Containing a series of 1 or higher phase directives, the phases part is when the majority of the “work” described with a Pipeline will be found. At least, it is suggested that phases have one or more stage directive for every discrete an element of the constant distribution procedure, such as for example develop, Test, and Deploy.
Only one time, within the pipeline block.
The actions section defines a few a number of actions become performed in a provided stage directive.
Inside each phase block.
The environment directive specifies a sequence of key-value pairs which is thought as environment variables for many actions, or steps that are stage-specific according to where in fact the environment directive is situated inside the Pipeline.
This directive supports a helper that is special credentials() that could be used to get into pre-defined qualifications by their identifier when you look at the Jenkins environment.
Within the pipeline block, or within phase directives.
Supported Qualifications Type
the environmental surroundings adjustable specified will undoubtedly be set to your Text that is secret content
the environmental surroundings adjustable specified is likely to be set towards the located area of the File file that is temporarily developed
the surroundings adjustable specified is likely to be set to username:password as well as 2 extra environment factors will undoubtedly be immediately defined: MYVARNAME_USR and MYVARNAME_PSW correspondingly.
SSH with Private Key
the surroundings adjustable specified will soon be set to your located area of the SSH key file that is temporarily produced as well as 2 extra environment factors might be automatically defined: MYVARNAME_USR and MYVARNAME_PSW (holding the passphrase).
Unsupported credentials kind causes the pipeline to fail utilizing the message: No binding that is suitable might be discovered for kind .
Your options directive enables configuring Pipeline-specific choices from within the Pipeline it self. Pipeline provides a quantity of the choices, such as for example buildDiscarder , nevertheless they are often supplied by plugins, such as for example timestamps .
Only one time, within the pipeline block.
Persist items and output that is console the precise amount of present Pipeline runs. For instance: choices
Perform the automated supply control checkout in a subdirectory associated with workplace. For instance: choices
Disallow concurrent executions regarding the Pipeline. They can be handy for preventing accesses that are simultaneous provided resources, etc. For instance: choices
Don’t allow the pipeline to resume in the event that controller restarts. As an example: choices
Used in combination with docker or dockerfile agent that is top-level. Whenever specified, each phase title loans Connecticut will run in a fresh container example for a passing fancy node, in the place of all phases operating into the exact same container example.
Allows overriding standard therapy of branch indexing causes. If branch indexing causes are disabled during the multibranch or company label, choices will allow them with this work just. Otherwise, choices will disable branch indexing causes because of this working work just.
Keep stashes from finished builds, to be used with phase restarting. For instance: choices to protect the stashes through the latest finished create, or choices to preserve the stashes through the five newest finished builds.
Set the peaceful duration, in moments, when it comes to Pipeline, overriding the international standard. For instance: choices
The entire Pipeline the specified number of times on failure, retry. For instance: choices
Skip looking at rule from supply control by standard into the agent directive. As an example: choices
Skip stages as soon as the create status moved to UNSTABLE. As an example: choices
Set a timeout duration for the Pipeline run, after which it Jenkins should abort the Pipeline. For instance: choices
Prepend all system production generated by the Pipeline run using the right time of which the line ended up being emitted. For instance: choices
Set failfast real for many subsequent synchronous phases in the pipeline. As an example: choices
A comprehensive directory of available choices is pending the conclusion of INFRA-1503.
Your options directive for a stage is comparable to the choices directive during the base of the Pipeline. Nevertheless, the stage options that are-level just include actions like retry , timeout , or timestamps , or Declarative choices being strongly related a phase , like skipDefaultCheckout .
In a very phase , the actions into the choices directive are invoked before going into the representative or checking any when conditions.