-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The plugin triggers builds for PRs with same number in different repositories #65
Comments
Definitely not intended behavior. Trying to figure out what is different in your setup though, since we don't hit this problem and we have thousands of PRs across hundreds of repositories. |
Ah, I missed originally that this is for a GitHub Organization Folder job. How did you configure this plugin for the folder? See also #1 as this describes some of what might be involved. Otherwise I think you are the first one (or the first to report) to try this. |
Hello, In the Jenkins organization folder, we just have the following (relevant?) settings: I think these are the most relevant ones. I also have "Pull request" event configured in the Github webhook, and if I remove the "Trigger build on PR comment", a build will be triggered if I update one of the PRs, but it will trigger only for the relevant repo. I had a quick look in the plugin code, as I was looking for the "Triggered build for <...>" source (from the log snippet), and if I interpreted it correctly, it will get all jobs, and if it matches the PR number, and the configured keyword, it will start a build: |
I believe this is a misconfigured. As mentioned in #1, the trigger must be added in the Jenkinsfile and not on the organization folder itself. I think what is happening (just a guess though without actually seeing the config) is that the folder is the GitHubSCMSource and since it has the property on it, it triggers everything underneath it. |
Jenkins and plugins versions report
Environment
Jenkins: 2.346.3
OS: Linux - 4.14.326-245.539.amzn2.x86_64
Java: 11.0.16 - Eclipse Adoptium (OpenJDK 64-Bit Server VM)
.....
branch-api:2.1071.v1a_188a_562481
git:4.14.3
git-client:3.13.1
github:1.34.5
github-api:1.303-400.v35c2d8258028
github-branch-source:1696.v3a_7603564d04
github-checks:1.0.19
github-pr-comment-build:96.v9ff13b69dd66
......
What Operating System are you using (both controller, and any agents involved in the problem)?
OS: Linux - 4.14.326-245.539.amzn2.x86_64
Reproduction steps
Expected Results
The expected result would be that a build is triggered only in the repository in which the comment was posted
Actual Results
Builds are triggered for every "repository" in Jenkins that matches the PR number which sent the Github event
In the image above, a comment with the expected keyword was posted on first PR in the sw-prj-repo3 repository
Anything else?
Here is a log snippet:
Is this the intended behavior?
The text was updated successfully, but these errors were encountered: