jenkinsci / jenkinsci/envinject-api-plugin

[JENKINS-47370] Unable to override global envs after update to 2.1.4

Open
#51 19 comments 0 reactions 0 assignees View on GitHub
bug envinject-api-plugin envinject-plugin imported-jira-issue jira-component:envinject-api-plugin jira-component:envinject-plugin
Dominant language
Java
Stars
6
Forks
17
PR merge metrics
No merged PRs in 30d

Description

We have a global setting of JIRA_URL=jira.acme.com

In some jobs we override this in the "Prepare an environment for the run" section to JIRA_URL=jira-staging.acme.com

 

After upgrading to 1.24 this stopped working. The effective value as seen in shell scripts is jira.acme.com

 

Setting the value in a "Inject environment variables" build step also has no effect.

The only thing that has an effect is to set the value inside the shell script.

---
Originally reported by jbochenski, imported from: Unable to override global envs after update to 2.1.4


  • status: Reopened
  • priority: Blocker
  • resolution: Unresolved
  • imported: 2022-10-20

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the environment precedence problem in a Jenkins job using the "Prepare an environment for the run" section and the "Inject environment variables" build step after the reported upgrade. Compare the effective JIRA_URL in shell scripts with the global and job-level values; done means job-level overrides take effect without setting the variable inside the script.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.