switch to jenkins build
This commit is contained in:
parent
ab5c6e7712
commit
d6e050ecf9
1 changed files with 21 additions and 11 deletions
32
Jenkinsfile
vendored
32
Jenkinsfile
vendored
|
@ -1,25 +1,35 @@
|
||||||
pipeline {
|
pipeline {
|
||||||
agent none
|
agent none
|
||||||
|
environment {
|
||||||
|
CHAT = "devel@conference.mcmillian.dev"
|
||||||
|
MAIL = "morgan@mcmillian.dev"
|
||||||
|
}
|
||||||
stages {
|
stages {
|
||||||
stage('Build docker image') {
|
stage('Build docker image') {
|
||||||
agent { label 'docker-build' }
|
agent { label 'docker-build' }
|
||||||
|
environment {
|
||||||
|
TAG = "${env.BRANCH_NAME == "main" ? "latest" : env.BRANCH_NAME}"
|
||||||
|
}
|
||||||
steps {
|
steps {
|
||||||
// mattermostSend "Docker build started - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
|
jabberNotify buildToChatNotifier: [$class: 'ExtraMessageOnlyBuildToChatNotifier'], extraMessage: 'Build Started', notifySuspects: true, targets: "${CHAT}"
|
||||||
script {
|
script {
|
||||||
docker.withRegistry('https://git.dreamfall.space/thrrgilag', 'docker-gitea-creds') {
|
docker.withRegistry('https://git.dreamfall.space/thrrgilag', 'thrrgilag-forgejo-pkg') {
|
||||||
def customImage = docker.build("git.dreamfall.space/thrrgilag/clacksme:latest")
|
def customImage = docker.build("git.dreamfall.space/thrrgilag/prosody:${TAG}")
|
||||||
customImage.push()
|
customImage.push()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// post {
|
post {
|
||||||
// success {
|
success {
|
||||||
// mattermostSend color: "good", message: "Docker build success - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
|
jabberNotify buildToChatNotifier: [$class: 'ExtraMessageOnlyBuildToChatNotifier'], extraMessage: 'Build Succeeded', notifySuspects: true, targets: "${CHAT}"
|
||||||
// }
|
}
|
||||||
// failure {
|
failure {
|
||||||
// mattermostSend color: "danger", message: "Docker build failure - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
|
jabberNotify buildToChatNotifier: [$class: 'ExtraMessageOnlyBuildToChatNotifier'], extraMessage: 'Build Failed', notifySuspects: true, targets: "${CHAT}"
|
||||||
// }
|
mail to: "${MAIL}"
|
||||||
// }
|
// subject: "Build Failed: ${currentBuild.fullDisplayName}",
|
||||||
|
// body: "Something is wrong with ${env.BUILD_URL}"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue