Giter VIP home page Giter VIP logo

gitlab-plugin's Introduction

GitLab Plugin

Table of Contents

Introduction

This plugin allows GitLab to trigger builds in Jenkins when code is committed or merge requests are opened/updated. It can also send build status back to GitLab.

User support

Relationship with GitLab Inc.

This plugin is Open Source Software, developed on a volunteer basis by users of Jenkins and GitLab. It is not formally supported by either GitLab Inc. or CloudBees Inc.

Supported GitLab versions

GitLab performs a new major release about every six to nine months, and they are constantly fixing bugs and adding new features. As a result, we cannot support this plugin when used with GitLab versions older than N-2, where N is the current major release.

Getting help

If you have a problem or question about using the plugin, please make sure you are using the latest version. Then create an issue in the GitHub project.

To enable debug logging in the plugin:

  1. Go to Jenkins -> Manage Jenkins -> System Log
  2. Add new log recorder
  3. Enter 'GitLab plugin' or whatever you want for the name
  4. On the next page, enter 'com.dabsquared.gitlabjenkins' for Logger, set log level to FINEST, and save
  5. Then click on your GitLab plugin log, click 'Clear this log' if necessary, and then use GitLab to trigger some actions
  6. Refresh the log page and you should see output

Known bugs/issues

The plugin tracks current issues with the GitHub issue tracker. Some issues are reported in the Jenkins Jira issue tracker. When searching for existng issues, please check both locations.

Report an Issue

Please report issues and enhancements through the GitHub issue tracker.

Defined variables

When GitLab triggers a build via the plugin, various environment variables are set based on the JSON payload that GitLab sends. You can use these throughout your job configuration. The available variables are:

gitlabBranch
gitlabSourceBranch
gitlabActionType
gitlabUserName
gitlabUserUsername
gitlabUserEmail
gitlabSourceRepoHomepage
gitlabSourceRepoName
gitlabSourceNamespace
gitlabSourceRepoURL
gitlabSourceRepoSshUrl
gitlabSourceRepoHttpUrl
gitlabMergeCommitSha
gitlabMergeRequestTitle
gitlabMergeRequestDescription
gitlabMergeRequestId
gitlabMergeRequestIid
gitlabMergeRequestState
gitlabMergedByUser
gitlabMergeRequestAssignee
gitlabMergeRequestLastCommit
gitlabMergeRequestTargetProjectId
gitlabTargetBranch
gitlabTargetRepoName
gitlabTargetNamespace
gitlabTargetRepoSshUrl
gitlabTargetRepoHttpUrl
gitlabBefore
gitlabAfter
gitlabTriggerPhrase

NOTE: These variables are not available in Pipeline Multibranch jobs.

Global plugin configuration

GitLab-to-Jenkins authentication

The plugin requires authentication to connect from GitLab to Jenkins. This prevents unauthorized persons from triggering jobs.

Authentication Security

APITOKENS and other secrets MUST not be send over unsecure connections. So, all connections SHOULD use HTTPS.

Note: Certificates are free and easy to manage with LetsEncrypt.

Configuring global authentication

  1. Create a user in Jenkins which has, at a minimum, Job/Build permissions
  2. Log in as that user (this is required even if you are a Jenkins admin user), then click on the user's name in the top right corner of the page
  3. Click 'Configure,' then 'Add new Token', and note/copy the User ID and API Token
  4. In GitLab, when you create webhooks to trigger Jenkins jobs, use this format for the URL and do not enter anything for 'Secret Token': https://USERID:APITOKEN@JENKINS_URL/project/YOUR_JOB
  5. After you add the webhook, click the 'Test' button, and it should succeed

Configuring per-project authentication

