prosody-docker/Jenkinsfile
Morgan McMillian 78a3d57bd6
Some checks reported errors
thrrgilag/prosody-docker/pipeline/head Something is wrong with the build of this commit
test notificaiton and tag strategy
2023-11-10 09:58:31 -08:00

29 lines
1.3 KiB
Groovy

pipeline {
agent none
stages {
stage('Build docker image') {
agent { label 'test-build' }
environment {
TAG = "${env.BRANCH_NAME == "main" ? "latest" : env.BRANCH_NAME}"
}
steps {
// mattermostSend "Docker build started - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
jabberNotify buildToChatNotifier: [$class: 'ExtraMessageOnlyBuildToChatNotifier'], extraMessage: 'Build Started', targets: '...'
script {
docker.withRegistry('https://git.dreamfall.space/thrrgilag', 'thrrgilag-forgejo-pkg') {
def customImage = docker.build("git.dreamfall.space/thrrgilag/prosody:${TAG}")
customImage.push()
}
}
}
// post {
// success {
// mattermostSend color: "good", message: "Docker build success - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
// }
// failure {
// mattermostSend color: "danger", message: "Docker build failure - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
// }
// }
}
}
}