Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where are Jenkins artifacts located?

I added the Archive Artifacts post-build option to my project. I can see the artifacts from the web browser interface, but I cannot find them in the filesystem.

Where are they located?

like image 882
Victor Avatar asked Mar 09 '16 11:03

Victor


People also ask

Where is Jenkins artifacts stored?

By default, Jenkins archives artifacts generated by the build. These artifacts are stored in the JENKINS_HOME directory with all other elements such as job configuration files.

Where are artifacts stored?

The artifacts are stored on the server "as is" without additional compression. By default, the artifacts are stored under the <TeamCity Data Directory\>/system/artifacts directory which can be changed. You can configure an external artifacts storage to replace the built-in one.


2 Answers

It is being archived on the master server (even if the build were on a slave) in the following folder:

$JENKINS_HOME/jobs/<job>/builds/<build>/archive

But you can configure a different location using the 'Advanced' setting of the job (where you can set a different workspace folder) or using plugins that are made for this purpose such as Copy Artifact Plugin

like image 84
yorammi Avatar answered Sep 26 '22 11:09

yorammi


Just another couple of tips...

You can find jenkins home by going to the environment variables page in the job build jenkins page.

Where to find Environment Variables

In my case JENKINS_HOME turned out to be /var/lib/jenkins

Found artifacts in:

/var/lib/jenkins/jobs/<my-job-name>-build/lastStable/archive/target  /var/lib/jenkins/jobs/<my-job-name>-build/lastSsuccessful/archive/target 

as well as

/var/lib/jenkins/jobs/<my-job-name>-build/builds/8/archive/target 
like image 24
chim Avatar answered Sep 25 '22 11:09

chim