If you want to create separate authentication credentials for each Jenkins job:

  1. In the configuration of your Jenkins job, in the GitLab configuration section, click 'Advanced'
  2. Click the 'Generate' button under the 'Secret Token' field
  3. Copy the resulting token, and save the job configuration
  4. In GitLab, create a webhook for your project, enter the trigger URL (e.g. https://JENKINS_URL/project/YOUR_JOB) and paste the token in the Secret Token field
  5. After you add the webhook, click the 'Test' button, and it should succeed

Disabling authentication

If you want to disable this authentication (not recommended):

  1. In Jenkins, go to Manage Jenkins -> Configure System
  2. Scroll down to the section labeled 'GitLab'
  3. Uncheck "Enable authentication for '/project' end-point" - you will now be able to trigger Jenkins jobs from GitLab without needing authentication

Jenkins-to-GitLab authentication

PLEASE NOTE: This auth configuration is only used for accessing the GitLab API for sending build status to GitLab. It is not used for cloning git repos. The credentials for cloning (usually SSH credentials) should be configured separately, in the git plugin.

This plugin can be configured to send build status messages to GitLab, which show up in the GitLab Merge Request UI. To enable this functionality:

  1. Create a new user in GitLab
  2. Give this user 'Maintainer' permissions on each repo you want Jenkins to send build status to
  3. Log in or 'Impersonate' that user in GitLab, click the user's icon/avatar and choose Settings
  4. Click on 'Access Tokens'
  5. Create a token named e.g. 'jenkins' with 'api' scope; expiration is optional
  6. Copy the token immediately, it cannot be accessed after you leave this page
  7. On the Global Configuration page in Jenkins, in the GitLab configuration section, supply the GitLab host URL, e.g. https://your.gitlab.server
  8. Click the 'Add' button to add a credential, choose 'GitLab API token' as the kind of credential, and paste your GitLab user's API key into the 'API token' field
  9. Click the 'Test Connection' button; it should succeed

Jenkins Job Configuration

There are two aspects of your Jenkins job that you may want to modify when using GitLab to trigger jobs. The first is the Git configuration, where Jenkins clones your git repo. The GitLab Plugin will set some environment variables when GitLab triggers a build, and you can use those to control what code is cloned from Git. The second is the configuration for sending the build status back to GitLab, where it will be visible in the commit and/or merge request UI.

Parameter configuration

If you want to be able to run jobs both manually and automatically via GitLab webhooks, you will need to configure parameters for those jobs. If you only want to trigger jobs from GitLab, you can skip this section.

Any GitLab parameters you create will always take precedence over the values that are sent by the webhook, unless you use the EnvInject plugin to map the webhook values onto the job parameters. This is due to changes that were made to address security vulnerabilities, with changes that landed in Jenkins 2.3.

In your job configuration, click 'This build is parameterized' and add any parameters you want to use. See the defined variables list for options - your parameter names must match these .e.g sourceBranch and targetBranch in the example Groovy Script below. Then, having installed EnvInject, click 'Prepare an environment for the run' and check:

  • Keep Jenkins Environment Variables
  • Keep Jenkins Build Variables
  • Override Build Parameters

In the Groovy Script field insert something similar to:

def env = currentBuild.getEnvironment(currentListener)
def map = [:]

if (env.gitlabSourceBranch != null) {
  map['sourceBranch'] = env.gitlabSourceBranch
}

if (env.gitlabTargetBranch != null) {
  map['targetBranch'] = env.gitlabTargetBranch
}

return map

You can then reference these variables in your job config, e.g. as ${sourceBranch}. You will need to update this code anytime you add or remove parameters.

Note: If you use the Groovy Sandbox, you might need to approve the script yourself or let an administrator approve the script in the Jenkins configuration.

Git configuration

Freestyle jobs

In the Source Code Management section:

  1. Click Git
  2. Enter your Repository URL, such as [email protected]:gitlab_group/gitlab_project.git
    1. In the Advanced settings, set Name to origin and Refspec to +refs/heads/*:refs/remotes/origin/* +refs/merge-requests/*/head:refs/remotes/origin/merge-requests/*
  3. In Branch Specifier enter:
    1. For single-repository workflows: origin/${gitlabSourceBranch}
    2. For forked repository workflows: merge-requests/${gitlabMergeRequestIid}
  4. In Additional Behaviours:
    1. Click the Add drop-down button
    2. Select Merge before build from the drop-down
    3. Set Name of repository to origin
    4. Set Branch to merge as ${gitlabTargetBranch}

Pipeline jobs

  • A Jenkins Pipeline bug will prevent the Git clone from working when you use a Pipeline script from SCM. It works if you use the Jenkins job config UI to edit the script. There is a workaround mentioned here: https://issues.jenkins-ci.org/browse/JENKINS-33719

  • Use the Snippet generator, General SCM step, to generate sample Groovy code for the git checkout/merge etc.

  • Example that performs merge before build:

checkout changelog: true, poll: true, scm: [
    $class: 'GitSCM',
    branches: [[name: "origin/${env.gitlabSourceBranch}"]],
    extensions: [[$class: 'PreBuildMerge', options: [fastForwardMode: 'FF', mergeRemote: 'origin', mergeStrategy: 'DEFAULT', mergeTarget: "${env.gitlabTargetBranch}"]]],
    userRemoteConfigs: [[name: 'origin', url: '[email protected]:foo/testrepo.git']]
    ]

Pipeline Multibranch jobs

Note: There is no way to pass external data from GitLab to a Pipeline Multibranch job, so the GitLab environment variables are not populated for this job type. GitLab will just trigger branch indexing for the Jenkins project, and Jenkins will build branches accordingly without needing e.g. the git branch env var. Due to this, the plugin just listens for GitLab Push Hooks for multibranch pipeline jobs; merge Request hooks are ignored.

  1. Click Add source
  2. Select Git
  3. Enter your Repository URL (e.g.: [email protected]:group/repo_name.git)

Example Jenkinsfile for multibranch pipeline jobs:

// Reference the GitLab connection name from your Jenkins Global configuration (https://JENKINS_URL/configure, GitLab section)
properties([gitLabConnection('your-gitlab-connection-name')])

node {
  checkout scm // Jenkins will clone the appropriate git branch, no env vars needed

  // Further build steps happen here
}

Job trigger configuration

Webhook URL

When you configure the plugin to trigger your Jenkins job, by following the instructions below depending on job type, it will listen on a dedicated URL for JSON POSTs from GitLab's webhooks. That URL always takes the form https://JENKINS_URL/project/PROJECT_NAME, or https://JENKINS_URL/project/FOLDER/PROJECT_NAME if the project is inside a folder in Jenkins. You should not be using https://JENKINS_URL/job/PROJECT_NAME/build or https://JENKINS_URL/job/gitlab-plugin/buildWithParameters, as this will bypass the plugin completely.

Freestyle and Pipeline jobs

  1. In the Build Triggers section:
    • Select Build when a change is pushed to GitLab
    • Copy the GitLab webhook URL shown in the UI (see here for guidance)
    • Use the check boxes to trigger builds on Push Events and/or Created Merge Request Events and/or Accepted Merge Request Events and/or Closed Merge Request Events
    • Optionally use Rebuild open Merge Requests to enable re-building open merge requests after a push to the source branch
    • If you selected Rebuild open Merge Requests other than None, check Comments, and specify the Comment for triggering a build. A new build will be triggered when this phrase appears in a commit comment. In addition to a literal phrase, you can also specify a Java regular expression
    • You can use Build on successful pipeline events to trigger on a successful pipeline run in GitLab. Note that this build trigger will only trigger a build if the commit is not already built and does not set the GitLab status. Otherwise you might end up in a loop
  2. Configure any other pre build, build or post build actions as necessary
  3. Click Save to preserve your changes in Jenkins
  4. Create a webhook in the relevant GitLab projects (consult the GitLab documentation for instructions on this), and use the URL you copied from the Jenkins job configuration UI. It should look something like https://JENKINS_URL/project/yourbuildname

Pipeline Multibranch jobs

Unlike other job types, there is no 'Trigger' setting required for a Multibranch job configuration; just create a webhook in GitLab for push requests which points to the project's webhook URL. When GitLab POSTs to this URL, it will trigger branch indexing for the Jenkins project, and Jenkins will handle starting any builds necessary.

If you want to configure some of the trigger options, such as the secret token or CI skip functionality, you can use a properties step. For example:

// Define your secret project token here
def project_token = 'abcdefghijklmnopqrstuvwxyz0123456789ABCDEF'

// Reference the GitLab connection name from your Jenkins Global configuration (https://JENKINS_URL/configure, GitLab section)
properties([
    gitLabConnection('your-gitlab-connection-name'),
    pipelineTriggers([
        [
            $class: 'GitLabPushTrigger',
            branchFilterType: 'All',
            triggerOnPush: true,
            triggerOnMergeRequest: false,
            triggerOpenMergeRequestOnPush: "never",
            triggerOnNoteRequest: true,
            noteRegex: "Jenkins please retry a build",
            skipWorkInProgressMergeRequest: true,
            secretToken: project_token,
            ciSkip: false,
            setBuildDescription: true,
            addNoteOnMergeRequest: true,
            addCiMessage: true,
            addVoteOnMergeRequest: true,
            acceptMergeRequestOnSuccess: false,
            branchFilterType: "NameBasedFilter",
            includeBranchesSpec: "release/qat",
            excludeBranchesSpec: "",
            triggerOnBranchDeleteRequest: true,
            triggerOnlyIfNewCommitsPushed: false,
            triggerOnPipelineEvent: false,
            triggerOnAcceptedMergeRequest: true,
            triggerOnClosedMergeRequest: false,
            triggerOnApprovedMergeRequest: false,
            labelsThatForcesBuildIfAdded: "",
            branchFilterName: "",
            sourceBranchRegex: "",
            targetBranchRegex: '^(.*/)?main$',
            mergeRequestLabelFilterConfig: [
                include: "",
                exclude: ""
            ],
            pendingBuildName: "jenkins",
            cancelPendingBuildsOnUpdate: true
        ]
    ])
])

Multibranch Pipeline jobs with Job DSL

You can use the Dynamic DSL feature of Job DSL to configure the job trigger. See https://github.com/jenkinsci/gitlab-plugin/blob/master/src/main/java/com/dabsquared/gitlabjenkins/GitLabPushTrigger.java for the methods you can use.

job('seed-job') {

    description('Job that makes sure a service has a build pipeline available')

    parameters {
        // stringParam('gitlabSourceRepoURL', '', 'the git repository url, e.g. [email protected]:kubernetes/cronjobs/cleanup-jenkins.git')
    }

    triggers {
        gitlab {
            // This line assumes you set the API_TOKEN as an env var before starting Jenkins - not necessarily required
            secretToken(System.getenv("API_TOKEN"))
            triggerOnNoteRequest(false)
        }
    }

    steps {
        dsl {
            text(new File('/usr/share/jenkins/ref/jobdsl/multibranch-pipeline.groovy').getText('UTF-8'))
        }
    }
}

Build status configuration

You can optionally have your Jenkins jobs send their build status back to GitLab, where it will be displayed in the commit or merge request UI as appropriate.

Freestyle jobs

Use 'Publish build status to GitLab' Post-build action to send build status with the given build name back to GitLab. 'Pending' build status is sent when the build is triggered, 'Running' status is sent when the build starts and 'Success' or 'Failed' status is sent after the build is finished.

Also make sure you have chosen the appropriate GitLab instance from the 'GitLab connection' dropdown menu, if you have more than one.

Scripted or Declarative Pipeline jobs

NOTE: If you use Pipeline global libraries, or if you clone your project's Jenkinsfile from a repo different from the one that contains the relevant source code, you need to be careful about when you send project status. In short, make sure you put your gitlabCommitStatus or other similar steps after the SCM step that clones your project's source. Otherwise, you may get HTTP 400 errors, or you may find build status being sent to the wrong repo.

