Bamboo: releasing off non-master branches

Tags: #<Tag:0x00007efd1a3e7f60> #<Tag:0x00007efd1a3e7e20> #<Tag:0x00007efd1a3e7cb8> #<Tag:0x00007efd1a3e7b00>

(Dimitri R) #1

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.

New option to release scripts to skip tests
(Cintia Del Rio) #2

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)

(Dimitri R) #3

@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

(Daniel Kayiwa) #4

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

(Dimitri R) #5

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

(Daniel Kayiwa) #6

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

(Dimitri R) #7

Ok, thanks. Just re-ran it…

(Dimitri R) #8

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…

(Daniel Kayiwa) #9

Did the error message say something like that?

(Dimitri R) #10

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

(Dimitri R) #11

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]

(Dimitri R) #12

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

(Cintia Del Rio) #13

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.

(Dimitri R) #14


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:

(Cintia Del Rio) #15


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)

(Cintia Del Rio) #16

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

(Dimitri R) #17

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

(Cintia Del Rio) #18


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

(Dimitri R) #19

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.

(Cintia Del Rio) #20

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.