29

I have a Jenkins master server plus multiple slave machines that get created and destroyed all the time.

I could not find any documentation on what exactly "archive artifacts" option does in a Jenkins job.

does it copy artifacts from slave machine's workspace to some folder on master server?

or does it save files from the slave's workspace to the same slave's "archive" location? in this case if the slave server is destroyed, those files would be gone.

if I delete the workspace, will those archived artifacts survive?

if I delete builds history, will they survive?

etc

Alex
  • 2,589
  • 3
  • 35
  • 44

2 Answers2

36

If you are talking about the "Archive the artifacts" post-build step, it copies the selected artifacts in the %JENKINS_HOME%/jobs/MY_JOB/builds/... on the master server.

So if you delete your slave or if you wipe your workspace, you won't lose your artifacts.

But if you delete a build or if you discard the old builds, you will remove the artifacts.

I hope it helps :)

GabLeRoux
  • 16,715
  • 16
  • 63
  • 81
Bruno Lavit
  • 10,184
  • 2
  • 32
  • 38
5

As Bruno stated it will "archive the artifacts" for that build back to your master.

One thing to note also though is if you use the "Discard Old Builds" plugin, which I would encourage, at the start of the page make sure you expand the "advanced" button and check your settings as there are additional settings for specifically for artifacts and retention.

duffycb89
  • 66
  • 2