debian-mirror-gitlab/doc/integration/jenkins_deprecated.md
2021-02-22 17:27:13 +05:30

2.1 KiB

stage group info
Create Ecosystem To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments

Jenkins CI (deprecated) service

NOTE: In GitLab 8.3, Jenkins integration using the GitLab Hook Plugin was deprecated in favor of the GitLab Plugin. Please use documentation for the new Jenkins CI service.

NOTE: This service was removed in v13.0

Integration includes:

  • Trigger Jenkins build after push to repository
  • Show build status on Merge Request page

Requirements:

Jenkins

  1. Install GitLab Hook plugin
  2. Set up Jenkins project

screen

GitLab

In GitLab, perform the following steps.

Read access to repository

Jenkins needs read access to the GitLab repository. We already specified a private key to use in Jenkins, now we need to add a public one to the GitLab project. For that case we need a Deploy key. Read the documentation on how to set up a Deploy key.

Jenkins service

Now navigate to GitLab services page and activate Jenkins

screen

Done! Now when you push to GitLab - it creates a build for Jenkins, and you can view the merge request build status with a link to the Jenkins build.

Multi-project Configuration

The GitLab Hook plugin in Jenkins supports the automatic creation of a project for each feature branch. After configuration GitLab triggers feature branch builds and a corresponding project is created in Jenkins.

Configure the GitLab Hook plugin in Jenkins. Go to 'Manage Jenkins' and then 'Configure System'. Find the 'GitLab Web Hook' section and configure as shown below.