From b0b8d9f71a610b598986f8e7997eeeca0571b4c6 Mon Sep 17 00:00:00 2001 From: Nicolas MASSART Date: Tue, 14 Feb 2023 20:15:03 +0100 Subject: [PATCH] Revert "add e2e tests announcement on Slack (#5723)" (#5754) This reverts commit 17859777a81fe1407a23dc3944247f0672aaa971. --- bitrise.yml | 7 +--- package.json | 1 - scripts/metamask-bot-e2e-announce-bitrise.js | 41 -------------------- 3 files changed, 1 insertion(+), 48 deletions(-) delete mode 100755 scripts/metamask-bot-e2e-announce-bitrise.js diff --git a/bitrise.yml b/bitrise.yml index 1c364e0f08d..ff8ef983a5c 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -151,11 +151,6 @@ workflows: #!/usr/bin/env bash echo 'weew - everything passed!' title: All Tests Passed is_always_run: false - - yarn@0: - inputs: - - command: e2e:announce - title: Announcing e2e tests result - is_always_run: true # Parallel Build & Deploy Steps create_release_builds: before_run: @@ -198,7 +193,7 @@ workflows: - yarn@0: inputs: - command: build:announce - title: Announcing pre-release + title: Accouncing pre-release is_always_run: false create_qa_builds: before_run: diff --git a/package.json b/package.json index 5009d0365bc..298d5053ce2 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,6 @@ "start:android:e2e": "./scripts/build.sh android debugE2E", "build:static-logos": "node ./scripts/metamask-bot-build-generate-static-assets", "build:announce": "node ./scripts/metamask-bot-build-announce-bitrise.js", - "e2e:announce": "node ./scripts/metamask-bot-e2e-announce-bitrise.js", "build:android:release": "./scripts/build.sh android release", "build:android:release:e2e": "./scripts/build.sh android releaseE2E", "build:android:qa:e2e": "./scripts/build.sh android QAE2E", diff --git a/scripts/metamask-bot-e2e-announce-bitrise.js b/scripts/metamask-bot-e2e-announce-bitrise.js deleted file mode 100755 index d39b7be53ea..00000000000 --- a/scripts/metamask-bot-e2e-announce-bitrise.js +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env node -// eslint-disable-next-line import/no-commonjs -const axios = require('axios'); - -const SLACK_TOKEN = process.env.MM_SLACK_TOKEN; -const SLACK_SECRET = process.env.MM_SLACK_SECRET; -const SLACK_ROOM = process.env.MM_SLACK_ROOM; -const BITRISE_GIT_COMMIT = process.env.BITRISE_GIT_COMMIT; -const BITRISE_GIT_COMMIT_MESSAGE = process.env.BITRISE_GIT_MESSAGE; -const E2E_SUCCESS = process.env.BITRISE_BUILD_STATUS || false; -const BITRISE_BUILD_URL = process.env.BITRISE_BUILD_URL; -const BITRISE_BUILD_NUMBER = process.env.BITRISE_BUILD_NUMBER; -const GIT_REPOSITORY_URL = 'https://github.com/MetaMask/metamask-mobile'; -const BITRISE_APP_TITLE = process.env.BITRISE_APP_TITLE; - -start().catch(console.error); - -async function start() { - const content = { - text: `*${ - E2E_SUCCESS === '0' - ? ':large_green_circle: SUCCESSFUL' - : ':red_circle: FAILED' - } E2E tests* for ${BITRISE_APP_TITLE} <${BITRISE_BUILD_URL}|build #${BITRISE_BUILD_NUMBER}>`, - attachments: [ - { - title_link: `${GIT_REPOSITORY_URL}/commit/${BITRISE_GIT_COMMIT}`, - title: `commit #${BITRISE_GIT_COMMIT}`, - text: BITRISE_GIT_COMMIT_MESSAGE, - }, - ], - }; - - const JSON_PAYLOAD = JSON.stringify(content); - const SLACK_API_URI = `https://hooks.slack.com/services/${SLACK_TOKEN}/${SLACK_SECRET}/${SLACK_ROOM}`; - - const headers = { - 'Content-type': 'application/json', - }; - await axios.post(SLACK_API_URI, JSON_PAYLOAD, { headers }); -}