0

I need to add custom file to Jenkins job workspace, but I have no opportunity to add any kind of plugins. Is there any way to do it?

neckobik
  • 307
  • 1
  • 6
  • 13
  • Have you tried using `File Parameter`? http://stackoverflow.com/questions/27491789/how-to-upload-a-generic-file-into-a-jenkins-job – Will Webb Mar 28 '17 at 08:59
  • 1
    @WillWebb no, I haven't try that. But i Don't want to upload file each time I'm running the job. I need to upload it only once and then it should be stored there. – neckobik Mar 28 '17 at 09:26
  • Can you provide a bit more context. Where is the file? Can you get it using curl? Is it on the host, or any of the slaves (you might be able to use `stash`/`unstash` then)? – Rik Mar 28 '17 at 09:26
  • @neckobik if you do not clean the workspace it persists (depending on the type of job), however if you allow concurrency, jenkins might create a second workspace, where of course the file is not present. Best is to just add it to you version control, so it will be checked out each time – Rik Mar 28 '17 at 09:28
  • I'v found the solution, thank you for your time. – neckobik Mar 28 '17 at 09:30
  • 8
    @neckobik Maybe you can share it as an answer, so other people might be helped if they run into the same problem – Rik Mar 28 '17 at 12:22
  • @neckobik Requesting you to please share the answer... I have a similar requirement. – Abhi Oct 06 '20 at 05:05

0 Answers0