3 ms·
Its possible to include and exclude different stages of the build with any criteria you like using the `when` block. Referring to this example https://gist.git
by i386 10y ago
Its possible to include and exclude different stages of the build with any criteria you like using the `when` block.
Referring to this example https://gist.github.com/i386/5bacc640574c6d79bb72cd9a1181a505 https://gist.github.com/i386/5bacc640574c6d79bb72cd9a1181a50... if I have a branch called 'feature/cool-feature' then only the stages Build and Test would be run. If the branch is called 'master', all stages in the Pipeline would be run.
'when' also supports environment variables and expressions and even multiple `when` blocks - see the docs at https://jenkins.io/doc/book/pipeline/syntax/#when https://jenkins.io/doc/book/pipeline/syntax/#when