Skip to content

Commit d829d73

Browse files
devversionclydin
authored andcommitted
build: use shared circleci dev-infra for common circleci code
This allows us to remove the `rebase-pr.js` script so that we can maintain this script in a single place.
1 parent 6ddcc36 commit d829d73

File tree

2 files changed

+14
-109
lines changed

2 files changed

+14
-109
lines changed

.circleci/dynamic_config.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ version: 2.1
1111

1212
orbs:
1313
browser-tools: circleci/browser-tools@1.1.3
14+
devinfra: angular/dev-infra@1.0.1
1415

1516
parameters:
1617
snapshot_changed:
@@ -102,19 +103,18 @@ commands:
102103

103104
rebase_pr:
104105
steps:
105-
- run:
106-
name: Rebase PR on target branch
107-
shell: bash
108-
command: >
109-
if [[ -n "${CIRCLE_PR_NUMBER}" ]]; then
110-
# User is required for rebase.
111-
git config user.name "angular-ci"
112-
git config user.email "angular-ci"
113-
# Rebase PR on top of target branch.
114-
node tools/rebase-pr.js angular/angular-cli ${CIRCLE_PR_NUMBER}
115-
else
116-
echo "This build is not over a PR, nothing to do."
117-
fi
106+
- devinfra/rebase-pr-on-target-branch:
107+
base_revision: << pipeline.git.base_revision >>
108+
head_revision: << pipeline.git.revision >>
109+
110+
rebase_pr_win:
111+
steps:
112+
- devinfra/rebase-pr-on-target-branch:
113+
base_revision: << pipeline.git.base_revision >>
114+
head_revision: << pipeline.git.revision >>
115+
# Use `bash.exe` as Shell because the CircleCI-orb command is an
116+
# included Bash script and expects Bash as shell.
117+
shell: bash.exe
118118

119119
custom_attach_workspace:
120120
description: Attach workspace at a predefined location
@@ -367,7 +367,7 @@ jobs:
367367
parallelism: 16
368368
steps:
369369
- checkout
370-
- rebase_pr
370+
- rebase_pr_win
371371
- setup_windows
372372
- restore_cache:
373373
keys:

tools/rebase-pr.js

Lines changed: 0 additions & 95 deletions
This file was deleted.

0 commit comments

Comments
 (0)