1
votes

I am testing out automatic deployment of build artifacts from Bamboo to Artifactory. I installed the Artifactory plugin in Bamboo, and then set up a test build plan. I added an "Artifactory Generic Deploy Task" since I'm not using Maven, Ivy, or Gradle.

My repository layout is:

group / product / version / filename.extension

It was pretty easy to specify where the artifact should go in the "Edit Published Artifacts" field in Bamboo:

myartifact=>com.example/someproduct/${bamboo.buildNumber}

This is fine for snapshot builds, but what if I want to make a release with a specific version number? What do I put in place of ${bamboo.buildNumber}? Or do I need to take an entirely different approach?

1

1 Answers

4
votes

It's normally preferred to promote a satisfactory snapshot build to a released status than to run an independent release build.

Although Artifactory's release promotion support was not implemented for Bamboo's generic build type, starting with version 2.6.0 you can actually implement your own build promotion strategy within Artifactory as a custom User Plugin and invoke the procedure via a REST-API command.

So the procedure becomes pretty simple:

  1. Write a release promotion strategy.
  2. Add a Bamboo build step that executes the promotion via REST.
  3. Build your snapshots until you're satisfied with the state.
  4. Execute release step.

We also keep an example of a release promotion strategy plugin in github.