-
Bug
-
Resolution: Fixed
-
Major
-
Jenkins 2.32.3
Gitlab plugin 1.4.5
I have a setup where a gitlab commit will trigger via webhook a jenkins Multi-Branch pipeline. The pipeline uses the CPS library, i.e. the Jenkinsfile starts like this:
@Library('mylib@master')
import ....
import ....
When the pipeline is triggered it checks out the library from a git repo. So we have several checkouts:
- Checkout the repository that contains the code to build (the webhook trigger) to read the Jenkinsfile (gitlab server 1)
- After the Jenkinsfile is parsed the repository that contains the library is checked out (gitlab server 2)
- Inside the pipeline i checkout the main repository one more time to build it (gitlab server 1)
With Pipeline: Multibranch vesion 2.12 the gitlab commit status was updated correctly - i have a code similar to this in the pipeline:
gitlabCommitStatus(name: 'Build Repository') {
......
}
However after i updated Pipeline: Multibranch to version 2.13 and restarted jenkins the commits in GitLab are no longer updated. In the jenkins logs i see this:
Retrieving the gitlab project id from remote url https://gitlab server 1/myusername/pipeline-shared-library.git
Mar 07, 2017 1:38:49 PM FINE com.dabsquared.gitlabjenkins.util.CommitStatusUpdater
Project (myusername/pipeline-shared-library) and commit (af88dcda9dc5e6a2eb06c563e6ec410b191893d6) combination not found
'pipeline-shared-library.git' is the repo that contains the pipeline cps library, but it is located on the gitlab server 2 not the gitlab server 1 (that's why the repo + commit combinations cannot be found in the message above). Just to note that af88dcda9dc5e6a2eb06c563e6ec410b191893d6 is the last commit id in the pipeline-shared-library.git repo.
Teh main problem is that this is the wrong commit/repo to update ....
I think this is somehow related to Jenkins-33273 but i'm not sure.
Updating the Multibranch plugin was the only thing that i did so there is nothing else to affect the behavior.