Excel sheet as a build parameter to Jenkins

34 views
Skip to first unread message

chenna keshav

unread,
Apr 4, 2019, 7:59:44 AM4/4/19
to Jenkins Users
Hi Guys,

I would like to know that is there any way that we could pass Excel sheet as a build parameter to Jenkins standalone project..

Thanks,
Keshav

Ivan Fernandez Calvo

unread,
Apr 4, 2019, 1:15:17 PM4/4/19
to Jenkins Users
I do not think that you can pass an excel file to a build to use it as parameters, but the readCSV step can read CSV files generated with Excel see https://jenkins.io/doc/pipeline/steps/pipeline-utility-steps/#readcsv-read-content-from-a-csv-file-in-the-workspace so you can pass a CSV file and use it to export environment variables to use them on your build, I've made something similar recently but with properties files this is the code


```
          def config = readProperties(file: 'my-porperties.properties')
          config.each { k, v ->
              env."${k}" = v
          }
```
Reply all
Reply to author
Forward
0 new messages