Hi Les,

Ok, I think the slave node is properly being called to run the job as I see
the message from the jenkins console output that it's delegating to the
slave node using the label which I assigned.

To answer your question about subversion, we are not using svn for this
job.  This job is simply to deploy our build to the slave windows
environment using the provided ant script.There is a target in the ant
script to copy the build files from our build machine and copy them over to
the slave machine.  So basically, all we want jenkins to do is execute our
ant script which deploys our software. There's probably an easier way to do
this in Jenkins, but since i've gone this far, i'd rather make it work via
master/slave method now, haha.

You mention that if the build.xml is in the top level directory, an
explicit path isn't needed in the job.   By top level directory, do you
mean C:/jenkins? or C:/jenkins/workspace/my_jenkins_job/  ?

Thanks for hanging with me Les, I definitely owe you a beer...or 5.

jp


On Fri, May 2, 2014 at 3:05 PM, Les Mikesell <[email protected]> wrote:

> On Fri, May 2, 2014 at 11:56 AM, John Park
> <[email protected]> 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
>     [email protected]
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/jenkinsci-users/0ELSkd80t_Q/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to