Skip to content

Commit

Permalink
ci: use conditional statments instead of bash script
Browse files Browse the repository at this point in the history
  • Loading branch information
alan-agius4 authored and clydin committed Jul 18, 2022
1 parent 14f7760 commit 34dd595
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .circleci/dynamic_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -382,12 +382,15 @@ workflows:
nodeversion: '16.10'
snapshots: true
pre-steps:
- run:
name: Check if e2e snapshots should be executed.
command: >
if [[ "<<pipeline.parameters.snapshot_changed>>" != "true" ]] && [[ -n "{$CIRCLE_PULL_REQUEST}" ]]; then
circleci-agent step halt
fi
- when:
condition:
and:
- not:
equal: [main, << pipeline.git.branch >>]
- not: << pipeline.parameters.snapshot_changed >>
steps:
# Don't run snapshot E2E's unless it's on the main branch or the snapshots file has been updated.
- run: circleci-agent step halt
requires:
- build
filters:
Expand Down

0 comments on commit 34dd595

Please sign in to comment.