Java 8 capabilities for Bamboo?

Continuing the discussion from Help us upgrade to Java 8:

@cintiadr et al., should it be time for Java 8 capabilities on Bamboo agents?

For sure!

We are using Ubuntu 14.04, so I believe jdk8 doesn’t come as a apt-get package, so it needs other magics. Do we want openjdk or would oracle one be enough?

Seems that @raff set up Travis CI with Oracle so maybe we want to do the same, but I’ll let him weigh in.

I suppose I can do both, it’s a matter of choice.

(and finding a ppa repo :D)

1 Like

Oracle is just my habit :wink: We could have openjdk on Bamboo since Oracle is covered by Travis. Please do remember that we still need JDK7 for building older branches of core and probably some modules so please leave that capability on until we transition entirely. We can probably ditch JDK6. If any build is still using JDK6 it can be changed to JDK8 or if it fails to JDK7. It would be nice if you could report what failed on JDK8 while doing this.

I did the change to add openjdk 8, I applied in my local vagrant box, but I cannot rollout.

Someone did a change directly to ‘gw108:/etc/puppet/modules/openmrs-contrib-bambooagent/install.pp’, apparently the person didn’t add a new repository, added a new capability and installed manually oracle 8 there. I’m not sure what is happening, or why a production server was changed directly.

I was running as root too.

Apparently gw107 is intact, but I don’t want to have different remote agents.

I don’t want to do a git reset of that change, and I don’t understand as well why it’s not in the github repository.

I’m happy to put both JDKs 8, but we need some coordination to make sure we are not drifting configuration there.

Sorry Cintia, that was done in haste and I should have communicated that(I’m now tracking the QA group). I created a new branch here and ran into some issues with my local and the remote repo not being in sync so it required some manual fixing. :frowning: So once again sorry, next time I will communicate better and QA my local setup better :smile:. I will cleanup gw108 and puppet apply your newest changes for openjdk-8.

1 Like

Wait, don’t take away Java 6!

In fact, all builds should be done with either Java 6 or Java 8. All previous OpenMRS releases are supposed to be Java 6-compliant.

Ok all looks good with the bamboo agents(Cintia may want to double check :smiley:). I cleaned up gw108 and applied the newest puppet recipe to both gw107 and gw108. I also changed out the plans that relied on the previous java8 jdk to the new openjdk-8. O and @darius, no worries java-6 jdk is still available for use with all plans.

1 Like

Amazing, @ryan! :slight_smile: But yes, please communicate, I wasn’t expecting it at all.

I think it looks fine, let me double check running a build with java8.

@Darius and @Rafal, we cannot yet remove java6. We still have all these plans using it: https://ci.openmrs.org/admin/agent/viewCapabilityKey.action?capabilityKey=system.jdk.openjdk-6-jdk So, after getting them to JDK7 or whatever, we can remove those capabilities from the agent.

I left JDK 7 as the ‘default’ jdk on the agent - if in a script you call ‘java -version’, it will run with version 7. It was already that way, but I’m enforcing it by puppet now.

Actually, we should not be using Java 7 at all for OpenMRS core or any modules.

For the past many years of OpenMRS’s history we have said that OpenMRS runs on Java 6, and to support that we need to be building our artifacts with a Java 6 compiler. (My understanding is that even if you use a java 7 compiler to build with java 6 compliance, that doesn’t really work.)

Please don’t change any plans away from Java 6.

With the next platform release, we will go straight to java 8.

Darius, you are right! I haven’t thought about that.