partybot/Jenkinsfile

32 lines
1.3 KiB
Plaintext
Raw Normal View History

2022-11-11 06:30:35 +00:00
pipeline {
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
}
}
}