build(job: “job name”, propagate: false)

Jenkins pipelines which execute jobs sequencially will fail if any of the jobs in the sequence fails. One of the ways to circumvent this rule – and to prevent the script from stopping the execution at a failed job – is using the “propagate: false” flag.

A job marked with this flag will be treated more “leniently”, meaning that even if it fails, the pipeline will keep on executing the remaining jobs.

The end result of the pipeline (pass/fail) will be determined based on those jobs which were “propagate: true”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s