Created
May 17, 2018 20:47
-
-
Save kgonzago/a12b92d6b612191179564ce154b10a0b to your computer and use it in GitHub Desktop.
Iterate across collection of machines
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Get all machines into an array | |
def machines = ["SolMeeSeeks01", "SolMeeSeeks02", "SolMeeSeeks03", "SolMeeSeeks04", "SolMeeSeeks05", "SolMeeSeeks06", "SolMeeSeeks07"] | |
//Iterate through machines | |
for (int i = 0; i < machines.size(); i++) { | |
node (machines[i]) { | |
stage ('Machine Name') { | |
bat 'hostname' //Placeholder command - call test runnner | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment