Merge pull request #197 from omehegan/patch-1

Reorganize README to be more clear about config for different versions of GitLab
This commit is contained in:
Owen Mehegan 2016-02-19 13:41:29 -08:00
commit 9ff93e9321
1 changed files with 16 additions and 16 deletions

View File

@ -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`` <br/>
**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`` <br/>
@ -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`` <br/>
**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`` <br/>
**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*