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 {
|
2023-11-10 20:20:57 +00:00
|
|
|
CHAT = "devel@conference.mcmillian.dev"
|
2022-11-29 19:19:51 +00:00
|
|
|
}
|
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' }
|
2023-11-10 20:20:57 +00:00
|
|
|
environment {
|
|
|
|
TAG = "${env.BRANCH_NAME == "main" ? "latest" : env.BRANCH_NAME}"
|
|
|
|
}
|
2022-11-30 01:58:57 +00:00
|
|
|
steps {
|
2023-11-10 20:20:57 +00:00
|
|
|
jabberNotify buildToChatNotifier: [$class: 'ExtraMessageOnlyBuildToChatNotifier'], extraMessage: 'Build Started', notifySuspects: true, targets: "${CHAT}"
|
2022-11-30 01:58:57 +00:00
|
|
|
script {
|
2023-11-10 20:20:57 +00:00
|
|
|
docker.withRegistry('https://git.dreamfall.space/thrrgilag', 'thrrgilag-forgejo-pkg') {
|
|
|
|
def customImage = docker.build("git.dreamfall.space/thrrgilag/partybot:${TAG}")
|
2022-11-30 01:58:57 +00:00
|
|
|
customImage.push()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-11-10 20:20:57 +00:00
|
|
|
post {
|
|
|
|
success {
|
|
|
|
jabberNotify buildToChatNotifier: [$class: 'ExtraMessageOnlyBuildToChatNotifier'], extraMessage: 'Build Succeeded', notifySuspects: true, targets: "${CHAT}"
|
2022-11-13 05:46:30 +00:00
|
|
|
}
|
2023-11-10 20:20:57 +00:00
|
|
|
failure {
|
|
|
|
jabberNotify buildToChatNotifier: [$class: 'ExtraMessageOnlyBuildToChatNotifier'], extraMessage: 'Build Failed', notifySuspects: true, targets: "${CHAT}"
|
2022-11-13 05:46:30 +00:00
|
|
|
}
|
2022-11-13 04:49:18 +00:00
|
|
|
}
|
2022-11-11 06:30:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|