Fwd: How to get the current build number in a build tool?

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

Fwd: How to get the current build number in a build tool?

Aliaksandr Radzivanovich
Is it possible to propagate the current build number to a build tool
(Maven or Ant)?
Probably Hudson sets some environmental variable or a system property
so it is possible to retrieve it later in a build script (e.g. it gets
stored in property '${env.HUDSON_BUIL_NUMBER}' or
'${hudson.currentBuildNumber}').

Thaks.

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

Reply | Threaded
Open this post in threaded view
|

Re: Fwd: How to get the current build number in a build tool?

Kohsuke Kawaguchi-2
Aliaksandr Radzivanovich wrote:
> Is it possible to propagate the current build number to a build tool
> (Maven or Ant)?
> Probably Hudson sets some environmental variable or a system property
> so it is possible to retrieve it later in a build script (e.g. it gets
> stored in property '${env.HUDSON_BUIL_NUMBER}' or
> '${hudson.currentBuildNumber}').

Yes. This is really just a doc issue. All the environment variables
available in shell are also available to Maven and Ant.

If you can file an issue so that we remember to update the docs
accordingly, that would be helpful.


--
Kohsuke Kawaguchi
Sun Microsystems                   [hidden email]

smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: How to get the current build number in a build tool?

Aliaksandr Radzivanovich
Thanks for your reply. Could you please provide a little doc right in
this e-mail thread?
I am intersted in the name of environment variable with the current
build number.

On 24/01/07, Kohsuke Kawaguchi <[hidden email]> wrote:

> Aliaksandr Radzivanovich wrote:
> > Is it possible to propagate the current build number to a build tool
> > (Maven or Ant)?
> > Probably Hudson sets some environmental variable or a system property
> > so it is possible to retrieve it later in a build script (e.g. it gets
> > stored in property '${env.HUDSON_BUIL_NUMBER}' or
> > '${hudson.currentBuildNumber}').
>
> Yes. This is really just a doc issue. All the environment variables
> available in shell are also available to Maven and Ant.
>
> If you can file an issue so that we remember to update the docs
> accordingly, that would be helpful.
>
>
> --
> Kohsuke Kawaguchi
> Sun Microsystems                   [hidden email]
>
>
>

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

Reply | Threaded
Open this post in threaded view
|

Re: Fwd: How to get the current build number in a build tool?

Kohsuke Kawaguchi-2
Aliaksandr Radzivanovich wrote:
> Thanks for your reply. Could you please provide a little doc right in
> this e-mail thread?
> I am intersted in the name of environment variable with the current
> build number.

Check the description under the "shell" section, which should have a
link to http://yourhost/hudson/env-vars.html

>
> On 24/01/07, Kohsuke Kawaguchi <[hidden email]> wrote:
>> Aliaksandr Radzivanovich wrote:
>> > Is it possible to propagate the current build number to a build tool
>> > (Maven or Ant)?
>> > Probably Hudson sets some environmental variable or a system property
>> > so it is possible to retrieve it later in a build script (e.g. it gets
>> > stored in property '${env.HUDSON_BUIL_NUMBER}' or
>> > '${hudson.currentBuildNumber}').
>>
>> Yes. This is really just a doc issue. All the environment variables
>> available in shell are also available to Maven and Ant.
>>
>> If you can file an issue so that we remember to update the docs
>> accordingly, that would be helpful.
>>
>>
>> --
>> Kohsuke Kawaguchi
>> Sun Microsystems                   [hidden email]
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

--
Kohsuke Kawaguchi
Sun Microsystems                   [hidden email]

smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: How to get the current build number in a build tool?

Kohsuke Kawaguchi-2
In reply to this post by Aliaksandr Radzivanovich
Aliaksandr Radzivanovich wrote:
> Thanks for your reply. Could you please provide a little doc right in
> this e-mail thread?
> I am intersted in the name of environment variable with the current
> build number.

I checked and it's already documented. The description says:

   Specify Ant target(s) to run. If necessary, you can also specify any
   ant command line options, such as '-Dprop=value'. Also, some
   environment variables are available to the build script

--
Kohsuke Kawaguchi
Sun Microsystems                   [hidden email]

smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: How to get the current build number in a build tool?

Aliaksandr Radzivanovich
Yes, I have found this too. Sorry for bothering you.

On 25/01/07, Kohsuke Kawaguchi <[hidden email]> wrote:

> Aliaksandr Radzivanovich wrote:
> > Thanks for your reply. Could you please provide a little doc right in
> > this e-mail thread?
> > I am intersted in the name of environment variable with the current
> > build number.
>
> I checked and it's already documented. The description says:
>
>    Specify Ant target(s) to run. If necessary, you can also specify any
>    ant command line options, such as '-Dprop=value'. Also, some
>    environment variables are available to the build script
>
> --
> Kohsuke Kawaguchi
> Sun Microsystems                   [hidden email]
>
>
>

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