2022-11-11 06:30:35 +00:00
|
|
|
pipeline {
|
2022-11-13 05:49:45 +00:00
|
|
|
agent none
|
2022-11-13 14:45:56 +00:00
|
|
|
environment {
|
|
|
|
SNAPCRAFT_STORE_CREDENTIALS = credentials('snapcraft-store-credentials')
|
|
|
|
}
|
2022-11-29 19:19:51 +00:00
|
|
|
options {
|
|
|
|
skipDefaultCheckout(true)
|
|
|
|
}
|
2022-11-11 06:30:35 +00:00
|
|
|
stages {
|
2022-11-30 01:58:57 +00:00
|
|
|
stage('Build docker image') {
|
|
|
|
agent { label 'docker-build' }
|
|
|
|
steps {
|
2022-11-30 03:44:16 +00:00
|
|
|
cleanWs()
|
|
|
|
checkout scm
|
2022-11-30 01:58:57 +00:00
|
|
|
script {
|
2022-11-30 03:44:16 +00:00
|
|
|
docker.withRegistry('https://git.dreamfall.space', 'jenkins-gitea-id') {
|
2022-11-30 01:58:57 +00:00
|
|
|
def customImage = docker.build('partybot:${env.BUILD_ID}')
|
|
|
|
|
|
|
|
customImage.push()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-11-13 05:46:30 +00:00
|
|
|
stage('Build snap packages') {
|
2022-11-30 01:58:57 +00:00
|
|
|
when { expression { false == true } }
|
2022-11-13 05:46:30 +00:00
|
|
|
parallel {
|
2022-11-13 14:45:56 +00:00
|
|
|
stage('Build snap for ARM64') {
|
2022-11-13 05:46:30 +00:00
|
|
|
agent { label "snap-arm64" }
|
2022-11-13 15:30:04 +00:00
|
|
|
steps {
|
2022-11-29 05:45:18 +00:00
|
|
|
mattermostSend "ARM64 Snap build started - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
|
2022-11-29 19:19:51 +00:00
|
|
|
cleanWs()
|
|
|
|
checkout scm
|
2022-11-29 20:12:13 +00:00
|
|
|
sh "snapcraft clean"
|
2022-11-13 15:30:04 +00:00
|
|
|
sh "snapcraft"
|
|
|
|
}
|
2022-11-13 14:45:56 +00:00
|
|
|
post {
|
|
|
|
success {
|
2022-11-29 05:45:18 +00:00
|
|
|
mattermostSend color: "good", message: "ARM64 Snap build success - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
|
2022-11-29 16:59:30 +00:00
|
|
|
archiveArtifacts artifacts: '*.snap'
|
2022-11-30 01:58:57 +00:00
|
|
|
sh "snapcraft upload --release=edge *.snap"
|
2022-11-13 14:45:56 +00:00
|
|
|
}
|
2022-11-29 05:45:18 +00:00
|
|
|
failure {
|
|
|
|
mattermostSend color: "danger", message: "ARM64 Snap build failure - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
|
|
|
|
}
|
2022-11-13 14:45:56 +00:00
|
|
|
}
|
2022-11-13 05:46:30 +00:00
|
|
|
}
|
2022-11-13 14:45:56 +00:00
|
|
|
stage('Build snap for AMD64') {
|
2022-11-13 05:46:30 +00:00
|
|
|
agent { label "snap-amd64" }
|
2022-11-13 15:30:04 +00:00
|
|
|
steps {
|
2022-11-29 05:45:18 +00:00
|
|
|
mattermostSend "AMD64 Snap build Started - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
|
2022-11-29 19:19:51 +00:00
|
|
|
cleanWs()
|
|
|
|
checkout scm
|
2022-11-29 20:12:13 +00:00
|
|
|
sh "snapcraft clean"
|
2022-11-13 15:30:04 +00:00
|
|
|
sh "snapcraft"
|
|
|
|
}
|
2022-11-13 14:45:56 +00:00
|
|
|
post {
|
|
|
|
success {
|
2022-11-29 05:45:18 +00:00
|
|
|
mattermostSend color: "good", message: "AMD64 Snap build success - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
|
2022-11-29 16:59:30 +00:00
|
|
|
archiveArtifacts artifacts: '*.snap'
|
2022-11-30 01:58:57 +00:00
|
|
|
sh "snapcraft upload --release=edge *.snap"
|
2022-11-13 14:45:56 +00:00
|
|
|
}
|
2022-11-29 05:45:18 +00:00
|
|
|
failure {
|
|
|
|
mattermostSend color: "danger", message: "AMD64 Snap build failure - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
|
|
|
|
}
|
2022-11-13 14:45:56 +00:00
|
|
|
}
|
2022-11-13 05:46:30 +00:00
|
|
|
}
|
2022-11-13 04:49:18 +00:00
|
|
|
}
|
2022-11-11 06:30:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|