[JIRA] (JENKINS-43177) env.WHATEVER not considered for environment variable cross reference resolution in Declarative

2 views
Skip to first unread message

andrew.bayer@gmail.com (JIRA)

unread,
Mar 28, 2017, 7:58:01 PM3/28/17
to jenkinsc...@googlegroups.com
Andrew Bayer created an issue
 
Jenkins / Bug JENKINS-43177
env.WHATEVER not considered for environment variable cross reference resolution in Declarative
Issue Type: Bug Bug
Assignee: Andrew Bayer
Components: pipeline-model-definition-plugin
Created: 2017/Mar/28 11:57 PM
Priority: Minor Minor
Reporter: Andrew Bayer

With an environment section like this:

environment {
  FOO = "something"
  BAR = "${env.FOO} else"
}

The EnvVars-driven environment variable resolution/expansion doesn't know that env.FOO means that it needs to resolve FOO before resolving BAR, so there's no guarantee that'll actually happen in that order, and you may well get BAR as null else.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

andrew.bayer@gmail.com (JIRA)

unread,
Mar 28, 2017, 7:58:01 PM3/28/17
to jenkinsc...@googlegroups.com
Andrew Bayer started work on Bug JENKINS-43177
 
Change By: Andrew Bayer
Status: Open In Progress

andrew.bayer@gmail.com (JIRA)

unread,
Mar 28, 2017, 8:02:02 PM3/28/17
to jenkinsc...@googlegroups.com
Andrew Bayer commented on Bug JENKINS-43177
 
Re: env.WHATEVER not considered for environment variable cross reference resolution in Declarative

One risk of a fix I've got almost done is that it could turn

environment {
  FOO = "foo"
  BAR = "${env.FOO} and env.Should not change"
}

into BAR == "foo and Should not change" - so I'm poking around to make sure I can do that replacement solely in the curlies.

andrew.bayer@gmail.com (JIRA)

unread,
Mar 29, 2017, 12:30:01 PM3/29/17
to jenkinsc...@googlegroups.com

bitwiseman@gmail.com (JIRA)

unread,
Oct 22, 2019, 11:25:47 PM10/22/19
to jenkinsc...@googlegroups.com
Liam Newman closed an issue as Fixed
 

Bulk closing resolved issues.

Change By: Liam Newman
Status: Resolved Closed
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages