Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to download a file from the jenkins job build folder

Tags:

jenkins

I have a jenkins server running, and for a job I need to download a file which is in the jobs/builds/buildname folder.

How to download that file from jenkins job?

like image 369
Vivek Pemawat Avatar asked Aug 31 '25 16:08

Vivek Pemawat


1 Answers

If you would use the workspace as suggested by previous post, you can access it within a Pipeline:

sh "wget http://<servername:port>/job/<jobname>/ws/index.txt"

Or inside a script:

wget http://<servername:port>/job/<jobname>/ws/index.txt

Where index.txt is the file you want to download.

like image 85
S.Spieker Avatar answered Sep 04 '25 19:09

S.Spieker