prosody-docker/Jenkinsfile

32 lines
1.3 KiB
Plaintext
Raw Normal View History

2023-11-10 19:20:12 +00:00
pipeline {
agent none
environment {
2024-04-21 15:30:19 +00:00
CHAT = "spacenerdmo@clacks.network"
2023-11-10 19:20:12 +00:00
}
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 {
2024-04-13 14:44:23 +00:00
docker.withRegistry('https://git.dreamfall.space/spacenerdmo', 'thrrgilag-forgejo-pkg') {
def customImage = docker.build("git.dreamfall.space/spacenerdmo/prosody:${TAG}")
2023-11-10 19:20:12 +00:00
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}"
}
}
}
}
}