prosody-docker/Jenkinsfile

32 lines
1.3 KiB
Text
Raw Normal View History

2023-11-09 15:55:30 -08:00
pipeline {
agent none
2023-11-10 11:17:39 -08:00
environment {
CHAT = "devel@conference.mcmillian.dev"
}
2023-11-09 15:55:30 -08:00
stages {
stage('Build docker image') {
2023-11-10 10:00:30 -08:00
agent { label 'docker-build' }
2023-11-10 09:58:31 -08:00
environment {
TAG = "${env.BRANCH_NAME == "main" ? "latest" : env.BRANCH_NAME}"
}
2023-11-09 15:55:30 -08:00
steps {
2023-11-10 11:17:39 -08:00
jabberNotify buildToChatNotifier: [$class: 'ExtraMessageOnlyBuildToChatNotifier'], extraMessage: 'Build Started', notifySuspects: true, targets: "${CHAT}"
2023-11-09 15:55:30 -08:00
script {
2023-11-09 17:59:41 -08:00
docker.withRegistry('https://git.dreamfall.space/thrrgilag', 'thrrgilag-forgejo-pkg') {
2023-11-10 09:58:31 -08:00
def customImage = docker.build("git.dreamfall.space/thrrgilag/prosody:${TAG}")
2023-11-09 15:55:30 -08:00
customImage.push()
}
}
}
2023-11-10 11:17:39 -08:00
post {
success {
jabberNotify buildToChatNotifier: [$class: 'ExtraMessageOnlyBuildToChatNotifier'], extraMessage: 'Build Succeeded', notifySuspects: true, targets: "${CHAT}"
}
failure {
jabberNotify buildToChatNotifier: [$class: 'ExtraMessageOnlyBuildToChatNotifier'], extraMessage: 'Build Failed', notifySuspects: true, targets: "${CHAT}"
}
}
2023-11-09 15:55:30 -08:00
}
}
}