Bamboo: releasing off non-master branches

Hi @cintiadr / all.

About this:

Any idea if this something that could be looked at in the near future?

In the context of Bahmni we would like to make a maintenance release of EMR API 1.24.5. That would be off the 1.24.x branch. We can still do it manually of course.

In all fairness, I have the feeling that HEAD of any branch might work. What I know it won’t work is if it’s not the head of the branch (like a previous commit) on the current branch.

This is the release script.

Would you be willing to test that? There’s a test module and a release test build.

(I’m quite happy if you or someone wants to improve that script, but I won’t have the bandwidth to do it)

@cintiadr I tried to launch the release process off the revision 1.24.x but it fails (see here):

Checkout to revision 1.24.x has failed.command /usr/bin/git checkout -f 1.24.x failed with code 1.
Working directory was [/home/bamboo-agent/bamboo-agent/xml-data/build-dir/EMRAPI-EMRAPI-JOB1].,
stderr: error: pathspec '1.24.x' did not match any file(s) known to git.

It looks like the local env. doesn’t know yet about that branch. A git fetch beforehand could help, is there a way to do that?

Cc @dkayiwa

I just changed the repository to point to the 1.24.x branch. Can you try to release?

Thanks @dkayiwa, I just did, here it is running:

Just run it again. The AdtServiceComponentTest test has a tendency of randomly failing.

Ok, thanks. Just re-ran it…

Ok in the meantime it failed because somehow the tag 1.24.5 had been created before anyway :expressionless:

So I cleaned up the branch, deleted the tag, and started over again…

Did the error message say something like that?

Yes it was complaining that the remote tag 1.24.5 was already there.

Now I’m getting this:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project emrapi:
  Failed to deploy artifacts:
    Could not find artifact org.openmrs.module:emrapi:pom:1.24.5 in openmrs-repo-modules ( -> [Help 1]

@cintiadr, just in case you have any clue on the above error. Here is the failing build.

Well. Can we actually do the test with the test module? So we don’t mess with an actual artefact we care about.

A branch build in bamboo is probably your best chance of it working.


So I have the same immediate error that the other branch is unknown to Git, @dkayiwa what did you do yesterday to fix this? See here:


Now can you please not use the ‘custom’ commit hash, and instead create a branch build in bamboo?

Probably Config/Branches/Create new or whatever

(Sorry, on my phone)

There’s no need to update the repository configuration. Just create a branch build on the same plan.

@cintiadr sorry what do you mean by ‘branch build’?


I want it to have default/master AND your branch, both showing in the UI.

On the test module all is fine, and by adding a plan branch I end up with this:

master and XYZ-123, as expected. Note that I didn’t add master, Bamboo seems to have understood that it was already there.

Doing the exact same thing on EMR API produces this:

The first one does point to what seems to be master though, and the second on is really 1.24.x.

That’s a correct assumption :slight_smile:

I can see that the release from branch XYZ-123 appears to have worked as expected, which is really great to know.

That’s because someone changed the repository configuration instead of creating a branch build. I don’t understand how one was pointing to master, but I don’t really care at this point.