From b93b393795d80033c763648ac2cb9051b621731e Mon Sep 17 00:00:00 2001 From: Owen Mehegan Date: Thu, 18 Feb 2016 17:25:00 -0800 Subject: [PATCH] Reorganize README to be more clear about config for different versions of GitLab --- README.md | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index b6499bb..0e12654 100644 --- a/README.md +++ b/README.md @@ -33,8 +33,7 @@ Optionally, the plugin communicates with the Gitlab server in order to fetch add To enable this functionality, a user should be set up on Gitlab, with adequate permissions to access the repository. On the global configuration screen, supply the gitlab host url ``http://your.gitlab.server`` and the API token of the user of choice. -Using it With A Job -===================== +### Jenkins Job Configuration * Create a new job by going to *New Job* * Set the _Project Name_ to whatever you like * In the *Source Code Management* section: @@ -60,7 +59,19 @@ Using it With A Job * Configure any other pre build, build or post build actions as necessary * Click *Save* to preserve your changes in Jenkins. -### GitLab Configuration (≥ 8.0) +### GitLab Configuration (7.x) +* In GitLab go to your repository's project *Settings* + * Click on *Services* + * Click on *GitLab CI* + * Check the *Active* checkbox + * For *Token* put any random string (This is not yet functioning) + * For *Project URL* put ``http://JENKINS_URL/project/PROJECT_NAME`` + * Click *Save* + * Click on *Web Hooks* + * Add a Web Hook for *Merge Request Events* to ``http://JENKINS_URL/project/PROJECT_NAME``
+ **Note:** GitLab for some reason does not send a merge request event with the GitLab Service. + +### GitLab Configuration (8.0.x) * In GitLab go to you primary repository's project *Settings* * Click on *Web Hooks* * Add a Web Hook for *Merge Request Events* and *Push Events* to ``http://JENKINS_URL/project/PROJECT_NAME``
@@ -72,23 +83,12 @@ If you plan to use forked repositories, you will need to enable the GitLab CI in * Add a Web Hook for *Merge Request Events* and *Push Events* to ``http://JENKINS_URL/project/PROJECT_NAME``
**Note:** You do not need to select any "Trigger Events" as the Web Hook for Merge Request Events will alert Jenkins. -### GitLab Configuration (≥ 8.1) +### GitLab Configuration (>= 8.1) GitLab 8.1 uses the same configuration as GitLab 8.0 * GitLab 8.1 has implemented a commit status api. To enable this check the ``Use GitLab CI features`` under the project settings. * Configure access to GitLab as described above in "Configure access to GitLab" -### GitLab Configuration (< 8.0) -* In GitLab go to you primary repository's project *Settings* - * Click on *Services* - * Click on *GitLab CI* - * Check the *Active* checkbox - * For *Token* put any random string (This is not yet functioning) - * For *Project URL* put ``http://JENKINS_URL/project/PROJECT_NAME`` - * Click *Save* - * Click on *Web Hooks* - * Add a Web Hook for *Merge Request Events* to ``http://JENKINS_URL/project/PROJECT_NAME``
- **Note:** GitLab for some reason does not send a merge request event with the GitLab Service. - +### Forked repositories If you plan to use forked repositories, you will need to enable the GitLab CI integration on **each fork**. * Go to the Settings page in each developer's fork * Click on *Services*