Skip to content

fix: reintroduce support for GraalVM 17 #1010

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

Merged
merged 8 commits into from
Apr 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .cloudbuild/cloudbuild-test-c.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Copyright 2025 Google LLC
#
# 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.

timeout: 7200s # 2 hours
substitutions:
_JAVA_SHARED_CONFIG_VERSION: '1.15.1' # {x-version-update:google-cloud-shared-config:current}

steps:
# GraalVM C build
- name: gcr.io/cloud-builders/docker
args: ["build", "-t", "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_c:${_JAVA_SHARED_CONFIG_VERSION}", "--file", "graalvm-c.Dockerfile", "."]
dir: .cloudbuild
id: graalvm-c-build
waitFor: ["-"]
- name: gcr.io/gcp-runtimes/structure_test
args:
["-i", "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_c:${_JAVA_SHARED_CONFIG_VERSION}", "--config", ".cloudbuild/graalvm-c.yaml", "-v"]
waitFor: ["graalvm-c-build"]
- name: us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_c:${_JAVA_SHARED_CONFIG_VERSION}
entrypoint: bash
args: [ './.kokoro/presubmit/downstream-build.sh' ]
waitFor: [ "graalvm-c-build" ]

options:
logging: CLOUD_LOGGING_ONLY
36 changes: 26 additions & 10 deletions .cloudbuild/cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,39 +15,55 @@
timeout: 7200s # 2 hours
substitutions:
_JAVA_SHARED_CONFIG_VERSION: '1.15.1' # {x-version-update:google-cloud-shared-config:current}
_IMAGE_REPOSITORY: us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing
_COMMIT_HASH_TAG: infrastructure-public-image-$SHORT_SHA
steps:
# GraalVM A build
- name: gcr.io/cloud-builders/docker
args: ["build",
"-t", "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_a:${_JAVA_SHARED_CONFIG_VERSION}",
"-t", "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_a:infrastructure-public-image-$SHORT_SHA",
"-t", "${_IMAGE_REPOSITORY}/graalvm_a:${_JAVA_SHARED_CONFIG_VERSION}",
"-t", "${_IMAGE_REPOSITORY}/graalvm_a:${_COMMIT_HASH_TAG}",
"--file", "graalvm-a.Dockerfile", "."]
dir: .cloudbuild
id: graalvm-a-build
waitFor: ["-"]
- name: gcr.io/gcp-runtimes/structure_test
args:
["-i", "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_a:${_JAVA_SHARED_CONFIG_VERSION}", "--config", ".cloudbuild/graalvm-a.yaml", "-v"]
["-i", "${_IMAGE_REPOSITORY}/graalvm_a:${_JAVA_SHARED_CONFIG_VERSION}", "--config", ".cloudbuild/graalvm-a.yaml", "-v"]
waitFor: ["graalvm-a-build"]

