Hi,
I have 2 windows nodes and have to run different set of commands in these nodes. I am using master/slave concept to connect to the remote VM via Jenkins.
In the single job , how can I do that?
As a reminder, the term “slave” to refer to an agent has been deprecated since 2016. Please refer to On Jenkins Terminology Updates for more details. We request you update your post.
pipeline {
agent none
stages {
stage('VM#1') {
agent { label: 'Vm1' }
steps {
bat("deltree /y c:\temp1\*.log") # or something, i'm not a windows power user
}
}
stage('VM#2') {
agent { label: 'Vm2' }
steps {
bat("deltree /y c:\temp2\*.log") # or something, i'm not a windows power user
}
}
}
}