From caf5e117b766b434818e180a4c924d23fdd66037 Mon Sep 17 00:00:00 2001 From: Jason McIntosh Date: Fri, 15 Nov 2024 13:31:45 -0600 Subject: [PATCH] chore(java): Full Java 17 support only --- .github/workflows/build.yml | 26 -------------------------- .github/workflows/pr.yml | 21 --------------------- .github/workflows/release.yml | 26 -------------------------- Dockerfile.compile | 2 +- Dockerfile.java11.slim | 10 ---------- Dockerfile.java11.ubuntu | 9 --------- gradle.properties | 2 +- gradle/dokka.gradle | 2 +- gradle/kotlin.gradle | 4 ++-- 9 files changed, 5 insertions(+), 97 deletions(-) delete mode 100644 Dockerfile.java11.slim delete mode 100644 Dockerfile.java11.ubuntu diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 743eef07..8bc69f7e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,7 +27,6 @@ jobs: with: java-version: | 17 - 11 distribution: 'zulu' cache: 'gradle' - name: Prepare build variables @@ -87,31 +86,6 @@ 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@v5 - 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 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@v5 - 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" - name: Test local slim container image env: diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index baa20a63..62717e8a 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -21,7 +21,6 @@ jobs: with: java-version: | 17 - 11 distribution: 'zulu' cache: 'gradle' - name: Prepare build variables @@ -53,26 +52,6 @@ jobs: tags: | "${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:latest-ubuntu" "${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.build_variables.outputs.VERSION }}-ubuntu" - - name: Build slim JRE 11 container image - uses: docker/build-push-action@v5 - with: - context: . - file: Dockerfile.java11.slim - platforms: linux/amd64,linux/arm64 - tags: | - "${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:latest-java11" - "${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.build_variables.outputs.VERSION }}-java11" - "${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:latest-java11-slim" - "${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.build_variables.outputs.VERSION }}-java11-slim" - - name: Build ubuntu JRE 11 container image - uses: docker/build-push-action@v5 - with: - context: . - file: Dockerfile.java11.ubuntu - platforms: linux/amd64,linux/arm64 - tags: | - "${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:latest-java11-ubuntu" - "${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.build_variables.outputs.VERSION }}-java11-ubuntu" - name: Build local slim container image for testing uses: docker/build-push-action@v5 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1b3d935c..e32f67b2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -45,7 +45,6 @@ jobs: with: java-version: | 17 - 11 distribution: 'zulu' cache: 'gradle' - name: Assemble release info @@ -121,31 +120,6 @@ jobs: tags: | "${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.release_info.outputs.RELEASE_VERSION }}-unvalidated-ubuntu" "${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.release_info.outputs.RELEASE_VERSION }}-${{ 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@v5 - with: - context: . - file: Dockerfile.java11.slim - platforms: linux/amd64,linux/arm64 - push: true - tags: | - "${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.release_info.outputs.RELEASE_VERSION }}-java11-unvalidated" - "${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.release_info.outputs.RELEASE_VERSION }}-java11-unvalidated-slim" - "${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.release_info.outputs.RELEASE_VERSION }}-${{ steps.build_variables.outputs.VERSION }}-java11-unvalidated-slim" - - name: Build and publish ubuntu 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@v5 - with: - context: . - file: Dockerfile.java11.ubuntu - platforms: linux/amd64,linux/arm64 - push: true - tags: | - "${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.release_info.outputs.RELEASE_VERSION }}-java11-unvalidated-ubuntu" - "${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.release_info.outputs.RELEASE_VERSION }}-${{ steps.build_variables.outputs.VERSION }}-java11-unvalidated-ubuntu" - name: Create release if: steps.release_info.outputs.SKIP_RELEASE == 'false' uses: softprops/action-gh-release@v2 diff --git a/Dockerfile.compile b/Dockerfile.compile index 68b3535c..4ce3f523 100644 --- a/Dockerfile.compile +++ b/Dockerfile.compile @@ -1,6 +1,6 @@ FROM ubuntu:jammy RUN apt-get update && apt-get install -y \ - openjdk-11-jdk \ + openjdk-17-jdk \ && rm -rf /var/lib/apt/lists/* LABEL maintainer="sig-platform@spinnaker.io" ENV GRADLE_USER_HOME /workspace/.gradle diff --git a/Dockerfile.java11.slim b/Dockerfile.java11.slim deleted file mode 100644 index b02aaae3..00000000 --- a/Dockerfile.java11.slim +++ /dev/null @@ -1,10 +0,0 @@ -FROM alpine:3.16 -LABEL maintainer="sig-platform@spinnaker.io" -RUN apk --no-cache add --update bash curl openjdk11-jre -RUN addgroup -S -g 10111 spinnaker -RUN adduser -S -G spinnaker -u 10111 spinnaker -COPY swabbie-web/build/install/swabbie /opt/swabbie -RUN mkdir -p /opt/swabbie/plugins && chown -R spinnaker:nogroup /opt/swabbie/plugins -USER spinnaker -HEALTHCHECK CMD curl --fail http://localhost:8092/health -CMD ["/opt/swabbie/bin/swabbie"] diff --git a/Dockerfile.java11.ubuntu b/Dockerfile.java11.ubuntu deleted file mode 100644 index 7ee58447..00000000 --- a/Dockerfile.java11.ubuntu +++ /dev/null @@ -1,9 +0,0 @@ -FROM ubuntu:jammy -LABEL maintainer="sig-platform@spinnaker.io" -RUN apt-get update && apt-get -y install curl openjdk-11-jre-headless wget -RUN adduser --system --uid 10111 --group spinnaker -COPY swabbie-web/build/install/swabbie /opt/swabbie -RUN mkdir -p /opt/swabbie/plugins && chown -R spinnaker:nogroup /opt/swabbie/plugins -USER spinnaker -HEALTHCHECK CMD curl --fail http://localhost:8092/health -CMD ["/opt/swabbie/bin/swabbie"] diff --git a/gradle.properties b/gradle.properties index 095c954c..7fcefdc8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ korkVersion=7.230.0 kotlinVersion=1.6.21 org.gradle.parallel=true spinnakerGradleVersion=8.32.1 -targetJava11=true +targetJava17=true # To enable a composite reference to a project, set the # project property `'Composite=true'`. # diff --git a/gradle/dokka.gradle b/gradle/dokka.gradle index 5e80a578..5bea7b45 100644 --- a/gradle/dokka.gradle +++ b/gradle/dokka.gradle @@ -3,7 +3,7 @@ apply plugin: "org.jetbrains.dokka" dokkaHtml { dokkaSourceSets { configureEach { - jdkVersion.set(11) + jdkVersion.set(17) } } } diff --git a/gradle/kotlin.gradle b/gradle/kotlin.gradle index 69fc4eb6..1acb685c 100644 --- a/gradle/kotlin.gradle +++ b/gradle/kotlin.gradle @@ -20,14 +20,14 @@ apply plugin: "io.gitlab.arturbosch.detekt" compileKotlin { kotlinOptions { languageVersion = "1.6" - jvmTarget = "11" + jvmTarget = "17" } } compileTestKotlin { kotlinOptions { languageVersion = "1.6" - jvmTarget = "11" + jvmTarget = "17" } }