Trigger a Pipeline Run Automatically

JFrog Pipelines Documentation

Products
JFrog Pipelines
Content Type
User Guide
ft:sourceType
Paligo

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.