Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does artifactory support multiple versions of the same artifact?

Tags:

artifactory

Let's say I have artifacts "mylibrary-5.2.jar" and "mylibrary-5.3.jar" representing the 5.2 and 5.3 versions of a library that our project creates and publishes for one of our other projects.

Does Artifactory support having multiple "versions" of each of these artifacts to represent the different builds that were performed during a release to construct this artifact?

For example, to produce the final version of the 5.2 release of "mylibrary" aka the artifact: mylibrary-5.2.jar, we went through 3 builds to get to a version that passed our integration environment's automated tests and our user acceptance tests.

So there were three separate builds that produced three separate artifacts for release 5.2. We want to be able to retain and potentially recall these different build's artifact at a later date (for testing, etc).

In order to do this, which of the following options would work?

  1. Capture the artifacts as separate Artifacts, i.e. build-5.2-b1.jar (build 1's artifact), build-5.2-b2.jar (build 2's artifact), build-5.2-b3.jar (build 3's artifact), and build-5.2.jar (the final production release; which matches build 3)

  2. Capture a SINGLE artifact named "build-5.2.jar" which has VERSIONS of the artifact which capture builds 1 through 3 and which can be recalled later, by version number.

  3. Some other option we have not considered, but should
like image 270
BestPractices Avatar asked Aug 08 '12 15:08

BestPractices


1 Answers

The question itself is less to do with Artifactory, as it can handle any artifact; but the recommended way is normally a variation of your first suggestion; that is, keeping separate snapshots of every build until you're satisfied with the result and produce a single release-version.

So or example, with every development/qa/integration iteration an artifact will be produced in the form of:

artifactName-1.0-${TIMESTAMP}.jar

Each differs in name (and possibly content) and is thus traceable.

Once the iterations are done, and you're ready to release the artifact, produce it in the form of:

artifactName-1.0.jar

This artifact represent the final released version.


Snapshots are very common in the Java world and are widely used by both Maven and Ivy, and are also one of the most fundamental concepts of Continuous Integration

like image 53
noamt Avatar answered Sep 29 '22 13:09

noamt