Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
Stephen Steiner
@ntwrkguru
WHICH logs?
Stephen Steiner
@ntwrkguru
I don't know java
I'm just trying to make this awesome plugin work
Parichay Barpanda
@baymac
Yeah okay, anyway that is also logged in UI so doesn’t matter much
Stephen Steiner
@ntwrkguru
ok, so I'll copy/paste that output
Stephen Steiner
@ntwrkguru
Here's an error when trying to create the token:
Can't create GL token for lockheed - Failure creating personal access token, aborting! org.gitlab4j.api.GitLabApiException: Failure creating personal access token, aborting! at org.gitlab4j.api.utils.AccessTokenUtils.createPersonalAccessToken(AccessTokenUtils.java:222) at io.jenkins.plugins.gitlabserverconfig.servers.helpers.GitLabPersonalAccessTokenCreator.doCreateTokenByPassword(GitLabPersonalAccessTokenCreator.java:163) at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627) at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:396) at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:408) at org.kohsuke.stapler.interceptor.RequirePOST$Processor.invoke(RequirePOST.java:77) at org.kohsuke.stapler.PreInvokeInterceptedFunction.invoke(PreInvokeInterceptedFunction.java:26) at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:212) at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:145)
I can't seem to delete the gitlab connection to try again, so still working on that
Parichay Barpanda
@baymac
Well creating a token inside of Jenkins is a hack that is done by gitlab4j-api (our dependency) so there might be inconsistency. Did you try getting the token from gitlab directly?
After getting the token, you can try curl --header "PRIVATE-TOKEN: xx” http://<local_gitlab_domain>/api/v4/user If this works then plugin should work as well
Amit Dar
@moshavnik

Hi!
two questions:

  1. is there any plan to prevent multibranch pipelines to execute concurrently on the same branch (if a push was made while the job of the same branch is still running)
  2. is there any plan to pass meta data to the pipeline as to what was the specific reason for the job execution (for example - was it a push made in to the repo or a tag)

thanks :)

Vincent Letarouilly
@Opa-
@moshavnik
  1. There's a setting on Jenkins jobs to disable concurrent builds. The toggle is called "Do not allow concurrent builds". Also there's a DSL available if you are using pipelines "disableConcurrentBuilds()".
  2. Since version 1.5 there's environment variables coming from the webhook payload available in the job, check here https://github.com/jenkinsci/gitlab-branch-source-plugin#environment-variables ;)
