[Anthill-pro] Passing the build stamp via an environment var
Peter Steele
psteele at maxiscale.com
Mon May 5 16:23:18 CDT 2008
I see that your build version looks like this:
x.y.z_nnnnn
where I assume the nnnnn portion is a value that increments with every
build. What expression do you use to create this format?
-----Original Message-----
From: anthill-pro-bounces at lists.urbancode.com
[mailto:anthill-pro-bounces at lists.urbancode.com] On Behalf Of Eric
Minick
Sent: Thursday, May 01, 2008 2:15 PM
To: AnthillPro user and support list.
Subject: Re: [Anthill-pro] Passing the build stamp via an environment
var
Peter,
We pass a command line argument to our build scripts (copy and pasted
from Help -> Scripting):
version=|${bsh:StampLookup.getLatestStampValue()}
|If you are fortunate enough to have your stamp just be the value of a
property, you could simplify:
version=${property:build number}
You could do the same thing for an environment variable. In the current
release, you'd need to set the environment variable for each step that
needs to access it. In an upcoming release, we'll allow dynamic
environment variables to persist across steps if you want them to.
Regards,
Eric
Peter Steele wrote:
>
> Yes, a stamp is a property, but our build scripts run largely without
> the knowledge they were launched by Anthill. A Python script for
> example isn't going to be able to query Anthill to get the value of
> the build stamp. However, the build system **can** set an environment
> variable before it launched the Python script. That will then let the
> Python script easily access the build stamp.
>
> How does Anthill itself access the build stamp. For example, when you
> can to the Anthill GUI, you see something "Powered by anthillpro
> <http://www.anthillpro.com/> (Version 3.4.7)." How do you get that
> version string into your executables?
>
> *From:* anthill-pro-bounces at lists.urbancode.com
> [mailto:anthill-pro-bounces at lists.urbancode.com] *On Behalf Of *Steve
> Boone
> *Sent:* Thursday, May 01, 2008 1:17 PM
> *To:* AnthillPro user and support list.
> *Subject:* Re: [Anthill-pro] Passing the build stamp via an
> environment var
>
> On the project level (click Administration Tab, then click the name of
> the Project) you can click on the properties tab, and create a Project
> Property. Then, this particular property could be referenced by any
> build defined under that specific project. That sounds like it might
> make more sense for your situation.
>
> Here is where I am getting confused. A stamp*/ is /*a property. I am
> assuming you are using version 3.4.x In 3.4, stamps are defined on the
> workflow, usually like ${+property:MyStampProperty}
>
> If MyStampProperty is defined as a project property, than you can
> access it from any other workflow/job in that project.
>
> Unless I am missing something, it seems to me that you could just use
> the property that is being used to create your stamp, as long as the
> property is not a workflow property and it is a project property.
>
> Cheers,
> Steve Boone
>
> On Thu, May 1, 2008 at 2:25 PM, Peter Steele <psteele at maxiscale.com
> <mailto:psteele at maxiscale.com>> wrote:
>
> Our product backup/upgrade subsystem builds a manifest file during the
> build process, and one of the items included in the manifest file is
> the build version. So we need to pass the build stamp to this build
> step for use when it generates the manifest file. Other build steps
> will reference this value as well. I was looking for a way to have
> this environment variable set globally, for all build steps. Do you
> recommend a difference approach than using an environment variable?
>
> *From:* anthill-pro-bounces at lists.urbancode.com
> <mailto:anthill-pro-bounces at lists.urbancode.com>
> [mailto:anthill-pro-bounces at lists.urbancode.com
> <mailto:anthill-pro-bounces at lists.urbancode.com>] *On Behalf Of *Steve
> Boone
> *Sent:* Thursday, May 01, 2008 10:52 AM
> *To:* AnthillPro user and support list.
> *Subject:* Re: [Anthill-pro] Passing the build stamp via an
> environment var
>
> On the project level, you could create an environment variable.
>
> Then, you would need to create a script that took the current Stamp
> Value, and saved it to the Environment Variable you created.
>
> What do you want to do with the environment variable after you have it
> set?
>
> On Thu, May 1, 2008 at 1:37 PM, Peter Steele <psteele at maxiscale.com
> <mailto:psteele at maxiscale.com>> wrote:
>
> I want to configure our builds to set an environment variable to be
> equal to the build stamp for the given build. Is there a way to do
> this that would work across all steps of a build job or do I need to
> set the environment variable separately for each build step?
>
>
> _______________________________________________
> Anthill-pro mailing list
> Anthill-pro at lists.urbancode.com
<mailto:Anthill-pro at lists.urbancode.com>
> http://lists.urbancode.com/mailman/listinfo/anthill-pro
>
>
> _______________________________________________
> Anthill-pro mailing list
> Anthill-pro at lists.urbancode.com
<mailto:Anthill-pro at lists.urbancode.com>
> http://lists.urbancode.com/mailman/listinfo/anthill-pro
>
>
------------------------------------------------------------------------
>
> _______________________________________________
> Anthill-pro mailing list
> Anthill-pro at lists.urbancode.com
> http://lists.urbancode.com/mailman/listinfo/anthill-pro
>
_______________________________________________
Anthill-pro mailing list
Anthill-pro at lists.urbancode.com
http://lists.urbancode.com/mailman/listinfo/anthill-pro
More information about the Anthill-pro
mailing list