Moving artifacts to different Artifact directories?

This question is about the Artifact directories storage location under Global Settings, not about defining build artifacts for a build configuration.

From what I understand, you can specify multiple Artifact directories. Only the first directory will be used to store new artifacts while old directories will be searched for existing artifacts. Does this mean I can move build artifacts from one Artifact directory to another?

We have very large build artifacts that are too big to store all locally, so we have a network drive location for more permanent storage. However, this network drive is somewhat flakey so we want to store artifacts locally until we can promote them to the network drive sometime in the future. Basically, I don't want artifact storage hiccups to fail my builds but I also don't want all artifacts stored locally forever. So:

  1. Can I move artifacts between directories?
  2. Is there an automatic way to do this "artifact promotion" in TeamCity?
  3. If this must be done manually, what are some best practices?
2
5 comments

> Does this mean I can move build artifacts from one Artifact directory to another?

Yes. You can add some other location for artifacts, make it the last one and move some of your artifacts there.

1. Can I move artifacts between directories?

Yes.

2. Is there an automatic way to do this "artifact promotion" in TeamCity?

Unfortunately no.

3. If this must be done manually, what are some best practices?

You can use any tool which can move artifacts from one location to another. There is probably one best practice - move artifacts of archived or inactive projects first. Other than that, you can just move files, there is no need to update anything in database, or tell TeamCity somehow that artifacts are moved.

 

 

1

Thanks for that information, very helpful. Quick followup, when moving artifacts from location A to location B, which of the following should we do:

  1. A simple move operation (which means during the move operation some artifacts for a single build will exist in location B while the rest of the artifacts for that same build are still in location A)?
  2. A copy+delete operation (which means during the copy operation location A is not modified until location B is completely up-to-date but means artifacts exist in both locations)? This also has the benefit of handling errors better (if the copy fails we aren't in some half-moved state).

What negative side-effects would there be if TeamCity or a user tried to access these artifacts during the move?

0

Any direction or guidelines here from JetBrains?

0

copy + delete is safer. In case of move if there are builds depending on artifacts of a build whose files are being moved then this can cause failure in the running dependent build, or dependent build may receive incomplete set of files.

1

Pavel: Is this also supposed to work when using Artifact storage plugin and using azure blob as a storage? I want to copy artifacts from local storage to blob after a certain time. I did a quick test and moved an artifact to blob but when I´m clicking on artifacts is shows just 'empty'.

0

Please sign in to leave a comment.