2020-10-29 11:09:12 -04:00
---
2021-08-02 11:08:56 -04:00
stage: Ecosystem
group: Integrations
2020-11-26 01:09:20 -05:00
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
2020-10-29 11:09:12 -04:00
---
2021-02-17 13:09:19 -05:00
# Jenkins CI (deprecated) service **(FREE)**
2019-05-05 08:04:54 -04:00
2020-12-04 16:09:29 -05:00
NOTE:
2020-07-23 14:10:06 -04:00
In GitLab 8.3, Jenkins integration using the
2019-05-05 08:04:54 -04:00
[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 ).
2020-12-04 16:09:29 -05:00
NOTE:
2021-09-28 05:11:19 -04:00
This service was [removed ](https://gitlab.com/gitlab-org/gitlab/-/issues/1600 ) in GitLab 13.0
2020-05-15 05:07:59 -04:00
2019-05-05 08:04:54 -04:00
Integration includes:
2020-12-11 01:10:17 -05:00
- Trigger Jenkins build after push to repository
2022-01-25 07:14:14 -05:00
- Show build status on Merge request page
2019-05-05 08:04:54 -04:00
Requirements:
2019-06-30 23:36:23 -04:00
- [Jenkins GitLab Hook plugin ](https://wiki.jenkins.io/display/JENKINS/GitLab+Hook+Plugin )
2020-12-11 01:10:17 -05:00
- Git clone access for Jenkins from GitLab repository (via SSH key)
2019-05-05 08:04:54 -04:00
## Jenkins
1. Install [GitLab Hook plugin ](https://wiki.jenkins.io/display/JENKINS/GitLab+Hook+Plugin )
2019-08-27 04:41:50 -04:00
1. Set up Jenkins project
2019-05-05 08:04:54 -04:00
![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
2021-08-26 17:11:25 -04:00
private key to use in Jenkins, now we must add a public one to the GitLab
2020-11-19 13:09:13 -05:00
project. For that case we need a Deploy key. Read the documentation on
2021-02-17 16:09:06 -05:00
[how to set up a Deploy key ](../user/project/deploy_keys/index.md ).
2019-05-05 08:04:54 -04:00
### Jenkins service
Now navigate to GitLab services page and activate Jenkins
![screen ](img/jenkins_gitlab_service.png )
2021-08-26 17:11:25 -04:00
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.
2019-05-05 08:04:54 -04:00
### Multi-project Configuration
The GitLab Hook plugin in Jenkins supports the automatic creation of a project
2020-11-19 13:09:13 -05:00
for each feature branch. After configuration GitLab triggers feature branch
builds and a corresponding project is created in Jenkins.
2019-05-05 08:04:54 -04:00
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.