Abhishek
Abhishek

Reputation: 529

Jfrog pipelines - how to cancel runs on repository updates?

Is there a way to cancel my active existing pipeline runs whenever a change is pushed to my repository?

Upvotes: 1

Views: 53

Answers (1)

Deepika Banoth
Deepika Banoth

Reputation: 361

Yes, you can set cancelPendingRunsOn for the triggarable GitRepo resources in order to cancel all the previous runs.

For example:

resources:
  - name: my_app_repo
    type: GitRepo
    configuration:
      gitProvider: my_github
      path: myuser/repo-name
      branches:
        include: master
      cancelPendingRunsOn:
        newCommit: true
        pullRequestUpdate: true

You can enable this variable for new commit and also for pullRequest update. Please refer this documentation for more information https://www.jfrog.com/confluence/display/JFROG/GitRepo

Upvotes: 2

Related Questions