This repository has been archived by the owner on Dec 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 41
Implement OpenJDK 9 Image #129
Merged
Changes from 7 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
e7dbce4
Refactor common docker scripts into separate module
eed3343
Refactor common test resources into separate module
3d6d093
Configure openjdk8 and openjdk9 modules
22d4431
Fixup build scripts for new structure
c0f3b12
Update documentation
6fe1988
Update travis config to support build-time dependencies
c29413c
Remove the use of envsubst in local_integration_test
a5948b5
Clarify documentation
1d3ba38
Add structure test for project jigsaw features
b4e5814
Add stability badges to readme
c40c952
Install jdk9 from testing repository
ba1386d
Merge branch 'master' into openjdk-9
334a90d
Fix gcloud docker usage in local_int_test
82f8aae
Merge branch 'openjdk-9' of github.com:GoogleCloudPlatform/openjdk-ru…
ba85465
Fix structure test execution in cloudbuild environment
e822405
Merge branch 'master' into openjdk-9
balopat 93b0090
Update build scripts
6352951
Merge branch 'openjdk-9' of github.com:GoogleCloudPlatform/openjdk-ru…
dce4a86
Rm compiled test app
f2bf7b5
Add variables for openjdk9 minor (update) version
904f3ef
Fixup dockerfile
4871520
Rename test-app to reflect narrower scope
50cd172
Update readme
d8cc970
Bash quoting of arguments
4f67a24
Use timestamp instead of uuidgen
5f4c54f
Update readme with build statuses
e5c2a8b
Revert "Use timestamp instead of uuidgen"
c656640
Remove duplicated int test run through maven
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,25 +9,33 @@ To build the image you need git, docker (your user needs to be part of the ``doc | |
``` | ||
$ git clone https://github.com/GoogleCloudPlatform/openjdk-runtime.git | ||
$ cd openjdk-runtime | ||
|
||
# build all images | ||
$ mvn clean install | ||
|
||
# only build the openjdk8 image | ||
$ mvn clean install -am -pl openjdk8 | ||
|
||
# only build the openjdk9 image | ||
$ mvn clean install -am -pl openjdk9 | ||
``` | ||
The resulting image is called openjdk | ||
The resulting image(s) are called openjdk. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ..with tags differentiating the version ( |
||
|
||
### Cloud build | ||
To build using the [Google Cloud Container Builder](https://cloud.google.com/container-builder/docs/overview), | ||
you need to have the [Google Cloud SDK](https://cloud.google.com/sdk/) installed locally. We provide a script to make this more convenient. | ||
``` | ||
# the following commands will build and push an image named "gcr.io/my-project/openjdk:tag" | ||
# the following commands will build and push an image named "gcr.io/my-project/openjdk:8" | ||
$ PROJECT_ID=my-project | ||
$ TAG=tag #optional | ||
$ ./scripts/build.sh gcr.io/$PROJECT_ID $TAG | ||
$ MODULE_TO_BUILD=openjdk8 # only builds the openjdk:8 image | ||
$ ./scripts/build.sh -d gcr.io/$PROJECT_ID -m $MODULE_TO_BUILD | ||
``` | ||
|
||
If you would like to simulate the cloud build locally, pass in the `--local` argument. | ||
``` | ||
$ PROJECT_ID=my-project | ||
$ TAG=tag #optional | ||
$ ./scripts/build.sh gcr.io/$PROJECT_ID $TAG --local | ||
$ MODULE_TO_BUILD=openjdk8 # only builds the openjdk:8 image | ||
$ ./scripts/build.sh -d gcr.io/$PROJECT_ID -m $MODULE_TO_BUILD --local | ||
``` | ||
|
||
# Running Tests | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,19 +2,15 @@ | |
# https://cloud.google.com/container-builder/docs/overview | ||
|
||
steps: | ||
# Build the maven project, omitting the docker build step | ||
- name: 'gcr.io/cloud-builders/java/mvn:3.3.9-jdk-8' | ||
args: ['-P-local-docker-build', '-Ddocker.tag.long=${_DOCKER_TAG}', 'clean', 'install'] | ||
id: 'MAVEN' | ||
# Execute the docker build | ||
- name: 'gcr.io/cloud-builders/docker' | ||
args: ['build', '--tag=${_IMAGE}', '--no-cache', 'openjdk8/target/docker'] | ||
id: 'DOCKER' | ||
|
||
# Runtimes-common structure tests | ||
# See https://github.com/GoogleCloudPlatform/runtimes-common/tree/master/structure_tests | ||
- name: 'gcr.io/gcp-runtimes/structure_test' | ||
args: ['--image', '${_IMAGE}', '-v', '--config', '/workspace/openjdk8/target/test-classes/structure.yaml'] | ||
id: 'STRUCTURE_TEST' | ||
args: | ||
- 'clean' | ||
- 'install' | ||
- '--batch-mode' | ||
- '-Ddocker.image.name=${_IMAGE}' | ||
# only build the specified module | ||
- '--projects=${_MODULE}' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doesn't There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would appear not - the mvn executable is able to deal with arguments of the form "foo=bar". |
||
- '--also-make' | ||
id: 'MVN_PACKAGE' | ||
|
||
images: ['${_IMAGE}'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
~ Copyright 2016 Google Inc. All Rights Reserved. | ||
~ | ||
~ Licensed under the Apache License, Version 2.0 (the "License"); | ||
~ you may not use this file except in compliance with the License. | ||
~ You may obtain a copy of the License at | ||
~ | ||
~ http://www.apache.org/licenses/LICENSE-2.0 | ||
~ | ||
~ Unless required by applicable law or agreed to in writing, software | ||
~ distributed under the License is distributed on an "AS IS" BASIS, | ||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
~ See the License for the specific language governing permissions and | ||
~ limitations under the License. | ||
--> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>com.google.cloud.runtimes</groupId> | ||
<artifactId>openjdk-parent</artifactId> | ||
<version>0.1.0-SNAPSHOT</version> | ||
<relativePath>../pom.xml</relativePath> | ||
</parent> | ||
|
||
<name>Openjdk Common Docker Configuration</name> | ||
<artifactId>openjdk-common</artifactId> | ||
<packaging>pom</packaging> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-assembly-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>single</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
<configuration> | ||
<descriptors> | ||
<descriptor>src/main/assembly/assembly.xml</descriptor> | ||
</descriptors> | ||
<tarLongFileMode>gnu</tarLongFileMode> | ||
<appendAssemblyId>false</appendAssemblyId> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<!-- | ||
~ Copyright 2017 Google Inc. All Rights Reserved. | ||
~ | ||
~ Licensed under the Apache License, Version 2.0 (the "License"); | ||
~ you may not use this file except in compliance with the License. | ||
~ You may obtain a copy of the License at | ||
~ | ||
~ http://www.apache.org/licenses/LICENSE-2.0 | ||
~ | ||
~ Unless required by applicable law or agreed to in writing, software | ||
~ distributed under the License is distributed on an "AS IS" BASIS, | ||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
~ See the License for the specific language governing permissions and | ||
~ limitations under the License. | ||
--> | ||
|
||
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd"> | ||
<id>assembly</id> | ||
<formats> | ||
<format>tar.gz</format> | ||
</formats> | ||
<baseDirectory>src/main/docker</baseDirectory> | ||
<includeBaseDirectory>false</includeBaseDirectory> | ||
<fileSets> | ||
<fileSet> | ||
<filtered>false</filtered> | ||
<directory>src/main/docker</directory> | ||
<outputDirectory></outputDirectory> | ||
<includes> | ||
<include>**</include> | ||
</includes> | ||
</fileSet> | ||
</fileSets> | ||
</assembly> |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
~ Copyright 2016 Google Inc. All Rights Reserved. | ||
~ | ||
~ Licensed under the Apache License, Version 2.0 (the "License"); | ||
~ you may not use this file except in compliance with the License. | ||
~ You may obtain a copy of the License at | ||
~ | ||
~ http://www.apache.org/licenses/LICENSE-2.0 | ||
~ | ||
~ Unless required by applicable law or agreed to in writing, software | ||
~ distributed under the License is distributed on an "AS IS" BASIS, | ||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
~ See the License for the specific language governing permissions and | ||
~ limitations under the License. | ||
--> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>com.google.cloud.runtimes</groupId> | ||
<artifactId>openjdk-parent</artifactId> | ||
<version>0.1.0-SNAPSHOT</version> | ||
<relativePath>../pom.xml</relativePath> | ||
</parent> | ||
|
||
<name>Openjdk Common Test resources</name> | ||
<artifactId>openjdk-test-common</artifactId> | ||
<packaging>pom</packaging> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-assembly-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>single</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
<configuration> | ||
<descriptors> | ||
<descriptor>src/main/assembly/assembly.xml</descriptor> | ||
</descriptors> | ||
<tarLongFileMode>gnu</tarLongFileMode> | ||
<appendAssemblyId>false</appendAssemblyId> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<!-- | ||
~ Copyright 2017 Google Inc. All Rights Reserved. | ||
~ | ||
~ Licensed under the Apache License, Version 2.0 (the "License"); | ||
~ you may not use this file except in compliance with the License. | ||
~ You may obtain a copy of the License at | ||
~ | ||
~ http://www.apache.org/licenses/LICENSE-2.0 | ||
~ | ||
~ Unless required by applicable law or agreed to in writing, software | ||
~ distributed under the License is distributed on an "AS IS" BASIS, | ||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
~ See the License for the specific language governing permissions and | ||
~ limitations under the License. | ||
--> | ||
|
||
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd"> | ||
<id>assembly</id> | ||
<formats> | ||
<format>tar.gz</format> | ||
</formats> | ||
<baseDirectory>src/test/resources</baseDirectory> | ||
<includeBaseDirectory>false</includeBaseDirectory> | ||
<fileSets> | ||
<fileSet> | ||
<filtered>false</filtered> | ||
<directory>src/test/resources</directory> | ||
<outputDirectory></outputDirectory> | ||
<includes> | ||
<include>**</include> | ||
</includes> | ||
</fileSet> | ||
</fileSets> | ||
</assembly> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we use non-abbreviated flags? For example,
--also-make
.