Skip to content

Commit

Permalink
build: use shared circleci dev-infra for common circleci code
Browse files Browse the repository at this point in the history
This allows us to remove the `rebase-pr.js` script
so that we can maintain this script in a single place.
  • Loading branch information
devversion authored and clydin committed Sep 21, 2022
1 parent 6ddcc36 commit d829d73
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 109 deletions.
28 changes: 14 additions & 14 deletions .circleci/dynamic_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ version: 2.1

orbs:
browser-tools: circleci/browser-tools@1.1.3
devinfra: angular/dev-infra@1.0.1

parameters:
snapshot_changed:
Expand Down Expand Up @@ -102,19 +103,18 @@ commands:

rebase_pr:
steps:
- run:
name: Rebase PR on target branch
shell: bash
command: >
if [[ -n "${CIRCLE_PR_NUMBER}" ]]; then
# User is required for rebase.
git config user.name "angular-ci"
git config user.email "angular-ci"
# Rebase PR on top of target branch.
node tools/rebase-pr.js angular/angular-cli ${CIRCLE_PR_NUMBER}
else
echo "This build is not over a PR, nothing to do."
fi
- devinfra/rebase-pr-on-target-branch:
base_revision: << pipeline.git.base_revision >>
head_revision: << pipeline.git.revision >>

rebase_pr_win:
steps:
- devinfra/rebase-pr-on-target-branch:
base_revision: << pipeline.git.base_revision >>
head_revision: << pipeline.git.revision >>
# Use `bash.exe` as Shell because the CircleCI-orb command is an
# included Bash script and expects Bash as shell.
shell: bash.exe

custom_attach_workspace:
description: Attach workspace at a predefined location
Expand Down Expand Up @@ -367,7 +367,7 @@ jobs:
parallelism: 16
steps:
- checkout
- rebase_pr
- rebase_pr_win
- setup_windows
- restore_cache:
keys:
Expand Down
95 changes: 0 additions & 95 deletions tools/rebase-pr.js

This file was deleted.

0 comments on commit d829d73

Please sign in to comment.