Running a Pipeline

JFrog Pipelines Documentation

ft:sourceType
Paligo

Pipelines enables you to trigger all your pipelines manually. However, to create an efficient CI/CD process, you should configure your pipelines to be automatically triggered based on certain events. 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 that they execute in an interdependent sequence. This means that each step is configured so that its execution is triggered by the successful completion of a prior, prerequisite step (or steps). In this way, step 1's completion triggers 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.

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

gitRepoResource_24jun22.png

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

Trigger 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 the step you want to trigger.

    This displays the information box for that step.

  2. In the step's information box, click the "Trigger this step" button.

    image2019-12-5_12-52-49.png

The step executes, and its successful completion triggers 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 the step you want to execute.

    This displays the information box for that step.

  2. In the step's information box, click the "Trigger this step with custom configuration" button.

    image2019-12-5_12-54-9.png
  3. In the resulting Run with custom configuration dialog, you can override the configuration settings, then click Confirm.

    Note

    For more information, see the section Environment Variables Configuration.

    runWithCustomConfiguration_24jun22.png

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

View 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 you want to execute.

  2. While the step executes, click the step.

    This displays the information box for that step.

  3. In the information box, click Logs.

    logs_24jun22.png
  4. This displays the step log view Pipeline Run Logs view, where you can see the shell commands issued by the step as they are executed.