Is it possible to use Environement Vairables in ccnet.config? I'm
using CruiseControl 1.3.
If so, what is the correct usage? Please provide an example.
If not, does anyone know why this hasn't been implemented yet?
Thanks for your help.
Surely this must be a FAQ by now?
Regards
Paul
Paul Grenyer
e: paul.g...@gmail.com
w: http://www.marauder-consulting.co.uk
Sorry girls, I'm married now.
thanks
On Nov 1, 1:54 pm, "Paul Grenyer" <paul.gren...@gmail.com> wrote:
> Hi
>
> > Is it possible to use Environement Vairables in ccnet.config? I'm
> > using CruiseControl 1.3.
>
> > If so, what is the correct usage? Please provide an example.
>
> > If not, does anyone know why this hasn't been implemented yet?
>
> > Thanks for your help.
>
> Surely this must be a FAQ by now?
>
> Regards
> Paul
>
> Paul Grenyer
For instance this answers your question exactly from Sep 24th...
http://groups.google.com/group/ccnet-user/browse_thread/thread/aaaa7d813284dfe1/0f5c37815aaad138?lnk=gst&q=environment+variables#0f5c37815aaad138
Grant.
> > Sorry girls, I'm married now.- Hide quoted text -
>
> - Show quoted text -
Any explanation as to why it's not implemented? I mean is there any
reason other than "it's just not done yet"?
On Nov 1, 2:39 pm, kiwidude <grant.dr...@gmail.com> wrote:
> Did you even try google search on the group? This comes up just about
> every other week, in fact 35 results found just now...
>
> For instance this answers your question exactly from Sep 24th...http://groups.google.com/group/ccnet-user/browse_thread/thread/aaaa7d...
Nevertheless, there are many CCNet projects that would greatly benefit
from being able to change execution parameters and then manually fire
the project. Again, my work does not directly address changing values
in CCNet projects, but in a NAnt task that gets executed by CCNet.
Strictly speaking, is what you are asking even possible? The ccservice
is already running; how do you go and poke an environment variable value
into an already executing process? In order to get this functionality,
you would need to trigger some code already in the process space to wake
up and read an external object, such as a file. I suppose some sort of
shared memory approach might also work. But not environment variables.
wads wrote:
> Thanks for that.
>
> Any explanation as to why it's not implemented? I mean is there any
> reason other than "it's just not done yet"?
>
>
--
Mike Frederick
mi...@theFrederickHome.name
There's a school of thought that says that Continuous Integration
systems like CCNet should be as independent of the surrounding
environment as possible, and that by implication, use of environment
variables set outside the configuration is a bad idea.
What are you trying to do? What is there in your CCNet configuration
that you would want to have change automatically if a Windows
environment variable changed?
Ross
________________________________
Ross A. Patterson, CISSP
Sr. Director, Development
Tel: +1 703-390-0865
RPatt...@QKnow.com
Q.Know Technologies, Inc.
11600 Sunrise Valley Drive, Suite 300
Reston, VA 20191
www.QKnow.com
I was thinking that rather than have to deply a difference
ccnet.config on each server, I could simply change an environement
variable on each server.
Can you think of a better way to do this?
Thanks
On Nov 1, 3:35 pm, "Ross Patterson" <RPatter...@qknow.com> wrote:
> wads writes:
> >Any explanation as to why it's not implemented? I mean is there any
> >reason other than "it's just not done yet"?
>
> There's a school of thought that says that Continuous Integration
> systems like CCNet should be as independent of the surrounding
> environment as possible, and that by implication, use of environment
> variables set outside the configuration is a bad idea.
>
> What are you trying to do? What is there in your CCNet configuration
> that you would want to have change automatically if a Windows
> environment variable changed?
>
> Ross
> ________________________________
>
> Ross A. Patterson, CISSP
> Sr. Director, Development
> Tel: +1 703-390-0865
> RPatter...@QKnow.com
The usual way folks address that sort of issue is to use a XML DTD
entities. Something like this for your ccnet.config:
<!DOCTYPE cruisecontrol [
<!ENTITY ProjectName "MyProject">
<!ENTITY MyVariable2 "MyValue2">
<!ENTITY CommonFile SYSTEM "file:common.xml">
]>
<cruisecontrol>
&CommonFile;
</cruisecontrol>
And then in common.xml:
<project name="&MyProject;">
<tasks>
<devenv configuration="&MyConfiguration" .../>
...
</tasks>
</project>
Ross
________________________________
Ross A. Patterson, CISSP
Sr. Director, Development
Tel: +1 703-390-0865
RPatt...@QKnow.com
> I was thinking that rather than have to deply a difference
> ccnet.config on each server, I could simply change an environement
> variable on each server. Can you think of a better way to do this?
I use a mixed approach: I use a tool to generate my configuration
files. I keep things DRY in the generator itself, where I'm free to
use variables and more advanced logic if it's necessary. When I need
to deploy the configuration with slight variations (eg: build a new CI
server with staging settings or production settings), I introduce a
configuration file (eg: YAML, usually stored in SVN itself) or a
configuration logic (eg: switch case in the generator).
This generator is kept in a well-known SVN location, and creating a
new instance requires an initial checkout, then running the tool with
bootstrapping parameters.
How I've chosen to implement this: today I'm using Ruby, Rake and XML
Builder templates [1], while in the past I had been using NAnt,
QuickGraph, or even CodeSmith. It has proven to be very efficient for
me.
hope this helps!
cheers
Thibaut Barrère / LoGeek
--
http://www.dotnetguru2.org/tbarrere
http://www.logeek.fr
[1] http://www.xml.com/pub/a/2006/01/04/creating-xml-with-ruby-and-builder.html
<cb:define name="myversion">
<exec>
<executable>c:\Windows\System32\cmd.exe</executable>
<buildArgs>
/C type "version.txt"
</buildArgs>
</exec>
</cb:define>
myversion was defined to c:\Windows\System32\cmd.exe. I want to define it to the data in version.txt. any suggestion?
Thanks
Jixiu