Compare commits

..

2 commits

Author SHA1 Message Date
57f591d0a2 Switch build back to jenkins
All checks were successful
thrrgilag/partybot/pipeline/head This commit looks good
2023-11-10 12:20:57 -08:00
45ebe8d0b5 take out extra notification recipient from ci 2023-07-17 21:49:46 -07:00
3 changed files with 14 additions and 61 deletions

2
.gitignore vendored
View file

@ -63,3 +63,5 @@ target/
*.sublime-project *.sublime-project
*.sublime-workspace *.sublime-workspace
.vscode/ .vscode/
*.yaml
*.yml

View file

@ -18,5 +18,3 @@ pipeline:
from_secret: smtp_user from_secret: smtp_user
password: password:
from_secret: smtp_pass from_secret: smtp_pass
recipients:
- morgan@clacks.network

71
Jenkinsfile vendored
View file

@ -1,76 +1,29 @@
pipeline { pipeline {
agent none agent none
environment { environment {
SNAPCRAFT_STORE_CREDENTIALS = credentials('snapcraft-store-credentials') CHAT = "devel@conference.mcmillian.dev"
}
options {
skipDefaultCheckout(true)
} }
stages { stages {
stage('Build docker image') { stage('Build docker image') {
agent { label 'docker-build' } agent { label 'docker-build' }
environment {
TAG = "${env.BRANCH_NAME == "main" ? "latest" : env.BRANCH_NAME}"
}
steps { steps {
// mattermostSend "Docker build started - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)" jabberNotify buildToChatNotifier: [$class: 'ExtraMessageOnlyBuildToChatNotifier'], extraMessage: 'Build Started', notifySuspects: true, targets: "${CHAT}"
cleanWs()
checkout scm
script { script {
docker.withRegistry('https://git.dreamfall.space/thrrgilag', 'docker-gitea-creds') { docker.withRegistry('https://git.dreamfall.space/thrrgilag', 'thrrgilag-forgejo-pkg') {
def customImage = docker.build('git.dreamfall.space/thrrgilag/partybot:latest') def customImage = docker.build("git.dreamfall.space/thrrgilag/partybot:${TAG}")
customImage.push() customImage.push()
} }
} }
} }
// post { post {
// success { success {
// mattermostSend color: "good", message: "Docker build success - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)" jabberNotify buildToChatNotifier: [$class: 'ExtraMessageOnlyBuildToChatNotifier'], extraMessage: 'Build Succeeded', notifySuspects: true, targets: "${CHAT}"
// }
// failure {
// mattermostSend color: "danger", message: "Docker build failure - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
// }
// }
}
stage('Build snap packages') {
when { expression { false == true } }
parallel {
stage('Build snap for ARM64') {
agent { label "snap-arm64" }
steps {
// mattermostSend "ARM64 Snap build started - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
cleanWs()
checkout scm
sh "snapcraft clean"
sh "snapcraft"
}
post {
success {
// mattermostSend color: "good", message: "ARM64 Snap build success - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
archiveArtifacts artifacts: '*.snap'
sh "snapcraft upload --release=edge *.snap"
}
// failure {
// mattermostSend color: "danger", message: "ARM64 Snap build failure - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
// }
}
} }
stage('Build snap for AMD64') { failure {
agent { label "snap-amd64" } jabberNotify buildToChatNotifier: [$class: 'ExtraMessageOnlyBuildToChatNotifier'], extraMessage: 'Build Failed', notifySuspects: true, targets: "${CHAT}"
steps {
// mattermostSend "AMD64 Snap build Started - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
cleanWs()
checkout scm
sh "snapcraft clean"
sh "snapcraft"
}
post {
success {
// mattermostSend color: "good", message: "AMD64 Snap build success - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
archiveArtifacts artifacts: '*.snap'
sh "snapcraft upload --release=edge *.snap"
}
// failure {
// mattermostSend color: "danger", message: "AMD64 Snap build failure - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
// }
}
} }
} }
} }