0

I am trying to find a way to assure that the build number for the same components are unique and it seems that the only place that is really appropriate to get next build number it would be the artifact repository (Artifactory in my case).

In case someone wonders why I am not using the build number from the build system, that's because I have components that are build, in parallel, by different build systems and each one of them may be allowed to upload the artefacts.

Obviously I do not want to introduce a new build-number-server dependency I do indent to use the destination to assure that I have a proper (unique) build number.

Using SCM for build numbers is not good because of several things like forks and branches.

Update: It seems that if I try to PUT a the buildInfo.json with the same build number on Artifactory the server returns a 500 error code with a message Could not insert build Build{...}.

sorin
  • 161,544
  • 178
  • 535
  • 806

1 Answers1

0

It seems that this is not possible at this moment because you can only publish build info once, which means that even if you can figure out which build number should be next, you cannot reserve it till you finish the build.

https://www.jfrog.com/jira/browse/RTFACT-7676 is asking to allow POST in addition to PUT for builds, so we can modify them (publish it as incomplete at the first place, and updating it later when the build process is finished).

sorin
  • 161,544
  • 178
  • 535
  • 806