Add jenkins build file
All checks were successful
thrrgilag/prosody-docker/pipeline/head This commit looks good
All checks were successful
thrrgilag/prosody-docker/pipeline/head This commit looks good
This commit is contained in:
parent
b2cb592278
commit
f55a924e36
1 changed files with 31 additions and 0 deletions
31
Jenkinsfile
vendored
Normal file
31
Jenkinsfile
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
pipeline {
|
||||
agent none
|
||||
environment {
|
||||
CHAT = "devel@conference.mcmillian.dev"
|
||||
}
|
||||
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 {
|
||||
docker.withRegistry('https://git.dreamfall.space/thrrgilag', 'thrrgilag-forgejo-pkg') {
|
||||
def customImage = docker.build("git.dreamfall.space/thrrgilag/prosody:${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}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue