Commit c1725124 authored by Suzanne Selhorn's avatar Suzanne Selhorn

Merge branch 'russell/edit-jenkins-intructions' into 'master'

Edited GitLab-Jenkins integration instructions

See merge request gitlab-org/gitlab!31560
parents 7943d2e7 68117d77
...@@ -99,25 +99,29 @@ Set up the Jenkins project you’re going to run your build on. ...@@ -99,25 +99,29 @@ Set up the Jenkins project you’re going to run your build on.
1. Check the following checkboxes: 1. Check the following checkboxes:
- **Accepted Merge Request Events** - **Accepted Merge Request Events**
- **Closed 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. 1. Specify how build status is reported to GitLab:
If you created a **Pipeline** project, you must use a pipeline script to update the status on - If you created a **Freestyle** project, in the **Post-build Actions** section, choose
GitLab. The following is an example pipeline script: **Publish build status to GitLab**.
- If you created a **Pipeline** project, you must use a Jenkins Pipeline script to update the status on
```plaintext GitLab.
pipeline {
agent any Example Jenkins Pipeline script:
stages { ```groovy
stage('gitlab') { pipeline {
steps { agent any
echo 'Notify GitLab'
updateGitlabCommitStatus name: 'build', state: 'pending' stages {
updateGitlabCommitStatus name: 'build', state: 'success' stage('gitlab') {
steps {
echo 'Notify GitLab'
updateGitlabCommitStatus name: 'build', state: 'pending'
updateGitlabCommitStatus name: 'build', state: 'success'
}
} }
} }
} }
} ```
```
## Configure the GitLab project ## 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