diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4c1978ea2..98b0e57ab 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,7 +26,6 @@ jobs: - uses: actions/setup-java@v4 with: java-version: | - 11 17 distribution: 'zulu' cache: 'gradle' @@ -38,7 +37,7 @@ jobs: - name: Build env: ORG_GRADLE_PROJECT_version: ${{ steps.build_variables.outputs.VERSION }} - run: ./gradlew -PenableCrossCompilerPlugin=true build --stacktrace ${{ steps.build_variables.outputs.REPO }}-web:installDist + run: ./gradlew build --stacktrace ${{ steps.build_variables.outputs.REPO }}-web:installDist - name: Build local slim container image for testing uses: docker/build-push-action@v6 with: @@ -87,28 +86,3 @@ 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 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.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" diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index ad71e598d..d88526491 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -23,11 +23,10 @@ jobs: - name: Gradle validation step uses: gradle/wrapper-validation-action@v3 - - name: Set up JDK 11 + - name: Set up JDK uses: actions/setup-java@v4 with: java-version: | - 11 17 distribution: 'zulu' cache: 'gradle' @@ -55,7 +54,6 @@ jobs: uses: actions/setup-java@v4 with: java-version: | - 11 17 distribution: 'zulu' cache: 'gradle' @@ -77,7 +75,6 @@ jobs: - uses: actions/setup-java@v4 with: java-version: | - 11 17 distribution: 'zulu' cache: 'gradle' @@ -89,7 +86,7 @@ jobs: - name: Build env: ORG_GRADLE_PROJECT_version: ${{ steps.build_variables.outputs.VERSION }} - run: ./gradlew -PenableCrossCompilerPlugin=true build ${{ steps.build_variables.outputs.REPO }}-web:installDist $GRADLE_ARGS + run: ./gradlew build ${{ steps.build_variables.outputs.REPO }}-web:installDist $GRADLE_ARGS - name: Build slim container image uses: docker/build-push-action@v6 @@ -111,26 +108,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@v6 - 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@v6 - 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@v6 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4ec132e3d..48db9fa9a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,7 +24,6 @@ jobs: - uses: actions/setup-java@v4 with: java-version: | - 11 17 distribution: 'zulu' cache: 'gradle' @@ -52,14 +51,14 @@ jobs: ORG_GRADLE_PROJECT_nexusPgpSigningKey: ${{ secrets.NEXUS_PGP_SIGNING_KEY }} ORG_GRADLE_PROJECT_nexusPgpSigningPassword: ${{ secrets.NEXUS_PGP_SIGNING_PASSWORD }} run: | - ./gradlew -PenableCrossCompilerPlugin=true --info build ${{ steps.build_variables.outputs.REPO }}-web:installDist publishToNexus closeAndReleaseNexusStagingRepository + ./gradlew --info build ${{ steps.build_variables.outputs.REPO }}-web:installDist publishToNexus closeAndReleaseNexusStagingRepository - name: Publish apt packages to Google Artifact Registry env: ORG_GRADLE_PROJECT_version: ${{ steps.release_info.outputs.RELEASE_VERSION }} ORG_GRADLE_PROJECT_artifactRegistryPublishEnabled: true GAR_JSON_KEY: ${{ secrets.GAR_JSON_KEY }} run: | - ./gradlew -PenableCrossCompilerPlugin=true --info publish + ./gradlew --info publish - name: Login to Google Cloud # Only run this on repositories in the 'spinnaker' org, not on forks. if: startsWith(github.repository, 'spinnaker/') @@ -110,31 +109,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@v6 - 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@v6 - 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 b/Dockerfile index 291e2da05..d089c2ae6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,7 +23,7 @@ FROM alpine:3.16 LABEL maintainer="delivery-engineering@netflix.com" -RUN apk --no-cache add --update openjdk11-jre +RUN apk --no-cache add --update openjdk17-jre # Set where to look for config from ENV KAYENTA_OPTS=-Dspring.config.location=file:/opt/kayenta/config/kayenta.yml diff --git a/Dockerfile.compile b/Dockerfile.compile index 17b5f1283..8a73bf22b 100644 --- a/Dockerfile.compile +++ b/Dockerfile.compile @@ -1,8 +1,8 @@ FROM alpine:3.16 RUN apk add --update \ - openjdk11 \ + openjdk17 \ && rm -rf /var/cache/apk LABEL maintainer="sig-platform@spinnaker.io" ENV GRADLE_USER_HOME /workspace/.gradle ENV GRADLE_OPTS -Xmx4g -CMD ./gradlew -PenableCrossCompilerPlugin=true --no-daemon kayenta-web:installDist -x test +CMD ./gradlew --no-daemon kayenta-web:installDist -x test diff --git a/Dockerfile.java11.slim b/Dockerfile.java11.slim deleted file mode 100644 index b41d85463..000000000 --- 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 kayenta-web/build/install/kayenta /opt/kayenta -RUN mkdir -p /opt/kayenta/plugins && chown -R spinnaker:nogroup /opt/kayenta/plugins -USER spinnaker -HEALTHCHECK CMD curl --fail http://localhost:8090/health -CMD ["/opt/kayenta/bin/kayenta"] diff --git a/Dockerfile.java11.ubuntu b/Dockerfile.java11.ubuntu deleted file mode 100644 index 7f7de94b7..000000000 --- a/Dockerfile.java11.ubuntu +++ /dev/null @@ -1,9 +0,0 @@ -FROM ubuntu:bionic -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 kayenta-web/build/install/kayenta /opt/kayenta -RUN mkdir -p /opt/kayenta/plugins && chown -R spinnaker:nogroup /opt/kayenta/plugins -USER spinnaker -HEALTHCHECK CMD curl --fail http://localhost:8090/health -CMD ["/opt/kayenta/bin/kayenta"] diff --git a/gradle.properties b/gradle.properties index f83e7e792..05e028072 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,3 +3,5 @@ org.gradle.parallel=true spinnakerGradleVersion=8.32.1 targetJava17=false org.gradle.jvmargs=-Xmx2g + +targetJava17=true