jenkinsci / jenkinsci/github-branch-source-plugin
[JENKINS-53624] Branch indexing schedules builds for other branches and repos
- Dominant language
- Java
- Stars
- 217
- Forks
- 398
- Avg merge
- 30m
- Merged PRs (30d)
- 1
Description
Hello,
I'm having a problem that seems pretty much identical to this one for the Gitlab Branch Source Plugin: https://github.com/Argelbargel/gitlab-branch-source-plugin/issues/45
I'm assuming the root issue is very similar, if not identical. On Github webhook triggers a number of branch indexing jobs are kicked off for builds in the current repo, as well as for other repos. I'm using BlueOcean.
Questions:
1) Is this a known issue?
2) Is there a workaround?
3) As a possible means to come up with a workaround, are there any variables I can latch onto that would give me visibility into the context so in my Jenkinsfile pipeline I can do the following on branch indexing:
```
currentBuild.result = 'NOT_BUILT'
error('Aborting build triggered by scan process')
```
This was a suggestion in the above Gitlab thread, only I'm not seeing an equivalent to `gitlabActionType` in the list of environment variables (output with "env"). It would be great if I could ignore builds from branch indexing as a short term workaround without disabling the webhooks entirely.
---
Originally reported by
joeauty, imported from: Branch indexing schedules builds for other branches and repos
lanwen
Raw content of original issue
Hello,
I'm having a problem that seems pretty much identical to this one for the Gitlab Branch Source Plugin: https://github.com/Argelbargel/gitlab-branch-source-plugin/issues/45
I'm assuming the root issue is very similar, if not identical. On Github webhook triggers a number of branch indexing jobs are kicked off for builds in the current repo, as well as for other repos. I'm using BlueOcean.
Questions:
1) Is this a known issue?
2) Is there a workaround?
3) As a possible means to come up with a workaround, are there any variables I can latch onto that would give me visibility into the context so in my Jenkinsfile pipeline I can do the following on branch indexing:
currentBuild.result = 'NOT_BUILT'
error('Aborting build triggered by scan process')This was a suggestion in the above Gitlab thread, only I'm not seeing an equivalent to `gitlabActionType` in the list of environment variables (output with "env"). It would be great if I could ignore builds from branch indexing as a short term workaround without disabling the webhooks entirely.
Contributor guide
Assessment
This issue has not been assessed yet.