From a5bfd500ca3a0353040561089379daa29a041a72 Mon Sep 17 00:00:00 2001 From: Nick Cabatoff Date: Tue, 11 Jan 2022 09:02:47 -0500 Subject: [PATCH] Skip tests on backported docs branches. (#13612) * Remove unnecessary branch filters; we rely instead on exiting the jobs on inappropriate branches, since otherwise GH's required checks won't be satisfied. --- .circleci/config.yml | 18 ++++-------------- .../commands/exit-if-ui-or-docs-branch.yml | 2 +- .circleci/config/workflows/ci.yml | 12 ------------ 3 files changed, 5 insertions(+), 27 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d73c777bc..d885e6f79 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -173,7 +173,7 @@ jobs: - run: command: | # If the branch being tested starts with ui/ or docs/ we want to exit the job without failing - [[ "$CIRCLE_BRANCH" = ui/* || "$CIRCLE_BRANCH" = docs/* ]] && { + [[ "$CIRCLE_BRANCH" = ui/* || "$CIRCLE_BRANCH" = docs/* || "$CIRCLE_BRANCH" = backport/docs/* ]] && { # stop the job from this step circleci-agent step halt } @@ -370,7 +370,7 @@ jobs: - run: command: | # If the branch being tested starts with ui/ or docs/ we want to exit the job without failing - [[ "$CIRCLE_BRANCH" = ui/* || "$CIRCLE_BRANCH" = docs/* ]] && { + [[ "$CIRCLE_BRANCH" = ui/* || "$CIRCLE_BRANCH" = docs/* || "$CIRCLE_BRANCH" = backport/docs/* ]] && { # stop the job from this step circleci-agent step halt } @@ -580,7 +580,7 @@ jobs: - run: command: | # If the branch being tested starts with ui/ or docs/ we want to exit the job without failing - [[ "$CIRCLE_BRANCH" = ui/* || "$CIRCLE_BRANCH" = docs/* ]] && { + [[ "$CIRCLE_BRANCH" = ui/* || "$CIRCLE_BRANCH" = docs/* || "$CIRCLE_BRANCH" = backport/docs/* ]] && { # stop the job from this step circleci-agent step halt } @@ -852,7 +852,7 @@ jobs: - run: command: | # If the branch being tested starts with ui/ or docs/ we want to exit the job without failing - [[ "$CIRCLE_BRANCH" = ui/* || "$CIRCLE_BRANCH" = docs/* ]] && { + [[ "$CIRCLE_BRANCH" = ui/* || "$CIRCLE_BRANCH" = docs/* || "$CIRCLE_BRANCH" = backport/docs/* ]] && { # stop the job from this step circleci-agent step halt } @@ -1067,19 +1067,9 @@ workflows: requires: - pre-flight-checks - test-go-race: - filters: - branches: - ignore: - - /^docs\/.*/ - - /^ui\/.*/ requires: - pre-flight-checks - test-go-race-remote-docker: - filters: - branches: - ignore: - - /^docs\/.*/ - - /^ui\/.*/ requires: - pre-flight-checks - website-docker-image: diff --git a/.circleci/config/commands/exit-if-ui-or-docs-branch.yml b/.circleci/config/commands/exit-if-ui-or-docs-branch.yml index d2edf67e0..322091f70 100644 --- a/.circleci/config/commands/exit-if-ui-or-docs-branch.yml +++ b/.circleci/config/commands/exit-if-ui-or-docs-branch.yml @@ -6,7 +6,7 @@ steps: name: Check branch name command: | # If the branch being tested starts with ui/ or docs/ we want to exit the job without failing - [[ "$CIRCLE_BRANCH" = ui/* || "$CIRCLE_BRANCH" = docs/* ]] && { + [[ "$CIRCLE_BRANCH" = ui/* || "$CIRCLE_BRANCH" = docs/* || "$CIRCLE_BRANCH" = backport/docs/* ]] && { # stop the job from this step circleci-agent step halt } diff --git a/.circleci/config/workflows/ci.yml b/.circleci/config/workflows/ci.yml index f6e27aaaa..15c6b7f40 100644 --- a/.circleci/config/workflows/ci.yml +++ b/.circleci/config/workflows/ci.yml @@ -34,21 +34,9 @@ jobs: - test-go-race: requires: - pre-flight-checks - filters: - branches: - # UI and Docs-only branches should skip go tests - ignore: - - /^docs\/.*/ - - /^ui\/.*/ - test-go-race-remote-docker: requires: - pre-flight-checks - filters: - branches: - # UI and Docs-only branches should skip go tests - ignore: - - /^docs\/.*/ - - /^ui\/.*/ - website-docker-image: context: vault-docs filters: