Cloud customer?
Start for Free >
Upgrade in MyJFrog >
What's New in Cloud >







Overview

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.

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.


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.

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.


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

    For more information, see the section Environment Variables Configuration.


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.

  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.


View Step History

There could be times when you want to view a step's execution history, to view the previous time a step was triggered or for debugging purposes.

To view a step's history:

  1. Click the step.
  2. Click Step History.
    This displays the Step History window, which shows various details about the step.
  3. Use the filter option to filter the step by status.

Cancel Runs and Steps

When a run is in progress, you may want to cancel a step or the run to either update the pipeline or free up resources.

You can cancel:

  • A specific active step
  • A specific active run
  • All active runs

Only runs in non-terminal status (Processing, Cancelling, and so on) or waiting in queue to be executed can be canceled. Runs in terminal status (Success, Error, and Failure) cannot be canceled.

Cancel a Specific Step

You can cancel execution of a run in progress by cancelling execution of a step. When a step is canceled, all subsequent dependent steps of the pipeline are skipped. The record of the run is logged in the pipeline history.

To cancel a step:

  1. While the step executes, click the step.
    This displays the information box for that step.
  2. In the information box, click the Cancel This Step button.

or

  1. While the step executes, click the active run and hover over the step you want to cancel.
  2. Click the Cancel icon that appears on the right-hand side.
  3. Click Confirm.

Cancel a Specific Run

To cancel a specific run:

In the Pipelines tab:

  1. Click the Pipelines tab and click the relevant pipeline.
  2. Click the Cancel button on the right-hand side.
  3. Click Confirm.


    1. Click the Pipelines tab and click the relevant pipeline.
    2. Hover over the run you want to cancel.
    3. Click the Cancel icon that appears on the right-hand side.
    4. Click Confirm.

    or

    1. Click the run you want to cancel.
    2. Click the vertical ellipsis icon and click Cancel run.
    3. Click Confirm.

or

In the Active Runs tab:

  1. Click the Active Runs tab and click the relevant pipeline.
  2. Hover over the run you want to cancel.
  3. Click the Cancel icon that appears on the right-hand side.
  4. Click Confirm.

Cancel Multiple Runs

To cancel multiple runs:

  1. In the Active Runs tab, click the check box for the runs you want to cancel.
    Or click the check box on top to select all the active runs.
  2. Click the Cancel icon on top.
  3. Click Confirm.
  • No labels
Copyright © 2023 JFrog Ltd.