Skip to content

Commit

Permalink
ci: fixed Jenkinsfile for upload-mirror
Browse files Browse the repository at this point in the history
  • Loading branch information
aleyeeey committed Jun 28, 2024
1 parent ad68472 commit fc9137f
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions .jenkins/upload-mirror
Original file line number Diff line number Diff line change
@@ -1,32 +1,36 @@
pipeline {
agent any
tools {
maven 'maven-3.9.6'
jdk 'ZULU8'
}
stages {
stage('Build with mirror-database profile') {
steps {
sh 'export MAVEN_HOME=/opt/maven'
sh 'export PATH=$PATH:$MAVEN_HOME/bin'
sh 'JAVA_HOME=/usr/lib/jvm/zulu-8-amd64 mvn -B clean install -Pmirror-database'
withMaven(maven: 'maven-3.9.6') {
sh 'mvn -B clean install -Pmirror-database'
}
}
}

stage('Push mirror-database artifacts to server') {
steps {
sh 'find . -name "*.jar" -exec curl -T {} http://ae-scanner/upload/mirror/{} \;'
sh "find . -name '*.jar' -exec curl -T {} http://ae-scanner/upload/mirror/{} \\;"
}
}

stage('Build with index-database profile') {
steps {
sh 'export MAVEN_HOME=/opt/maven'
sh 'export PATH=$PATH:$MAVEN_HOME/bin'
sh 'JAVA_HOME=/usr/lib/jvm/zulu-8-amd64 mvn -B clean install -Pindex-database'
withMaven(maven: 'maven-3.9.6') {
sh 'mvn -B clean install -Pindex-database'
}
}
}

stage('Push index-database artifacts to server') {
steps {
sh 'find . -name "*.jar" -exec curl -T {} http://ae-scanner/upload/index/{} \;'
sh "find . -name '*.jar' -exec curl -T {} http://ae-scanner/upload/index/{} \\;"
}
}
}
}
}

0 comments on commit fc9137f

Please sign in to comment.