Scripted Pipeline jobs

  • For Pipeline jobs, surround your build steps with the gitlabCommitStatus step like this:
    node() {
        stage('Checkout') { checkout <your-scm-config> }
    
        gitlabCommitStatus {
           // The result of steps within this block is what will be sent to GitLab
           sh 'mvn install'
        }
    }
  • Or use the updateGitlabCommitStatus step to use a custom value for updating the commit status. You could use try/catch blocks or other logic to send fine-grained status of the build to GitLab. Valid statuses are defined by GitLab and documented here.
    node() {
        stage('Checkout') { checkout <your-scm-config> }
    
        updateGitlabCommitStatus name: 'build', state: 'pending'
        // Build steps
    
        updateGitlabCommitStatus name: 'build', state: 'success'
    }
  • Or you can mark several build stages as pending in GitLab, using the gitlabBuilds step:
    node() {
        stage('Checkout') { checkout <your-scm-config> }
    
        gitlabBuilds(builds: ["build", "test"]) {
            stage("build") {
              gitlabCommitStatus("build") {
                  // your build steps
              }
            }
    
            stage("test") {
              gitlabCommitStatus("test") {
                  // your test steps
              }
            }
        }
    }
    Note: If you put the gitlabBuilds block inside a node block, it will not trigger until a node is allocated. On a busy system, or one where nodes are allocated on demand, there could be a delay here, and the 'pending' status would not be sent to GitLab right away. If this is a concern, you can move the gitlabBuilds block to wrap the node block, and then the status will be sent when Jenkins starts trying to allocate a node.

Declarative Pipeline jobs

The example below configures the GitLab connection and job triggers. It also sends build status back to GitLab.

NOTE: You will need to run this job manually once, in order for Jenkins to read and set up the trigger configuration. Otherwise webhooks will fail to trigger the job.

pipeline {
    agent any
    post {
      failure {
        updateGitlabCommitStatus name: 'build', state: 'failed'
      }
      success {
        updateGitlabCommitStatus name: 'build', state: 'success'
      }
      aborted {
        updateGitlabCommitStatus name: 'build', state: 'canceled'
      }
    }
    options {
      gitLabConnection('your-gitlab-connection-name')
    }
    triggers {
        gitlab(triggerOnPush: true, triggerOnMergeRequest: true, branchFilterType: 'All')
    }
    stages {
      stage("build") {
        steps {
          updateGitlabCommitStatus name: 'build', state: 'running'
          echo "hello world"
        }
      }
    }
   [...]
}

If:

  1. You use the "Merge When Pipeline Succeeds" option for Merge Requests in GitLab, and
  2. Your Declarative Pipeline jobs have more than one stage, and
  3. You use a gitlabCommitStatus step in each stage to send status to GitLab...

Then: You will need to define those stages in an options block. Otherwise, when and if the first stage passes, GitLab will merge the change. For example, if you have three stages named build, test, and deploy:

    options {
      gitLabConnection('your-gitlab-connection-name')
      gitlabBuilds(builds: ['build', 'test', 'deploy'])
    }

If you want to configure any of the optional job triggers that the plugin supports in a Declarative build, use a triggers block. The full list of configurable trigger options is as follows:

triggers {
    gitlab(
      triggerOnPush: false,
      triggerOnMergeRequest: true, triggerOpenMergeRequestOnPush: "never",
      triggerOnNoteRequest: true,
      noteRegex: "Jenkins please retry a build",
      skipWorkInProgressMergeRequest: true,
      ciSkip: false,
      setBuildDescription: true,
      addNoteOnMergeRequest: true,
      addCiMessage: true,
      addVoteOnMergeRequest: true,
      acceptMergeRequestOnSuccess: false,
      branchFilterType: "NameBasedFilter",
      includeBranchesSpec: "release/qat",
      excludeBranchesSpec: "",
      pendingBuildName: "Jenkins",
      cancelPendingBuildsOnUpdate: false,
      secretToken: "abcdefghijklmnopqrstuvwxyz0123456789ABCDEF",
      triggerToBranchDeleteRequest: false,
      triggerOnlyIfNewCommitsPushed: false,
      triggerOnPipelineEvent: false,
      triggerOnAcceptedMergeRequest: true,
      triggerOnClosedMergeRequest: false,
      triggerOnApprovedMergeRequest: false,
      labelsThatForcesBuildIfAdded: "",
      branchFilterName: "",
      sourceBranchRegex: "",
      targetBranchRegex: '^(.*/)?main$',
      mergeRequestLabelFilterConfig: [include: "", exclude: ""]
    )
}
Pending build status for pipelines

To send 'Pending' build status to GitLab when the pipeline is triggered, set a build name to 'Pending build name for pipeline' field in the Advanced-section of the trigger configuration or use pendingBuildName option in the GitLab-trigger configuration in the declarative pipeline.

Matrix/Multi-configuration jobs

This plugin can be used with Matrix/Multi-configuration jobs together with the Flexible Publish plugin which allows you to run publishers after all axis jobs are done. Configure the Post-build Actions as follows:

  1. Add a Flexible publish action
  2. In the Flexible publish section:
    1. Add conditional action
    2. In the Conditional action section:
      1. Set Run? to Never
      2. Select Condition for Matrix Aggregation
      3. Set Run on Parent? to Always
      4. Add GitLab actions as required

See also

Advanced features

Branch filtering

Triggers may be filtered based on the branch name, i.e. the build will only be allowed for selected branches. On the project configuration page, when you configure the GitLab trigger, you can choose 'Filter branches by name' or 'Filter branches by regex.' Filter by name takes comma-separated lists of branch names to include and/or exclude from triggering a build. Filter by regex takes a Java regular expression to include and/or exclude. For example, to exclude all branches containing the word "feature", you can use the following regular expression: ^(?:(?!feature).)*$. On a similar note, the regular expression ^(?!.*master).*$ will mean - all branches not matching master. This is a regular expression that uses negative lookahead to match any string that does not contain the word "master". Here's a breakdown of how it works:

^: Anchors the match to the beginning of the string.
(: Starts a group that will be used for the negative lookahead.
?!: Indicates a negative lookahead assertion - finds all that does not match.
.*: Matches any number of characters (except for a newline) zero or more times.
master: should not match master.
): Ends the group.
$: Anchors the match to the end of the string.

Keep in mind that the RegexBasedFilter feature is case-sensitive by default. If you want to make it case-insensitive, you can use the (?i) flag at the beginning of your regular expression pattern. For example: ^(?i)(?:(?!feature).)*$.

Here is an example pipeline script that shows how to use the RegexBasedFilter feature in the GitLab trigger:

triggers {
    gitlab(
        triggerOnPush: true, 
        triggerOnMergeRequest: false, 
        branchFilterType: "RegexBasedFilter", 
        targetBranchRegex: '^(?:(?!feature).)*$'
    )
}

Note: This functionality requires access to GitLab and a git repository url already saved in the project configuration. In other words, when creating a new project, the configuration needs to be saved once before being able to add branch filters. For Pipeline jobs, the configuration must be saved and the job must be run once before the list is populated.

Build when tags are pushed

In order to build when a new tag is pushed:

  1. In the GitLab webhook configuration, add 'Tag push events'
  2. In the job configuration under 'Source code management':
    1. Select 'Advanced...' and add '+refs/tags/*:refs/remotes/origin/tags/*' as the Refspec
    2. You can also use 'Branch Specifier' to specify which tag need to be built (example 'refs/tags/${TAGNAME}')

Add a note to merge requests

To add a note to GitLab merge requests after the build completes, select 'Add note with build status on GitLab merge requests' from the optional Post-build actions. Optionally, click the 'Advanced' button to customize the content of the note depending on the build result.

Pipeline jobs - addGitLabMRComment

addGitLabMRComment(comment: 'The pipeline was run on Jenkins')

Note that it requires that the build be triggered by the GitLab MR webhook, not the push webhook (or manual build). Please also note that it currently does not work with Multibranch Pipeline jobs, because MR hooks won't trigger.

Accept merge request

To accept a merge request when build is completed select 'Accept GitLab merge request on success' from the optional Post-build actions.

Pipeline jobs

For pipeline jobs two advanced configuration options can be provided

  1. useMRDescription - Adds the merge request description into the merge commit, in a similar format as would be recieved by selecting 'Modify commit message' followed by 'include description in commit message' in GitLab UI
  2. removeSourceBranch - Removes the source branch in GitLab when the merge request is accepted
