Skip to content
Open
Show file tree
Hide file tree
Changes from 4 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
5 changes: 4 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ workflows:
parameters:
publish-binary-branch:
type: string
default: main
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" != "feat/support_next_16" ]]; 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