From 5b3983bde022f8146db849e6aa6deea51483c403 Mon Sep 17 00:00:00 2001 From: Brian Peiris Date: Mon, 11 Jan 2021 18:42:53 -0500 Subject: [PATCH] Slack commands for promoting QA builds --- terraform/modules/slackbot/mr-ops-command-slackbot/main.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/terraform/modules/slackbot/mr-ops-command-slackbot/main.js b/terraform/modules/slackbot/mr-ops-command-slackbot/main.js index 684da8b..a0c39f0 100644 --- a/terraform/modules/slackbot/mr-ops-command-slackbot/main.js +++ b/terraform/modules/slackbot/mr-ops-command-slackbot/main.js @@ -44,6 +44,11 @@ function processEvent(event, callback) { const retPool = commandParts[3].trim(); const url = `${ciBaseUrl}?job=ret-deploy&RET_VERSION=${retVersion}&RET_POOL=${retPool}&token=${jtoken}&SOURCE=${user}`; https.get(url, () => { callback(null, "Reticulum deploy started. See #mr-push."); }); + } else if (commandText.startsWith("promote-ret-qa ") || commandText.startsWith("promote-hubs-qa ") || commandText.startsWith("promote-spoke-qa ")) { + const type = commandParts[0].trim(); + const packageIdent = commandParts[1].trim(); + const url = `${ciBaseUrl}?job=promote-qa&PACKAGE=${encodeURIComponent(packageIdent)}&TYPE=${type}&token=${jtoken}&SOURCE=${user}`; + https.get(url, () => { callback(null, "Promotion started."); }); } else if (commandText.startsWith("test ")) { const msg = commandParts[2].trim(); const url = `${ciBaseUrl}?job=bp-test&MSG=${msg}&token=${jtoken}&SOURCE=${user}`;