acceptGitLabMR(useMRDescription: true, removeSourceBranch: true)

Notify Specific project by a specific GitLab connection

You can specify a map of project builds to notify a variety of GitLab repositories which could be located on different servers. This is useful if you want to create a complex CI/CD which involves several Jenkins and GitLab projects, see examples bellow:

  • Notify several GitLab projects using GitLab connection data from the trigger context:
gitlabCommitStatus(name: 'stage1',
        builds: [
            [projectId: 'test/test', revisionHash: 'master'],
            [projectId: 'test/utils', revisionHash: 'master'],
        ])
    {
            echo 'Hello World'
    }
  • Notify several GitLab projects using specific GitLab connection:
gitlabCommitStatus( name: 'stage1', connection:gitLabConnection('site1-connection'),
        builds: [
            [projectId: 'test/test', revisionHash: 'master'],
            [projectId: 'test/utils', revisionHash: 'master'],
        ])
    {
            echo 'Hello World'
    }
  • Notify several GitLab repositories located on different GitLab servers:
gitlabCommitStatus(
        builds: [
            [name:'stage1',connection:gitLabConnection('site1-connection'), projectId: 'group/project1', revisionHash: 'master'],
            [name:'stage1',connection:gitLabConnection('site2-connection'), projectId: 'group/project1', revisionHash: 'master'],
            [name:'stage1',connection:gitLabConnection('site2-connection'), projectId: 'test/test', revisionHash: 'master'],
            [name:'stage1',connection:gitLabConnection('site2-connection'), projectId: 'test/utils', revisionHash: 'master'],
        ])
    {
            echo 'Hello World'
    }

Cancel pending builds on merge request update

To cancel pending builds of the same merge request when new commits are pushed, check 'Cancel pending merge request builds on update' from the Advanced-section in the trigger configuration. This saves time in projects where builds can stay long time in a build queue and you care only about the status of the newest commit.

Compatibility

Version 1.2.1 of the plugin introduces a backwards-incompatible change for Pipeline jobs. They will need to be manually reconfigured when you upgrade to this version. Freestyle jobs are not impacted.

Contributing to the Plugin

Detailed instructions for code and documentation contributions to the plugin are available in the contributing guide.

Changelog

For recent versions, see GitHub Releases.

For versions 1.5.21 and older, see the historical changelog.

gitlab-plugin's People

Contributors

ababushk avatar argelbargel avatar axls avatar basil avatar bassrock avatar bbreijer avatar bulanovk avatar coder-hugo avatar dependabot[bot] avatar evgeni avatar gounthar avatar harsh-ps-2003 avatar illay1994 avatar jakub-bochenski avatar jmcgeheeiv avatar kasper-f avatar krisstern avatar markewaite avatar markjacksonfishing avatar markus-mnm avatar mat1e avatar mreichel avatar omehegan avatar omorillo avatar pdudits avatar tomandrews avatar tomelfring avatar ttsalonen avatar wondercsabo avatar xaniasd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gitlab-plugin's Issues

Failed to render status.png

I am getting an error when gitlab tries to render a status image for my project. Going to the URL, jenkins shows following error:

javax.servlet.ServletException: java.lang.IllegalArgumentException: This repo does not use git.
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:795)
    ...
    at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.IllegalArgumentException: This repo does not use git.
    at com.dabsquared.gitlabjenkins.GitLabWebHook.generateStatusPNG(GitLabWebHook.java:237)
    at com.dabsquared.gitlabjenkins.GitLabWebHook.getDynamic(GitLabWebHook.java:146)
    at sun.reflect.GeneratedMethodAccessor2082.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298)
    at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161)
    at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:389)
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:745)
    ... 70 more

I reckon this is because my project uses Multiple SCMs?

Push to merge request is not triggering a rebuild

The checkbox in jenkins Rebuild open Merge Requests on Push Events is checked however it does not seem to be rebuilding when a push is made to an open merge request.

Also, and I will admit i'm not 100% sure about this behaviour, but it doesn't look like its building when the merge request is closed, it seems to get confused sometimes, I would expect it to either build as the merge request has closed on master branch or build as there has been a push to master due to the closure of the merge request, however it doesn't always do this.

Build status icon toggling

The build icon from the plugin seems to toggle every refresh

The first time it looks like this:
image

The second time it looks correct:
image

Build is not triggered when number of merge request is greater than 20

Jenkins job configured with options:

  • Build on Merge Request Events
  • Rebuild open Merge Requests on Push Events
  • Set build description to build cause (eg. Merge request or Git Push )
  • Add note with build status on merge requests
  • All allow all branches (Ignoring Filtered Branches)

When I create new merge request Jenkins job will be triggered but when I added new commit does not.
In Jenkins logs I can see push event (data: {0}).

The problem occurs in projects with number of MR greater than 20. Probably because gitlab api return only so much results.

Option "Add note with build status on merge requests" always active

There seems to be a bug with the "Add note with build status on merge requests" option. I upgraded to the newest version from 1.1.7 multiple times and downgraded again since this options doesn't work correctly.

When visiting the configuration of a job for the first time after upgrading the plugin the option is not active. Then, since I like it, I activate "Set build description to build cause (eg. Merge request or Git Push )" and save. After the reload "Add note with build status on merge requests" is activated as well.

I didn't look into the problem very long but it looks like in the constructor for the GitlabPushTrigger this. addNoteOnMergeRequest is never changed and therefore always true.

Commit status stuck on "pending" in status.json

It looks like there were two groups of users describing the same symptoms in #56, but suffering from different underlying causes. Myself and @twk3, at least, are in the group whose problem was not fixed by #76.

I was able to track the introduction of the bug down to a single commit: 6ad6804. I'm not a domain expert, so I can't speculate further on what part of the commit is the culprit, but the affected code regions certainly seem to make sense.

Regular push to gitlab server can't get build

As described in issue #4 regular pushs to my repository outside of merge requests are not working. They trigger a correct build request in jenkins (sourceBranch and destinationBranch is set to the same branch as expected). But this plugin doesn't populate gitlabSourceRepoURL and gitlabSourceRepoName. So the build fails because this values are not set.

Add an "All branches" radio button in order to build new branches

Currently the list of selected branches in the "Filter branches" option is initialized when creating the job (see #20 ). Unfortunately, this behaviour leads branches created after the job creation to not being automatically added to the filter branches list.

A nice feature would be to have two radio buttons for the "Filter branches" option :

  • No filter (build for every modified branch)
  • Custom filter (the current list would follow).

Thanks !

Merge request build, simple build

Using: jenkins 1.590. gitlab 7.4, jenkins gitlab plugin 1.1.3.

I set up the project as written here(https://github.com/DABSquared/gitlab-plugin#using-it-with-a-job)
Jenkins configuration
When i clicked "Build now" on jenkins i have some errors:

Started by GitLab push by trillanewhero
Building in workspace /var/lib/jenkins/jobs/test_merge/workspace
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from 2 remote Git repositories
 > git config remote.${gitlabSourceRepoName}.url ${gitlabSourceRepoURL} # timeout=10
Fetching upstream changes from ${gitlabSourceRepoURL}
 > git --version # timeout=10
using GIT_SSH to set credentials gitlab
 > git fetch --tags --progress ${gitlabSourceRepoURL} +refs/heads/*:refs/remotes/${gitlabSourceRepoName}/*
ERROR: Error fetching remote repo '${gitlabSourceRepoName}'
ERROR: Error fetching remote repo '${gitlabSourceRepoName}'
Finished: FAILURE

Merge Requests from forks are not recognized

First things first: Thanks for your work.

I installed it on our corporate CE instance and found that it's working as long as the Merge Requests references local branches. But when the MR comes in from a fork of the project that will not trigger the jenkins build.

Did I miss something? Do I neet to set origin/${gitlabSourceBranch} to remote/*/${gitlabSourceBranch} or something similar?

Merge Request CI status not updating

On a Gitlab merge request the CI status stays at "CI build pending for 6f3ca78b. Build page". The Build page link does not go to the build status (just goes to a blank Jenkins page) and even when the build is successful this pending message is never changed.

Link on build status button leads to a jenkins error page

Configuration:

The "Test" buttons both on the "Merge Web Hook" and the "Gitlab CI Service" configured in Gitlab trigger a valid build in Jenkins. But the build status button shown on the project in Gitlab provides a link (see below) that is throwing the following exception:

Stack trace

javax.servlet.ServletException: net.sf.json.JSONException: A JSONObject text must begin with '{' at character 0 of 
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:795)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:875)
    at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:391)
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:745)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:875)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:648)
    at org.kohsuke.stapler.Stapler.service(Stapler.java:237)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)
    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:96)
    at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:88)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
    at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
    at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:86)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
    at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
    at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
    at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:46)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
    at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
    at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1474)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:533)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
    at org.eclipse.jetty.server.Server.handle(Server.java:370)
    at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
    at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:949)
    at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1011)
    at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)
    at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
    at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
    at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:701)
