From my understanding the workflow, at the top level, can contain a true / false condition which is great. My question is: Is it possible to apply conditions to specific jobs inside the workflow. for example:
- If
production
the following jobs are triggered onmaster
branch - if
development
another set of jobs are triggered ondevelopment
branch
They would be passed as pipline parameters and I would image look something like this.
parameters:
run-production:
type: boolean
default: false
...
workflows:
version: 2
node-android-ios:
jobs:
- node
- android-prod:
when: << pipeline.parameters.run-production >>
requires:
- node
filters:
branches:
only: master
- ios-prod:
when: << pipeline.parameters.run-production >>
requires:
- node
filters:
branches:
only: master
- android-beta:
unless: << pipeline.parameters.run-production >>
requires:
- node
filters:
branches:
only: development
- ios-beta:
unless: << pipeline.parameters.run-production >>
requires:
- node
filters:
branches:
only: development
Thanks in advance for the assist.