Merge pull request #529 from mstg/pipeline-example
README: Better declarative pipeline example
This commit is contained in:
commit
46e1af798c
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue