Merge pull request #134 from thommy101/CommitStatus
Fixes for pullrequest #127
This commit is contained in:
commit
856ae9a9f7
|
@ -71,7 +71,8 @@ If you plan to use forked repositories, you will need to enable the GitLab CI in
|
|||
* Click on *Web Hooks*
|
||||
* 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.
|
||||
|
||||
|
|
|
@ -415,7 +415,7 @@ public class GitLabPushTrigger extends Trigger<Job<?, ?>> {
|
|||
|
||||
private void onCompletedPushRequest(Run run, GitLabPushCause cause) {
|
||||
if(addCiMessage) {
|
||||
cause.getPushRequest().createCommitStatus(this.getDescriptor().getGitlab().instance(), run.getResult()==Result.SUCCESS?"success":"failure", Jenkins.getInstance().getRootUrl() + run.getUrl());
|
||||
cause.getPushRequest().createCommitStatus(this.getDescriptor().getGitlab().instance(), run.getResult()==Result.SUCCESS?"success":"failed", Jenkins.getInstance().getRootUrl() + run.getUrl());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -456,7 +456,7 @@ public class GitLabPushTrigger extends Trigger<Job<?, ?>> {
|
|||
}
|
||||
|
||||
if(addCiMessage) {
|
||||
cause.getMergeRequest().createCommitStatus(this.getDescriptor().getGitlab().instance(), run.getResult()==Result.SUCCESS?"success":"failure", Jenkins.getInstance().getRootUrl() + run.getUrl());
|
||||
cause.getMergeRequest().createCommitStatus(this.getDescriptor().getGitlab().instance(), run.getResult()==Result.SUCCESS?"success":"failed", Jenkins.getInstance().getRootUrl() + run.getUrl());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue