The YAML schema for the TriggerPipeline native step is as follows:
An alphanumeric string (underscores are permitted) that identifies the step.
TriggerPipeline for this step type.
Description of usage
Specifies an JFrog Platform Access Token Integration. This integration should contain a token that has the appropriate level of access to trigger the specified pipeline.
The name of the pipeline that you want to trigger
The name of the step that you want to trigger
The name of the branch that you want to trigger. This should be used if your target pipeline comes from a multibranch pipeline source.
May be required
|The unique key of the Project that contains the pipeline that you want to trigger. This should only be used if your target pipeline belongs to a Project.|
May be required
In addition, these tags can be defined to support the step's native operation:
Tags derived from Bash
All native steps derive from the Bash step. This means that all steps share the same base set of tags from Bash, while native steps have their own additional tags as well that support the step's particular function. So it's important to be familiar with the Bash step definition, since it's the core of the definition of all other steps.
executionDeclares collections of shell command sequences to perform for pre- and post-execution phases:
|Tag||Description of usage||Required/Optional|
|Commands to execute in advance of the native operation. This is the ideal place to utilize the ||Optional|
|Commands to execute on successful completion||Optional|
|Commands to execute on failed completion||Optional|
|Commands to execute on any completion||Optional|
The actions performed for the
onExecute phase are inherent to this step type and may not be overridden.
The TriggerPipeline step utilizes several new environment variables to provide as much information as possible.
These variables can be used to configure the behavior of the
How frequently, in seconds, the step should poll for its nested run status.
Defaults to 10 seconds
These variables are injected into the environment of the target pipeline
|parent_step_id||The unique ID of the TriggerPipeline step|
|parent_step_name||The name of the TriggerPipeline step|
|parent_step_url||The URL that links to the TriggerPipeline step|
|parent_run_id||The unique ID of the run that the TriggerPipeline step belongs to|
|parent_run_number||The run number of the run that the TriggerPipeline step belongs to|
These variables are exported into the
TriggerPipeline step environment after the target pipeline's run completes.
|nested_run_status||The final status of the triggered run (can be success, failure, error, canceled, timeout, or skipped)|
|nested_run_number||The run number of the triggered run.|
|nested_run_duration_seconds||The total duration of the triggered run (in seconds)|
|nested_run_url||The URL that links to the triggered step|
The following example shows how to configure a
This example requires a JFrog Platform Access Token integration.
How it Works
When you use the TriggerPipeline native step in a pipeline, it performs the following functions in the background:
- GET /projects (if projectKey is provided, the projectId is found)
- GET /pipelines (find the pipeline by its name)
- GET /pipelineSteps (find the step by its name)
- POST /pipelineSteps/:id/trigger (trigger a run starting from the specified step)
- GET /runs/:id (poll the run to check its status)