1

I have two build machines set for 32 bit version and 64 bit versions of the same code. As the code is same, only the parameter values are different.

I have created a job for the compilation and parameter to tell whether 32 or 64 bit.

How to run the same job on two nodes at the same time?

There is one post already: How to run the same job multiple times in parallel with Jenkins?

But it refers to same job running multiple times on same machine.

But mine is to run multiple times on different machines.

encrypted name
  • 149
  • 3
  • 17

3 Answers3

0

click on check box "restrict where project should run" in job configuration and mention slave node: ref : http://www.infobeans.com/opensourceblog/miscellaneous/jenkins-master-slave-configuration/ bottom of the doc explains it

sanath meti
  • 5,179
  • 1
  • 21
  • 30
0

If you are using Pipeline you could add a Label to your agents, as 32bits and 64bits.

And on your pipeline declaration, add it to the Node definition:

parallel(
        [
         "Build with 32bits": { node("32bits") { ... } },
         "Build with 64bits": { node("64bits") { ... } }
        ]
)
Pedro Witzel
  • 368
  • 3
  • 14
0

One way could be to use jenkins pipeline and the construct parallel. e.g:

pipeline {
agent none
stages {
    stage('Run Builds in parallel') {
        parallel {
            stage('Build On Windows') {
                agent {
                    label "windows"
                }
                steps {
                    bat '''
                    echo running on windows
                    '''
                }
            }
            stage('Build On Linux') {
                agent {
                    label "linux"
                }
                steps {
                    sh "echo Hello"
                }
            }
        }
    }
}

}

You can offcourse call builds instead of steps.