github-plugin icon indicating copy to clipboard operation
github-plugin copied to clipboard

[JENKINS-59242] github webhook triggers the job which is defined ONLY SHOULD be triggered on TAGS

Open jenkins-infra-bot opened this issue 6 years ago • 0 comments

Hi,

We have a job that triggering on tags with github webhook, but now it can be triggered by almost all Github actions, such as creating/deleting branches, committing codes/pulling request to branches, etc.  However the other jobs are working well even those are defined to be triggered on tags. I've tried to copy the working job's Jenkinsfile onto the issue job but had no luck as I got the same result.

In the past, this issue happened sometimes, and it can be resolved by temporary disabling the job or unchecking "GitHub hook trigger for GITScm polling" under "Build Triggers", but this time it doesn't work anymore.

Below is the checkout code:
checkout([$class: 'GitSCM', branches: [[name: '**/tags/**']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: '$MyCredentialsId', refspec: '+refs/tags/*:refs/remotes/origin/tags/*', url: '$Github_Url']]])


Originally reported by thinkinfinite, imported from: github webhook triggers the job which is defined ONLY SHOULD be triggered on TAGS
  • assignee: lanwen
  • status: Open
  • priority: Minor
  • component(s): github-plugin
  • label(s): github-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 1
  • imported: 2025-12-08
Raw content of original issue

Hi,

We have a job that triggering on tags with github webhook, but now it can be triggered by almost all Github actions, such as creating/deleting branches, committing codes/pulling request to branches, etc.  However the other jobs are working well even those are defined to be triggered on tags. I've tried to copy the working job's Jenkinsfile onto the issue job but had no luck as I got the same result.

In the past, this issue happened sometimes, and it can be resolved by temporary disabling the job or unchecking "GitHub hook trigger for GITScm polling" under "Build Triggers", but this time it doesn't work anymore.

Below is the checkout code: checkout([$class: 'GitSCM', branches: [[name: '**/tags/**']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: '$MyCredentialsId', refspec: '+refs/tags/*:refs/remotes/origin/tags/*', url: '$Github_Url']]])

environment
org.jenkins-ci.main:jenkins-war:2.174<br/>
GitHub plugin:1.29.4
1 attachment

jenkins-infra-bot avatar Sep 05 '19 08:09 jenkins-infra-bot