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:
- Can I move artifacts between directories?
- Is there an automatic way to do this "artifact promotion" in TeamCity?
- If this must be done manually, what are some best practices?
Please sign in to leave a comment.
> 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.
Thanks for that information, very helpful. Quick followup, when moving artifacts from location A to location B, which of the following should we do:
What negative side-effects would there be if TeamCity or a user tried to access these artifacts during the move?
Any direction or guidelines here from JetBrains?
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.
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'.