GitRepo Tags

JFrog Pipelines Documentation

Products
JFrog Pipelines
Content Type
User Guide
ft:sourceType
Paligo

name

An alphanumeric string (underscores are permitted) that identifies the resource.

type

Must be GitRepo for this resource type.

configuration

Specifies all configuration selections for the resource.

Tag

Description

Required/Optional

gitProvider

The name of the source control integration. Currently supported integration types are:

Required

path

The path of the repository from the integration root.

The path can be hard coded or you can use {{.jfrog-pipelines.sourceRepository}} variable to reference the current pipeline source path.

Example

  - name: myFirstRepo
    type: GitRepo
    configuration:
      gitProvider: myGitHub
      path: {{.jfrog-pipelines.sourceRepository}}

Required

files

  • include -- (optional) Regular expression to include files meeting the pattern from the repo

  • exclude-- (optional) Regular expression to exclude files meeting the pattern from the repo

Note

  • If this tag is not specified, all files are matched by default.

  • This filter only applies to commit events, and not pull requests, tags, or releases.

Optional

branches

  • include -- (optional) Regular expression to include branches from the repo

  • exclude-- (optional) Regular expression to exclude branches from the repo

Supported regex

The branches tag supports the following regex:

^ $ . * & ? @ = ; : +

Examples:

^gitBranch$ (to trigger for that branch)

example.*

example+.&

example+:&@=.*$

^._example+:&.@=+;?.*$

example+.:&@=*;?1661337986460$

Note

If the tag is not specified, the default branch will be triggered.

Optional

recurseSubmodules

Set as true to clone all submodules in the repository. Default value is false.

Optional

pullRequestSourceBranches

  • include -- (optional) Regular expression to include pull requests from branches matching the pattern

  • exclude -- (optional) Regular expression to exclude pull requests from branches matching the pattern

Note

If this tag is not specified, all branches are matched by default.

Optional

pullRequestTargetBranches

  • include -- (optional) Regular expression to include pull requests to branches matching the pattern

  • exclude-- (optional) Regular expression to exclude pull requests to branches matching the pattern

Note

If this tag is not specified, the branches tag setting will apply to the target branch. If neither is specified, all branches are matched by default.

Optional

tags

Used to specify a collection of tags and releases upon which a new version is created

  • include -- (optional) Regular expression to include tags meeting the pattern from the repo

  • exclude-- (optional) Regular expression to exclude tags meeting the pattern from the repo

Note

If this tag is not specified, all tags are matched by default.

Optional

buildOn

Used to control whether the resource will be updated on specified events

  • branchCreate -- (default is false) used to control whether the resource will be updated when a branch is created. Note that when this is set as false, the resource is not updated and the resource version is not created.

  • branchDelete -- (default is false) used to control whether the resource will be updated when a branch is deleted. Note that when this is set as false, the resource is not updated and the resource version is not created.

  • commit-- (default is true) used to control whether the resource will be updated for commit webhooks. Note that when this is set as false, the resource is not updated and the resource version is not created.

  • pullRequestCreate -- (default is false) used to control whether the resource will be updated for pull request webhooks

  • pullRequestClose -- (default is false) used to control whether the resource will be updated for closing a pull request webhook

  • releaseCreate -- (default is false) used to control whether the resource will be updated for release webhooks

  • tagCreate -- (default is false) used to control whether the resource will be updated for tag webhooks

    Note

    In a multi-branch pipeline, when tagCreate is set as true and when you perform a commit or Git release with a specific tag, buildOn.commit will trigger only those branches that have the associated Git tag.

    This is applicable for GitHub only.

Note

If this tag is not specified, commit: true is the default setting.

For more information about using this tag, see Triggering On a Git Repository Change.

Optional

cancelPendingRunsOn

Used to control whether previously triggered runs are canceled for new webhooks

  • newCommit-- (default is false) Cancels previous processing or waiting runs for the same branch for commits, same tag name for tags, and same release name for releases.

  • pullRequestUpdate -- (default is false) Cancels previous processing or waiting runs for the same pull request number when a webhook is received for a pull request.

Note

All values for this tag are false by default.

For more information about using this tag, see Cancelling Previous Runs On a Git Repository Change.

Optional

shallowDepth

Uses a positive integer to set the depth at which the repo is (shallow) cloned/fetched

Note

If shallowDepth is not specified, no shallow clone options are passed to git. The full repo is cloned in its entirety.

Optional

cloneProtocol

Used to select the protocol to be used when cloning the repo. Supported values are ssh or https. Defaults to ssh.

Optional

pin

This configuration can be used to pin the resource to a specific version. The pinned resource version will be used by the steps that reference this resource as an input and newer versions will be ignored.

Users have two configuration options when selecting the GitRepo resource version to be pinned:

  • versionId -- Resource version Id (can be obtained through the UI)

Or

  • sha -- The commit sha to be pinned

Steps that use the resource as an output can still produce new versions. New versions will be visible for steps using the resource as an input as long as they are part of the same run of the step that created the version.

When creating a new run, manual custom trigger can still be used to override the pinned version to a different one.

Optional

Using Include and Exclude Patterns

When both include and exclude patterns are used, the following rules apply on the list of all the files in the commit change list :

  • All files that do not match the include pattern are removed

  • All files that do match the exclude pattern are removed

  • If any files are left, the resource is updated