1

I have the below configuration for a GitRepo resource:

name: ExtBuildInfo_ReleaseGitRepo
  type: GitRepo
  configuration:
    gitProvider: Github
    path: myrepo/ext-build-info
    tags:
      include: ^v.*$
    buildOn:
      commit: false
      tagCreate: true
    cancelPendingRuns:
      newCommit: true

When i create a new release in Guthub I see two runs being queued for the pipeline. Why is this? Is there any configuration missing above?

Vivek Kodira
  • 2,764
  • 4
  • 31
  • 49

1 Answers1

0

In GitHub, creating a release sends two webhooks. One hook represents the "release" action and one represents the "tag" action. Both of these actions are supported by the GitRepo resource.

Normally, to react to both webhooks you would need to enable both settings:

name: ExtBuildInfo_ReleaseGitRepo
type: GitRepo
configuration:
  gitProvider: Github
  path: myrepo/ext-build-info
  tags:
    include: ^v.*$
  buildOn:
    commit: false
    tagCreate: true
    releaseCreate: true
  cancelPendingRuns:
    newCommit: true

Having both of these flags enabled can be a common source of double-triggering when creating a release.

In your case, I see that you don't have the "releaseCreate: true" in your yaml. In this case I would suggest that you check your GitHub repository settings to see if you might have 2 different webhooks configured that could be causing duplicate triggers. If you have two, I'd recommend deleting one of them to avoid the duplicate triggering.

Here's the full documentation on the GitRepo resource: https://www.jfrog.com/confluence/display/JFROG/GitRepo