Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Nov 29 17:24
    jetersen commented #252
  • Nov 29 16:48
    mifitous commented #252
  • Nov 29 15:52

    github-actions[bot] on 643.vdc12a_4a_06434

    (compare)

  • Nov 29 15:24

    jetersen on master

    Fix wrong action IDs in GitLabM… (compare)

  • Nov 29 15:24
    jetersen closed #252
  • Nov 29 15:24
    jetersen labeled #252
  • Nov 29 15:03
    mifitous commented #252
  • Nov 28 16:00

    dependabot[bot] on maven

    (compare)

  • Nov 28 16:00
    dependabot[bot] closed #245
  • Nov 28 16:00
    dependabot[bot] commented #245
  • Nov 28 16:00
    dependabot[bot] labeled #253
  • Nov 28 16:00
    dependabot[bot] labeled #253
  • Nov 28 16:00
    dependabot[bot] review_requested #253
  • Nov 28 16:00
    dependabot[bot] opened #253
  • Nov 28 16:00

    dependabot[bot] on maven

    Bump checkstyle from 9.3 to 10.… (compare)

  • Nov 27 20:36
    mifitous commented #252
  • Nov 27 20:35
    mifitous edited #252
  • Nov 27 15:45
    mifitous synchronize #252
  • Nov 27 07:20
    mifitous commented #252
  • Nov 24 14:39
    mifitous edited #252
webminster
@webminster
k. thanks for that
Julian Xhokaxhiu
@julianxhokaxhiu
Hi, I'm having a small issue with the plugin not being able to create webhooks upon discovering a repository with a Jenkinsfile in it
Most of the time I do get this from the logs Cannot set web hook: Forbidden, although those repos have no Jenkinsfile so I could expect is because of that
But on the repos that do have that file, and are correctly detects and jobs do run on top successfully, I get this other reply: Cannot set web hook: Unprocessable Entity
The users Personal Access token is working successfully to discovery groups and much more on the Gitlab instance, it has the api scope set, and the user is currently set as Maintainer
Am I missing something in the whole setup? The group organization scan works fine too and the repo can be detected, so I'm not getting what is wrong with the webhook setup
Plugin version: 1.5.7
GitLab Community Edition 13.6.7
Julian Xhokaxhiu
@julianxhokaxhiu
Some updates: I managed to fix the Forbidden error now, but for every repo now I get Cannot set web hook: Unprocessable Entity what does this error means?
11 replies
Shabab Qaisar
@shobishani_gitlab
Hi, I'm having hard time configuring job using dsl (groovy script). I want to create single multibranch pipeline with gitlab and manage it as configuration as code using Jenkins Job DSL plugin. I can't find any code snippet for single job although I've found one for organizationFolder in the plugin docs. Does anyone have blog link or code snippet that can help me create single multibranch pipeline with gitlab? Or is that even possible using DSL script?
2 replies
santoshdj
@santoshdj
Hi, I am facing an issue with code checkout continuously failing after upgrading to v1.5.1 and upwards of the gitlab branch source plugin in a multibranch pipeline with the below error:
2 replies

Querying the current revision of branch master...

[Pipeline] }

[Pipeline] // stage

[Pipeline] }

[Pipeline] // node

[Pipeline] End of Pipeline

java.lang.ClassCastException: Cannot cast org.glassfish.jersey.inject.hk2.Hk2InjectionManagerFactory

