[JIRA] Created: (HUDSON-5685) Does not read environment variables in commands and JVM arguments

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[JIRA] Created: (HUDSON-5685) Does not read environment variables in commands and JVM arguments

Hudson issues mailing list
Does not read environment variables in commands and JVM arguments
-----------------------------------------------------------------

                 Key: HUDSON-5685
                 URL: http://issues.hudson-ci.org/browse/HUDSON-5685
             Project: Hudson
          Issue Type: Bug
          Components: buckminster
    Affects Versions: current
         Environment: SuSE Linux 64, Hudson 1.346
            Reporter: lemmster
            Assignee: jutzig


Trying to pass an environment var to Buckminster (plugin) does not work, e.g. the command

...
import ${WORKSPACE}/$MSPEC_NAME.mspec
...

whereas $MSPEC_NAME gets set via the setenv plugin results in

...
File not found: file:/opt/hudson/jobs/C-HEAD-platform_feature_tmpl/workspace/.mspec


--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.hudson-ci.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[JIRA] Updated: (HUDSON-5685) Buckminster: Read environment variables in commands and JVM arguments

Hudson issues mailing list

     [ http://issues.hudson-ci.org/browse/HUDSON-5685?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

mdonohue updated HUDSON-5685:
-----------------------------

       Summary: Buckminster: Read environment variables in commands and JVM arguments  (was: Does not read environment variables in commands and JVM arguments)
    Issue Type: Improvement  (was: Bug)

> Buckminster: Read environment variables in commands and JVM arguments
> ---------------------------------------------------------------------
>
>                 Key: HUDSON-5685
>                 URL: http://issues.hudson-ci.org/browse/HUDSON-5685
>             Project: Hudson
>          Issue Type: Improvement
>          Components: buckminster
>    Affects Versions: current
>         Environment: SuSE Linux 64, Hudson 1.346
>            Reporter: lemmster
>            Assignee: jutzig
>
> Trying to pass an environment var to Buckminster (plugin) does not work, e.g. the command
> ...
> import ${WORKSPACE}/$MSPEC_NAME.mspec
> ...
> whereas $MSPEC_NAME gets set via the setenv plugin results in
> ...
> File not found: file:/opt/hudson/jobs/C-HEAD-platform_feature_tmpl/workspace/.mspec

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.hudson-ci.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[JIRA] Commented: (HUDSON-5685) Buckminster: Read environment variables in commands and JVM arguments

Hudson issues mailing list
In reply to this post by Hudson issues mailing list

    [ http://issues.hudson-ci.org/browse/HUDSON-5685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=136095#action_136095 ]

jutzig commented on HUDSON-5685:
--------------------------------

The property expansion looks for values that match \\$\\{(.*?)\\} (e.g. ${VARIABLE} ).
Can you try ${MSPEC_NAME} instead of $MSPEC_NAME?

> Buckminster: Read environment variables in commands and JVM arguments
> ---------------------------------------------------------------------
>
>                 Key: HUDSON-5685
>                 URL: http://issues.hudson-ci.org/browse/HUDSON-5685
>             Project: Hudson
>          Issue Type: Improvement
>          Components: buckminster
>    Affects Versions: current
>         Environment: SuSE Linux 64, Hudson 1.346
>            Reporter: lemmster
>            Assignee: jutzig
>
> Trying to pass an environment var to Buckminster (plugin) does not work, e.g. the command
> ...
> import ${WORKSPACE}/$MSPEC_NAME.mspec
> ...
> whereas $MSPEC_NAME gets set via the setenv plugin results in
> ...
> File not found: file:/opt/hudson/jobs/C-HEAD-platform_feature_tmpl/workspace/.mspec

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.hudson-ci.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[JIRA] Commented: (HUDSON-5685) Buckminster: Read environment variables in commands and JVM arguments

Hudson issues mailing list
In reply to this post by Hudson issues mailing list

    [ http://issues.hudson-ci.org/browse/HUDSON-5685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=136096#action_136096 ]

lemmster commented on HUDSON-5685:
----------------------------------

That's what I tried initially but it didn't work either.

> Buckminster: Read environment variables in commands and JVM arguments
> ---------------------------------------------------------------------
>
>                 Key: HUDSON-5685
>                 URL: http://issues.hudson-ci.org/browse/HUDSON-5685
>             Project: Hudson
>          Issue Type: Improvement
>          Components: buckminster
>    Affects Versions: current
>         Environment: SuSE Linux 64, Hudson 1.346
>            Reporter: lemmster
>            Assignee: jutzig
>
> Trying to pass an environment var to Buckminster (plugin) does not work, e.g. the command
> ...
> import ${WORKSPACE}/$MSPEC_NAME.mspec
> ...
> whereas $MSPEC_NAME gets set via the setenv plugin results in
> ...
> File not found: file:/opt/hudson/jobs/C-HEAD-platform_feature_tmpl/workspace/.mspec

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.hudson-ci.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[JIRA] Commented: (HUDSON-5685) Buckminster: Read environment variables in commands and JVM arguments

Hudson issues mailing list
In reply to this post by Hudson issues mailing list

    [ http://issues.hudson-ci.org/browse/HUDSON-5685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=136097#action_136097 ]

jutzig commented on HUDSON-5685:
--------------------------------

The plugin evaluates both the environment variables passed to the BuildListener, as well as the build variables of the AbstractBuild and uses whatever is written in ${...} as key for that map.
I have never used the setEnv Plugin before so I must first evaluate how exactly the variables are passed by this plugin.

> Buckminster: Read environment variables in commands and JVM arguments
> ---------------------------------------------------------------------
>
>                 Key: HUDSON-5685
>                 URL: http://issues.hudson-ci.org/browse/HUDSON-5685
>             Project: Hudson
>          Issue Type: Improvement
>          Components: buckminster
>    Affects Versions: current
>         Environment: SuSE Linux 64, Hudson 1.346
>            Reporter: lemmster
>            Assignee: jutzig
>
> Trying to pass an environment var to Buckminster (plugin) does not work, e.g. the command
> ...
> import ${WORKSPACE}/$MSPEC_NAME.mspec
> ...
> whereas $MSPEC_NAME gets set via the setenv plugin results in
> ...
> File not found: file:/opt/hudson/jobs/C-HEAD-platform_feature_tmpl/workspace/.mspec

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.hudson-ci.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[JIRA] Commented: (HUDSON-5685) Buckminster: Read environment variables in commands and JVM arguments

Hudson issues mailing list
In reply to this post by Hudson issues mailing list

    [ http://issues.hudson-ci.org/browse/HUDSON-5685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=136098#action_136098 ]

lemmster commented on HUDSON-5685:
----------------------------------

FWIW An env var VAR that is set by SetEnv can be used in a shell builder via $VAR.

> Buckminster: Read environment variables in commands and JVM arguments
> ---------------------------------------------------------------------
>
>                 Key: HUDSON-5685
>                 URL: http://issues.hudson-ci.org/browse/HUDSON-5685
>             Project: Hudson
>          Issue Type: Improvement
>          Components: buckminster
>    Affects Versions: current
>         Environment: SuSE Linux 64, Hudson 1.346
>            Reporter: lemmster
>            Assignee: jutzig
>
> Trying to pass an environment var to Buckminster (plugin) does not work, e.g. the command
> ...
> import ${WORKSPACE}/$MSPEC_NAME.mspec
> ...
> whereas $MSPEC_NAME gets set via the setenv plugin results in
> ...
> File not found: file:/opt/hudson/jobs/C-HEAD-platform_feature_tmpl/workspace/.mspec

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.hudson-ci.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[JIRA] Commented: (HUDSON-5685) Buckminster: Read environment variables in commands and JVM arguments

Hudson issues mailing list
In reply to this post by Hudson issues mailing list

    [ http://issues.hudson-ci.org/browse/HUDSON-5685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=136110#action_136110 ]

lemmster commented on HUDSON-5685:
----------------------------------

Apparently it's working now with ${VAR}. IIRC the first time I tried it I didn't use SetEnv but exported VAR in a shell step prior to buckminster.

> Buckminster: Read environment variables in commands and JVM arguments
> ---------------------------------------------------------------------
>
>                 Key: HUDSON-5685
>                 URL: http://issues.hudson-ci.org/browse/HUDSON-5685
>             Project: Hudson
>          Issue Type: Improvement
>          Components: buckminster
>    Affects Versions: current
>         Environment: SuSE Linux 64, Hudson 1.346
>            Reporter: lemmster
>            Assignee: jutzig
>
> Trying to pass an environment var to Buckminster (plugin) does not work, e.g. the command
> ...
> import ${WORKSPACE}/$MSPEC_NAME.mspec
> ...
> whereas $MSPEC_NAME gets set via the setenv plugin results in
> ...
> File not found: file:/opt/hudson/jobs/C-HEAD-platform_feature_tmpl/workspace/.mspec

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.hudson-ci.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[JIRA] Resolved: (HUDSON-5685) Buckminster: Read environment variables in commands and JVM arguments

Hudson issues mailing list
In reply to this post by Hudson issues mailing list

     [ http://issues.hudson-ci.org/browse/HUDSON-5685?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

jutzig resolved HUDSON-5685.
----------------------------

    Resolution: Cannot Reproduce

I tried it myself and it does work as expected
I doubt that the way with a shell script can work. All Variables you export in the script are only visible in the scope of that shell script (to my knowledge at least), so the next build step won't be able to make use of them.

Cannot Reproduce -> resolved

> Buckminster: Read environment variables in commands and JVM arguments
> ---------------------------------------------------------------------
>
>                 Key: HUDSON-5685
>                 URL: http://issues.hudson-ci.org/browse/HUDSON-5685
>             Project: Hudson
>          Issue Type: Improvement
>          Components: buckminster
>    Affects Versions: current
>         Environment: SuSE Linux 64, Hudson 1.346
>            Reporter: lemmster
>            Assignee: jutzig
>
> Trying to pass an environment var to Buckminster (plugin) does not work, e.g. the command
> ...
> import ${WORKSPACE}/$MSPEC_NAME.mspec
> ...
> whereas $MSPEC_NAME gets set via the setenv plugin results in
> ...
> File not found: file:/opt/hudson/jobs/C-HEAD-platform_feature_tmpl/workspace/.mspec

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.hudson-ci.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]