0

I need to pass a list of parameters to Jenkins from a file written in this way

param1=test1
param2=test2
paramBool=true
....

How can I pass these parameters? I have to use the parameters in a Jenkins pipeline

pakolela
  • 19
  • 4

1 Answers1

1

I mentioned before a dynamic declarative pipeline parameters.

You might combine it with:

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • But I would pass the file with the parameters uploading it using the Jenkins interface (parameter file) – pakolela Jun 13 '22 at 10:25
  • @pakolela "pass the file with the parameters", as in "pass the file location/full path, or pass the file content? – VonC Jun 13 '22 at 11:40
  • I don't have the file in the workspace so: file content – pakolela Jun 13 '22 at 12:35
  • @pakolela OK, the [groovy script](https://stackoverflow.com/a/64120833/6309) can use that file content, once split into lines, then key-value, and modify `params`. – VonC Jun 13 '22 at 15:07