# GraalVM B build
- name: gcr.io/cloud-builders/docker
args: [ "build", "-t", "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_b:${_JAVA_SHARED_CONFIG_VERSION}",
"-t", "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_b:infrastructure-public-image-$SHORT_SHA",
args: [ "build", "-t", "${_IMAGE_REPOSITORY}/graalvm_b:${_JAVA_SHARED_CONFIG_VERSION}",
"-t", "${_IMAGE_REPOSITORY}/graalvm_b:${_COMMIT_HASH_TAG}",
"--file", "graalvm-b.Dockerfile", "." ]
dir: .cloudbuild
id: graalvm-b-build
waitFor: [ "-" ]
- name: gcr.io/gcp-runtimes/structure_test
args:
[ "-i", "us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_b:${_JAVA_SHARED_CONFIG_VERSION}", "--config", ".cloudbuild/graalvm-b.yaml", "-v" ]
[ "-i", "${_IMAGE_REPOSITORY}/graalvm_b:${_JAVA_SHARED_CONFIG_VERSION}", "--config", ".cloudbuild/graalvm-b.yaml", "-v" ]
waitFor: [ "graalvm-b-build" ]

# GraalVM C build
- name: gcr.io/cloud-builders/docker
args: [ "build", "-t", "${_IMAGE_REPOSITORY}/graalvm_c:${_JAVA_SHARED_CONFIG_VERSION}",
"-t", "${_IMAGE_REPOSITORY}/graalvm_c:${_COMMIT_HASH_TAG}",
"--file", "graalvm-c.Dockerfile", "." ]
dir: .cloudbuild
id: graalvm-c-build
waitFor: [ "-" ]
- name: gcr.io/gcp-runtimes/structure_test
args:
[ "-i", "${_IMAGE_REPOSITORY}/graalvm_c:${_JAVA_SHARED_CONFIG_VERSION}", "--config", ".cloudbuild/graalvm-c.yaml", "-v" ]
waitFor: [ "graalvm-c-build" ]
options:
logging: CLOUD_LOGGING_ONLY

images:
- us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_a:${_JAVA_SHARED_CONFIG_VERSION}
- us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_b:${_JAVA_SHARED_CONFIG_VERSION}
- us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_a:infrastructure-public-image-$SHORT_SHA
- us-docker.pkg.dev/java-graalvm-ci-prod/graalvm-integration-testing/graalvm_b:infrastructure-public-image-$SHORT_SHA
- ${_IMAGE_REPOSITORY}/graalvm_a:${_JAVA_SHARED_CONFIG_VERSION}
- ${_IMAGE_REPOSITORY}/graalvm_b:${_JAVA_SHARED_CONFIG_VERSION}
- ${_IMAGE_REPOSITORY}/graalvm_c:${_JAVA_SHARED_CONFIG_VERSION}
- ${_IMAGE_REPOSITORY}/graalvm_a:${_COMMIT_HASH_TAG}
- ${_IMAGE_REPOSITORY}/graalvm_b:${_COMMIT_HASH_TAG}
- ${_IMAGE_REPOSITORY}/graalvm_c:${_COMMIT_HASH_TAG}
49 changes: 49 additions & 0 deletions .cloudbuild/graalvm-c.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Copyright 2025 Google LLC
#
# 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.

FROM ghcr.io/graalvm/graalvm-community:17.0.9-ol9-20231024

# use microdnf, see https://github.com/graalvm/container/issues/10
RUN microdnf update -y oraclelinux-release-el9 && \
microdnf install -y wget unzip git && \
# Install maven
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 && \
unzip /tmp/maven.zip -d /tmp/maven && \
mv /tmp/maven/apache-maven-3.9.4 /usr/local/lib/maven && \
rm /tmp/maven.zip && \
ln -s $JAVA_HOME/lib $JAVA_HOME/conf

ENV PATH $PATH:/usr/local/lib/maven/bin

# Install gcloud SDK
COPY google-cloud-sdk.repo /etc/yum.repos.d/google-cloud-sdk.repo
RUN microdnf install -y google-cloud-sdk

# Adding the package path to local
ENV PATH $PATH:/usr/local/gcloud/google-cloud-sdk/bin

# Install docker
# See also https://docs.docker.com/engine/install/rhel/#set-up-the-repository
COPY docker-ce.repo /etc/yum.repos.d/docker-ce.repo
RUN microdnf install -y docker-ce docker-ce-cli

# Install terraform
# See also https://www.hashicorp.com/official-packaging-guide
COPY hashicorp.repo /etc/yum.repos.d/hashicorp.repo
RUN microdnf -y install terraform

# Install jq
RUN microdnf -y install jq

WORKDIR /workspace
29 changes: 29 additions & 0 deletions .cloudbuild/graalvm-c.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright 2025 Google LLC
#
# 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.

schemaVersion: 1.0.0
commandTests:
- name: "version"
command: ["java", "-version"]
# java -version outputs to stderr...
expectedError: ["openjdk version \"17.0.9\"", "GraalVM CE 17.0.9"]
- name: "maven"
command: ["mvn", "-version"]
expectedOutput: ["Apache Maven 3.9.4"]
- name: "gcloud"
command: ["gcloud", "version"]
expectedOutput: ["Google Cloud SDK"]
- name: "docker"
command: ["docker", "--version"]
expectedOutput: ["Docker version *"]
Loading