Skip to content

Commit 1906261

Browse files
fix: reintroduce support for GraalVM 17 (#1010)
* fix: reintroduce support for GraalVM 17 * correct coment * fix copyright year * non image-dependent steps to not depend on image building step * restore step dependency * checkout fix branch for testing * clone with branch * use main branch of sdk-platform
1 parent 8186e31 commit 1906261

File tree

4 files changed

+140
-10
lines changed

4 files changed

+140
-10
lines changed

.cloudbuild/cloudbuild-test-c.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Copyright 2025 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
timeout: 7200s # 2 hours
16+
substitutions:
17+
_JAVA_SHARED_CONFIG_VERSION: '1.15.1' # {x-version-update:google-cloud-shared-config:current}
18+
19+
steps:
20+
# GraalVM C build
21+
- name: gcr.io/cloud-builders/docker
22+
args: ["build", "-t", "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_c:${_JAVA_SHARED_CONFIG_VERSION}", "--file", "graalvm-c.Dockerfile", "."]
23+
dir: .cloudbuild
24+
id: graalvm-c-build
25+
waitFor: ["-"]
26+
- name: gcr.io/gcp-runtimes/structure_test
27+
args:
28+
["-i", "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_c:${_JAVA_SHARED_CONFIG_VERSION}", "--config", ".cloudbuild/graalvm-c.yaml", "-v"]
29+
waitFor: ["graalvm-c-build"]
30+
- name: us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_c:${_JAVA_SHARED_CONFIG_VERSION}
31+
entrypoint: bash
32+
args: [ './.kokoro/presubmit/downstream-build.sh' ]
33+
waitFor: [ "graalvm-c-build" ]
34+
35+
options:
36+
logging: CLOUD_LOGGING_ONLY

.cloudbuild/cloudbuild.yaml

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,39 +15,55 @@
1515
timeout: 7200s # 2 hours
1616
substitutions:
1717
_JAVA_SHARED_CONFIG_VERSION: '1.15.1' # {x-version-update:google-cloud-shared-config:current}
18+
_IMAGE_REPOSITORY: us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing
19+
_COMMIT_HASH_TAG: infrastructure-public-image-$SHORT_SHA
1820
steps:
1921
# GraalVM A build
2022
- name: gcr.io/cloud-builders/docker
2123
args: ["build",
22-
"-t", "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_a:${_JAVA_SHARED_CONFIG_VERSION}",
23-
"-t", "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_a:infrastructure-public-image-$SHORT_SHA",
24+
"-t", "${_IMAGE_REPOSITORY}/graalvm_a:${_JAVA_SHARED_CONFIG_VERSION}",
25+
"-t", "${_IMAGE_REPOSITORY}/graalvm_a:${_COMMIT_HASH_TAG}",
2426
"--file", "graalvm-a.Dockerfile", "."]
2527
dir: .cloudbuild
2628
id: graalvm-a-build
2729
waitFor: ["-"]
2830
- name: gcr.io/gcp-runtimes/structure_test
2931
args:
30-
["-i", "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_a:${_JAVA_SHARED_CONFIG_VERSION}", "--config", ".cloudbuild/graalvm-a.yaml", "-v"]
32+
["-i", "${_IMAGE_REPOSITORY}/graalvm_a:${_JAVA_SHARED_CONFIG_VERSION}", "--config", ".cloudbuild/graalvm-a.yaml", "-v"]
3133
waitFor: ["graalvm-a-build"]
3234

3335
# GraalVM B build
3436
- name: gcr.io/cloud-builders/docker
35-
args: [ "build", "-t", "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_b:${_JAVA_SHARED_CONFIG_VERSION}",
36-
"-t", "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_b:infrastructure-public-image-$SHORT_SHA",
37+
args: [ "build", "-t", "${_IMAGE_REPOSITORY}/graalvm_b:${_JAVA_SHARED_CONFIG_VERSION}",
38+
"-t", "${_IMAGE_REPOSITORY}/graalvm_b:${_COMMIT_HASH_TAG}",
3739
"--file", "graalvm-b.Dockerfile", "." ]
3840
dir: .cloudbuild
3941
id: graalvm-b-build
4042
waitFor: [ "-" ]
4143
- name: gcr.io/gcp-runtimes/structure_test
4244
args:
43-
[ "-i", "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_b:${_JAVA_SHARED_CONFIG_VERSION}", "--config", ".cloudbuild/graalvm-b.yaml", "-v" ]
45+
[ "-i", "${_IMAGE_REPOSITORY}/graalvm_b:${_JAVA_SHARED_CONFIG_VERSION}", "--config", ".cloudbuild/graalvm-b.yaml", "-v" ]
4446
waitFor: [ "graalvm-b-build" ]
4547

48+
# GraalVM C build
49+
- name: gcr.io/cloud-builders/docker
50+
args: [ "build", "-t", "${_IMAGE_REPOSITORY}/graalvm_c:${_JAVA_SHARED_CONFIG_VERSION}",
51+
"-t", "${_IMAGE_REPOSITORY}/graalvm_c:${_COMMIT_HASH_TAG}",
52+
"--file", "graalvm-c.Dockerfile", "." ]
53+
dir: .cloudbuild
54+
id: graalvm-c-build
55+
waitFor: [ "-" ]
56+
- name: gcr.io/gcp-runtimes/structure_test
57+
args:
58+
[ "-i", "${_IMAGE_REPOSITORY}/graalvm_c:${_JAVA_SHARED_CONFIG_VERSION}", "--config", ".cloudbuild/graalvm-c.yaml", "-v" ]
59+
waitFor: [ "graalvm-c-build" ]
4660
options:
4761
logging: CLOUD_LOGGING_ONLY
4862

4963
images:
50-
- us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_a:${_JAVA_SHARED_CONFIG_VERSION}
51-
- us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_b:${_JAVA_SHARED_CONFIG_VERSION}
52-
- us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_a:infrastructure-public-image-$SHORT_SHA
53-
- us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_b:infrastructure-public-image-$SHORT_SHA
64+
- ${_IMAGE_REPOSITORY}/graalvm_a:${_JAVA_SHARED_CONFIG_VERSION}
65+
- ${_IMAGE_REPOSITORY}/graalvm_b:${_JAVA_SHARED_CONFIG_VERSION}
66+
- ${_IMAGE_REPOSITORY}/graalvm_c:${_JAVA_SHARED_CONFIG_VERSION}
67+
- ${_IMAGE_REPOSITORY}/graalvm_a:${_COMMIT_HASH_TAG}
68+
- ${_IMAGE_REPOSITORY}/graalvm_b:${_COMMIT_HASH_TAG}
69+
- ${_IMAGE_REPOSITORY}/graalvm_c:${_COMMIT_HASH_TAG}

.cloudbuild/graalvm-c.Dockerfile

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Copyright 2025 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
FROM ghcr.io/graalvm/graalvm-community:17.0.9-ol9-20231024
16+
17+
# use microdnf, see https://github.com/graalvm/container/issues/10
18+
RUN microdnf update -y oraclelinux-release-el9 && \
19+
microdnf install -y wget unzip git && \
20+
# Install maven
21+
wget -q https://archive.apache.org/dist/maven/maven-3/3.9.4/binaries/apache-maven-3.9.4-bin.zip -O /tmp/maven.zip && \
22+
unzip /tmp/maven.zip -d /tmp/maven && \
23+
mv /tmp/maven/apache-maven-3.9.4 /usr/local/lib/maven && \
24+
rm /tmp/maven.zip && \
25+
ln -s $JAVA_HOME/lib $JAVA_HOME/conf
26+
27+
ENV PATH $PATH:/usr/local/lib/maven/bin
28+
29+
# Install gcloud SDK
30+
COPY google-cloud-sdk.repo /etc/yum.repos.d/google-cloud-sdk.repo
31+
RUN microdnf install -y google-cloud-sdk
32+
33+
# Adding the package path to local
34+
ENV PATH $PATH:/usr/local/gcloud/google-cloud-sdk/bin
35+
36+
# Install docker
37+
# See also https://docs.docker.com/engine/install/rhel/#set-up-the-repository
38+
COPY docker-ce.repo /etc/yum.repos.d/docker-ce.repo
39+
RUN microdnf install -y docker-ce docker-ce-cli
40+
41+
# Install terraform
42+
# See also https://www.hashicorp.com/official-packaging-guide
43+
COPY hashicorp.repo /etc/yum.repos.d/hashicorp.repo
44+
RUN microdnf -y install terraform
45+
46+
# Install jq
47+
RUN microdnf -y install jq
48+
49+
WORKDIR /workspace

.cloudbuild/graalvm-c.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Copyright 2025 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
schemaVersion: 1.0.0
16+
commandTests:
17+
- name: "version"
18+
command: ["java", "-version"]
19+
# java -version outputs to stderr...
20+
expectedError: ["openjdk version \"17.0.9\"", "GraalVM CE 17.0.9"]
21+
- name: "maven"
22+
command: ["mvn", "-version"]
23+
expectedOutput: ["Apache Maven 3.9.4"]
24+
- name: "gcloud"
25+
command: ["gcloud", "version"]
26+
expectedOutput: ["Google Cloud SDK"]
27+
- name: "docker"
28+
command: ["docker", "--version"]
29+
expectedOutput: ["Docker version *"]

0 commit comments

Comments
 (0)