Commit 68117d77 authored by Russell Dickenson's avatar Russell Dickenson Committed by Suzanne Selhorn

Edited GitLab-Jenkins integration instructions

parent c2ac5f1d
......@@ -99,25 +99,29 @@ Set up the Jenkins project you’re going to run your build on.
1. Check the following checkboxes:
- **Accepted Merge Request Events**
- **Closed Merge Request Events**
1. If you created a **Freestyle** project, choose Publish build status to GitLab in the Post-build Actions section.
If you created a **Pipeline** project, you must use a pipeline script to update the status on
GitLab. The following is an example pipeline script:
```plaintext
pipeline {
agent any
stages {
stage('gitlab') {
steps {
echo 'Notify GitLab'
updateGitlabCommitStatus name: 'build', state: 'pending'
updateGitlabCommitStatus name: 'build', state: 'success'
1. Specify how build status is reported to GitLab:
- If you created a **Freestyle** project, in the **Post-build Actions** section, choose
**Publish build status to GitLab**.
- If you created a **Pipeline** project, you must use a Jenkins Pipeline script to update the status on
GitLab.
Example Jenkins Pipeline script:
```groovy
pipeline {
agent any
stages {
stage('gitlab') {
steps {
echo 'Notify GitLab'
updateGitlabCommitStatus name: 'build', state: 'pending'
updateGitlabCommitStatus name: 'build', state: 'success'
}
}
}
}
}
```
```
## Configure the GitLab project
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment