diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 12:55:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 12:55:51 +0300 |
commit | e8d2c2579383897a1dd7f9debd359abe8ae8373d (patch) | |
tree | c42be41678c2586d49a75cabce89322082698334 /doc/integration/jenkins.md | |
parent | fc845b37ec3a90aaa719975f607740c22ba6a113 (diff) |
Add latest changes from gitlab-org/gitlab@14-1-stable-eev14.1.0-rc42
Diffstat (limited to 'doc/integration/jenkins.md')
-rw-r--r-- | doc/integration/jenkins.md | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/doc/integration/jenkins.md b/doc/integration/jenkins.md index 60c9faf938d..b6d720d2714 100644 --- a/doc/integration/jenkins.md +++ b/doc/integration/jenkins.md @@ -18,7 +18,7 @@ To better understand the GitLab Jenkins integration, watch the following video: Use the Jenkins integration with GitLab when: -- You plan to migrate your CI from Jenkins to [GitLab CI/CD](../ci/README.md) in the future, but +- You plan to migrate your CI from Jenkins to [GitLab CI/CD](../ci/index.md) in the future, but need an interim solution. - You're invested in [Jenkins Plugins](https://plugins.jenkins.io/) and choose to keep using Jenkins to build your apps. @@ -65,7 +65,7 @@ Grant a GitLab user access to the select GitLab projects. 1. Grant the user permission to the GitLab projects. If you're integrating Jenkins with many GitLab projects, consider granting the user global - Administrator permission. Otherwise, add the user to each project, and grant Developer permission. + Administrator permission. Otherwise, add the user to each project, and grant the Developer role. ## Configure GitLab API access @@ -137,13 +137,16 @@ Set up the Jenkins project you intend to run your build on. } ``` + For more Jenkins Pipeline script examples, go to the [Jenkins GitLab plugin repository on GitHub](https://github.com/jenkinsci/gitlab-plugin#scripted-pipeline-jobs). + ## Configure the GitLab project Configure the GitLab integration with Jenkins in one of the following ways. ### Recommended Jenkins integration -GitLab recommends this approach for Jenkins integrations. +GitLab recommends this approach for Jenkins integrations because it is easier to configure +than the [webhook integration](#webhook-integration). 1. Create a new GitLab project or choose an existing one. 1. Go to **Settings > Integrations**, then select **Jenkins CI**. @@ -217,3 +220,16 @@ If you don't find the errors above, but do find *duplicate* entries like below ( 2019-10-25_04:22:41.25630 2019-10-25T04:22:41.256Z 1584 TID-ovowh4tek WebHookWorker JID-941fb7f40b69dff3d833c99b INFO: start 2019-10-25_04:22:41.25630 2019-10-25T04:22:41.256Z 1584 TID-ovowh4tek WebHookWorker JID-941fb7f40b69dff3d833c99b INFO: start ``` + +### Enable job logs in Jenkins + +When troubleshooting an integration issue, it is useful to enable job logs in Jenkins to see more details about what is happening under the hood. +To enable job logs in Jenkins: + +1. Go to **Dashboard > Manage Jenkins > System Log**. +1. Select **Add new log recorder**. +1. Enter a name for the log recorder. +1. On the next screen, select **Add** and enter `org.jenkinsci.plugins.workflow.job` in the text field. +1. Make sure that the Log Level is **All** and select **Save**. + +Now, after you run a build, you can go to the loggers page (**Dashboard > Manage Jenkins > System Log**), select your logger, and check the logs. |