(replies inline)

On Thu, 25 Feb 2016, Alex Domoradov wrote:

> Some time ago Jenkins has started run jobs on slave node (win 7).



You have a couple options to consider. One when configuring build nodes,
choosing "Only build jobs with label restrictions matching this node" will
ensure that only when you explicitly "Restrict where this project can be run"
and enter the appropriate label. This will ensure Jenkins doesn't schedule work
on that node unless a job has explicitly requested it.


Additionally/optionally, it's a good practice to label all nodes, including the 
master,
with labels that describe its capabilities. In your example I would suggest
labeling all nodes which are intended to perform ant builds with the "ant"
label, then restricting your project to only build on nodes labelled with
"ant". This syntax can be combined to include multiple labels via a label
expression, e.g. "ant && linux"






> 
> 
> [EnvInject] - Loading node environment variables.
> 
> Installing JDK jdk-8u74-oth-JPR
> Downloading JDK from 
> http://download.oracle.com/otn-pub/java/jdk/8u74-b02/jdk-8u74-windows-x64.exe
> Downloading 196405336 bytes
> 
> Installing D:\jenkins\tools\hudson.model.JDK\jdk-sun-1.8.74\jdk.exe
> 
> [jdk-sun-1.8.74] $ D:\jenkins\tools\hudson.model.JDK\jdk-sun-1.8.74\jdk.exe 
> /s ADDLOCAL="ToolsFeature" REBOOT=ReallySuppress 
> INSTALLDIR=D:\jenkins\tools\hudson.model.JDK\jdk-sun-1.8.74 /L 
> D:\jenkins\tools\hudson.model.JDK\install1182473847874408631log
> 
> Building remotely on win7 (WINDOWS) in workspace 
> D:\jenkins\workspace\resin-deploy
> 
> Cloning the remote Git repository
> ...
> [EnvInject] - Injecting environment variables from a build step.
> [EnvInject] - Injecting as environment variables the properties content 
> JAVA_HOME=/var/lib/jenkins/tools/hudson.model.JDK/jdk-sun-1.8.74
> 
> [EnvInject] - Variables injected successfully.
> FATAL: Cannot find executable from the chosen Ant installation "ant-1.9.6"
> Build step 'Invoke Ant' marked build as failure
> SSH: Current build result is [FAILURE], not going to run.
> Finished: FAILURE
> 
> 
> The slave node was connected via 
> 
> 
> 
> > java -jar d:\jenkins-slave.jar -jnlpUrl 
> > http://jenkins.example.net:8080/computer/win7/slave-agent.jnlp -secret 
> > {SECRET}
> 
> 
>  
> 
> For example build 10 was built on Master node (linux) and build 11 was 
> built on Slave (windows 7). How can I revert the old behavior and tell 
> Jenkins build all jobs on master node by default ?
> 
> -- 
> 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].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/59c9cda5-424b-4ff6-a05c-d602ad07f515%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.


- R. Tyler Croy

------------------------------------------------------
     Code: <https://github.com/rtyler>
  Chatter: <https://twitter.com/agentdero>

  % gpg --keyserver keys.gnupg.net --recv-key 3F51E16F
------------------------------------------------------

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/20160225161344.GE13352%40blackberry.coupleofllamas.com.
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: Digital signature

Reply via email to