Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-35218

Gitlab plugin with job dsl doesn't use gitlab CI features anymore

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • None
    • Jenkins 2.6
      Job DSL 1.47
      Gitlab plugin 1.2.3

      Hi,

      the aforementioned versions of the Job DSL + the gitlab plugin don't activate the GitLabCommitStatusPublisher needed for the CI features of Gitlab to work.
      The line
      <com.dabsquared.gitlabjenkins.publisher.GitLabCommitStatusPublisher plugin="gitlab-plugin@1.2.3"/>
      is missing from the generated xml, which is needed because we want to show gitlab that builds are in progress, to get the results of jenkins jobs to gitlab merge requests etc.
      Our job dsl snippet for the gitlab trigger is:
      triggers {
      gitlabPush

      { acceptMergeRequestOnSuccess(false) buildOnPushEvents(false) buildOnMergeRequestEvents(true) enableCiSkip(false) addNoteOnMergeRequest(true) addVoteOnMergeRequest(true) rebuildOpenMergeRequest("source") setBuildDescription(true) useCiFeatures(true) }

      }

            daspilker Daniel Spilker
            cri Cornelius Riemenschneider
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: