diff --git a/.circleci/config.yml b/.circleci/config.yml index 72390b6ffd..e2c2bac023 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -16,6 +16,9 @@ parameters: publish-binary-branch: type: string default: main + force-persist-artifacts: + type: boolean + default: false commands: persist: diff --git a/.circleci/src/pipeline/@pipeline.yml b/.circleci/src/pipeline/@pipeline.yml index 7abef48d1e..46610ab075 100644 --- a/.circleci/src/pipeline/@pipeline.yml +++ b/.circleci/src/pipeline/@pipeline.yml @@ -18,6 +18,9 @@ parameters: publish-binary-branch: type: string default: main + force-persist-artifacts: + type: boolean + default: false orbs: browser-tools: circleci/browser-tools@2.3.1 @@ -121,9 +124,13 @@ commands: name: Set environment variable to determine whether or not to persist artifacts command: | echo "Setting SHOULD_PERSIST_ARTIFACTS variable" - echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "fix/angular_dep_resolution_windows" ]]; then - export SHOULD_PERSIST_ARTIFACTS=true - fi' >> "$BASH_ENV" + if [[ "<< pipeline.parameters.force-persist-artifacts >>" == "true" ]]; then + echo 'export SHOULD_PERSIST_ARTIFACTS=true' >> "$BASH_ENV" + else + echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* ]]; then + export SHOULD_PERSIST_ARTIFACTS=true + fi' >> "$BASH_ENV" + fi # You must run `setup_should_persist_artifacts` command and be using bash before running this command verify_should_persist_artifacts: steps: