0
votes

We want to use Artifactory with TeamCity CI for our production. I am in the process of testing it and now I found a problem. This is what happens:

I am using the generic repository.

There are 2 jobs, producer (deploys some artifacts) and consumer (only downloads them).

  • producer with build number #1 deploys 5 artifacts into Artifactory via the Artifactory Plugin.
  • consumer is set to resolve artifacts of the producer build. All 5 are downloaded.
  • producer with build number #2 is run again, again deploying 5 artifacts.
  • consumer is now set to resolve artifacts of the producer build of number #1. Only 2 of the 5 artifacts are downloaded.

The same thing happens when using the REST API - downloading artifacts of the newest build is okay, all the artifacts are downloaded. But when I try to download artifacts of the older builds, only some are.

I have not set up any cleanup policy, so artifacts should not be deleted.

The artifacts from producer build #1 and #2 may or may not be the same - in both cases I want to download all of them.

Is there something I am not getting right? It looks as if the older artifacts are, for some reason, thrown away with the new build.

When I view the published artifacts of the build I want in Artifactory web GUI, it says No path found (externally resolved or deleted/overwritten) next to it.

1
Are you building snapshot/release artifacts? does every build produce artifacts with a new version number? are you overwriting previous build artifacts (using the same exact path)?Dror Bereznitsky
The artifacts are not necessarily able to have metadata about their version (logfiles, .raw and more). I am always deploying to the same path and the same filename. The way I understood it, Artifactory takes care of versions through the BuildInfo JSON that is uploaded with every build deploy. Or will I have to manually separate all the artifacts to folder-per-build structure?Martin Melka

1 Answers

1
votes

If you want to keep versions of the deployed artifacts they must be deployed with a unique path/file name.
Otherwise, Artifactory will override the artifact which already exist in this path. Notice that this is a different behavior from a version control tool which keeps revisions of the same file. This makes less sense when it comes to binaries, as the binary diff is usually not that useful.
The build info only keeps metadata about your build, but it does not take care of versions.