Release Management for 2.0 Maintenance Release From Bahmni

I would be pairing with @bharatak for the release process. Yes, I took a look at this: https://wiki.openmrs.org/display/docs/Release+Process

We are releasing 2.0.2 as @preethi_s mentioned. We are moving the pending issues in JIRA to Platform 2.0.3

@bharatak and @preethi_s for those tickets in the POST COMMIT state which have already been back ported to the 2.0.x branch, the fix version should be 2.0.2. You just need to close them. :slight_smile:

@dkayiwa You are right. Changed them back to 2.0.2 and closed those tickets.

Hi @dkayiwa @darius @wyclif We are facing an issue while releasing openmrs 2.0.2. Build#150

Looking into the logsā€¦ the following is the error.

build 20-Dec-2016 07:43:46 [INFO] [INFO] Checking licensesā€¦ build 20-Dec-2016 07:43:46 [INFO] [WARNING] Missing header in: /home/bamboo-agent-1/bamboo-agent/xml-data/build-dir/TRUNK-OC2-REL/release-scripts/list-repos-using-refapp-import.txt

I cannot see a header for list-repos-using-refapp-import.txt.

Can you please suggest?

You need to add that file i.e list-repos-using-refapp-import.txt to the ignored list here, Iā€™d think all .txt files should be ignored

Pull request: https://github.com/openmrs/openmrs-core/pull/1909 Can someone merge?

Just Merged!

@darius @wyclif @dkayiwa

We tried releasing after the pull request but it fails for the following error now.

[INFO] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.1:compile (default-compile) on project openmrs-tools: Compilation failure
20-Dec-2016 12:57:12	[INFO] [ERROR] Failure executing javac, but could not parse the error:
20-Dec-2016 12:57:12	[INFO] [ERROR] javac: invalid target release: 1.8
20-Dec-2016 12:57:12	[INFO] [ERROR] Usage: javac <options> <source files>
20-Dec-2016 12:57:12	[INFO] [ERROR] use -help for a list of possible options
20-Dec-2016 12:57:12	[INFO] [ERROR] -> [Help 1]
20-Dec-2016 12:57:12	[INFO] [ERROR] 
20-Dec-2016 12:57:12	[INFO] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
20-Dec-2016 12:57:12	[INFO] [ERROR] Re-run Maven using the -X switch to enable full debug logging.
20-Dec-2016 12:57:12	[INFO] [ERROR] 
20-Dec-2016 12:57:12	[INFO] [ERROR] For more information about the errors and possible solutions, please read the following articles:
20-Dec-2016 12:57:12	[INFO] [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
20-Dec-2016 12:57:12	[INFO] [ERROR] 
20-Dec-2016 12:57:12	[INFO] [ERROR] After correcting the problems, you can resume the build with the command
20-Dec-2016 12:57:12	[INFO] [ERROR]   mvn <goals> -rf :openmrs-tools   

Build log: https://ci.openmrs.org/browse/TRUNK-OC2-REL-151/log

Can we get some help?

Looks like the plan is being run on JDK 7, it should be set to 8

From the error message I wonder if this stage is being executed with Java 7 rather than Java 8.

(I will try to investigate a bit.)

Actually I donā€™t have privs to log into the bamboo agents. @cintiadr or @pascal do you know how to investigate this?

I think we need to set JAVA_HOME to jdk 8 under environment variables for the release to maven task, am not sure where java 8 is installed on that machine

Itā€™s more complicated because this is a bamboo agent, which also needs to be able to run other builds. :slight_smile:

We have multiple JDK installed in Bamboo, for those who are admin you can check each agent https://ci.openmrs.org/admin/agent/viewAgent.action?agentId=50495493

We have openjdk 6, 7 and 8.
The easiest way to set a certain behaviour from a CI agent is to actually setup a build: https://ci.openmrs.org/browse/RELEASE-TES-JOB1-4/log

Build logs

20-Dec-2016 21:07:34 default java 20-Dec-2016 21:07:34 java version ā€œ1.7.0_111ā€ 20-Dec-2016 21:07:34 OpenJDK Runtime Environment (IcedTea 2.6.7) (7u111-2.6.7-0ubuntu0.14.04.3) 20-Dec-2016 21:07:34 OpenJDK 64-Bit Server VM (build 24.111-b01, mixed mode) 20-Dec-2016 21:07:34 version java 6 20-Dec-2016 21:07:38 java version ā€œ1.6.0_40ā€ 20-Dec-2016 21:07:38 OpenJDK Runtime Environment (IcedTea6 1.13.12) (6b40-1.13.12-0ubuntu0.14.04.2) 20-Dec-2016 21:07:38 OpenJDK 64-Bit Server VM (build 23.40-b40, mixed mode) 20-Dec-2016 21:07:38 version java 7 20-Dec-2016 21:07:38 java version ā€œ1.7.0_111ā€ 20-Dec-2016 21:07:38 OpenJDK Runtime Environment (IcedTea 2.6.7) (7u111-2.6.7-0ubuntu0.14.04.3) 20-Dec-2016 21:07:38 OpenJDK 64-Bit Server VM (build 24.111-b01, mixed mode) 20-Dec-2016 21:07:38 version java 8 20-Dec-2016 21:07:38 openjdk version ā€œ1.8.0_91ā€ 20-Dec-2016 21:07:38 OpenJDK Runtime Environment (build 1.8.0_91-8u91-b14-0ubuntu4~14.04-b14) 20-Dec-2016 21:07:38 OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode)

I do remember to explicitly keep java 7 as the default on the agent, so older builds wouldnā€™t be accidentally moved to java 8. To choose the relevant JAVA_HOME for your script task, on the ā€˜Environment Variablesā€™ field of your task, add a ā€˜JAVA_HOME=${bamboo.capability.system.jdk.JDK 1.8}ā€™. The same can be done with MAVAN_HOME or any other variable needed.

Okay, I believe I have set JAVA_HOME here as @cintiadr suggests: https://ci.openmrs.org/build/admin/edit/editBuildTasks.action?buildKey=TRUNK-OC2-REL

@preethi_s you can give this another try

@darius and others,

Thanks. We are able to release openmrs platform 2.0.2 successfully.