Cloud customer?
 Upgrade in MyJFrog >

Search





Overview

This page describes the methods and procedures for triggering an automatic or manual run of a pipeline.


When creating an automated pipeline, you should define your steps so they will execute in an interdependent sequence. This means that each step is configured so that its execution will be triggered by the successful completion of a prior, prerequisite step (or steps). In this way, step 1's completion will trigger the execution of step 2, completion of step 2 triggers execution of step 3, and so on until all steps in the pipeline are executed.

Trigger a Run Automatically

In most cases, you will want your pipeline to initiate execution automatically as the result of some external event that causes a resource to change. This is configured by defining a step's inputResources.

For example, you are likely to want to trigger a run whenever there is a new commit into a source code repository.

To set your source code repo as the pipeline trigger:

  1. If you haven't already, add a GitHub integration (or other source control system type) to JFrog Pipelines.
  2. In your resources definitions of your pipeline config, define a gitrepo resource type for the project repository, with a descriptive name (for example, "myprojectrepo").
  3. In the definition of the first step of your pipeline, specify the gitrepo resource in inputResources. For extra clarity, you can also specify trigger as true (even though that is the default). For example:
    inputResources:
    - name:
    myprojectrepo
      trigger: true

When triggering runs through a GitRepo resource, adding [skipRun] to a commit message won't trigger anything when that commit is pushed to the source provider.

Page Contents

When the completed pipeline is viewed, the gitrepo resource is shown as a triggering input into the step.

Other example events might be a change to an Image resource, or receipt through a Webhook.


Triggering a Run Manually

You can trigger a run of any step through the pipeline visualization. To manually run the entire pipeline, trigger the first step in the workflow.

With default configuration

To manually trigger a step:

  1. Click on the step. This will display the information box for that step.
  2. In the step's information box, click the "Trigger this step" button.

The step will execute, and its successful completion will trigger the subsequent steps of the pipeline. The record of the run is logged in the pipeline history.


With custom configuration

You can trigger a run of any step and provide a set of custom settings to test a specific set of conditions.

To manually trigger a step with custom settings:

  1. Click on the step. This will display the information box for that step.
  2. In the step's information box, click the "Trigger this step with custom configuration" button.


  3. In the resulting Run with custom configuration dialog, you can override the configuration settings, then click Confirm.

The step will execute with the custom settings, and its successful completion will trigger the subsequent steps of the pipeline. The record of the run is logged in the pipeline history.



Viewing Step Execution

You can view the shell commands issued as the step is executing.

To view real-time execution of a step:

  1. Trigger the step to execute.
  2. While the step executes, click on the step. This will display the information box for that step.
  3. In the information box, click "View Logs".


  4. This will call up the step log view, where you can see the shell commands issued by the step as they are executed.



Cancelling a Run

You can cancel execution of a run in progress by cancelling execution of a step.

To cancel a step:

  1. While the step executes, click on the step. This will display the information box for that step.
  2. In the information box, click the "Cancel This Step" button.

The step will cancel execution, and subsequent dependent steps of the pipeline will be skipped. The record of the run is logged in the pipeline history.


  • No labels
Copyright © 2020 JFrog Ltd.