Caused by: net.sf.json.JSONException: A JSONObject text must begin with '{' at character 0 of 
    at net.sf.json.util.JSONTokener.syntaxError(JSONTokener.java:499)
    at net.sf.json.JSONObject._fromJSONTokener(JSONObject.java:919)
    at net.sf.json.JSONObject._fromString(JSONObject.java:1145)
    at net.sf.json.JSONObject.fromObject(JSONObject.java:162)
    at net.sf.json.JSONObject.fromObject(JSONObject.java:132)
    at com.dabsquared.gitlabjenkins.GitLabWebHook.generateBuild(GitLabWebHook.java:280)
    at com.dabsquared.gitlabjenkins.GitLabWebHook.getDynamic(GitLabWebHook.java:112)
    at sun.reflect.GeneratedMethodAccessor509.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:622)
    at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298)
    at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161)
    at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:389)
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:745)
    ... 62 more

Is this is a known issue or could there be a misconfiguration on our side?

No build status on merge request from forks

If you look at this screenshot:

origin

The build status CI build failed for... is there. This is a merge request from a branch on origin to origin/master.

If you look at this one:

fork

There's no build status. This is a merge request from a branch on a fork to origin/master.

But both triggered a build on the Jenkins CI serve as you can see from the Jenkins Bot User comments. Also, following pushes to the same branch don't make new Jenkins builds (thus no new comment from Jenkins Bot User) for forks, but these comments appear for each push on origin branches.

Conclusion:

  • Branches on upstream:
    • Build status is shown and updated for each push.
    • Jenkins Bot User comments when the MR is first created and after a push of commit(s).
  • Branches on a fork:
    • Build status is never shown.
    • Jenkins Bot User comments only for the first build when the MR is created.

Am I missing some configuration or is this a bug?

NPE and unparseable date exception

Jenkins: 1.5.7.0
Gitlab Plugin: 1.0.11
Gilab: 6.8.1

I setup the above boxes and when a merge request is created in Gitlab, I got the below exception on the Jenkins log file. Many thanks for any help.

BTW it is strange that it seems that even viewing a merge request page in Gitlab would trigger the webhook call to jenkins.

WARNING: Error while serving http://sinwv1156148.sg.net.intra:8080/project/TestG
itWebhook
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:29
8)
at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161)
at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:388)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)
at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:390)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:631)
at org.kohsuke.stapler.Stapler.service(Stapler.java:225)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686
)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
Handler.java:1494)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:9
6)
at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:2
02)
at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:1
80)
at net.bull.javamelody.PluginMonitoringFilter.doFilter(PluginMonitoringF
ilter.java:85)
at org.jvnet.hudson.plugins.monitoring.HudsonMonitoringFilter.doFilter(H
udsonMonitoringFilter.java:90)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:9
9)
at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:88)

    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet

Handler.java:1482)
at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
Handler.java:1482)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.
java:84)
at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.ja
va:76)
at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
Handler.java:1482)
at org.kohsuke.stapler.compression.CompressionFilter.doFilter(Compressio
nFilter.java:46)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
Handler.java:1482)
at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.
java:81)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
Handler.java:1474)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java
:499)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.j
ava:137)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.jav
a:533)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandl
er.java:231)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandl
er.java:1086)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:
428)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandle
r.java:193)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandle
r.java:1020)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.j
ava:135)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper
.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:370)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(Abstrac
tHttpConnection.java:489)
at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpC
onnection.java:960)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.conten
t(AbstractHttpConnection.java:1021)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)

    at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnecti

on.java:82)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEn
dPoint.java:668)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEnd
Point.java:52)
at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)

    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.

java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:615)
at java.lang.Thread.run(Thread.java:724)
Caused by: com.google.gson.JsonSyntaxException: 2014-08-07T09:04:32.429Z
at com.google.gson.DefaultDateTypeAdapter.deserializeToDate(DefaultDateT
ypeAdapter.java:107)
at com.google.gson.DefaultDateTypeAdapter.deserialize(DefaultDateTypeAda
pter.java:82)
at com.google.gson.DefaultDateTypeAdapter.deserialize(DefaultDateTypeAda
pter.java:35)
at com.google.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(Ref
lectiveTypeAdapterFactory.java:93)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.re
ad(ReflectiveTypeAdapterFactory.java:172)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(Ref
lectiveTypeAdapterFactory.java:93)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.re
ad(ReflectiveTypeAdapterFactory.java:172)
at com.google.gson.Gson.fromJson(Gson.java:803)
at com.google.gson.Gson.fromJson(Gson.java:768)
at com.google.gson.Gson.fromJson(Gson.java:717)
at com.google.gson.Gson.fromJson(Gson.java:689)
at com.dabsquared.gitlabjenkins.GitLabMergeRequest.create(GitLabMergeReq
uest.java:30)
at com.dabsquared.gitlabjenkins.GitLabWebHook.generateMergeRequestBuild(
GitLabWebHook.java:310)
at com.dabsquared.gitlabjenkins.GitLabWebHook.generateBuild(GitLabWebHoo
k.java:279)
at com.dabsquared.gitlabjenkins.GitLabWebHook.getDynamic(GitLabWebHook.j
ava:103)
... 58 more
Caused by: java.text.ParseException: Unparseable date: "2014-08-07T09:04:32.429Z
"
at java.text.DateFormat.parse(DateFormat.java:357)
at com.google.gson.DefaultDateTypeAdapter.deserializeToDate(DefaultDateT
ypeAdapter.java:105)
... 73 more

←[0m←[33mAug 07, 2014 5:05:17 PM org.eclipse.jetty.util.log.JavaUtilLog warn
WARNING: Error while serving http://sinwv1156148.sg.net.intra:8080/project/TestG
itWebhook/status.png
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:29
8)
at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161)
at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:388)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)
at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:390)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:631)
at org.kohsuke.stapler.Stapler.service(Stapler.java:225)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686
)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
Handler.java:1494)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:9
6)
at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:2
02)
at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:1
80)
at net.bull.javamelody.PluginMonitoringFilter.doFilter(PluginMonitoringF
ilter.java:85)
at org.jvnet.hudson.plugins.monitoring.HudsonMonitoringFilter.doFilter(H
udsonMonitoringFilter.java:90)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:9
9)
at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:88)

    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet

Handler.java:1482)
at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
Handler.java:1482)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.
java:84)
at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.ja
va:76)
at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
Handler.java:1482)
at org.kohsuke.stapler.compression.CompressionFilter.doFilter(Compressio
nFilter.java:46)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
Handler.java:1482)
at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.
java:81)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
Handler.java:1474)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java
:499)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.j
ava:137)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.jav
a:533)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandl
er.java:231)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandl
er.java:1086)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:
428)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandle
r.java:193)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandle
r.java:1020)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.j
ava:135)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper
.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:370)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(Abstrac
tHttpConnection.java:489)
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(Abstra
ctHttpConnection.java:949)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.header
Complete(AbstractHttpConnection.java:1011)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)

    at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnecti

on.java:82)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEn
dPoint.java:668)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEnd
Point.java:52)
at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)

    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.