Julian Xhokaxhiu
@julianxhokaxhiu
Hi, I'm having an issue with the plugin that is not able to auto-trigger job builds on a tag push. In the README it is stated that you need to install the basic-branch-build-plugin ( which I think it's a typo and you probably mean this one https://plugins.jenkins.io/basic-branch-build-strategies/ ). So nevertheless I installed it and I am able to configure the buildStrategy for tags on organization folders via JCasC but I'm not able to propagate that to each multibranch repo being created by the gitlab plugin.
How can we therefore configure the buildStrategy for those and/or propagate the tag behavior on each repo?
I think the README needs a bit more information about this behavior because it's too simplified and an OOB solution would be expected somehow... ( see https://github.com/jenkinsci/gitlab-branch-source-plugin#additional-traits )
For the sake of the context: I can see my tag once I push, I can see the strategy being applied to the OrganizationFolder, but I can't see this one being applied to each multibranch job type
Julian Xhokaxhiu
@julianxhokaxhiu
Nvm I finally figured it out...for everyone interested:
configure {
      // Start configuring build strategies
      def buildStrategies = it / sources / data / 'jenkins.branch.BranchSource' / buildStrategies
      buildStrategies << 'jenkins.branch.buildstrategies.basic.TagBuildStrategyImpl' {
        // The number of days since the tag was created before it is eligible for automatic building.
        atLeastDays('-1')
        // The number of days since the tag was created after which it is no longer eligible for automatic building.
        atMostDays('7')
      }
}
Webert Lima
@webertrlz
Hello, how can I batch change one configuration from all my jenkins jobs that use the gitlab branch source plugin?
8 replies
Felix Schlüter
@fschlueter_gitlab
Hi all, I am new to jenkins and this plugin and have some problems setting up jenkins with an existing (formally svn-hosted) multi-pipeline project. I hope you understand my problem and can help me. I apologize up front if I screw up some naming convention or so.
After quite some try&error I reached a point were I can trigger on changes to the master and also to a MR. What happen first is that the Jenkinsfiles is executed which creates the pipelines via jobDSL. My issue right now is that the pipeline-status for the MR on GitLab shows the result of running the Jenkinsfile rather than running the pipeline it creates.
Can that be fix?
What information may I provide (sorry I have no clue at this point)?
PS: I am using the Plugin in version 1.5.9 and jenkins in 2.278
11 replies
b1czu
@b1czu

