On Fri, May 2, 2014 at 11:56 AM, John Park
<john.p...@sightlinesystems.com> wrote:
> Silly question, does the build.xml that's on the slave have to be on the
> master machine's root workspace directory in order for it to run on the
> slave?

No, the slave has its own workspace and doesn't have anything to do
with the filesystem the master sees.  It can be confusing because the
master web interface shows a 'workspace' folder icon with files - but
that is actually a view from the node that did the last build.

> I made changes to the node configuration based on your pointers, and re-ran
> the project.  On this try, I gave an explicit path to the build file, then
> got this message:
>
> Started by upstream project "master_slave_test" build number 51
> originally caused by:
>  Started by user John Park
> [EnvInject] - Loading node environment variables.
> Building on master in workspace

That wouldn't happen if your job has a 'restrict where this job can
run' set to a slave node.

> <http://build:80/job/master_slave_test/default/ws/>
> FATAL: Unable to find build script at
> <http://build:80/job/master_slave_test/default/ws/build.xml/"C>:\Builds\build.xml"
> Build step 'Invoke Ant' marked build as failure
>
> Seems like there's a syntax error based  on the above message, as it looks
> to close the C: drive within the URL tag.

If your build.xml is in the job's top-level directory you don't need
to specify a path.

> I then moved the build file to the jennkins/ directory on the slave machine
> and re-ran, but got the same message:
>
> Started by upstream project "master_slave_test" build number 53
> originally caused by:
>  Started by user John Park
> [EnvInject] - Loading node environment variables.
> Building on master in workspace
> <http://build:80/job/master_slave_test/default/ws/>
> FATAL: Unable to find build script at
> <http://build:80/job/master_slave_test/default/ws/build.xml>
> Build step 'Invoke Ant' marked build as failure

Are you not using a source control repository (subversion, git, etc.)?
  That is the typical and probably best way to handle things since it
takes care of the transport of the code/build scripts etc. to whatever
node/workspace needs it.   Otherwise you'll need some other way to
update the files in the workspace of the slave that is going to do the
build.

> Some other potential useful info:
>
> The path I gave to ant home and java home when configuring globally was only
> to the apache ant and jdk folders, i did not include bin in the path

Yes, I think it figures out where to execute ant from the ANT_HOME
setting, and that in turn will find java by looking through an
assortment of environment settings.

> Same goes for configuring the path in the nodes config.
>
> Based on the error message, the job seems to be executing from the master,
> and not the slave.

Yes, fix the 'restrict where to build' first.  And if your build.xml
is at the top of the workspace, just remove your explicit reference to
it.

-- 
  Les Mikesell
    lesmikes...@gmail.com

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to