How to make path of File Parameter Dynamic in Jenkins Job

Viewed 21

I am using a file parameter in my Jenkins Job. E.g. src/main/resources/file1.txt;

Now I have three files in the same directory (src/main/resources) : file1.txt, file2.txt, file3.txt If I enter the path of file param as : src/main/resources/file1.txt

Then the uploaded file will be replacing the file1.txt file in my workspace.

Problem Statement : I want the file parameter to be dynamic in nature so that I can upload file1/2/3 and it should replace the corresponding file in my workspace in directory(src/main/resources/).

Need suggestion if this can be achieved in Jenkins.

1 Answers
Related