jenkinsci / jenkinsci/gitlab-plugin

Add the ability to parse the whole webhook JSON payload

Open
#708 14 comments 13 reactions 0 assignees View on GitHub
feature request
Dominant language
Java
Stars
1.4k
Forks
615
Avg merge
4h 32m
Merged PRs (30d)
10

Description

Right now when the plugin receives a webhook JSON payload, we parse it and, if the project type is not Pipeline Multibranch, we set various environment variables using some of the JSON data, and discard the rest. Every few months a user asks us to add another env var from something in the JSON.

The plugin pre-dates Pipeline, and originally was really just intended to receive the relevant branch name from the webhook, and use that when cloning the repo. GitLab and Jenkins have come a long way since then. I have thought for awhile that, at least for Pipeline jobs, it would make everyone's life simpler if we just slurped the whole JSON payload into a Groovy data structure. Then anyone using Pipeline could access any of the data in the payload, and when GitLab adds things to it they would automatically be available.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.