Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added IBM Jdk8 build support to travis-ci configuration #45

Merged
merged 5 commits into from
Jun 12, 2017
Merged

Added IBM Jdk8 build support to travis-ci configuration #45

merged 5 commits into from
Jun 12, 2017

Conversation

ameyjadiye
Copy link
Contributor

No description provided.

@coveralls
Copy link

coveralls commented Jun 8, 2017

Coverage Status

Coverage remained the same at 96.653% when pulling 90b5426 on ameyjadiye:travis-ibmjdk8 into 5f498c0 on apache:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage remained the same at 96.653% when pulling 90b5426 on ameyjadiye:travis-ibmjdk8 into 5f498c0 on apache:master.

Copy link
Member

@garydgregory garydgregory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should use the verify Maven goal instead of test.

.travis.yml Outdated
script:
- mvn test apache-rat:check clirr:check checkstyle:check findbugs:check javadoc:javadoc
- docker run -v `pwd`:/work ibmcom/ibmjava:8-sdk /bin/bash -c "apt-get update && cd work && apt-get install -y maven && mvn test apache-rat:check clirr:check checkstyle:check findbugs:check javadoc:javadoc"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can simply run mvn at the end without specifying any goals, because we have configured a defaultGoal in our pom.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @britter for pointing this out. fixed now!

@ameyjadiye
Copy link
Contributor Author

Hi @garydgregory , I think removing test is not good idea, better we can have verify along with test

@joehni
Copy link

joehni commented Jun 9, 2017

In Maven "verify" implies "test", since "verify" is a later step in the Maven build lifecycle.

- docker

before_install:
- docker pull ibmcom/ibmjava:8-sdk
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to use library/ibmjava:8-jsk because it's marked on dockerhub as "official" whereas ibmcom is just public. It's a bit curious though. It seems that they both point to the same place (repository) one points to "master" and one points to a githash.

ibmcom/ibmjava:8-sdk - https://github.com/ibmruntimes/ci.docker/blob/master/ibmjava/8/sdk/x86_64/ubuntu/Dockerfile

library/ibmjava:8-sdk - https://github.com/ibmruntimes/ci.docker/blob/a9a184211f9feef1f2bdd0330ff8ae95e6c015cf/ibmjava/8/sdk/x86_64/ubuntu/Dockerfile

Copy link
Member

@chtompki chtompki Jun 9, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a curiosity I'm not sure how to solve.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @chtompki , I just compared them and found both Dockerfile belongs to same repository, I took the one from master. Official belongs to some past commit. I prefer to go with official library/ibmjava:8-sdk though.

.travis.yml Outdated
script:
- mvn test apache-rat:check clirr:check checkstyle:check findbugs:check javadoc:javadoc
- docker run -v `pwd`:/work ibmcom/ibmjava:8-sdk /bin/bash -c "apt-get update && cd work && apt-get install -y maven && mvn"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The apt-get update here might take a long time.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @britter @garydgregory @chtompki

Flashed a though, can we use our own image for this ? we can build it from library/ibmjava:8-sdk. Rather doing apt-get update and apt-get install -y maven again and again on fly we can just build our own with below Dockerfile on Dockerhub, I also found we have apache account so it will be easy to publish it there. same can be reused by some other project in apache. (that's why commons is made for anyway 😊 )

from library/ibmjava:8-sdk

RUN apt-get update 
RUN apt-get install -y maven  

@@ -150,7 +150,7 @@


<build>
<defaultGoal>clean test apache-rat:check clirr:check checkstyle:check findbugs:check javadoc:javadoc</defaultGoal>
<defaultGoal>clean verify apache-rat:check clirr:check checkstyle:check findbugs:check javadoc:javadoc</defaultGoal>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@ameyjadiye
Copy link
Contributor Author

Created one image containing maven with ibmjava8, same can be pushed to apache dockerhub repo

https://hub.docker.com/r/ameyjadiye/ibmjava8/

@ameyjadiye
Copy link
Contributor Author

@chtompki, I think we are good to merge this.

@chtompki
Copy link
Member

Agreed. Will pull this in tonight or in the morning (UTC-4)

script:
- mvn test apache-rat:check clirr:check checkstyle:check findbugs:check javadoc:javadoc
- mvn
- docker run -v `pwd`:/work library/ibmjava:8-sdk /bin/bash -c "apt-get update && cd work && apt-get install -y maven && mvn"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm about to pull this in, but I wonder if we could put in either issues or PR's on the official "maven" docker image whose docker files are given here: https://github.com/carlossg/docker-maven such that we could get oracle java as well as ibm java supported.

I've opened the following issue for tracking purposes:
carlossg/docker-maven#25

I'm not sure, but I could see licensing being the main blocker to those being brought into the project.

@PascalSchumacher
Copy link
Contributor

PascalSchumacher commented Jun 14, 2017

This does not seem to really work. It looks like the ibm jdk build is run after each (oracle8, openjdk(7|8)) build and actually fails, but the build is still marked successful, e.g.:

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.039s
[INFO] Finished at: Wed Jun 14 20:58:38 UTC 2017
[INFO] Final Memory: 10M/143M
[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:3.0.0:clean (default-clean) on project commons-text: Failed to clean project: Failed to delete /home/travis/build/apache/commons-text/target/surefire-reports/org.apache.commons.text.similarity.LevenshteinDetailedDistanceTest.txt -> [Help 1]

e.g. https://travis-ci.org/apache/commons-text/jobs/243003865 (see raw build log)

@PascalSchumacher
Copy link
Contributor

I guess this failure is also the reason that the coveralls integration is broken.

@chtompki
Copy link
Member

Hm. I'll give this a look.

@ameyjadiye
Copy link
Contributor Author

Hi @PascalSchumacher , where did you see build is failing ? I see all builds passed given in your link https://travis-ci.org/apache/commons-text/jobs/243003865,

Yes ibmjdk8 is running after each build , that's how Travis handling it , but its ok over the cost of not checking code with ibmjdk8

And if build fails it do mark build as failed i did verified that because maven return exit code as -1 which all the way go to Travis to mark RED.

At this point all (openjdk7, oraclejdk7, oraclejdk7, ibmjdk8*3) = 6 builds as passing .

I see some exception on findbug library and that's not issue with Commons Text code but in findbug code and that's because they might not have considered ibmjdk8 for their build.

@PascalSchumacher
Copy link
Contributor

The build failure I quoted occurs after the findbugs exceptions.

@chtompki
Copy link
Member

I believe the reason that we're getting a "success" to be the fact that the docker command exits with a 0. So might we want to do a {docker run -v pwd:/work library/ibmjava:8-sdk /bin/bash -c "apt-get update && cd work && apt-get install -y maven && mvn} || exit 1 in the docker command.

Further, I've been thinking about this more:

  1. I submitted some changes to the official maven docker image (which I think we should be using). 2. Would we want to have two builds here, one that builds in a bunch of containers, and a second (presumably running on the target usage jdk) that does the coveralls bit?
  2. Depending on how we do this we loose a certain amount of paralellization.

I think I'll bubble this up to the ML for more discussion. It seems clear to me that folks want to do this, but it's just a matter of how.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants