Question about letting Ant grab source

I have a build configuration that works fine when I check the box
'Checkout sources automatically'. But now I need to interact with
Perforce as part of the official build, so I changed the client
mapping so the root is now points to %build.working.dir%; added a task in
build.xml to sync up the source; and unchecked the 'Checkout sources
automatically' box. Now when I run a build, it's looking for source
in C:\WINDOWS\TEMP instead of in the build working dir.

Here's the entire build log:

Checking for changes (1s)Building in
C:\WINDOWS\TEMP\1879jetbrains.buildServer.RunBuildException:
java.io.IOException: Cannot find build file
'C:\WINDOWS\TEMP\1879\JRX\official-build.xml'.
jetbrains.buildServer.RunBuildException: java.io.IOException: Cannot find build file 'C:\WINDOWS\TEMP\1879\JRX\official-build.xml'.
at jetbrains.buildServer.agent.runner.GenericProgramRunner.run(GenericProgramRunner.java:64)
at jetbrains.buildServer.agent.impl.BuildAgentImpl$3.run(BuildAgentImpl.java:405)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: Cannot find build file 'C:\WINDOWS\TEMP\1879\JRX\official-build.xml'.
at jetbrains.buildServer.runner.BuildFileRunnerUtil.getBuildFile(BuildFileRunnerUtil.java:55)
at jetbrains.buildServer.agent.ant.AntBuildRunner.getBuildFile(AntBuildRunner.java:140)
at jetbrains.buildServer.agent.ant.AntBuildRunner.getProgramParameters(AntBuildRunner.java:84)
at jetbrains.buildServer.agent.runner.JavaProgramRunner.buildCommandLine(JavaProgramRunner.java:96)
at jetbrains.buildServer.agent.runner.GenericProgramRunner.run(GenericProgramRunner.java:58)


My client spec is

Root: d:\TeamCity\BuildAgent\work\JOfficial

Options: noallwrite noclobber nocompress unlocked nomodtime normdir

LineEnd: local

View:
//x/java/JRX/trunk/... //cm-teamcity-jofficial/JRX/...
//tools/jakarta/ant/1.6.5/... //cm-teamcity-jofficial/JRX/tools/ant/...
//tools/sun/jdk1.6.0/... //cm-teamcity-jofficial/JRX/tools/java/...


I synced it up that client on the build agent before running the
build, and official-build.xml is in %build.working.dir%/JRX where it
belongs.

What have I done wrong? Why is TC using C:\WINDOWS\TEMP as
%build.working.dir%?

Thanks.

--
-- Steve

4 comments
Comment actions Permalink

You have to specify 'build.working.dir' system parameter for the build
configuration (using some required property from an agent, for example
'perforce.working.dir')

--
Olesya Smirnova
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


"Steve Allan" <takezowest@yahoo.com> wrote in message
news:uejuq6n59.fsf@attachmate.com...
>I have a build configuration that works fine when I check the box

'Checkout sources automatically'. But now I need to interact with
Perforce as part of the official build, so I changed the client
mapping so the root is now points to %build.working.dir%; added a task in
build.xml to sync up the source; and unchecked the 'Checkout sources
automatically' box. Now when I run a build, it's looking for source
in C:\WINDOWS\TEMP instead of in the build working dir.

>

Here's the entire build log:

>

Checking for changes (1s)Building in
C:\WINDOWS\TEMP\1879jetbrains.buildServer.RunBuildException:
java.io.IOException: Cannot find build file
'C:\WINDOWS\TEMP\1879\JRX\official-build.xml'.
jetbrains.buildServer.RunBuildException: java.io.IOException: Cannot find
build file 'C:\WINDOWS\TEMP\1879\JRX\official-build.xml'.
at
jetbrains.buildServer.agent.runner.GenericProgramRunner.run(GenericProgramRunner.java:64)
at
jetbrains.buildServer.agent.impl.BuildAgentImpl$3.run(BuildAgentImpl.java:405)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: Cannot find build file
'C:\WINDOWS\TEMP\1879\JRX\official-build.xml'.
at
jetbrains.buildServer.runner.BuildFileRunnerUtil.getBuildFile(BuildFileRunnerUtil.java:55)
at
jetbrains.buildServer.agent.ant.AntBuildRunner.getBuildFile(AntBuildRunner.java:140)
at
jetbrains.buildServer.agent.ant.AntBuildRunner.getProgramParameters(AntBuildRunner.java:84)
at
jetbrains.buildServer.agent.runner.JavaProgramRunner.buildCommandLine(JavaProgramRunner.java:96)
at
jetbrains.buildServer.agent.runner.GenericProgramRunner.run(GenericProgramRunner.java:58)

>
>

My client spec is

>

Root: d:\TeamCity\BuildAgent\work\JOfficial

>

Options: noallwrite noclobber nocompress unlocked nomodtime normdir

>

LineEnd: local

>

View:
//x/java/JRX/trunk/... //cm-teamcity-jofficial/JRX/...
//tools/jakarta/ant/1.6.5/... //cm-teamcity-jofficial/JRX/tools/ant/...
//tools/sun/jdk1.6.0/... //cm-teamcity-jofficial/JRX/tools/java/...

>
>

I synced it up that client on the build agent before running the
build, and official-build.xml is in %build.working.dir%/JRX where it
belongs.

>

What have I done wrong? Why is TC using C:\WINDOWS\TEMP as
%build.working.dir%?

>

Thanks.

>

--
-- Steve



0
Comment actions Permalink

