Skip to content

Commit 3775262

Browse files
authored
Merge pull request #1325 from TPXP/doc-updates
Doc updates
2 parents a87469d + 6f4e807 commit 3775262

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ Also make sure you have chosen the appropriate GitLab instance from the 'GitLab
345345
}
346346
}
347347
```
348-
* Or use the `updateGitlabCommitStatus` step to use a custom value for updating the commit status. You could use try/catch blocks or other logic to send fine-grained status of the build to GitLab. Valid statuses are defined by GitLab and documented here: https://docs.gitlab.com/ce/api/pipelines.html
348+
* Or use the `updateGitlabCommitStatus` step to use a custom value for updating the commit status. You could use try/catch blocks or other logic to send fine-grained status of the build to GitLab. Valid statuses are defined by GitLab and documented here: https://docs.gitlab.com/ee/api/commits.html#post-the-build-status-to-a-commit
349349
```groovy
350350
node() {
351351
stage('Checkout') { checkout <your-scm-config> }
@@ -393,6 +393,9 @@ pipeline {
393393
success {
394394
updateGitlabCommitStatus name: 'build', state: 'success'
395395
}
396+
aborted {
397+
updateGitlabCommitStatus name: 'build', state: 'canceled'
398+
}
396399
}
397400
options {
398401
gitLabConnection('your-gitlab-connection-name')
@@ -403,6 +406,7 @@ pipeline {
403406
stages {
404407
stage("build") {
405408
steps {
409+
updateGitlabCommitStatus name: 'build', state: 'running'
406410
echo "hello world"
407411
}
408412
}

0 commit comments

Comments
 (0)