Jenkins GitLab Integration Processes

Muhammed Eren Demir
3 min readJun 21, 2021

By integrating GitLab and Jenkins. With GitLab WebHook, we will trigger Jenkins according to our requests made to GitLab to perform the operations we want.

For example, when our GitLab project is pushed, Jenkins is triggered and the project is built.

Integration

Step 1: Search for Manage Jenkins -> Manage Plugins GitLab Plugin and install it, then reboot.

Step 2: Let’s create a token by logging into Gitlab and entering the Access Tokens tab.

Let’s copy the token after the token is created.

Step 3: Let’s enter Jenkins and fill in the GitLab field in Manage Jenkins -> Configure System and if there is no GitLab token we created in the token section, we will create a new token by clicking Add.

  • Let’s select the GitLab API token that receives Kind.
  • The token that we created in GitLab will be entered in the API token field.

Step 4: Configure our Jenkins Project. We will generate a token from the advanced options by clicking advanced in the Generating Triggers.

The URL in the blue box here will be needed in the future, so let’s copy it or save it to a different location.

We will copy the created token and then enter Gitlab.

Step 5: By entering GitLab and entering the Integrations field from the Settings area of ​​our project, the URL in the blue box in the previous step will be the URL. The token that we created in the previous step will be entered into the Secret Token field.

After creating, we can test it from the Test section.
The processes are finished. Jenkins can now be triggered with GitLab Webhook.

--

--

Muhammed Eren Demir

I am software developer. I'm improving myself on Java and devops. I'm working java and devops software in DetaySoft.