[JIRA] Commented: (CC-1026) Configure environment variables in <exec> configuration

"Antoine Levy Lambert (JIRA)" <[email protected]>
Newsgroups gmane.comp.java.cruise-control.devel
Message-ID <1766497754.1294082449851.JavaMail.jira@chidmzhosting02.thoughtworks.com>
    [ http://jira.public.thoughtworks.org/browse/CC-1026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_18995 ] 

Antoine Levy Lambert commented on CC-1026:
------------------------------------------

this is a very good idea, but in fact environment variables should be added to all builders, not only exec.

I need it for ant too.

Currently I create wrapper scripts to specify which version of ant and which JDK I want to use for a particular build.

With this change I could do this

<ant
  <env name="JAVA_HOME" value="C:/Program Files/Java/jdk1.6.15"/>
  <env name="ANT_HOME" value="c:/apache-ant-1.8.2"/>
</ant>

this is more elegant and more maintainable.

> Configure environment variables in <exec> configuration
> -------------------------------------------------------
>
>                 Key: CC-1026
>                 URL: http://jira.public.thoughtworks.org/browse/CC-1026
>             Project: CruiseControl
>          Issue Type: New Feature
>         Environment: all
>            Reporter: Daniel Tihelka
>            Priority: Major
>         Attachments: env_01.patch
>
>
> When running custom scripts (e.g. in python with submodules), the PYTHONPATH environment variable must be set for correct import  of the packages. The variable may be set before CruiseControl is started, but it will not work for project-dependent settings - e.g. when one project requires module of a given version, while another requires different version.
> I propose patch extending the <exec /> configuration in the following way:
> <exec>
>   <!--  Defines new value or sets new value to the existing env variable -->
>   <env name="" value=""  />
>   <!--  Deletes the existing env variable -->
>   <env name="" del="true" />
> </exec>
> while the <env /> sub-element is optional.
> Both 'name' and 'value' may contain references to CC properties, and in addition, if an unresolved property ${PROP} is found in the value, and the environment contains variable named 'PROP', the unresolved property is substituted by the value of the environment variable. In this way, we can extend already existing environment variable, e.g. as:
>  <env name="PATH" value="new/path/added:${PATH}" />
> where 'PATH' exists only as environment variable, not being defined as CC property. If it is defined as the CC property, its value would be preffered and used.

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

        

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.