[JIRA] (JENKINS-38394) Ability to set output of a step to environment variable(s)

2 views
Skip to first unread message

mneale@cloudbees.com (JIRA)

unread,
Sep 20, 2016, 8:38:03 PM9/20/16
to jenkinsc...@googlegroups.com
Michael Neale created an issue
 
Jenkins / Story JENKINS-38394
Ability to set output of a step to environment variable(s)
Issue Type: Story Story
Assignee: Andrew Bayer
Components: pipeline-model-definition-plugin
Created: 2016/Sep/21 12:37 AM
Priority: Major Major
Reporter: Michael Neale

When using steps like input that capture data from a user, it makes sense to be able to set the resultant values to environment variables.

This could be generalised to other steps that return values (perhaps as maps).

In pipeline-model, the way data is passed around is via (environment) variables as there are no local variables, so the ability to set environment variables to the output is required.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

jglick@cloudbees.com (JIRA)

unread,
Sep 23, 2016, 9:08:01 AM9/23/16
to jenkinsc...@googlegroups.com
Jesse Glick commented on Story JENKINS-38394
 
Re: Ability to set output of a step to environment variable(s)

Currently input returns typed objects, so JENKINS-34101 would be needed to get these in a form amenable to passing to withEnv.

mneale@cloudbees.com (JIRA)

unread,
Oct 3, 2016, 9:47:02 PM10/3/16
to jenkinsc...@googlegroups.com

Patrick Wolf what do you think about a pipeline-model specific "captureInput" step - which wraps input and grabs its stuff as env vars? (may be easier than the changes needed to input?)

pwolf@cloudbees.com (JIRA)

unread,
Oct 3, 2016, 9:59:03 PM10/3/16
to jenkinsc...@googlegroups.com

I think a generalized method to set the output of a step in an environment variable is a decent hack but it feels like a temporary workaround until the step is supported natively. Otherwise, a quick script block works just as well.

For input I think we need a more elegant solution. I agree with Jesse Glick that input might require a more specialized setup in declarative. I think we should look into including an input section of the per-stage configuration like notifications.

bitwiseman@gmail.com (JIRA)

unread,
Oct 22, 2019, 11:24:33 PM10/22/19
to jenkinsc...@googlegroups.com
Liam Newman closed an issue as Duplicate
 

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