I have file consist of 10 VM name.I want to pass the each VM name as parameter for a jenkins job.so that my jenkins job should perform task specified in each machine.Can some one suggest how it can be done.How it can be done using pipeline script.
Example
File.txt consist below variables
VM1
VM2
VM3
..
vm10
and I want to pass the values to jenkins job name called "Setupenvironment"
Please suggest.
You can use the file parameter to pass a file to your job. For a declarative pipeline it looks like the following
pipeline {
parameters {
file(name: 'FILE', description: 'Some file to upload')