move cleanup to start of build stage
All checks were successful
dreamfall/partybot/pipeline/head This commit looks good

This commit is contained in:
Morgan McMillian 2022-11-29 11:19:51 -08:00
parent 41725fa57e
commit d47c9daf4f

17
Jenkinsfile vendored
View file

@ -3,6 +3,9 @@ pipeline {
environment {
SNAPCRAFT_STORE_CREDENTIALS = credentials('snapcraft-store-credentials')
}
options {
skipDefaultCheckout(true)
}
stages {
stage('Build snap packages') {
parallel {
@ -10,7 +13,9 @@ pipeline {
agent { label "snap-arm64" }
steps {
mattermostSend "ARM64 Snap build started - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
sh "rm *.snap || true"
cleanWs()
// sh "rm *.snap || true"
checkout scm
sh "snapcraft"
}
post {
@ -22,16 +27,15 @@ pipeline {
failure {
mattermostSend color: "danger", message: "ARM64 Snap build failure - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
}
always {
cleanWs()
}
}
}
stage('Build snap for AMD64') {
agent { label "snap-amd64" }
steps {
mattermostSend "AMD64 Snap build Started - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
sh "rm *.snap || true"
cleanWs()
// sh "rm *.snap || true"
checkout scm
sh "snapcraft"
}
post {
@ -43,9 +47,6 @@ pipeline {
failure {
mattermostSend color: "danger", message: "AMD64 Snap build failure - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
}
always {
cleanWs()
}
}
}
}