Skip to content

Commit 49de0a6

Browse files
alan-agius4dgp1130
authored andcommitted
ci: use branch filtering to run e2e-cli-ng-snapshots and e2e-cli-ng-ve-snapshots
Unlike PRs from users, when renovate opens a PR, the branch name will be in the following format `renovate/typescript-3.7.x` with `CIRCLE_BRANCH` being set to the same value. Also, `CIRCLE_PR_USERNAME` will not be defined in this case. Thus currently these 2 tasks are not being run for PRs which are being open by renovate. Example of such build: https://circleci.com/gh/angular/angular-cli/129384
1 parent 049fc79 commit 49de0a6

File tree

1 file changed

+10
-16
lines changed

1 file changed

+10
-16
lines changed

.circleci/config.yml

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -387,28 +387,22 @@ workflows:
387387
snapshots: true
388388
requires:
389389
- e2e-cli
390-
pre-steps:
391-
- run:
392-
name: Don't run expensive e2e snapshots tests for forks other than renovate-bot and angular
393-
command: >
394-
if [[ "$CIRCLE_PR_USERNAME" != "renovate-bot" ]] &&
395-
[[ "$CIRCLE_PROJECT_USERNAME" != "angular" || $CIRCLE_BRANCH != "master" ]]; then
396-
circleci step halt
397-
fi
390+
filters:
391+
branches:
392+
only:
393+
- /renovate\/.+/
394+
- master
398395
- e2e-cli:
399396
name: e2e-cli-ng-ve-snapshots
400397
snapshots: true
401398
ve: true
402399
requires:
403400
- e2e-cli
404-
pre-steps:
405-
- run:
406-
name: Don't run expensive e2e snapshots tests for forks other than renovate-bot and angular
407-
command: >
408-
if [[ "$CIRCLE_PR_USERNAME" != "renovate-bot" ]] &&
409-
[[ "$CIRCLE_PROJECT_USERNAME" != "angular" || $CIRCLE_BRANCH != "master" ]]; then
410-
circleci step halt
411-
fi
401+
filters:
402+
branches:
403+
only:
404+
- /renovate\/.+/
405+
- master
412406
- e2e-cli-node-10:
413407
<<: *ignore_pull_requests
414408
requires:

0 commit comments

Comments
 (0)