[JIRA] (JENKINS-54930) withEnv should accept Map as well as List

1 view
Skip to first unread message

craig@2ndquadrant.com (JIRA)

unread,
Nov 29, 2018, 12:44:02 AM11/29/18
to jenkinsc...@googlegroups.com
Craig Ringer created an issue
 
Jenkins / New Feature JENKINS-54930
withEnv should accept Map as well as List
Issue Type: New Feature New Feature
Assignee: Unassigned
Components: workflow-basic-steps-plugin
Created: 2018-11-29 05:43
Priority: Minor Minor
Reporter: Craig Ringer

The `withEnv` step should accept a Map, which is the natural form of an environment variable list. It expects a `java.util.List`, and dies with

java.lang.UnsupportedOperationException: must specify $class with an implementation of interface java.util.List
	at org.jenkinsci.plugins.structs.describable.DescribableModel.resolveClass(DescribableModel.java:503)
  ...
Caused: java.lang.IllegalArgumentException: Could not instantiate {overrides={}} for EnvStep(overrides: String[])
  ...

if a Map is passed.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

craig@2ndquadrant.com (JIRA)

unread,
Nov 29, 2018, 12:45:02 AM11/29/18
to jenkinsc...@googlegroups.com
Craig Ringer updated an issue
Change By: Craig Ringer
The {{withEnv}} step should accept a {{ java.util.{{Map}} }} , which is the natural form of an environment variable list. It expects a {{java.util.List}}, and dies with
{code:java}

java.lang.UnsupportedOperationException: must specify $class with an implementation of interface java.util.List
at org.jenkinsci.plugins.structs.describable.DescribableModel.resolveClass(DescribableModel.java:503)
  ...
Caused: java.lang.IllegalArgumentException: Could not instantiate {overrides={}} for EnvStep(overrides: String[])
  ...
{code}

if a {{Map}} is passed.

craig@2ndquadrant.com (JIRA)

unread,
Nov 29, 2018, 12:45:02 AM11/29/18
to jenkinsc...@googlegroups.com

dnusbaum@cloudbees.com (JIRA)

unread,
Jul 12, 2019, 10:51:02 AM7/12/19
to jenkinsc...@googlegroups.com
Devin Nusbaum closed an issue as Duplicate
 

I ran into this issue and JENKINS-46124 while looking into something related to JENKINS-28510. I am going to close this as a dupe of the former because that issue has some comments and was filed earlier.

Change By: Devin Nusbaum
Status: Open Closed
Resolution: Duplicate

josephp90@gmail.com (JIRA)

unread,
Jan 27, 2020, 4:17:03 PM1/27/20
to jenkinsc...@googlegroups.com
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages