-
Notifications
You must be signed in to change notification settings - Fork 147
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
chore(java17): upgrade java runtime to JRE17 and compilation using JDK17, but target remains Java11 #2106
chore(java17): upgrade java runtime to JRE17 and compilation using JDK17, but target remains Java11 #2106
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,9 @@ jobs: | |
uses: docker/setup-buildx-action@v3 | ||
- uses: actions/setup-java@v4 | ||
with: | ||
java-version: 11 | ||
java-version: | | ||
11 | ||
17 | ||
distribution: 'zulu' | ||
cache: 'gradle' | ||
- name: Prepare build variables | ||
|
@@ -36,7 +38,7 @@ jobs: | |
- name: Build | ||
env: | ||
ORG_GRADLE_PROJECT_version: ${{ steps.build_variables.outputs.VERSION }} | ||
run: ./gradlew build --stacktrace ${{ steps.build_variables.outputs.REPO }}-web:installDist | ||
run: ./gradlew -PenableCrossCompilerPlugin=true build --stacktrace ${{ steps.build_variables.outputs.REPO }}-web:installDist | ||
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. We need separate java11 + java 17 dockerfiles + build steps too, right? 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. Added the required steps and docker files. |
||
- name: Login to GAR | ||
# Only run this on repositories in the 'spinnaker' org, not on forks. | ||
if: startsWith(github.repository, 'spinnaker/') | ||
|
@@ -71,3 +73,28 @@ jobs: | |
tags: | | ||
"${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ github.ref_name }}-latest-unvalidated-ubuntu" | ||
"${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.build_variables.outputs.VERSION }}-unvalidated-ubuntu" | ||
- name: Build and publish slim JRE 11 container image | ||
# Only run this on repositories in the 'spinnaker' org, not on forks. | ||
if: startsWith(github.repository, 'spinnaker/') | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
file: Dockerfile.java11.slim | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: | | ||
"${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ github.ref_name }}-latest-java11-unvalidated" | ||
"${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.build_variables.outputs.VERSION }}-java11-unvalidated" | ||
"${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ github.ref_name }}-latest-java11-unvalidated-slim" | ||
"${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.build_variables.outputs.VERSION }}-java11-unvalidated-slim" | ||
- name: Build and publish ubuntu JRE11 container image | ||
# Only run this on repositories in the 'spinnaker' org, not on forks. | ||
if: startsWith(github.repository, 'spinnaker/') | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
file: Dockerfile.java11.ubuntu | ||
push: true | ||
tags: | | ||
"${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ github.ref_name }}-latest-java11-unvalidated-ubuntu" | ||
"${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.build_variables.outputs.VERSION }}-java11-unvalidated-ubuntu" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM alpine:3.11 | ||
LABEL maintainer="sig-platform@spinnaker.io" | ||
RUN apk --no-cache add --update bash openjdk11-jre | ||
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. Please avoid multiple RUN commands. This explodes the image size in docker. Instead
|
||
RUN addgroup -S -g 10111 spinnaker | ||
RUN adduser -S -G spinnaker -u 10111 spinnaker | ||
COPY keel-web/build/install/keel /opt/keel | ||
RUN mkdir -p /opt/keel/plugins && chown -R spinnaker:nogroup /opt/keel/plugins | ||
USER spinnaker | ||
CMD ["/opt/keel/bin/keel"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM ubuntu:bionic | ||
LABEL maintainer="sig-platform@spinnaker.io" | ||
RUN apt-get update && apt-get -y install openjdk-11-jre-headless wget | ||
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. Same here |
||
RUN adduser --system --uid 10111 --group spinnaker | ||
COPY keel-web/build/install/keel /opt/keel | ||
RUN mkdir -p /opt/keel/plugins && chown -R spinnaker:nogroup /opt/keel/plugins | ||
USER spinnaker | ||
CMD ["/opt/keel/bin/keel"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
FROM alpine:3.11 | ||
FROM alpine:3.16 | ||
LABEL maintainer="sig-platform@spinnaker.io" | ||
RUN apk --no-cache add --update bash openjdk11-jre | ||
RUN apk --no-cache add --update bash openjdk17-jre | ||
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. Turns out all of our images need to do this |
||
RUN addgroup -S -g 10111 spinnaker | ||
RUN adduser -S -G spinnaker -u 10111 spinnaker | ||
COPY keel-web/build/install/keel /opt/keel | ||
|
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.
Think it's time to remove 11....