Morgan McMillian
c7098685dd
All checks were successful
git.dreamfall.space/jenkins-mercurial/pipeline/head This commit looks good
35 lines
1.5 KiB
Groovy
35 lines
1.5 KiB
Groovy
pipeline {
|
|
agent none
|
|
environment {
|
|
CHAT = "spacenerdmo@clacks.network"
|
|
MAIL = "morgan@mcmillian.dev"
|
|
}
|
|
stages {
|
|
stage('Build docker image') {
|
|
agent { label 'docker-build' }
|
|
environment {
|
|
TAG = "lts"
|
|
}
|
|
steps {
|
|
jabberNotify buildToChatNotifier: [$class: 'ExtraMessageOnlyBuildToChatNotifier'], extraMessage: 'Build Started', notifySuspects: true, targets: "${CHAT}"
|
|
script {
|
|
docker.withRegistry('https://git.dreamfall.space/spacenerdmo', 'spacenerdmo-pkg-pub') {
|
|
def customImage = docker.build("git.dreamfall.space/spacenerdmo/jenkins-mercurial:${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}"
|
|
mail to: "${MAIL}",
|
|
subject: "Deploy Failed: ${currentBuild.fullDisplayName}",
|
|
body: "Something is wrong with ${env.BUILD_URL}"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|