java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:615)
at java.lang.Thread.run(Thread.java:724)
Caused by: java.lang.NullPointerException
at com.dabsquared.gitlabjenkins.GitLabWebHook.getBuildByBranch(GitLabWeb
Hook.java:378)
at com.dabsquared.gitlabjenkins.GitLabWebHook.generateStatusPNG(GitLabWe
bHook.java:210)
at com.dabsquared.gitlabjenkins.GitLabWebHook.getDynamic(GitLabWebHook.j
ava:119)
... 58 more

Build is kicked off after a merge request is accepted

When I accept a merge request in gitlab, it triggers another build in Jenkins. This is undesirable since the branch has already been merged and deleted. The result of the build is not useful since we've already run the build before merging the branch.

Generate filter branches

I am trying to use gitlab plugin with jenkins job-dsl. Everyting works OK but the 'filter branches' (allowedBranches).

What I want to do? I want to have one jenkins job to build only master branch and one which is building stuff for merge requests. Therefore, I want to set alowedBranches to master for one of those.

From code I see that allowedBranches parameter is a list of strings which is somehow automatically data bound. I have troubles to find out how should the XML look like, so plugin can consume it.

For example, this is not working as all push events triggers build, not only master:

<com.dabsquared.gitlabjenkins.GitLabPushTrigger plugin="[email protected]">
  <spec/>
  <triggerOnPush>true</triggerOnPush>
  <triggerOnMergeRequest>false</triggerOnMergeRequest>
  <triggerOpenMergeRequestOnPush>false</triggerOpenMergeRequestOnPush>
  <setBuildDescription>true</setBuildDescription>
  <addNoteOnMergeRequest>true</addNoteOnMergeRequest>
  <allowedBranches>master</allowedBranches>
</com.dabsquared.gitlabjenkins.GitLabPushTrigger>

"Ignore SSL Certificate Errors" has no effect

I am experiencing this issue in Jenkins, even after selecting "ignore ssl errors":

javax.servlet.ServletException: java.lang.Error: javax.net.ssl.SSLHandshakeException:
You can disable certificate checking by setting ignoreCertificateErrors on GitlabHTTPRequestor.
SSL Error: java.security.cert.CertificateException: No name matching myfqdn.tld found

Jenkins 1.610
Gitlab plugin version 1.1.21
java version "1.7.0_79" OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode)

Gitlab plugin requires git plugin merge before build

Commit aaada90 introduced a reliance on MergeRecord to correlate builds with merge requests. This restriction forces projects to use of the Jenkins Git Plugin's merge before build behavior. While the git plugin is able to merge branches in some cases we've found that it can't handle the following simple case:

  • Create two branches off of master, branch_a and branch_b
  • Change file_a in branch_a, commit, push, create a merge request
  • Jenkins build is triggered for branch_a
  • Accept the merge request for branch_a
  • Change file_b in branch_b, commit, push, create a merge request. Gitlab notes that it can automatically merge this change into master
  • Jenkins build for branch_b fails because the Git Plugin cannot merge the change into master

As a workaround for this issue we use a shell script build step to merge the change into master, without committing it, before the build in Jenkins instead of using Git Plugin. However, this breaks the Gitlab plugin since it relies on the MergeRecord data from builds to correlate Jenkins builds with merge requests.

Could we modify the GitLabWebHook.getBuildBySHA1(AbstractProject, String, boolean) method to fallback to using build parameters when a MergeRecord doesn't exist.

Feature: Multiple jobs configurable

I would love to see the possibility to use more than one Jenkins Job with this awesome plugin. We have different types of jobs for different branches in GIT that we would like to use.

HTTP ERROR 404 - Images not found

When trying to access an image from Jenkins (about the build status etc), I get a HTTP 404 error. Possibly caused due to a wrong URL:
/plugin/gitlab-jenkins/images/failed.png

instead of:
/plugin/gitlab-plugin/images/failed.png

Auto Merge On Build

Did there is plan to add auto merge feature ?

When a job build successfully, MR is accepted on Gitlab side..

This feature should be optionaly of course and will help team using tests validated workflow instead of by code-revew.

It will be a great add-on for Jenkins+GitLab

Build reports on Merge Request Comment Page - Nothing reported

I'm using Jenkins LTS 1.580.2 and Gitlab 7.7.0

I tried up to date plugin (1.1.12) and checked "Add note with build status on merge requests".
I created jenkins user account on Gitlab side and its private key is w1234567XKdMW1Vn45F_9z

I did a MR, detected by Jenkins but I didn't see update on Gitlab Merge Page.

On Jenkins log side, I could see

Jan 27, 2015 3:01:36 PM com.dabsquared.gitlabjenkins.GitLabPushTrigger$2 run
INFO: GitLab Merge Request detected in git-spike-maven-jarsigning-sample-joe. Triggering  #15
Jan 27, 2015 3:02:21 PM hudson.model.Run execute
INFO: git-spike-maven-jarsigning-sample-joe #15 main build action completed: SUCCESS
java.io.FileNotFoundException: http://swf-incubator0.lab.ancy.mycorp.org/api/v3/projects/5/merge_request/13?private_token=w1234567XKdMW1Vn45F_9z
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1457)
    at org.gitlab.api.http.GitlabHTTPRequestor.parse(GitlabHTTPRequestor.java:283)
    at org.gitlab.api.http.GitlabHTTPRequestor.to(GitlabHTTPRequestor.java:131)
    at org.gitlab.api.http.GitlabHTTPRequestor.to(GitlabHTTPRequestor.java:106)
    at org.gitlab.api.GitlabAPI.getMergeRequest(GitlabAPI.java:301)
    at com.dabsquared.gitlabjenkins.GitLabPushTrigger.onCompleteMergeRequest(GitLabPushTrigger.java:249)
    at com.dabsquared.gitlabjenkins.GitLabPushTrigger.onCompleted(GitLabPushTrigger.java:230)
    at com.dabsquared.gitlabjenkins.GitLabRunListener.onCompleted(GitLabRunListener.java:23)
    at com.dabsquared.gitlabjenkins.GitLabRunListener.onCompleted(GitLabRunListener.java:16)
    at hudson.model.listeners.RunListener.fireCompleted(RunListener.java:199)
    at hudson.model.Run.execute(Run.java:1796)
    at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531)
    at hudson.model.ResourceController.execute(ResourceController.java:89)
    at hudson.model.Executor.run(Executor.java:240)
Jan 27, 2015 3:02:21 PM jenkins.model.lazy.LazyBuildMixIn removeRun
WARNING: hudson.maven.MavenModuleSet@7af58c60[git-spike-maven-jarsigning-sample-joe] did not contain git-spike-maven-jarsigning-sample-joe #10 to begin with
Jan 27, 2015 3:02:21 PM jenkins.model.lazy.LazyBuildMixIn removeRun
WARNING: hudson.maven.MavenModule@25443877[git-spike-maven-jarsigning-sample-joe/org.mycorp.ecd.samples:jarsigning][git-spike-maven-jarsigning-sample-joe/org.mycorp.ecd.samples:jarsigning][relativePath:] did not contain git-spike-maven-jarsigning-sample-joe/org.mycorp.ecd.samples:jarsigning #10 to begin with

Did I miss something ?

Gitlab build links broken in Gitlab 7.10

I have just upgraded from Gitlab 7.8.4 to Gitlab 7.10.0 and now the build status on merge requests always shows "pending" and the links to "View build page" just return a blank page.

In the Jenkins log I see this when accessing the build page:
Apr 25, 2015 2:28:03 PM com.dabsquared.gitlabjenkins.GitLabWebHook getDynamic
WARNING: WebHook called.
Apr 25, 2015 2:28:03 PM com.dabsquared.gitlabjenkins.GitLabWebHook getDynamic
WARNING: Dynamic request mot met: First path: 'refs' late path: '02eb3e12f2517ed2a4e6b52ecf13dc78bf61da1d'

Looking at the URLs being built it seems the Gitlab CI integration has changed what it looks for.

