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-workspace
.vscode/
*.yaml
*.yml

View file

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

71
Jenkinsfile vendored
View file

@ -1,76 +1,29 @@
pipeline {
agent none
environment {
SNAPCRAFT_STORE_CREDENTIALS = credentials('snapcraft-store-credentials')
}
options {
skipDefaultCheckout(true)
CHAT = "devel@conference.mcmillian.dev"
}
stages {
stage('Build docker image') {
agent { label 'docker-build' }
environment {
TAG = "${env.BRANCH_NAME == "main" ? "latest" : env.BRANCH_NAME}"
}
steps {
// mattermostSend "Docker build started - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
cleanWs()
checkout scm
jabberNotify buildToChatNotifier: [$class: 'ExtraMessageOnlyBuildToChatNotifier'], extraMessage: 'Build Started', notifySuspects: true, targets: "${CHAT}"
script {
docker.withRegistry('https://git.dreamfall.space/thrrgilag', 'docker-gitea-creds') {
def customImage = docker.build('git.dreamfall.space/thrrgilag/partybot:latest')
docker.withRegistry('https://git.dreamfall.space/thrrgilag', 'thrrgilag-forgejo-pkg') {
def customImage = docker.build("git.dreamfall.space/thrrgilag/partybot:${TAG}")
customImage.push()
}
}
}
// post {
// success {
// mattermostSend color: "good", message: "Docker build success - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
// }
// 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>)"
// }
}
post {
success {
jabberNotify buildToChatNotifier: [$class: 'ExtraMessageOnlyBuildToChatNotifier'], extraMessage: 'Build Succeeded', notifySuspects: true, targets: "${CHAT}"
}
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>)"
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>)"
// }
}
failure {
jabberNotify buildToChatNotifier: [$class: 'ExtraMessageOnlyBuildToChatNotifier'], extraMessage: 'Build Failed', notifySuspects: true, targets: "${CHAT}"
}
}
}