Quantcast

[JIRA] (JENKINS-15117) env Variables can not be resolved in "predefined parameters" textfield

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15117) env Variables can not be resolved in "predefined parameters" textfield

JIRA noreply@jenkins-ci.org
Issue Type: Bug Bug
Assignee: huybrechts
Components: parameterized-trigger
Created: 11/Sep/12 3:19 PM
Description:

usecase:
JobA wants to pass its name (%JOB_NAME%) to JobB. Therefore in the configuration of JobA the predefined parameters textfield is used to resolve the name but does not work as expected. Instead the whole string "%JOB_NAME%" is passed instead of "JobA". Here how I configured it:

-JobA-
-predefined parameters:
myJobName=%JOB_NAME%

=>pass parameter on to JobB

-JobB-
-bash command(win7)
echo %myJobName%

=>output: echo %JOB_NAME%
%JOB_NAME%

cheers
Ignaz

Environment: win7
Project: Jenkins
Priority: Major Major
Reporter: ignaz reicht
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15117) env Variables can not be resolved in "predefined parameters" textfield

JIRA noreply@jenkins-ci.org
Change By: ignaz reicht (11/Sep/12 3:21 PM)
Description: usecase:
JobA wants to pass its name (%JOB_NAME%) to JobB. Therefore in the configuration of JobA the predefined parameters textfield is used to resolve the name but does not work as expected. Instead the whole string "%JOB_NAME%" is passed instead of "JobA". Here how I configured it:

--JobA--
-----
 -predefined parameters:
  myJobName=%JOB_NAME%

=>pass parameter on to JobB

--JobB--
------
 -bash command(win7)
 echo %myJobName%

=>output: echo %JOB_NAME%
         %JOB_NAME%

cheers
Ignaz
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15117) env Variables can not be resolved in "predefined parameters" textfield

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
Change By: ignaz reicht (11/Sep/12 3:22 PM)
Description: usecase:
JobA wants to pass its name (%JOB_NAME%) to JobB. Therefore in the configuration of JobA the predefined parameters textfield is used to resolve the name but does not work as expected. Instead the whole string "%JOB_NAME%" is passed instead of "JobA". Here how I configured it:

-- JobA-------
--  * predefined parameters:
  myJobName=%JOB_NAME%

=>pass parameter on to JobB

-- JobB--------
--  * bash command(win7)
 echo %myJobName%

=>output: echo %JOB_NAME%
         %JOB_NAME%

cheers
Ignaz
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15117) env Variables can not be resolved in "predefined parameters" textfield

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
Change By: ignaz reicht (11/Sep/12 3:21 PM)
Description: usecase:
JobA wants to pass its name (%JOB_NAME%) to JobB. Therefore in the configuration of JobA the predefined parameters textfield is used to resolve the name but does not work as expected. Instead the whole string "%JOB_NAME%" is passed instead of "JobA". Here how I configured it:

--JobA-------
 -
- predefined parameters:
  myJobName=%JOB_NAME%

=>pass parameter on to JobB

--JobB--------
 -
- bash command(win7)
 echo %myJobName%

=>output: echo %JOB_NAME%
         %JOB_NAME%

cheers
Ignaz
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15117) env Variables can not be resolved in "predefined parameters" textfield

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org

I have the same issue but for linux environment variables.

During job execution I execute a shell script that sets an environment variable say GINI_VERSION.

When I enter this variable in the predefined parameters field like version=${GINI_VERSION} or $GINI_VERSION. In the next job the entire string is passed and the variable is not resolved.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15117) env Variables can not be resolved in "predefined parameters" textfield

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
cjo9900 commented on Bug JENKINS-15117

looks like the issue is fixed in commit
https://github.com/jenkinsci/parameterized-trigger-plugin/commit/16586248c382ef417e0aaa1d2cdb00baee87ec18

for inclusion into version 2.17.

Note you need to specify the predefined parameters using the myJobName=$JOB_NAME instead of the windows %JOB_NAME% style, as mentioned in the help "Current build parameters and/or environment variables can be used in form: ${PARAM} or $PARAM."

You can test using the built version at https://jenkins.ci.cloudbees.com/job/plugins/job/parameterized-trigger-plugin/1/org.jenkins-ci.plugins$parameterized-trigger/

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15117) env Variables can not be resolved in "predefined parameters" textfield

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
cjo9900 commented on Bug JENKINS-15117

@Stein Welberg
if you want to use variables that are set in a shell, you will need to add them to the Jenkins build Environment first, otherwise they will only be available for the life of that shell session (buildstep).

You can do this by writing them to a properties file (KEY=VALUE format) in the workspace and then using the EnvInject plugin[1] to add them from that as the next build step, which will make the variables available from that point on.

[1] https://wiki.jenkins-ci.org/display/JENKINS/EnvInject+Plugin

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15117) env Variables can not be resolved in "predefined parameters" textfield

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org

thank you for the updates!

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15117) env Variables can not be resolved in "predefined parameters" textfield

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org

Thanks for the update @cjo9900. We did something similar to the fix you suggested!

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15117) env Variables can not be resolved in "predefined parameters" textfield

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
Change By: cjo9900 (16/Jan/13 1:46 PM)
Assignee: huybrechts cjo9900
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

[JIRA] (JENKINS-15117) env Variables can not be resolved in "predefined parameters" textfield

JIRA noreply@jenkins-ci.org
In reply to this post by JIRA noreply@jenkins-ci.org
cjo9900 resolved Bug JENKINS-15117 as Fixed

Fixed in 2.17

Change By: cjo9900 (27/Feb/13 5:48 PM)
Status: Open Resolved
Resolution: Fixed
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Loading...