From b9270ad41ab398eed90b7d7e0e98db3ac9dc6dcf Mon Sep 17 00:00:00 2001 From: Brian Peiris Date: Mon, 11 Jan 2021 19:33:49 -0500 Subject: [PATCH] have jenkins script build and message qa packages --- Jenkinsfile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2e677281ef..b6471bfbc0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -32,7 +32,8 @@ pipeline { def jobName = env.JOB_NAME def gitCommit = env.GIT_COMMIT def disableDeploy = env.DISABLE_DEPLOY - def promoteToChannel = env.PROMOTE_TO_CHANNEL + def showQAPromoteCommand = env.SHOW_QA_PROMOTE_COMMAND + def qaBuildsSlackChannel = env.QA_BUILDS_SLACK_CHANNEL def habCommand = ( "/bin/bash scripts/hab-build-and-push.sh " @@ -66,16 +67,15 @@ pipeline { def gitMessage = sh(returnStdout: true, script: "git log -n 1 --pretty=format:'[%an] %s'").trim() def gitSha = sh(returnStdout: true, script: "git log -n 1 --pretty=format:'%h'").trim() - if (promoteToChannel != null && promoteToChannel != "") { - runCommand("sudo /usr/bin/hab-ret-pkg-promote ${packageIdent} ${promoteToChannel}") - + if (showQAPromoteCommand == "true") { def text = ( "** *${jobName}* " + - "\n" + - " " + - "Promoted ${hubsVersion} to ${promoteToChannel}: ```${gitSha} ${gitMessage}```\n" + " ${hubsVersion} " + + "Hubs: ```${gitSha} ${gitMessage}```\n" + + "${packageIdent} built and uploaded - to promote:\n" + + "`/mr promote-hubs-qa ${packageIdent}`" ) - sendSlackMessage(text, "#mr-builds", ":gift:", slackURL) + sendSlackMessage(text, qaBuildsSlackChannel, ":gift:", slackURL) } else { def text = ( "** *${jobName}* " +