jenkinsci / jenkinsci/git-plugin

[JENKINS-75072] Support documentation of EnvVar contributed by GitSCMExtension

Open
#3,867 3 comments 0 reactions 0 assignees View on GitHub
component:git-plugin enhancement imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
694
Forks
1.1k
Avg merge
1h 29m
Merged PRs (30d)
3

Description

As a Jenkins plugin developer, when I provide an implementation of the GitSCMExtension extension point with environment variables via the populateEnvironmentVariables method, I also need to be able to provide documentation.

Such documentation I would expect to contribute to the page under the "Pipeline Syntax" -> "Global Variable Reference" menu under the "env" pipeline step.

Actually Jenkins core lookup for a buildEnv.jelly or buildEnv.groovy resource in the classpath of the plugin that provides an entension of EnvironmentContributor or SCM.

Since the SCM implementation (GitSCM) is provided by the git-plugin, any buildEnv.groovy resource in the plugin where the implementation of GitSCMExtension is placed is not taken into account.

---
Originally reported by nfalco, imported from: Support documentation of EnvVar contributed by GitSCMExtension


  • status: Open
  • priority: Minor
  • component(s): git-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 4
  • imported: 2025-12-02

Raw content of original issue

As a Jenkins plugin developer, when I provide an implementation of the GitSCMExtension extension point with environment variables via the populateEnvironmentVariables method, I also need to be able to provide documentation.
Such documentation I would expect to contribute to the page under the "Pipeline Syntax" -> "Global Variable Reference" menu under the "env" pipeline step.

Actually Jenkins core lookup for a buildEnv.jelly or buildEnv.groovy resource in the classpath of the plugin that provides an entension of EnvironmentContributor or SCM.
Since the SCM implementation (GitSCM) is provided by the git-plugin, any buildEnv.groovy resource in the plugin where the implementation of GitSCMExtension is placed is not taken into account.

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.