In 7.8.4 the build page link would be of the form:
http://jenkins.host.com/project/Project_Name/commits/cda3a5c549392ce3e2141a4c8798ddc90b148089
In 7.10.0 the link is now:
http://jenkins.host.com/project/Project_Name/refs/sourceBranchName/commits/cda3a5c549392ce3e2141a4c8798ddc90b148089

This looks to be the change to gitlab which altered this functionality:
gitlabhq/gitlabhq@5738afd

Allow Configuring the GitLabPushTrigger via the Job DSL Plugin

I am attempting to use the https://github.com/jenkinsci/job-dsl-plugin to build jobs from our GitLab repo via the GitLab API

I have it building the job correctly but cannot figure out the correct config to pass to enable the GitLabPushTrigger checkbox

job("test") {
    configure { buildTriggers ->
      buildTriggers/GitLabPushTrigger << 'com.dabsquared.gitlabjenkins.GitLabPushTrigger' 
        triggerOnMergeRequest << 'true'
        triggerOnPush << 'true'
        triggerOpenMergeRequestOnPush << 'true'
        ciSkip << 'true'
        setBuildDescription << 'true'
        addNoteOnMergeRequest << 'true'
        addVoteOnMergeRequest << 'true'
        allowAllBranches << 'true'
      }
    }
}

Set Job Description to the Build Cause

The plugin should provide an option to set the Build Description to the build cause that triggered it. For Merge Request Builds, this would be the message that says:

GitLab Merge Request <mergeRequestNumber> : <sourceBranch> => <destBranch>

This allows a user to quickly scan the list of recent builds to see which merge requests are good and which have issues.

For a comparison, see the Gitlab Merge Request Builder plugin for an example of how it sets the build description.

Gitlab configuration failed

On the global configuration screen, when gitlab host url and token is added Test Connection failed.

Both are the same added in Gitlab.

Gitlab version: 7.9.1
Jenkins version: 1.606

javax.servlet.ServletException: java.lang.Error: java.io.IOException: {"message":"401 Unauthorized"}
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:783)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:863)
    at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:248)
    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:733)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:863)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:636)
    at org.kohsuke.stapler.Stapler.service(Stapler.java:225)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)
    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:96)
    at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:88)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
    at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
    at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
    at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
    at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:46)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
    at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1474)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:533)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
    at org.eclipse.jetty.server.Server.handle(Server.java:370)
    at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
    at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:960)
    at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1021)
    at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
    at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
    at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
    at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:701)
Caused by: java.lang.Error: java.io.IOException: {"message":"401 Unauthorized"}
    at org.gitlab.api.http.GitlabHTTPRequestor$1.fetch(GitlabHTTPRequestor.java:218)
    at org.gitlab.api.http.GitlabHTTPRequestor$1.hasNext(GitlabHTTPRequestor.java:174)
    at org.gitlab.api.http.GitlabHTTPRequestor.getAll(GitlabHTTPRequestor.java:143)
    at org.gitlab.api.GitlabAPI.getProjects(GitlabAPI.java:168)
    at com.dabsquared.gitlabjenkins.GitLab.checkConnection(GitLab.java:29)
    at com.dabsquared.gitlabjenkins.GitLabPushTrigger$DescriptorImpl.doTestConnection(GitLabPushTrigger.java:463)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:622)
    at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298)
    at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161)
    at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96)
    at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:120)
    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:733)
    ... 46 more
Caused by: java.io.IOException: {"message":"401 Unauthorized"}
    at org.gitlab.api.http.GitlabHTTPRequestor.handleAPIError(GitlabHTTPRequestor.java:320)
    at org.gitlab.api.http.GitlabHTTPRequestor.access$300(GitlabHTTPRequestor.java:39)
    at org.gitlab.api.http.GitlabHTTPRequestor$1.fetch(GitlabHTTPRequestor.java:215)
    ... 61 more
Caused by: java.io.IOException: Server returned HTTP response code: 401 for URL: http://localhost/api/v3/projects?private_token=jenkinstoken
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1403)
    at org.gitlab.api.http.GitlabHTTPRequestor.parse(GitlabHTTPRequestor.java:283)
    at org.gitlab.api.http.GitlabHTTPRequestor.access$200(GitlabHTTPRequestor.java:39)
    at org.gitlab.api.http.GitlabHTTPRequestor$1.fetch(GitlabHTTPRequestor.java:211)
    ... 61 more 

Build not kicked off when source branch was updated by push

Now, when a new merge request generated (for example, feature-a will merge to master branch), jenkins build my project fine. But branch feature-a maybe contains some bugs, so it should be fixed, and push new commits to remote. Go to the gitlab to see the original unaccepted merge request. These operations should trigger a new build on jenkins, but it didn't occurs.
Is it a bug?

Empty Filter Branches Select Box

Filter branches select box never gets populated with the branches from a project.

Here’s my setup:

