-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
Jenkins: v2.105
GIT plugin: v4.0.0-beta2
GIT client plugin: v3.0.0-beta3
Hello.
My setup contains multibranch pipeline project driven by Jenkins (declarative) file.
Jenkinsfile fraction:
triggers { pollSCM('') }
And I start Jenkins with:
-Dhudson.plugins.git.GitStatus.safeParameters=pullRequestId,toBranch,toHash,mergeCommit,fromHash,action,author,reviewers
Once new commit is detected on my Bitbucket server, Pull Request Notifier for Bitbucket plugin sends notifyCommit request to the Jenkins. notifyCommit request contains both, sha1 and branches parameters. SHA1=5c5e0c03cbab1dae0dcb9f755689ac1cfca653c9 and branches=feature/jen3.
However, Jenkins spawns two builds from this very request (#101 and #102):
Event log (notice that "Processed 2 branches"):
[Mon Jun 11 13:08:41 CEST 2018] Received jenkins.plugins.git.GitSCMSource$ListenerImpl$1 UPDATED event from 10.29.1.239 ⇒ https://***/git/notifyCommit with timestamp Mon Jun 11 13:08:41 CEST 2018 > /opt/rh/rh-git29/root/usr/bin/git-launch.sh rev-parse --is-inside-work-tree # timeout=10 Setting origin to ssh://git@***:7999/jen/jenkins.git > /opt/rh/rh-git29/root/usr/bin/git-launch.sh config remote.origin.url ssh://git@***:7999/jen/jenkins.git # timeout=10 Fetching & pruning origin... Fetching upstream changes from origin > /opt/rh/rh-git29/root/usr/bin/git-launch.sh --version # timeout=10 using GIT_SSH to set credentials > /opt/rh/rh-git29/root/usr/bin/git-launch.sh fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/* --prune Listing remote references... > /opt/rh/rh-git29/root/usr/bin/git-launch.sh config --get remote.origin.url # timeout=10 using GIT_SSH to set credentials > /opt/rh/rh-git29/root/usr/bin/git-launch.sh ls-remote -h ssh://git@***:7999/jen/jenkins.git # timeout=10 Checking branches... Checking branch feature/jen3 ‘Jenkinsfile’ found Met criteria Changes detected: feature/jen3 (0e8de89af3183f9f6daac7bd9e40203a0465799d → 5c5e0c03cbab1dae0dcb9f755689ac1cfca653c9) Scheduled build for branch: feature/jen3 Processed 2 branches (query complete) [Mon Jun 11 13:08:42 CEST 2018] jenkins.plugins.git.GitSCMSource$ListenerImpl$1 UPDATED event from 10.29.1.239 ⇒ https://***/git/notifyCommit with timestamp Mon Jun 11 13:08:41 CEST 2018 processed in 1 sec
notifyCommit request contains additional parameters and the exclamation mark means that build #101 has been spawned without the parameters provided (have when clause inside stages).
Build #101:
See the branch name "feature/jen3"
Build #102:
Branch name is different "origin/feature/jen3"
Build #103:
Was also triggered by notifyCommit, but with manual trigger by clicking a button (supported by the Bitbucket plugin) while no new changes has been made to the repository.
—
- Is that normal behavior that Jankins is processing two branches (even though they are the same, aren't they?) or is it a bug?
Thank you.