Closed ananace closed 7 years ago
Hi again ;-)
i'll look into the NPE in GitLabSCMPublishAction. I'm not sure whether the other exception relates to gitlab-branch-source, though. Could also be a problem/bug in blueocean or the pubsub-light-plugin.
Considering the fact that it's talking about BlueOcean, I'm assuming that specific message relates to something in the BlueOcean UI. But I wanted to grab the entire log from the build just in case.
I'm curious though why there's not a single message from the build status publisher during the build though, seeing as it should be publishing build statuses for every stage.
An example layout for our templated pipeline;
stage('Source Preparation') {
if (steps.preprepare) {
steps.preprepare()
}
parallel(_wFallback(steps.prepare))
}
stage('Syntax Validation') {
parallel(_wFallback(steps.validate))
}
stage('Testing') {
parallel(_wFallback(steps.test))
}
stage('Packaging') {
parallel(_wFallback(steps.package))
}
stage('Deployment') {
parallel(_wFallback(steps.deploy))
}
I'm not sure myself, but it seems that calling getActions(...).clear() does not always return the action i'm using to keep track of the stages and such. As this only happens at the end of the build, the statuses of the stages should be published.
Interesting, today I recreated the Gitlab folder to try out some other workflow libraries for internal things.
Still not getting any build statuses, but the error has disappeared.
Mar 28, 2017 2:55:41 PM INFO jenkins.plugins.git.GitSCMFileSystem$BuilderImpl build
> git rev-parse --is-inside-work-tree # timeout=10
Mar 28, 2017 2:55:41 PM INFO jenkins.plugins.git.GitSCMFileSystem$BuilderImpl build
Setting origin to https://gitlab.fqdn/group/project.git
Mar 28, 2017 2:55:41 PM INFO jenkins.plugins.git.GitSCMFileSystem$BuilderImpl build
> git config remote.origin.url https://gitlab.fqdn/group/project.git # timeout=10
Mar 28, 2017 2:55:41 PM INFO jenkins.plugins.git.GitSCMFileSystem$BuilderImpl build
Fetching & pruning origin...
Mar 28, 2017 2:55:41 PM INFO jenkins.plugins.git.GitSCMFileSystem$BuilderImpl build
Fetching upstream changes from origin
Mar 28, 2017 2:55:41 PM INFO jenkins.plugins.git.GitSCMFileSystem$BuilderImpl build
> git --version # timeout=10
Mar 28, 2017 2:55:41 PM INFO jenkins.plugins.git.GitSCMFileSystem$BuilderImpl build
> git fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/remotes/origin/tags/* +refs/merge-requests/*/head:refs/remotes/origin/merge-requests/* --prune
Mar 28, 2017 2:55:41 PM INFO jenkins.plugins.git.GitSCMFileSystem$BuilderImpl build
Done.
Mar 28, 2017 2:55:55 PM INFO org.jenkinsci.plugins.workflow.job.WorkflowRun finish
Gitlab/group%2Fproject/test #6 completed: SUCCESS
Mar 28, 2017 2:55:56 PM WARNING org.jenkinsci.plugins.pubsub.listeners.SyncQueueListener publish
Error publishing Run queued event.
org.acegisecurity.AccessDeniedException: Please log in to access test
at com.cloudbees.hudson.plugins.folder.AbstractFolder.getItem(AbstractFolder.java:1167)
at jenkins.branch.MultiBranchProject.getItem(MultiBranchProject.java:693)
at io.jenkins.blueocean.rest.impl.pipeline.BranchContainerImpl.get(BranchContainerImpl.java:130)
at io.jenkins.blueocean.rest.impl.pipeline.BranchContainerImpl.get(BranchContainerImpl.java:21)
at io.jenkins.blueocean.rest.impl.pipeline.MultiBranchPipelineImpl$PipelineFactoryImpl.resolve(MultiBranchPipelineImpl.java:401)
at io.jenkins.blueocean.service.embedded.rest.PipelineFolderImpl$PipelineFactoryImpl.resolve(PipelineFolderImpl.java:160)
at io.jenkins.blueocean.service.embedded.rest.BluePipelineFactory.resolve(BluePipelineFactory.java:60)
at io.jenkins.blueocean.service.embedded.LinkResolverImpl.resolveJob(LinkResolverImpl.java:50)
at io.jenkins.blueocean.service.embedded.LinkResolverImpl.resolve(LinkResolverImpl.java:30)
at io.jenkins.blueocean.rest.hal.LinkResolver.resolveLink(LinkResolver.java:32)
at io.jenkins.blueocean.events.BlueMessageEnricher.enrich(BlueMessageEnricher.java:64)
at org.jenkinsci.plugins.pubsub.PubsubBus.publish(PubsubBus.java:111)
Caused: org.jenkinsci.plugins.pubsub.MessageException: Event enrichment failure due to unexpected exception in io.jenkins.blueocean.events.BlueMessageEnricher.
at org.jenkinsci.plugins.pubsub.PubsubBus.publish(PubsubBus.java:113)
at org.jenkinsci.plugins.pubsub.listeners.SyncQueueListener.publish(SyncQueueListener.java:178)
at org.jenkinsci.plugins.pubsub.listeners.SyncQueueListener.access$300(SyncQueueListener.java:57)
at org.jenkinsci.plugins.pubsub.listeners.SyncQueueListener$1.run(SyncQueueListener.java:106)
If it helps, here's the XML dumps for the project hierarchy; ~jenkins/jobs/Gitlab/config.xml ~jenkins/jobs/Gitlab/jobs/project/config.xml ~jenkins/jobs/Gitlab/jobs/project/branches/test/config.xml
I managed to get build information to be published again through lots of cleanup - basically a full reinstall of Jenkins. It's still not reported properly though, so might've worked before just without me noticing it.
Here's an example screenshot of what's happening;
The oldest of these is from the GitLab plugin itself, reporting the ref as only the branch name, which GitLab understands. This plugin on the other hand seems to report build statuses as the fully qualified ref name, which leaves GitLab with no idea where to link that build status.
Ok. I think that's easy to fix.
I don't suppose there's been any progress on this fix?
Really want to start using this on the side, so I can begin phasing out the ~5k lines of Groovy code that emulates proper Jenkins pipelines in our system.
Hi @ace13,
sorry, been a bit busy at work. No there is no progress on this bug yet. I'll try to fix this and release a new snapshot tomorrow night...
Hi @ace13,
could you try out the new release? Publishing the build-status/linking to the right commit seems to be working (at least for my local install). Like to hear back and hope that you'll be able to use the plugin.
Kind regards,
Argelbargel
From the testing on my side it indeed looks like it does what it should now, thanks.
As the title says, here's all the messages posted in the log during the build;
And an excerpt from the project-specific job XML;