jenkinsci / jenkinsci/gitlab-branch-source-plugin

[JENKINS-61683] Add GitLab variables to environment

Open
#668 1 comment 0 reactions 0 assignees View on GitHub
component:gitlab-branch-source-plugin imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
134
Forks
113
PR merge metrics
No merged PRs in 30d

Description

A great addition would be to have GitLab Webhook information available as environment variable such as:


  • object_kind -> GITLAB_OBJECT_KIND

  • projectId -> GITLAB_PROJECT_ID

This would allow us to do different things in our scripted pipelines depending on the type of event.

An easier solution would be to provide just one env variable like GITLAB_BRANCH_TYPE that could be either NORMAL / CHANGE_REQUEST / TAG

While we do not plan to use projectId at the moment, I still think it could benefit other users of the plugin.

---
Originally reported by opa, imported from: Add GitLab variables to environment


  • assignee: baymac
  • status: In Review
  • priority: Minor
  • component(s): gitlab-branch-source-plugin
  • label(s): environment-variables, gitlab, plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 2
  • imported: 20251216-182730

Raw content of original issue

A great addition would be to have GitLab Webhook information available as environment variable such as:


  • object_kind -> GITLAB_OBJECT_KIND

  • projectId -> GITLAB_PROJECT_ID

This would allow us to do different things in our scripted pipelines depending on the type of event.

An easier solution would be to provide just one env variable like GITLAB_BRANCH_TYPE that could be either NORMAL / CHANGE_REQUEST / TAG
While we do not plan to use projectId at the moment, I still think it could benefit other users of the plugin.

environment

```
Jenkins 2.227

gitlab-branch-source-plugin 1.4.4
```

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.