On Fri, May 2, 2014 at 11:56 AM, John Park
<
john...@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.
If your build.xml is in the job's top-level directory you don't need
to specify a path.
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