Re: "Sourcing" linux environment file in CC

Zach La Celle <[email protected]>
Newsgroups gmane.comp.java.cruise-control.user
Message-ID <[email protected]>
There are separate environments for each project.  So solution one is 
unfortunately not viable.

I have used the solution where I put it all in one bash script and 
execute, but none of the build output is published to the web dashboard, 
making the build kind of pointless (if it's not published, then the 
developer doesn't know what exactly failed!).

Previously I've wrapped "make" in an Ant script, as an exec task, and 
that seemed to publish the results correctly.  However, running the 
"source" inside a bash script doesn't preserve the variables after the 
script exits.  I need something similar to a single shell, where after 
running the source command, the exported variables remain.

On 06/03/2010 11:39 AM, Lincoln Peters wrote:
> On Thu, Jun 3, 2010 at 6:23 AM, zachlac<[email protected]>  wrote:
>    
>> For our builds, we pick and choose the different code
>> subdirectories needed for a specific project by using
>> "environment" files; we call "source<filename>" to set
>> up lots of different variables, etc.  We then call
>> "make" to build the project.
>>
>> How can do something similar in CruiseControl: "source"
>> a tcl script to get the variables from it, and then
>> run "make" with those variables preserved?
>>      
> I can think of two possible solutions:
>
> 1. If there's only one file that needs to be sourced, source it before
> starting CruiseControl.  Of course, if any of the variables set by the
> script happen to have the same names as environment variables that
> Java relies on (which I'm guessing is unlikely), that won't work so
> well.
>
> 2. Write another shell script that sources the variables and then runs
> "make".  This is what I'm using right now, since I have one
> CruiseControl server configured to do two different builds that
> require different environment variables.
>
>
>    


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
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.