prosody-docker/Jenkinsfile
Morgan McMillian 14a7fe0d02
All checks were successful
thrrgilag/prosody-docker/pipeline/head This commit looks good
fix xmpp bot notification
2024-04-21 08:30:19 -07:00

32 lines
1.3 KiB
Groovy

pipeline {
agent none
environment {
CHAT = "spacenerdmo@clacks.network"
}
stages {
stage('Build docker image') {
agent { label 'docker-build' }
environment {
TAG = "${env.BRANCH_NAME == "main" ? "latest" : env.BRANCH_NAME}"
}
steps {
jabberNotify buildToChatNotifier: [$class: 'ExtraMessageOnlyBuildToChatNotifier'], extraMessage: 'Build Started', notifySuspects: true, targets: "${CHAT}"
script {
docker.withRegistry('https://git.dreamfall.space/spacenerdmo', 'thrrgilag-forgejo-pkg') {
def customImage = docker.build("git.dreamfall.space/spacenerdmo/prosody:${TAG}")
customImage.push()
}
}
}
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}"
}
}
}
}
}