Victor
Victor

Reputation: 14593

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?

Upvotes: 62

Views: 114463

Answers (3)

Nitul
Nitul

Reputation: 1035

Path is : $JENKINS_HOME/jobs//jobs//branches//builds/$BUILD_NUMBER/archive/

You have to extract branch name, job name and repository name from JOB_NAME environment variable.

Upvotes: -1

chim
chim

Reputation: 8573

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

Upvotes: 14

yorammi
yorammi

Reputation: 6458

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

Upvotes: 71

Related Questions