Help: Jenkins builds ONLY on master OR slave

17 views
Skip to first unread message

firs...@gmail.com

unread,
Nov 2, 2018, 3:22:06 AM11/2/18
to Jenkins Users
Hi

I got two machines with Win10. One is jenkins' master and the other is slave. Both are shown as online in dashboard.

Both node are configured as 'Use this node as much as possible'.

My Project is configured as 'Execute concurrent builds if necessary'.

I want to build the project on master AND slave concurrently, but found jenkins only start build action on slave. Only after mark slave as offline, master would take build action.

I tried label them but failed.

Master has 2 executors while slave has one, but they are the default setting value.

Jenkins version : 2.138.2

Is there any thing I missed?

Thanks.

Jan Monterrubio

unread,
Nov 2, 2018, 10:28:49 AM11/2/18
to jenkins...@googlegroups.com
When the job builds on the slave agent, does it not build concurrently with one executor on the master and one on the slave? 

--
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-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/0bf2a8b2-0d1d-4600-9dab-9e762a834cb7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ivan Fernandez Calvo

unread,
Nov 2, 2018, 1:04:16 PM11/2/18
to Jenkins Users
You can make it with a pipeline with 2 stages in parallel with the same steps and different nodes somethinlike this


pipeline{

stages {
stage(‘parallel’) {
parallel {
stage(‘master’){
agent { label ‘master’}
steps{
//steps
}
}
stage(‘agent’){
agent { label ‘agent’ }
steps {
//steps
}
}
}
}

}

On steps you could use the build step, it launch a job, or translate your job to pipeline

https://jenkins.io/doc/book/pipeline/syntax/

firstrose

unread,
Nov 4, 2018, 8:30:03 PM11/4/18
to jenkins...@googlegroups.com
Yes. When master AND slave are all enabled, the job builds ONLY on the SLAVE agent. At the same time, the job does NOT build concurrently with any executor on the master.

Jan Monterrubio <janmont...@gmail.com> 于2018年11月2日周五 下午10:28写道:
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/EWXcj5fm_kA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CADgiF9JnFmZcD7T8L0Wqys7mDvMDSoZP5oQW9GRfWqb%2BAMcf-Q%40mail.gmail.com.

firstrose

unread,
Nov 4, 2018, 8:32:30 PM11/4/18
to jenkins...@googlegroups.com
Thank you. I'll try it.

Ivan Fernandez Calvo <kuisat...@gmail.com> 于2018年11月3日周六 上午1:04写道:
--
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/EWXcj5fm_kA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/7e74b1a1-c866-4750-97a9-4c890046a45d%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages