Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ parameters:
publish-binary-branch:
type: string
default: main
force-persist-artifacts:
type: boolean
default: false

commands:
persist:
Expand Down
13 changes: 10 additions & 3 deletions .circleci/src/pipeline/@pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
Loading