README: Better declarative pipeline example
This commit is contained in:
parent
45477e0fae
commit
5c80f563e7
|
@ -141,9 +141,16 @@ The plugin supports the new [declarative pipeline syntax](https://github.com/jen
|
||||||
```
|
```
|
||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
|
post {
|
||||||
|
failure {
|
||||||
|
updateGitlabCommitStatus name: 'build', state: 'failed'
|
||||||
|
}
|
||||||
|
success {
|
||||||
|
updateGitlabCommitStatus name: 'build', state: 'success'
|
||||||
|
}
|
||||||
|
}
|
||||||
options {
|
options {
|
||||||
gitLabConnection('<your-gitlab-connection-name')
|
gitLabConnection('<your-gitlab-connection-name')
|
||||||
gitlabCommitStatus(name: 'jenkins')
|
|
||||||
}
|
}
|
||||||
triggers {
|
triggers {
|
||||||
gitlab(triggerOnPush: true, triggerOnMergeRequest: true, branchFilterType: 'All')
|
gitlab(triggerOnPush: true, triggerOnMergeRequest: true, branchFilterType: 'All')
|
||||||
|
|
Loading…
Reference in New Issue