Single (non-clustered) Jenkins and GitLab servers.
GitLab v. 7.7.8 (on
Jenkins v. 1.588 (on Windows Server 2014)
GIT client plugin 1.16.1
GIT plugin 2.3.5
GitHub Plugin 1.10
GitLab Plugin 1.1.14

In my global Jenkins configuration, I have set the GitLab section as follows:
Gitlab host URL = http://gitlab.our.domain (I have also tried the IP address for all gitlab.our.domain)
API Token = (Set)
Ignose SSL Certificate Errors = (Checked)
Test Connection = Success when clicked

In my project configuration, I have as follows:
GitHub project = http://gitlab.our.domain/GroupName/ProjectName/
Git Repository URL = [email protected]:GroupName/ProjectName.git
Credentials = (ssh key set)
Name = origin
Repository browser = gitlab
URL = http://gitlab.our.domain/GroupName/ProjectName
Version = 7.7

Build when a change is pushed to Gitlab. = (Checked)
Build on Push Events = (Checked)
Set build description to build cause = (Checked)
Add note with build status on merge requests = (Checked)
Filter branches = (Blank)

I have saved and reloaded the configuration.
I have set up the GitLab CI settings on GitLab. Clicking the Test settings button triggers a build successfully.
The build can reach gitlab, pull, clone, and build.
The only thing that does not appear to be working is the Filter branches box.

I don't know if I should be looking for logs somewhere. I would love to debug this myself, but this would be my first jenkins plugin debugging venture and I don't think I have the bandwidth for the learning curve.

Build only for merge requests, not for regular pushes

We have two jobs on our servers:

  • a normal job that builds master, so we always see if the main branch passes the build and have a nice history of code metrics
  • the merge-request job, configured as instructed in this README, to get build information in the merge requests

Currently, the merge-request job also builds the branches on normal pushes, so on every push to master, two builds are scheduled. We'd like the merge-request job to only build when pushing to a branch with an open merge request, i.e. iff the build comment will be of the form "GitLab ​Merge ​​Request ​​#xx ​​: source-branch ​​=> ​​master ".

Is this possible? If I disable "Build on Push Events", subsequent pushes to open merge requests are not built. The "Filter branches" box also looks promising, we could simply exclude master, but the list is empty for me, even after a few builds.

Redirect to Jenkins Build Page Issue

I have an issue related to Builds being initiated by Gitlab Merge Request creation:
The Jenkins Build Page URL in Gitlab Merge Request Page, similar to "commits/5b3be24cb184e3698fc0cec9dd7c8ca2d1fc857e", does not redirect to the Jenkins build details page.

It just shows white page at Jenkins side.

What could be the issue?

Editing merge request descriptions triggers build

I have the job set up as described in the README, in particular, there is a webhook for merge requests as well as the CI service enabled in Gitlab. The build triggers in Jenkins are the defaults - everything checked.

Whenever I edit a merge request description, a build is triggerd. Maybe we could add a check to the trigger handler that compares the new revision to the old one, and only builds when the revision has changed? This would prevent many unnecessary builds.

Get build status by commit sha

Allow the status.png?ref=<branch> to get status.png?ref=<sha>
Useful when you want to know the status of the specific commit/last commit of a specific push

Support to Build Tag

Are their plans to trigger a build when a tag is created / pushed to the repository?

In case, the feature already exists, please help.

Build Coverage

With Gitlab 7.4 it looks like the api supports build coverage. Is it possible for someone to upload what this looks like in Gitlab 7.4 and if possible the output of what the merge request requests from the build service.

Spaces in Jenkins job name causes CI Status to not update

I am getting the error "Cannot connect to the CI server." on Merge Requests in Gitlab ever since upgrading to 7.10.5-ee. This is happening for any project where my Jenkins job name has a space in it. The projects still build and everything, just the status says it cannot connect. If I remove spaces from the job name, it works. This was working just fine in 7.10.0-ee.

I am using the most recent version of the plugin. I checked the production.log in gitlab and see:

Started GET "/venus-platform/venus/merge_requests/165/ci_status" for 127.0.0.1 at 2015-05-29 08:17:36 -0500

and in the Jenkins log I see:

May 29, 2015 8:21:58 AM com.dabsquared.gitlabjenkins.GitLabWebHook getDynamic
INFO: WebHook called with url: /refs/bug-changeBgcEnumToEspd/commits/97b19a8d6a6cb52c8faaf6f55588270dadbc3a33/status.json

Any ideas?

Jenkins URLs use "%20" for spaces. Perhaps a parsing error?

image

Push trigger not invoked

Caused by: java.lang.NullPointerException
    at com.dabsquared.gitlabjenkins.GitLabPushTrigger.onPost(GitLabPushTrigger.java:73)
    at com.dabsquared.gitlabjenkins.GitLabWebHook.generatePushBuild(GitLabWebHook.java:297)
    at com.dabsquared.gitlabjenkins.GitLabWebHook.generateBuild(GitLabWebHook.java:276)
    at com.dabsquared.gitlabjenkins.GitLabWebHook.getDynamic(GitLabWebHook.java:120)
    ... 90 more

https://wiki.jenkins-ci.org/display/JENKINS/Hint+on+retaining+backward+compatibility

Inverse filter branches.

Hi.
We have 2 builds. One of them is based on master branch and this build has higher priority and needs to be stable all the time.

The second build is for any other branch.
We are creating new branches for each feature we are creating so I would like to ignore master in the second build.

Option to inverse filter branches behaviour would be awesome for us.

Thanx for awesome job !

Build on Merge Request fails since updating to gitlab-plugin-1.1.14

Since upgrading from gitlab-plugin-1.1.13 to gitlab-plugin-1.1.14, triggering jobs when merge requests are created is broken.

The logs show data is being submitted from GitLab correctly:

data: {
    "object_kind": "merge_request",
    "object_attributes":     {
        "id": 52,
        "target_branch": "branch-1",
        "source_branch": "branch-2",
        "source_project_id": 91,
        "author_id": 4,
        "assignee_id": 4,
        "title": "Branch 2",
        "created_at": "2015-02-14 09:03:05 UTC",
        "updated_at": "2015-02-14 09:03:05 UTC",
        "milestone_id": null,
        "state": "opened",
        "merge_status": "unchecked",
        "target_project_id": 91,
        "iid": 40,
        "description": "",
        "position": 0
    }
}

But generateMergeRequestBuild is throwing a NullPointerException:

Feb 14, 2015 9:02:35 AM WARNING org.eclipse.jetty.util.log.JavaUtilLog warn
Error while serving http://jenkins.looklive.org/project/looklive-merge
java.lang.reflect.InvocationTargetException
    at sun.reflect.GeneratedMethodAccessor223.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298)
    at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161)
    at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:388)
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)
    at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:390)
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:631)
    at org.kohsuke.stapler.Stapler.service(Stapler.java:225)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)
    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:96)
    at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:88)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
    at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
    at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:135)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:86)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
    at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
    at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
    at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:46)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
    at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1474)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:533)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
    at org.eclipse.jetty.server.Server.handle(Server.java:366)
    at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
    at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:960)
    at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1021)
    at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
    at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
    at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
    at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
    at com.dabsquared.gitlabjenkins.GitLabWebHook.generateMergeRequestBuild(GitLabWebHook.java:409)
    at com.dabsquared.gitlabjenkins.GitLabWebHook.generateBuild(GitLabWebHook.java:316)
    at com.dabsquared.gitlabjenkins.GitLabWebHook.getDynamic(GitLabWebHook.java:130)
    ... 67 more

Before the update everything was working fine. If I revert to 1.13 the trigger begins to work again.

I looked through the changelog for 1.13->1.14 and couldn't see any obvious changes that could have caused this.

Do you have any suggestions for debugging further?

status.json raises 500 error

When viewing a merge request on Gitlab, Gitlab makes a request to Jenkins to get the status of the commit, however this raises a NullPointerException.

The request made by Gitlab looks like this:

https://JENKINS_URL/project/PROJECT_NAME/commits/COMMIT_SHA/status.json?token=TOKEN

And the NullPointerException traceback is:
``
Caused by: java.lang.NullPointerException
at com.dabsquared.gitlabjenkins.GitLabWebHook.getBuildBySHA1(GitLabWebHook.java:440)
at com.dabsquared.gitlabjenkins.GitLabWebHook.generateStatusJSON(GitLabWebHook.java:183)
at com.dabsquared.gitlabjenkins.GitLabWebHook.getDynamic(GitLabWebHook.java:137)
at sun.reflect.GeneratedMethodAccessor238.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298)
at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161)
at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:389)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)

``

Connecting to gitlab server via https fails

I am trying to setup the gitlab-plugin with a gitlab server that can only be reached via https. Upon testing the configuration in jenkin's configure system page I get the error appended to this ticket. I verified that the gitlab api works as expected with https://my_host/gitlab/api/v3/projects?private_token=my_private_token.

Environment

  • Gitlab Version 7.6.1
  • jenkins Version 1.596
  • gitlab-plugin Version 1.1.7

gitlab-plugin Test Connection-Error

javax.servlet.ServletException: java.lang.Error: javax.net.ssl.SSLProtocolException: handshake alert:  unrecognized_name
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:796)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
    at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:249)
    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
    at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)
    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:96)
    at com.smartcodeltd.jenkinsci.plugin.assetbundler.filters.LessCSS.doFilter(LessCSS.java:43)
    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:99)
    at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:88)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
    at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
    at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
    at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
    at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
    at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
    at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
    at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1474)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:533)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
    at org.eclipse.jetty.server.Server.handle(Server.java:370)
    at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
    at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:960)
    at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1021)
    at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
    at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
    at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
    at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.Error: javax.net.ssl.SSLProtocolException: handshake alert:  unrecognized_name
    at org.gitlab.api.http.GitlabHTTPRequestor$1.fetch(GitlabHTTPRequestor.java:218)
    at org.gitlab.api.http.GitlabHTTPRequestor$1.hasNext(GitlabHTTPRequestor.java:174)
    at org.gitlab.api.http.GitlabHTTPRequestor.getAll(GitlabHTTPRequestor.java:143)
    at org.gitlab.api.GitlabAPI.getProjects(GitlabAPI.java:168)
    at com.dabsquared.gitlabjenkins.GitLab.checkConnection(GitLab.java:29)
    at com.dabsquared.gitlabjenkins.GitLabPushTrigger$DescriptorImpl.doTestConnection(GitLabPushTrigger.java:388)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298)
    at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161)
    at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96)
    at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:121)
    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
    ... 65 more
Caused by: javax.net.ssl.SSLProtocolException: handshake alert:  unrecognized_name
    at sun.security.ssl.ClientHandshaker.handshakeAlert(ClientHandshaker.java:1373)
    at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1952)
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1077)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1312)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1339)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1323)
    at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:563)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1300)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
    at org.gitlab.api.http.GitlabHTTPRequestor.parse(GitlabHTTPRequestor.java:283)
    at org.gitlab.api.http.GitlabHTTPRequestor.access$200(GitlabHTTPRequestor.java:39)
    at org.gitlab.api.http.GitlabHTTPRequestor$1.fetch(GitlabHTTPRequestor.java:211)
    ... 80 more

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.