Parichay Barpanda
@baymac
Not sure if disableCurrentBuilds() work for multibranch https://stackoverflow.com/questions/41492688/how-to-limit-jenkins-concurrent-multibranch-pipeline-builds. Also there is an open JIRA ticket https://issues.jenkins-ci.org/browse/JENKINS-35359. I believe this is a problem that should be solved by branch api but I'll explore during the weekend if we can do sth about it in our plugin.
Vincent Letarouilly
@Opa-
disableConcurrentBuilds() works for multibranch but only on the same branch, it allows having branch1 and branch2 building at the same time
2 replies
Ben Marsden
@benmarsden
Hey folks! I'm using the plugin's trigger build on merge request comment feature. This has the caveat that "the job can only be triggered by trusted members of the project". internally we don't establish permissions on a project level, but via inheritance from elsewhere. In this way, I have 'Developer' access levell priviledge within the project, but I am not listed as a project member. After some testing, it appears as though the plugin does not support this. Does anyone have a suggested workaround?
8 replies
Will Plaut
@FuriousJulius
Hi all, been using the plugin for a bit now. We recently moved our multi branch pipelines to a scripted syntax and now I can't figure out how to get MRs to trigger on push updates. When MRs are created Jenkins sees the MR but it never triggers. I see the webhook events on Jenkins, a push event and a merge event. Setting the job's property strategy for Trigger on MR updates doesn't change anything. any suggestions on places to find more debug info?
11 replies
Peter Leibiger
@kuhnroyal
I have recently renamed projects in GitLab which are in a Gitlab-Organization folder, now they have been discovered with the new name in Jenkins but the old ones don't get removed. Is there any way I can get rid of the old ones?
4 replies
Parichay Barpanda
@baymac
@zipleen Log comment issues should fixed with jenkinsci/gitlab-branch-source-plugin#93
@zipleen Just a kind note that since you did not create a jira ticket for the issue, it was lost in the chat. I recommend to create jira ticket if anyone finds an issue. Mentioning in the chat makes it difficult to track.
Luis Fernandes
@zipleen
No worries! Appreciate it :) I'll remember next time creating the ticket if I find something else :p
1 reply
Marky Jackson
@markyjackson-taulia
I will be offline for the next few days for personal reasons but just wanted to drop a note
1 reply
Amit Dar
@moshavnik
This message was deleted
4 replies
Ben Marsden
@benmarsden
Does anyone know how to specify a build strategy of "only trigger a build on merge request comment"? In other words, I only want to build open MRs (never branches), and only when a merge request comment is provided to a specific MR. I thought this was the default, but then I noticed that on initial scan of a new repository, all retrieved branches/MRs get built. Is the skipInitialBuildOnFirstBranchIndexing()the only thing missing to get my desired setup, or is there some other config with buildStrategiesthat I need to make use of?
7 replies
Amit Dar
@moshavnik
can anyone help me with the following issue?
https://issues.jenkins-ci.org/browse/JENKINS-62478
Ben Marsden
@benmarsden
@baymac FYI, something I noticed as a result of jenkinsci/gitlab-branch-source-plugin#91: I believe createWebHookWhenMissing:220 has now introduced a NPE. projectHook.getToken()...returns a null reference, so I'm not sure this if statement is ever entered. Object.equals(x,y) might fit?
1 reply
Peter Leibiger
@kuhnroyal
Does anyone know if there is a way to cancel currently running builds of a MR if a new change/amend is pushed?
3 replies
cognomen
@cognomen
Hi folks. Configuring the plugin for the first time. It seems like pipelines only appear in gitlab if the Personal Access Token used by Jenkins is attached to a Gitlab account with Developer access or higher. (But I couldn't find anything in the docs to verify that.) Does that sound right?
1 reply
jb29237
@jb29237
When using gitlab organization folders...Is there a way to disable auto-building during scanning of the gitlab group? I'd like everything to be indexed, just not built automatically.
Peter Leibiger
@kuhnroyal
When a MR points to a non-existing (anymore) branch, then the project scan stops with a 404 error on this branch, it does not scan further and does not detect new tags. Is this a known issue?
AdamLambet
@AdamLambet
hi when i use plugin ,some pipelines be disabled after i scan gitlab project , but not merged or cancled
nrundle
@nrundle

I'm having trouble figuring out why my multibranch pipeline jobs don't automatically trigger on merge events. I setup a multibranch pipeline and other than pointing it to my gitlab repository, I left the rest of the settings on default. The webhook in my GitLab project was setup automatically. I pressed the "Scan GitLab Project Now" button and it correctly found my existing branches and merge requests and scheduled the necessary jobs.

Then, I made some changes and pushed to a branch which is part of an open merge request. I can see the Merge request UPDATED event in the "Multibranch Pipeline Events" log but it didn't schedule a job. If I press "Scan GitLab Project Now" it detects the changes and schedules the job. I can't figure out what is missing with my setup. This is Jenkins 2.222.3 with GitLab Branch Source plugin 1.5.0 and GitLab 12.10.11-ee

Dax T Games
@daxgames

Setting up Gitlab Group Folder I have the below goals:

  1. Watch specific branches master|MR-\d*(Feature Branching)OR master|prod|stage|dev|MR-\d*(GitFlow) where MR-\d* are merge requests.
  2. ONLY discover the above. DO NOT SHOW/RUN JOBS of Merge Request Source Branches. Example:
    • MR-1 = Merge Feature-1 branch -> 'master' branch should only show/run MR-1 on the Merge Requests tab and master on the Branches tab.
    • Merging the merge request runs the job on master and removes/scratches out the MR-1 on the Merge Requests tab whether I delete the branch or not.

The above does not seem possible. If it is what am I missing?

Golance + MightyDevops
@golance-mightydevops

Hey Guys - I always have "Credentials" empty, even when I click the "Add" button and fill out everything.

I see created credentials in Jenkins / Credentials / System / Global credentials (unrestricted), but the dropdown displays NONE Still.

Plugin version: 1.5.1
Jenkins version: 2.252

Any ideas?

Rishabh Budhouliya
@rishabhBudhouliya

@baymac Hi! I have been trying to create a GitLab api instance using the apiBuilder helper method (ref GitLabHelper).

Is there a way to create a GitLabApi using server url instead of server name?

David Jakob
@djvo_gitlab
hi @baymac , i am struggling with an error during the Organization scan. It always says that Jenkinsfile was found, but is a directory. this error msg is wrong. It looks like the git fetch fails. When I do it manually on the Jenkins server both works SSH and https with personal access token. Any idea?
Alessandro Baldi Vitali
@ABVitali
Hello to everybody. I'm new on this channel and I'm trying to use this useful plugin to setup a well configured jenkins instance.
I would like to ask you if there is a reason why the only authentication method for the gitlab server is the personal access token. Would it be feasible and useful also to have the chance to authenticate through a deploy token that is specific to a project/group instead of needing "personal" tokens?
I hope I'm not saying stupid things and don't hesitate to tell me if it is the case. Thank you in advance and I'm looking forward to hearing from your point of view on this.
Peter Leibiger
@kuhnroyal
afaik deploy tokens don't give API access, thus there is no way to find merge requests etc.
@djvo_gitlab I am getting this message all the time but the scan is still successful.
David Jakob
@djvo_gitlab
@kuhnroyal yes the scan is still sucessfull. But the pipline does not run.
amirmv2006
@amirmv2006
Hello everybody. Does anyone here know, why if I create a parallel pipeline with Jenkins it will create one workspace for each parallel task, but with gitlab-branch-source-plugin it will only keep one workspace? Was that intended or it's just a bug?
Aditya Yavagal
@adityayavagal
Hello everyone I had a query about gitlab branch source plugin, can anyone tell me will this plugin this plugin is not detecting any MR(Merge Requests) on my gitlab server (community edition) can anyone confirm if the plugin works fine on gitlab ce edition
2 replies
nrundle
@nrundle
According to the latest repo update, this plugin is no longer maintained. That's too bad because it was really nice.
Aditya Yavagal
@adityayavagal
Can you suggest me a alternative to it?
Jeremy Cornett
@jeremycornett
@ixolt did you ever resolve that error?
Cannot cast org.glassfish.jersey.inject.hk2.Hk2InjectionManagerFactory to org.glassfish.jersey.internal.inject.InjectionManagerFactory
2 replies
Ryan Proud
@binarymelon
Getting the following execption on the project configuration page trying to fill the credentials dropdown.
java.lang.LinkageError: com/cloudbees/plugins/credentials/domains/URIRequirementBuilder at io.jenkins.plugins.gitlabbranchsource.GitLabSCMSource$DescriptorImpl.doFillCredentialsIdItems(GitLabSCMSource.java:792) at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627) at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:396) at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:408) at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:212) at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:145) at org.kohsuke.stapler.MetaClass$11.doDispatch(MetaClass.java:536) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:766) Caused: javax.servlet.ServletException at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:816) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:898) at org.kohsuke.stapler.MetaClass$4.doDispatch(MetaClass.java:281) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
Toh Rong Quan
@keegantoh_gitlab
Anyone facing issue with commenting on merge request does not trigger the build after setting up "Trigger build on merge request comment"
2 replies
Toh Rong Quan
@keegantoh_gitlab
Anyone face issue with multibranch not respecting "Custom script - marker file". During branch indexing, all branch's pipeline are generated even when there is no "marker file" in the branch.
Jeremy Cornett
@jeremycornett
I am using job DSL to configure all my multibranch pipelines with gitLabSCMSource (version 1.5.1) in Jenkins running in a docker container (tag 2.235.3-jdk11). I've set the id so indexing caused by the seed job doesn't rebuild branches unnecessarily (see https://issues.jenkins-ci.org/browse/JENKINS-43693). Nevertheless, if I restart the Jenkins docker container, the next time the dsl seed job is rerun, all of the pipeline jobs run their indexing. The log shows "Branch reopened" for just the Gitlab default branch on each job, and it thus triggers a build of only that branch. I can't figure out why or how to prevent it. Any suggestions?
djvo
@djvo
Does anyone know whta to do when in gitlab the webhook test fails? Webhook expired... I cannot trigger jenkins via webhooks. in the gitlab prod logs there is also nothing that indicates a networks settings problem. Could it be thet the branch source plugin does not work well receiving the webhooks?
Viacheslav Dubrovskyi
@dubrsl
Hi. Does anybody use gitlab-branch-source plugin?
Yes, stupid question. :( But I can't figure out its code in any way. And I have questions about it.