gitlab-plugin
gitlab-plugin copied to clipboard
Jenkins job is triggered when approval is revoked.
Issue
When a Merge Request approval is revoked, Gitlab creates an event which is sent to Jenkins. When using the Approved Merge Requests (EE-only) trigger option, the Jenkins job triggers a build. I am trying to prevent this from happening.
When looking up the metadata which Gitlab sends to Jenkins, I see there is one particular key value that is being sent to Jenkins. This is the "action": "unapproved" within the "object_attributes" object.
Are we able to convert this value into an environment variable so we can skip the build? Or alternatively, do not allow Jenkins to trigger a job on this action (revoke approval)
Context
- Gitlab plugin version: 1.5.13
- Gitlab version: 13.1.4-ee
- Jenkins version: 2.236
- Job type: Pipeline
Problem description
Describe your problem in a meaningful way:
- Revoke a Merge Request approval while using the Approved Merge Requests (EE-only) trigger option
- Jenkins job should not trigger
- Jenkins job is triggered
Same here. Need an env variable to get the mr action in payload.
Approve or revoke will trigger the build.