From 78a3d57bd6fd89c71750219ce1b7167c203a2040 Mon Sep 17 00:00:00 2001 From: Morgan McMillian Date: Fri, 10 Nov 2023 09:58:31 -0800 Subject: [PATCH] test notificaiton and tag strategy --- Jenkinsfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2f59c16..64ba908 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -3,11 +3,15 @@ pipeline { stages { stage('Build docker image') { agent { label 'test-build' } + environment { + TAG = "${env.BRANCH_NAME == "main" ? "latest" : env.BRANCH_NAME}" + } steps { // mattermostSend "Docker build started - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)" + jabberNotify buildToChatNotifier: [$class: 'ExtraMessageOnlyBuildToChatNotifier'], extraMessage: 'Build Started', targets: '...' script { docker.withRegistry('https://git.dreamfall.space/thrrgilag', 'thrrgilag-forgejo-pkg') { - def customImage = docker.build("git.dreamfall.space/thrrgilag/prosody:${env.BUILD_TAG}") + def customImage = docker.build("git.dreamfall.space/thrrgilag/prosody:${TAG}") customImage.push() } }