jenkins_deprecated.md 2.13 KB
Newer Older
Craig Norris's avatar
Craig Norris committed
1
---
Kati Paizee's avatar
Kati Paizee committed
2 3
stage: Ecosystem
group: Integrations
4
info: 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
Craig Norris's avatar
Craig Norris committed
5 6
---

7
# Jenkins CI (deprecated) service **(FREE)**
8

9
NOTE:
10
In GitLab 8.3, Jenkins integration using the
11 12 13 14 15
[GitLab Hook Plugin](https://wiki.jenkins.io/display/JENKINS/GitLab+Hook+Plugin)
was deprecated in favor of the
[GitLab Plugin](https://wiki.jenkins.io/display/JENKINS/GitLab+Plugin).
Please use documentation for the new [Jenkins CI service](jenkins.md).

16
NOTE:
17 18
This service was [removed in v13.0](https://gitlab.com/gitlab-org/gitlab/-/issues/1600)

19 20
Integration includes:

21
- Trigger Jenkins build after push to repository
22
- Show build status on Merge Request page
23 24 25

Requirements:

26
- [Jenkins GitLab Hook plugin](https://wiki.jenkins.io/display/JENKINS/GitLab+Hook+Plugin)
27
- Git clone access for Jenkins from GitLab repository (via SSH key)
28 29 30 31

## Jenkins

1. Install [GitLab Hook plugin](https://wiki.jenkins.io/display/JENKINS/GitLab+Hook+Plugin)
32
1. Set up Jenkins project
33 34 35 36 37 38 39 40 41 42

![screen](img/jenkins_project.png)

## GitLab

In GitLab, perform the following steps.

### Read access to repository

Jenkins needs read access to the GitLab repository. We already specified a
Mike Russo's avatar
Mike Russo committed
43
private key to use in Jenkins, now we must add a public one to the GitLab
44
project. For that case we need a Deploy key. Read the documentation on
45
[how to set up a Deploy key](../user/project/deploy_keys/index.md).
46 47 48 49 50 51 52

### Jenkins service

Now navigate to GitLab services page and activate Jenkins

![screen](img/jenkins_gitlab_service.png)

Mike Russo's avatar
Mike Russo committed
53 54
Done! When you push to GitLab, it creates a build for Jenkins. You can view the
merge request build status with a link to the Jenkins build.
55 56 57 58

### Multi-project Configuration

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

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.