Skip to content

Commit

Permalink
CME-43 java 21 upgrade (#1514)
Browse files Browse the repository at this point in the history
  • Loading branch information
rapolaskaseliscgi authored Oct 28, 2024
1 parent ea841a7 commit f324c7c
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/dependency-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle-
- name: Set up JDK 17
uses: actions/setup-java@v3
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: 17
java-version: 21
distribution: 'temurin'
- name: Run dependencyCheck
run: ./gradlew dependencyCheckAggregate
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle-
- name: Set up JDK 17
uses: actions/setup-java@v3
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: 17
java-version: 21
distribution: 'temurin'
- name: Run Swagger Publisher
run: ./gradlew application:test --tests uk.gov.hmcts.net.ccd.definition.store.SwaggerGeneratorTest
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Keep hub.Dockerfile aligned to this file as far as possible
ARG JAVA_OPTS="-Djava.security.egd=file:/dev/./urandom"
ARG APP_INSIGHTS_AGENT_VERSION=3.4.13
ARG APP_INSIGHTS_AGENT_VERSION=3.5.4
ARG PLATFORM=""

FROM hmctspublic.azurecr.io/base/java${PLATFORM}:17-distroless
FROM hmctspublic.azurecr.io/base/java${PLATFORM}:21-distroless

# Change to non-root privilege
USER hmcts
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ simply ignored

### Prerequisites

- [Open JDK 17](https://openjdk.java.net/)
- [Open JDK 21](https://openjdk.java.net/)
- [Docker](https://www.docker.com)

#### Environment variables
Expand Down
4 changes: 2 additions & 2 deletions acb.tpl.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 1.0-preview-1
steps:
- id: pull-base-image-amd64
cmd: docker pull --platform linux/amd64 hmctspublic.azurecr.io/base/java:17-distroless && docker tag hmctspublic.azurecr.io/base/java:17-distroless hmctspublic.azurecr.io/base/java/linux/amd64:17-distroless
cmd: docker pull --platform linux/amd64 hmctspublic.azurecr.io/base/java:21-distroless && docker tag hmctspublic.azurecr.io/base/java:21-distroless hmctspublic.azurecr.io/base/java/linux/amd64:21-distroless
when: ["-"]
retries: 3
retryDelay: 5
Expand All @@ -18,7 +18,7 @@ steps:
retryDelay: 5

- id: pull-base-image-arm64
cmd: docker pull --platform linux/arm64 hmctspublic.azurecr.io/base/java:17-distroless && docker tag hmctspublic.azurecr.io/base/java:17-distroless hmctspublic.azurecr.io/base/java/linux/arm64:17-distroless
cmd: docker pull --platform linux/arm64 hmctspublic.azurecr.io/base/java:21-distroless && docker tag hmctspublic.azurecr.io/base/java:21-distroless hmctspublic.azurecr.io/base/java/linux/arm64:21-distroless
when:
- pull-base-image-amd64
retries: 3
Expand Down
14 changes: 7 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ buildscript {

plugins {
id 'application'
id "org.springframework.boot" version '2.7.12'
id "org.springframework.boot" version '2.7.18'
id 'io.spring.dependency-management' version '1.1.5'
id 'se.patrikerdes.use-latest-versions' version '0.2.7'
id 'com.github.ben-manes.versions' version '0.51.0'
Expand Down Expand Up @@ -184,7 +184,7 @@ allprojects {

java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
languageVersion = JavaLanguageVersion.of(21)
}
}

Expand Down Expand Up @@ -262,11 +262,11 @@ subprojects { subproject ->
exclude group: 'com.google.guava', module: 'guava'
}

compileOnly 'org.projectlombok:lombok:1.18.28'
annotationProcessor 'org.projectlombok:lombok:1.18.28'
compileOnly 'org.projectlombok:lombok:1.18.34'
annotationProcessor 'org.projectlombok:lombok:1.18.34'

testCompileOnly 'org.projectlombok:lombok:1.18.28'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.28'
testCompileOnly 'org.projectlombok:lombok:1.18.34'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.34'

implementation "org.springframework.security:spring-security-web"
implementation "org.springframework.security:spring-security-config"
Expand Down Expand Up @@ -301,7 +301,7 @@ subprojects { subproject ->
// To avoid compiler warnings about @API annotations in JUnit5 code.
testImplementation 'org.apiguardian:apiguardian-api:1.0.0'
testImplementation "org.postgresql:postgresql:42.7.3"
testImplementation "org.testcontainers:postgresql:1.17.2"
testImplementation "org.testcontainers:postgresql:1.20.2"
testImplementation "org.hamcrest:hamcrest-core:${hamcrestVersion}"
testImplementation "org.hamcrest:hamcrest-library:${hamcrestVersion}"
testImplementation "org.junit.jupiter:junit-jupiter-api:${junitJupiterVersion}"
Expand Down

0 comments on commit f324c7c

Please sign in to comment.