| ... | ... | @@ -22,5 +22,22 @@ I installed Jenkins with docker-compose. |
|
|
|
- sonarqube
|
|
|
|
|
|
|
|
```
|
|
|
|
Go to your url port 8080 and follow to installation instructions.
|
|
|
|
#### Configuring Jenkins to work with Gitlab
|
|
|
|
I builded my integration based on [this](https://docs.gitlab.com/ee/integration/jenkins.html) guide.
|
|
|
|
First you need to Install GitLab-plugin to Jenkins. After installing plugin you configure the connection in Jenkins > Manage Jenkins > Configure System:
|
|
|
|

|
|
|
|
You need to set-up your gitlab-url and name to connection.
|
|
|
|
The next step is to create credentials for your connection. This is done in GitLab. In GitLab you go to user settings > access tokens > personal access tokens and create a access token. You should save your acces token to a secure location.
|
|
|
|

|
|
|
|
Created Access token.
|
|
|
|
|
|
|
|
In Jenkins you create GitLab API token. Input your token and the ID you created.
|
|
|
|

|
|
|
|
Jenkins GitLab API token.
|
|
|
|
You can test the connection and you should see Success if the configuration is correct.
|
|
|
|
|
|
|
|
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.
|
|
|
|
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. |