Jenkins – Upload a txt file to jenkins build job as build parameter

jenkins

Need some help to know about uploading a test case file to Jenkins Build job as build parameter is it possible?

I am aware of following options

  1. Parametric build where we can specify the source code path at run time
  2. Copy files into the job's workspace before building

but both the options we have to give the path i am looking at option where we can upload files to Jenkins build job (similar to attaching files to email).

Is it possible?

Best Solution

If looking for an interactive solution:

  • Have a set of check-boxes as parameters, each representing a different test-case
  • Let the developer check the required tests when running the build

If you plan to run this as an unattended job:

  • Let the developer edit a parameters-file in a known location
    and specify the required tests in this parameters-file
  • The build-job will read this parameters-file when it runs,
    and will act up-on it
Related Question