diff --git a/.circleci/config.yml b/.circleci/config.yml index b8f615d3050d..23a30c3979bd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -102,8 +102,6 @@ aliases: workflows: test_and_release: - when: - is: pull_request # Only include pull_requests jobs: - create_release_pull_request: <<: *rc_branch_only @@ -112,8 +110,13 @@ workflows: - trigger-beta-build: requires: - prep-deps - - check-pr-tag - - prep-deps + - validate-pr-for-mmi: + requires: + - check-pr + - check-pr + - prep-deps: + requires: + - check-pr - get-changed-files-with-git-diff: <<: *exclude_develop_master_rc requires: @@ -180,7 +183,7 @@ workflows: - prep-build-test-mmi-playwright: requires: - prep-deps - - check-pr-tag + - validate-pr-for-mmi - prep-build-storybook: requires: - prep-deps @@ -190,7 +193,9 @@ workflows: - test-lint: requires: - prep-deps - - test-lint-shellcheck + - test-lint-shellcheck: + requires: + - check-pr - test-lint-lockfile: requires: - prep-deps @@ -415,22 +420,32 @@ jobs: name: Create GitHub Pull Request for version command: .circleci/scripts/release-create-release-pr.sh - check-pr-tag: + check-pr: docker: - image: cimg/base:stable steps: - run: - name: Check for MMI Team Tag + name: Check if branch has a linked PR command: | #!/bin/bash - GH_LABEL=team-mmi if [ -z "$CIRCLE_PULL_REQUESTS" ]; then - echo "Skipping tag check; this is not a PR." - echo "false" > ./RUN_MMI_OPTIONAL - exit 0 + echo "This branch has no associated pull request. Terminating pipeline build" + exit 1 + else + echo "This branch has associated pull request." fi + validate-pr-for-mmi: + docker: + - image: cimg/base:stable + steps: + - run: + name: Check for MMI Team Tag + command: | + #!/bin/bash + + GH_LABEL=team-mmi echo $CIRCLE_PULL_REQUESTS | sed 's/,/\n/g' # See if any associated PRs have matching label