Merge pull request #529 from mstg/pipeline-example

README: Better declarative pipeline example
This commit is contained in:
Owen Mehegan 2017-08-02 14:46:36 -07:00 committed by GitHub
commit 46e1af798c
1 changed files with 8 additions and 1 deletions

View File

@ -137,9 +137,16 @@ The plugin supports the new [declarative pipeline syntax](https://github.com/jen
```
pipeline {
agent any
post {
failure {
updateGitlabCommitStatus name: 'build', state: 'failed'
}
success {
updateGitlabCommitStatus name: 'build', state: 'success'
}
}
options {
gitLabConnection('<your-gitlab-connection-name')
gitlabCommitStatus(name: 'jenkins')
}
triggers {
gitlab(triggerOnPush: true, triggerOnMergeRequest: true, branchFilterType: 'All')