Semantic version between Bamboo and Artifactory?

We have an internal Java library that is dependent on many other projects, let it name it our-commons-<version>.jar. We like the idea of semantic versioning more or less, therefore:

  • A significant number of changes change when we make backward incompatible API changes;
  • A small number changes when we make backward compatible API changes;
  • The fix number changes every time we make an assembly (so for us this is really the build number ); but we really will only build when fixing the error so that it is close enough to truesemver

Currently, we publish only in the SNAPSHOT directory on Artifactory and rewrite the JAR that is there every time we create. In particular, we have a repo project:

http://arty/artifactory/simple/our-libs-snapshots/our-commons/snapshot

Where http://arty/artifactoryis the Artifactory service running on the machine arty, where our-libs-snapshotsis the name of the actual repo, and where our-commonsis the name of our library. The directory /snapshotis where all the Bamboo assemblies publish, as I said, rewriting the JAR of each assembly. We hard code our assembly to create our-commons-0.1-SNAPSHOT.jareach assembly.

To make this post, I have the following task configured as part of our Bamboo plan for our-commons:

Artifactory Deploy Task
=======================
Artifactory Serverl URL:        http://arty/artifactory
Target Repository:              our-libs-snapshots
Deployer Username:              myadmin
Deployer Password:              ******
Edit Published Artifacts:       dist/our-commons-0.1-SNAPSHOT.jar=>our-commons/snapshot
Capture & Publish Build Info:   yes (checked)

I am trying to figure out how to make Bamboo and Artifactory work with our semver flavor. So for the first time when we will build, it will produce:

http://arty/artifactory/simple/our-libs-snapshots/our-commons/1.0.0/our-commons-1.0.0.jar

, , :

http://arty/artifactory/simple/our-libs-snapshots/our-commons/1.0.1/our-commons-1.0.1.jar

Etc. , , :

http://arty/artifactory/simple/our-libs-snapshots/our-commons/1.1.0/our-commons-1.1.0.jar

, , reset , .

, , . ?

+4
1

, , (. ). patch semver, ( - , , 10.0.3 3 - ).

Maven ( Gradle, Ivy) Artifactory . Artifactory setup ( 3 5 - ).

+3

Source: https://habr.com/ru/post/1544180/


All Articles