add to jenkins
Some checks failed
git.dreamfall.space/pnut-matrix/pipeline/head There was a failure building this commit

This commit is contained in:
Morgan McMillian 2024-12-25 07:25:19 -08:00
parent 4f15f7751b
commit 88b02977c6

31
Jenkinsfile vendored Normal file
View file

@ -0,0 +1,31 @@
pipeline {
agent none
environment {
CHAT = "devel@groups.clacks.network"
}
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/spacenerdmo', 'pnut-matrix') {
def customImage = docker.build("git.dreamfall.space/spacenerdmo/pnut-matrix:${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}"
}
}
}
}
}