prosody-docker/Jenkinsfile

30 lines
1.3 KiB
Text
Raw Normal View History

2023-11-09 23:55:30 +00:00
pipeline {
agent none
stages {
stage('Build docker image') {
2023-11-10 18:00:30 +00:00
agent { label 'docker-build' }
2023-11-10 17:58:31 +00:00
environment {
TAG = "${env.BRANCH_NAME == "main" ? "latest" : env.BRANCH_NAME}"
}
2023-11-09 23:55:30 +00:00
steps {
// mattermostSend "Docker build started - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
2023-11-10 17:58:31 +00:00
jabberNotify buildToChatNotifier: [$class: 'ExtraMessageOnlyBuildToChatNotifier'], extraMessage: 'Build Started', targets: '...'
2023-11-09 23:55:30 +00:00
script {
2023-11-10 01:59:41 +00:00
docker.withRegistry('https://git.dreamfall.space/thrrgilag', 'thrrgilag-forgejo-pkg') {
2023-11-10 17:58:31 +00:00
def customImage = docker.build("git.dreamfall.space/thrrgilag/prosody:${TAG}")
2023-11-09 23:55:30 +00:00
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>)"
// }
// }
}
}
}