I have the same problem... For testing purposes I split the build in
separate steps, so the first step checkouts the working copy from subversion
and runs a "get" target from my WC build.xml.
This "get" target retrieves some external jars from an internal http server
and performs a build of third party tools. (We achieved this way in order to
get svn repository smaller so chekouts and checkings became faster)

The second build configuration, is on the same project, and its goal is to
build the entire project using the local source and external artifacts
(jars) retrieved from the previous step.
I NEED this build configuration neither to do a checkout or svn update, just
build, so I unckecked "Checkout sources automatically".

Since this, I get this weird message

Building in /tmp/38
jetbrains.buildServer.RunBuildException: java.io.IOException: Cannot find
build file '/tmp/38/local/build.xml'.
jetbrains.buildServer.RunBuildException: java.io.IOException: Cannot find
build file '/tmp/38/local/build.xml'.
at
jetbrains.buildServer.agent.runner.GenericProgramRunner.run(GenericProgramRunner.java:64)
at
jetbrains.buildServer.agent.impl.BuildAgentImpl$3.run(BuildAgentImpl.java:405)
(...)


there is no documentation explaining this agent's behavior... Can you be
further specific with your given workaround? I didn't understand your
response to Steve....

Thanks in advance

Regards,
Gaston Martin



when I check "Checkout sources automatically" TC is


"Olesya Smirnova" <Olesya.Smirnova@jetbrains.com> wrote in message
news:edmdbr$faf$1@is.intellij.net...

You have to specify 'build.working.dir' system parameter for the build
configuration (using some required property from an agent, for example
'perforce.working.dir')

>

--
Olesya Smirnova
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

>
>

"Steve Allan" <takezowest@yahoo.com> wrote in message
news:uejuq6n59.fsf@attachmate.com...

>>I have a build configuration that works fine when I check the box
>> 'Checkout sources automatically'. But now I need to interact with
>> Perforce as part of the official build, so I changed the client
>> mapping so the root is now points to %build.working.dir%; added a task in
>> build.xml to sync up the source; and unchecked the 'Checkout sources
>> automatically' box. Now when I run a build, it's looking for source
>> in C:\WINDOWS\TEMP instead of in the build working dir.


0
Comment actions Permalink

I just checked it and it doesn't work as I expected...
But your bootstrap script can set working dir to actual working directory
and invoke real build script in there (as a workaround).
We'll add parameter "working directory" to configuration page.
--
Olesya Smirnova
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


"Gaston Martin" <gmartin@bea.com> wrote in message
news:edp635$opb$1@is.intellij.net...
>I have the same problem... For testing purposes I split the build in
>separate steps, so the first step checkouts the working copy from
>subversion and runs a "get" target from my WC build.xml.

This "get" target retrieves some external jars from an internal http
server and performs a build of third party tools. (We achieved this way in
order to get svn repository smaller so chekouts and checkings became
faster)

>

The second build configuration, is on the same project, and its goal is to
build the entire project using the local source and external artifacts
(jars) retrieved from the previous step.
I NEED this build configuration neither to do a checkout or svn update,
just build, so I unckecked "Checkout sources automatically".

>

Since this, I get this weird message

>

Building in /tmp/38
jetbrains.buildServer.RunBuildException: java.io.IOException: Cannot find
build file '/tmp/38/local/build.xml'.
jetbrains.buildServer.RunBuildException: java.io.IOException: Cannot find
build file '/tmp/38/local/build.xml'.
at
jetbrains.buildServer.agent.runner.GenericProgramRunner.run(GenericProgramRunner.java:64)
at
jetbrains.buildServer.agent.impl.BuildAgentImpl$3.run(BuildAgentImpl.java:405)
(...)

>
>

there is no documentation explaining this agent's behavior... Can you be
further specific with your given workaround? I didn't understand your
response to Steve....

>

Thanks in advance

>

Regards,
Gaston Martin

>
>
>

when I check "Checkout sources automatically" TC is

>
>

"Olesya Smirnova" <Olesya.Smirnova@jetbrains.com> wrote in message
news:edmdbr$faf$1@is.intellij.net...

>> You have to specify 'build.working.dir' system parameter for the build
>> configuration (using some required property from an agent, for example
>> 'perforce.working.dir')
>>
>> --
>> Olesya Smirnova
>> JetBrains, Inc
>> http://www.jetbrains.com
>> "Develop with pleasure!"
>>
>>
>> "Steve Allan" <takezowest@yahoo.com> wrote in message
>> news:uejuq6n59.fsf@attachmate.com...
>>>I have a build configuration that works fine when I check the box
>>> 'Checkout sources automatically'. But now I need to interact with
>>> Perforce as part of the official build, so I changed the client
>>> mapping so the root is now points to %build.working.dir%; added a task
>>> in
>>> build.xml to sync up the source; and unchecked the 'Checkout sources
>>> automatically' box. Now when I run a build, it's looking for source
>>> in C:\WINDOWS\TEMP instead of in the build working dir.
>



0
Comment actions Permalink

Olesya Smirnova wrote:

You have to specify 'build.working.dir' system parameter for the build
configuration (using some required property from an agent, for example
'perforce.working.dir')


Ok, I finally have time to get back to this issue. How do I specify the
system parameter 'build.working.dir' for my build configuration? When I
go to the 'Properties and environment variables' page for my build
configuration, it tells me that build.working.dir is a predefined system
property and provides no interface for editing it. So how exactly do I
specify it as you suggest? Do I need to edit project-config.xml
directly? If so, does it go within <run-parameters>?

Thanks!

--
-- Steve

0

Please sign in to leave a comment.