Hi all,
I'm trying to use this plugin (organizationFolder mode) in use case scenario that needs Jenkinsfile to be loaded from external source and not from repository. For this purpose I'm trying to use Pipeline Multibranch with Defaults plugin (https://github.com/jenkinsci/pipeline-multibranch-defaults-plugin) and configure it to use global Jenkinsfile stored in config-file provider plugin. The problem arises at the "checkout scm" step - it throws following exception: java.io.IOException: Failed to retrieve the SCM revision for master. I'm using GIT. Full build log available here: https://pastebin.com/HuhxS6v5

Example Jenkinsfile:

node {
    stage('Checkout scm') {
        checkout scm
    }
}

I've also tried following code to do checkout step without success:

checkout([
         $class: 'GitSCM',
         branches: scm.branches,
         doGenerateSubmoduleConfigurations: scm.doGenerateSubmoduleConfigurations,
         extensions: scm.extensions,
         userRemoteConfigs: scm.userRemoteConfigs
    ])

Same Jenkinsfile works without any problem when loaded directly from repository (without use of Pipeline: Multibranch with defaults plugin). It looks like there is no data in scm variable when Jenkinsfile is loaded from pipeline-multibranch-defaults plugin. I don't have any idea how to debug it further. Does anybody have any idea where the problem could be and how to fix it?
My versions are: Jenkins: 2.289.3, gitlab-branch-source-plugin: 1.5.9, pipeline-multibranch-defaults: 2.1.

Also I've tried to replace pipeline-multibranch-defaults plugin with inline-pipeline plugin only to see the same problem.

4 replies
Sverre Moe
@DJViking
Is this plugin still under active development?
I was hoping something could be done with https://issues.jenkins.io/browse/JENKINS-58445
10 replies
Francois Marot
@francois.marot_gitlab
image.png
Hello,
I'm battling with the configuration of the gitlab-branch-source plugin. By default, when I configure my multibranch pipeline in Jenkins with only gitlab-branch-source, the commits or changes on Gitlab side are not detected and do not trigger any build on Jenkins side.
I have to add the classic/basic git plugin in Jenkins to make Jenkins react to notifications and start the builds. Like in the provided screenshot:
5 replies
does anyone know if this is the explected behavior ? I would expect the gitlab-branch-source to be able to trigger the builds by itself, not needing another plugin.
Francois Marot
@francois.marot_gitlab
Update: responding to my previous comment
In fact, the gitlab-branch-source plugin seems to work perfectly well if I create in Jenkins a job of type "gitlab group" that acts as an umbrella for all the project/repositories under a given group in gitlab. If configured like this, all projects are detected, all branches are detected and notifications from gitlab to jenkins automatically trigger the matching job in jenkins. I think this plugin may be designed to work like this but I find the documentation lacking: it should be made explicit that configuring jobs manually may not be the best way.
If the plugn author is interested, I may help to provide a PR for the doc.
Francois Marot
@francois.marot_gitlab
image.png

Hello again,
I'm wondering if this is normal that the job names contain the html encode slash as '%2F' instead of a real slash when configured by this plugin (see the above capture).
The problem is that when I want to trigger another job in the Jenkinsfile, this works:

build job: '/aaa/sherlock%2Fdata-pipeline/master'

but this does not:

build job: '/aaa/sherlock/data-pipeline/master'

Which is not very convenient !

T N
@teodor20
Hi everyone, I am experiencing a strange issue with this plugin: Jenkins does not notify GitLab of the job build status if I use "Default Jenkinsfile" provided by the default multibranch pipeline plugin. If I use the exact same Jenkinsfile but placed in the root directory of my repo, it works fine. I've tried investigating the Jenkins log file, but I can't see anything - I don't think it ever attempts to update the GitLab status.
MCMicS
@MCMicS
Have you tried to increase log level to get more hints?
T N
@teodor20

Have you tried to increase log level to get more hints?

Yes! This is the result: "Cannot cast org.glassfish.jersey.inject.hk2.Hk2InjectionManagerFactory to org.glassfish.jersey.internal.inject.InjectionManagerFactory"

Apparently, it gets stuck at that when trying to retrieve some branch information and update the status - right after this step: "io.jenkins.plugins.gitlabbranchsource.GitLabSCMSource retrieve"

11 replies
James Fuller
@jblotus
image.png
Any idea why after adding credentials, they would not show up in this configuration dropdown? The dropdown doesn't not show any existing credentials on my system but they do exist.
3 replies
James Fuller
@jblotus
Sverre Moe
@DJViking
Any chance for the fix on this issue to be merged and release soon?
jenkinsci/gitlab-branch-source-plugin#118
jenkinsci/gitlab-branch-source-plugin#168
4 replies
clive2000
@clive2000
Hello everyone. I'm writing a multi branch pipeline. In my Jenkins file, I want to retrieve Gitlab Merge Request description when the pipeline is triggered by webhooks. For 'merge_request' event I can easily retrieve the MR description by reading from GITLAB_OA_DESCRIPTION env variables. However, for note event (Webhook generated by 'jenkins rebuild' in MR comment), there is no GITLAB_OA_DESCRIPTION. I do see MR description in the webhook's body, does anyone know how can I retrieve it?
robross0606
@robross0606
Hello, I'm trying my hand at working a patch for JENKINS-63102 because our company desperately needs it. Many years of Java experience, but have been working Node.js for the last several years so I'm a little rusty. I have the plugin source set up in Eclipse here and I'm scratching my head trying to figure out how to regenerate Messages.class from messages.properties. Some maven call for Localizer? Setting in Eclipse I'm missing? Tips would be much appreciated.
robross0606
@robross0606
Never mind, I got it. mvn localizer:generate
Mate Rigo
@materigoprecitec_gitlab
image.png
Hi folks, I have set up the plugin to automatically build each commit from our gitlab CE instance. This works pretty well, there is this thing which is bugging me: If I press on the pipeline status link I end up on a 404 page on gitlab. But if I press on the Stages link I am correctly redirected to the Jenkins build overview on the Jenkins UI. Is the pipeline status link supposed to work? Thanks in advance!
3 replies
Brian Klarman
@bklar84

Good afternoon! I am attempting to set up an Organization Folder, but am running into certificate issues. I have successfully mounted cacerts into /var/jenkins_home/keystore and the connection is just fine. But as the pipeline runs, the scm checkout stage fails due to git not recognizing the certificate.
stderr: fatal: unable to access 'https://blahblah.git/': server certificate verification failed. CAfile: none CRLfile: none

Any help is appreciated

6 replies
Brian Klarman
@bklar84
@jeremycornett , going back to our discussion above, do you have a good resource on wrapping the jnlp-agent? Hit another snag in that the checkout() command ran from the git plugin relies on the jnlp container and not the container it is issued in...so it doesnt care about any of the git settings and trust stores i set up in my custom git image.
4 replies
Jorge Cisneros
@jorgecis
Hi All, I'm new in this channel and I come here for help of course :), is possible that an event like commit or MR, can trigger 2 different Jenkins Jobs, and see the results of each on Gitlab, like maybe 2 pipelines?? right now I did the test, so the webwook trigger both jobs, but Gitlab only take care the status of the last job, so if the first one ends in fails and the other that take more time ends in success, for gitlab the results is a success
1 reply
Julian Xhokaxhiu
@julianxhokaxhiu
Hello, I'm having a weird plugin issue and it happens only on the newest versions ( the ones which uses the gitlab-api 5.0.x dependency ): jenkinsci/gitlab-branch-source-plugin#197
3 replies
So far what I found out is that apparently the token is not being attached despite being defined in Jenkins credentials, although the very same setup works on top of the the 1.5.9 version of this plugin
1 reply
Any new 6xx release is basically broken for me, I am not able to scan groups
Brian Klarman
@bklar84

Good morning! Im attempting to build MRs via an organizational folder setup. The GITLAB_OBJECT_KIND env variable is not returning what the documentation says it should. Pushes are returning a value of 'none' and MRs are returning a value of 'null'. This is on version 1.5.9

Im trying to utilize that variable so i can do a proper checkout of the branch, as right now, all MRs are failing because they can't be checked out.

6 replies
Jorge Cisneros
@jorgecis
Any idea of how I can re-use the token, I tried using the withCredentials but I got and error that the type is not what was expected,ERROR: Credentials 'bcf8439b-b485-45c5-b241-37b6cd38bf39' is of type 'GitLab Personal Access Token' where 'org.jenkinsci.plugins.plaincredentials.StringCredentials' was expected
1 reply
Shankar Iyer
@shankariyer96_gitlab

Good afternoon! I'm new and I'm experiencing a bug where Jenkins pipelines from a Gitlab Organizational Folder fails to update the status any and all Gitlab Pipelines, but Gitlab marks this pipeline as "pending" and successfully kicks off the Jenkins pipeline.

The issue (recreated): https://issues.jenkins.io/browse/JENKINS-68635?jql=project%20%3D%20JENKINS%20AND%20component%20%3D%20gitlab-branch-source-plugin

The solution from above: Re-install the plugin.

(Said solution did not work -- that's why I'm here.)

I've tried updating the Global Jenkins Configuration with an Admin-level Gitlab API Access Token, but logs don't show that any API calls are made from Jenkins to Gitlab after a successful build.

2 replies
Miguel Gomes
@mmiradua_gitlab
Good afternoon, we're experiencing issues with this plugin ever since upgrading Gitlab to 14.0. Seems related to jenkinsci/gitlab-branch-source-plugin#147 and gitlab-org/gitlab#333548. Occasionally when we do a gitlab scan it stops after finding 96 branches and won't discover any more, leading to missing branches. After a while it finds them again, and then the issue repeats. We've tried playing with the delay value and also setting the pipelines to scan frequently but neither had an effect. I believe this is because we have multiple Jenkins jobs scanning the same repository so the rate limit gets applied quickly. Is there any way to fix this? Or any way to apply a refspec to the gitlab scan so it only looks at branches/MRs/tags we care about?
3 replies
Jason
@grush128
Seeking some support on a bad interaction with GITLAB. The issue happens when a branch build is kicked off from a pushed commit, then a MR is made from the branch while the build for the branch is building. If the plugin discovers that the branch is a MR it will disable the branch build preventing it from providing the job status to GITLAB leaving it perpetually "in progress". This will prevent merging the MR. If there is anything I can try let me know. this sounds like the issue that @shankariyer96_gitlab had but neither solution mentioned were applicable to my case.
3 replies