move cleanup to start of build stage
All checks were successful
dreamfall/partybot/pipeline/head This commit looks good
All checks were successful
dreamfall/partybot/pipeline/head This commit looks good
This commit is contained in:
parent
41725fa57e
commit
d47c9daf4f
1 changed files with 9 additions and 8 deletions
17
Jenkinsfile
vendored
17
Jenkinsfile
vendored
|
@ -3,6 +3,9 @@ pipeline {
|
||||||
environment {
|
environment {
|
||||||
SNAPCRAFT_STORE_CREDENTIALS = credentials('snapcraft-store-credentials')
|
SNAPCRAFT_STORE_CREDENTIALS = credentials('snapcraft-store-credentials')
|
||||||
}
|
}
|
||||||
|
options {
|
||||||
|
skipDefaultCheckout(true)
|
||||||
|
}
|
||||||
stages {
|
stages {
|
||||||
stage('Build snap packages') {
|
stage('Build snap packages') {
|
||||||
parallel {
|
parallel {
|
||||||
|
@ -10,7 +13,9 @@ pipeline {
|
||||||
agent { label "snap-arm64" }
|
agent { label "snap-arm64" }
|
||||||
steps {
|
steps {
|
||||||
mattermostSend "ARM64 Snap build started - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
|
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"
|
sh "snapcraft"
|
||||||
}
|
}
|
||||||
post {
|
post {
|
||||||
|
@ -22,16 +27,15 @@ pipeline {
|
||||||
failure {
|
failure {
|
||||||
mattermostSend color: "danger", message: "ARM64 Snap build failure - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
|
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') {
|
stage('Build snap for AMD64') {
|
||||||
agent { label "snap-amd64" }
|
agent { label "snap-amd64" }
|
||||||
steps {
|
steps {
|
||||||
mattermostSend "AMD64 Snap build Started - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
|
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"
|
sh "snapcraft"
|
||||||
}
|
}
|
||||||
post {
|
post {
|
||||||
|
@ -43,9 +47,6 @@ pipeline {
|
||||||
failure {
|
failure {
|
||||||
mattermostSend color: "danger", message: "AMD64 Snap build failure - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
|
mattermostSend color: "danger", message: "AMD64 Snap build failure - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
|
||||||
}
|
}
|
||||||
always {
|
|
||||||
cleanWs()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue