| ... | @@ -37,7 +37,21 @@ In Jenkins you create GitLab API token. Input your token and the ID you created. |
... | @@ -37,7 +37,21 @@ In Jenkins you create GitLab API token. Input your token and the ID you created. |
|
|
Jenkins GitLab API token.
|
|
Jenkins GitLab API token.
|
|
|
You can test the connection and you should see Success if the configuration is correct.
|
|
You can test the connection and you should see Success if the configuration is correct.
|
|
|
|
|
|
|
|
|
You need to create a Jenkins-project for your GitLab connection. Create a Freestyle project. In project go to Configure. Add a GitHub project and enter the project url and select your GitLab connection.
|
|
|
|

|
|
|
|
GitLab project url.
|
|
|
|

|
|
|
|
GitLab connection.
|
|
|
|
Add source code managment to Git.
|
|
|
|

|
|
|
|
Select which branches you like to control.
|
|
|
|
I added a build trigger:
|
|
|
|

|
|
|
|
|
|
|
|
|
|
|
In Gitlab you need to create a Webhook for Jenkins. Go to Project Settings > Integrations and enter the Jenkins url/project/your-project-name and triggers you want to.
|
|
In Gitlab you need to create a Webhook for Jenkins. Go to Project Settings > Integrations and enter the Jenkins url/project/your-project-name and triggers you want to.
|
|
|

|
|

|
|
|
Created Webhook.
|
|
Created Webhook.
|
|
|
Test the connection. I tested the connection using Push events. You may need to [enable same network-traffic](https://docs.gitlab.com/ee/security/webhooks.html). You should see a success message in GitLab.
|
|
Test the connection. I tested the connection using Push events. You may need to [enable same network-traffic](https://docs.gitlab.com/ee/security/webhooks.html). You should see a success message in GitLab.
|
|
|
|
|
|
|
|
|