How to trigger a Slave Job

12 views
Skip to first unread message

Salah Uddin Ahmed

unread,
Jul 22, 2020, 11:58:18 PM7/22/20
to Jenkins Users
Hello,

Im new to jenkins, Anybody please help me on an "How to" question?

Suppose I have one master node and one slave node, I have a maven project in the slave node. Now I want to trigger the build of the project from the master node pipeline. Is that a meaningful idea?

I tried to run the master project in the slave instance, it's working fine.

Code I used to run master-project in slave node:

pipeline {
   agent {label 'junit_jenkins'}
   stages {
      stage('Build') {
         steps {
            build job: 'test-jenkins', parameters: [string(name: 'PACKAGE', value: 'test-jenkins'), [$class: 'LabelParameterValue', name: 'junit_jenkins', label: 'junit_jenkins']]
         }
      }
   }
}


Any help will be appreciated

Thanks,
Rubel
Reply all
Reply to author
Forward
0 new messages