Skip to content

Commit e0c001f

Browse files
authored
chore: extract/consolidate contributor pr workflow (#32494)
* add husky script to build circleci yml files * add circleci cli as a required tool for working with .circleci * break the original workflows.yml file into separate pieces, using circleci config pack to compose them into the main workflows.yml file * fix pull request workflow def * more robust precommit for circleci packing * even nicer stdout for precommit :) * allow pr pipeline on this branch * split up the config.yml to demonstrate more fully * remove linux-x64-contributor workflow, use contributor workflow to kick off pull-request workflow after approval * do not run pull-request for contributor prs that have not been approved * use job level continuation * try using continuation orb as a job step * move contributor pr approval to the setup config * fix parameters * json? * json? * need to check out to be able to pass config path to continuation * use dynamic config to be able to lint etc contributor prs before approval * maybe if parameter is direct? * debug? * auto-approve contributor gate when launched as an internal pr * vastly simplify, use job filter * fix * fix conditional on pr pipeline * rm contributor pr flag on build job, use local env var instead * does not use context for contrib prs
1 parent 86d9c84 commit e0c001f

File tree

3 files changed

+178
-461
lines changed

3 files changed

+178
-461
lines changed

.circleci/src/pipeline/@pipeline.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1497,9 +1497,6 @@ jobs:
14971497
resource_class:
14981498
type: string
14991499
default: large
1500-
is_contributor_pr:
1501-
type: boolean
1502-
default: false
15031500
resource_class: << parameters.resource_class >>
15041501
steps:
15051502
- restore_cached_workspace
@@ -1518,8 +1515,9 @@ jobs:
15181515
command: yarn list --depth=0 || true
15191516
- run:
15201517
name: Check env canaries
1521-
command: node ./scripts/circle-env.js --check-canaries --is-contributor-pr <<
1522-
parameters.is_contributor_pr >>
1518+
command: |
1519+
IS_CONTRIBUTOR_PR=$([[ "<< pipeline.git.branch >>" =~ ^pull/[0-9]+$ ]] && echo "true" || echo "false")
1520+
node ./scripts/circle-env.js --check-canaries --is-contributor-pr $IS_CONTRIBUTOR_PR
15231521
- build-and-persist
15241522

15251523
lint:

0 commit comments

Comments
 (0)