Refactor Jenkins pipeline

This commit is contained in:
nsubiron 2018-07-10 16:26:05 +02:00
parent e930133ebb
commit 83e16d065f
1 changed files with 13 additions and 22 deletions

35
Jenkinsfile vendored
View File

@ -6,7 +6,7 @@ pipeline {
} }
options { options {
buildDiscarder(logRotator(numToKeepStr: '6', artifactNumToKeepStr: '6')) buildDiscarder(logRotator(numToKeepStr: '3', artifactNumToKeepStr: '3'))
} }
stages { stages {
@ -14,24 +14,15 @@ pipeline {
stage('Setup') { stage('Setup') {
steps { steps {
sh 'make setup' sh 'make setup'
}
}
stage('Download Content') {
steps {
sh './Update.sh' sh './Update.sh'
} }
} }
stage('LibCarla') { stage('Build') {
steps { steps {
sh 'make LibCarla' sh 'make LibCarla'
}
}
stage('PythonAPI') {
steps {
sh 'make PythonAPI' sh 'make PythonAPI'
sh 'make CarlaUE4Editor'
} }
} }
@ -39,11 +30,11 @@ pipeline {
steps { steps {
sh 'make check ARGS="--all --xml"' sh 'make check ARGS="--all --xml"'
} }
} post {
always {
stage('CarlaUE4Editor') { junit 'Build/test-results/*.xml'
steps { archiveArtifacts 'profiler.csv'
sh 'make CarlaUE4Editor' }
} }
} }
@ -51,18 +42,18 @@ pipeline {
steps { steps {
sh 'make package' sh 'make package'
} }
post {
always {
archiveArtifacts 'Dist/*.tar.gz'
}
}
} }
} }
post { post {
always { always {
junit 'Build/test-results/*.xml'
archiveArtifacts 'profiler.csv'
archiveArtifacts 'Dist/*.tar.gz'
deleteDir() deleteDir()
} }
} }
} }