-
Bug
-
Resolution: Duplicate
-
Critical
-
None
-
Jenkins v2.32.3, bitbucket-branch-source v2.1.1
I was wondering to get totally unrelated build status notifications in our "base-jenkins-lib" global CPS library repository.
Turned out that when the actual project's ("example-hello-world") job was run (which uses the "base-jenkins-lib" library) the notifications ended up in last Bitbucket commit for the library, not in the commit for the project.
Also note that it ended up exclusively in the commit of the library, no status was reported to the project's commit.
I guess it just takes the wrong SHA as two git sources are present when you use a global library:
Started by user admin > git rev-parse --is-inside-work-tree # timeout=10 Setting origin to ssh://git@stash.intranet.acme.com:7999/devops/example-hello-world.git > git config remote.origin.url ssh://git@stash.intranet.acme.com:7999/devops/example-hello-world.git # timeout=10 Fetching origin... Fetching upstream changes from origin > git --version # timeout=10 > git fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/* Seen branch in repository origin/feature/do-try-improved Seen branch in repository origin/feature/sonarqube Seen branch in repository origin/feature/xxx Seen branch in repository origin/master Seen 4 remote branches Obtained Jenkinsfile from 5dce620f781e59afb1e960aa6a8e32a1e0cf83b8 Loading library base-jenkins-lib@feature/do-try-improved > git rev-parse --is-inside-work-tree # timeout=10 Setting origin to ssh://git@stash.intranet.acme.com:7999/devops/base-jenkins-lib.git > git config remote.origin.url ssh://git@stash.intranet.acme.com:7999/devops/base-jenkins-lib.git # timeout=10 Fetching origin... Fetching upstream changes from origin > git --version # timeout=10 > git fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/* > git rev-parse feature/do-try-improved^{commit} # timeout=10 > git rev-parse origin/feature/do-try-improved^{commit} # timeout=10 > git rev-parse --is-inside-work-tree # timeout=10 Fetching changes from the remote Git repository > git config remote.origin.url ssh://git@stash.intranet.acme.com:7999/devops/base-jenkins-lib.git # timeout=10 Fetching upstream changes from ssh://git@stash.intranet.acme.com:7999/devops/base-jenkins-lib.git > git --version # timeout=10 > git fetch --tags --progress ssh://git@stash.intranet.acme.com:7999/devops/base-jenkins-lib.git +refs/heads/*:refs/remotes/origin/* Checking out Revision 43a8bcec5d1eb28df07b736a2fb82e08960a6121 (feature/do-try-improved) > git config core.sparsecheckout # timeout=10 > git checkout -f 43a8bcec5d1eb28df07b736a2fb82e08960a6121 > git rev-list 43a8bcec5d1eb28df07b736a2fb82e08960a6121 # timeout=10 [Bitbucket] Notifying commit build result [Pipeline] node Running on master in /var/lib/jenkins/workspace/-ci_feature_do-try-improved-6ALO3R3UJUUQTAP75WY5TGJTIY6TWKBVT2CR5G527CQ2OFRJ73UQ [Pipeline] { [Pipeline] echo ...
- duplicates
-
JENKINS-41996 Using a specific global library version in consumers sometimes causes notifications of build success/failure on the library that they consume
- Resolved
- is related to
-
JENKINS-41214 bitbucket branch source plugin notifies wrong repository
- Resolved