Hi,

your case sounds like you simply need to pick up the environment variable 
in your ant script:

<property environment="env" />

Then you can use the following variables:
https://wiki.jenkins-ci.org/display/JENKINS/Building+a+software+project#Buildingasoftwareproject-JenkinsSetEnvironmentVariables

e.g. ${env.BUILD_NUMBER}

Kind regards,
 
Andreas Schilling
CAE Processes & Data Management
-------------------------------------------------------------------
Dipl. Inf. Andreas Schilling
Senior Software Architect

TWT GmbH
Science & Innovation
Bernhäuser Str. 40 - 42
73765 Neuhausen
 
Tel: +49 - 7158 - 17 15 - 673
E-Mail: [email protected]
--------------------------------------------------------------------
www.twt-gmbh.de
--------------------------------------------------------------------
Geschäftsführung: Dimitrios Vartziotis, Joachim Laicher (stv.)
Registergericht: Amtsgericht Stuttgart, HRB Nr. 212778
Umsatzsteuer: ID-Nr.: DE147841145
--------------------------------------------------------------------



Von:    Benjamin Lau <[email protected]>
An:     [email protected]
Datum:  30.11.2012 04:23
Betreff:        Re: how to include Jenkins Build Number in Ant script - 
quick question
Gesendet von:   [email protected]



Take a look at XmlTask for Ant. You can then update your xml file using 
xpath.

Ben

[1] http://www.oopsconsultancy.com/software/xmltask/

On Thu, Nov 29, 2012 at 7:20 PM, Z W <[email protected]> wrote:
> Hi
>
> We like to sync up Jenkins build number with our version.xml file.
> Is there a way to include Jenkins build number in our main ant script
> build.xml so that it would write to our version.xml ?
>
> Thanks

Reply via email to