Skip to content

Commit 6f4e807

Browse files
authored
Handle more statuses in the Declarative pipeline example
Send the running status when the pipeline starts and handle aborted pipelines
1 parent b1f0aee commit 6f4e807

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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)