CircleCI cannot vary parallelism
parameter based on environment variable. But you can define different jobs (or even a single job with a parameter), and pick one to run based on branches, see config docs
To see effective config
circleci config process circle.yml | sed /^#/d
So we do the following: in the workflow we call same job depending on the branch filters, and we pass a parameter to the job to control parallelism
.
- if this is a
master
or internal branch and internal pull request, the branch name will be whatever you set it to. - if pull request is coming from external forked branch, then the branch will be named
pull/<number>
See circle.yml and compare the runs
- master branch on two machines
- internal branch on two machines
- external pull request from a forked repo on one machine