From 2c70c1cc7429fba08d14ecfe1828b18bc5b26790 Mon Sep 17 00:00:00 2001 From: Imran Ali <101260174+justiceia@users.noreply.github.com> Date: Thu, 26 Sep 2024 11:26:20 +0100 Subject: [PATCH] FACT-1802 17 to 21 changes (#1607) * FACT-1802 17 to 21 changes * changed workflow and readme --- .github/workflows/ci.yml | 4 ++-- .github/workflows/publish-openapi.yaml | 2 +- Dockerfile | 2 +- README.md | 2 +- build.gradle | 16 ++++++++-------- gradle/wrapper/gradle-wrapper.properties | 2 +- src/main/resources/application.yaml | 4 ++++ 7 files changed, 18 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1a537166..6ad942e0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,10 +16,10 @@ jobs: path: ~/.gradle/caches key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} restore-keys: ${{ runner.os }}-gradle- - - name: Set up JDK 17 + - name: Set up JDK 21 uses: actions/setup-java@v4 with: - java-version: 17 + java-version: 21 distribution: 'zulu' - name: Run checks run: ./gradlew check diff --git a/.github/workflows/publish-openapi.yaml b/.github/workflows/publish-openapi.yaml index 5f22b470..00cfc562 100644 --- a/.github/workflows/publish-openapi.yaml +++ b/.github/workflows/publish-openapi.yaml @@ -11,4 +11,4 @@ jobs: SWAGGER_PUBLISHER_API_TOKEN: ${{ secrets.SWAGGER_PUBLISHER_API_TOKEN }} with: test_to_run: 'uk.gov.hmcts.reform.notificationservice.config.SwaggerPublisher' - java_version: 17 \ No newline at end of file + java_version: 21 diff --git a/Dockerfile b/Dockerfile index cef422de..9ef037bf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ ARG APP_INSIGHTS_AGENT_VERSION=3.5.2 # Application image -FROM hmctspublic.azurecr.io/base/java:17-distroless +FROM hmctspublic.azurecr.io/base/java:21-distroless COPY lib/applicationinsights.json /opt/app/ COPY build/libs/reform-scan-notification-service.jar /opt/app/ diff --git a/README.md b/README.md index 13343bf4..c2ea0dcf 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Retrieves service bus queue messages from notifications queue and then processes ## Getting Started ### Prerequisites -- [JDK 17](https://www.oracle.com/java) +- [JDK 21](https://www.oracle.com/java) - Project requires Spring Boot v3.x to be present ## Quick Start diff --git a/build.gradle b/build.gradle index 7cf6a021..70d09cc8 100644 --- a/build.gradle +++ b/build.gradle @@ -17,8 +17,8 @@ plugins { id 'org.springframework.boot' version '3.3.3' id 'org.owasp.dependencycheck' version '9.0.10' id 'com.github.ben-manes.versions' version '0.51.0' - id 'org.sonarqube' version '4.4.1.3373' - id 'org.flywaydb.flyway' version "$flywayVersion" + id 'org.sonarqube' version '5.0.0.4638' + id 'org.flywaydb.flyway' version '10.13.0' } group = 'uk.gov.hmcts.reform' @@ -26,7 +26,7 @@ version = '0.0.1' java { toolchain { - languageVersion = JavaLanguageVersion.of(17) + languageVersion = JavaLanguageVersion.of(21) } } @@ -114,7 +114,7 @@ pmd { ignoreFailures = true incrementalAnalysis = true sourceSets = [sourceSets.main, sourceSets.test, sourceSets.integrationTest, sourceSets.smokeTest, sourceSets.functionalTest] - reportsDir = file("$project.buildDir/reports/pmd") + reportsDir = layout.buildDirectory.dir("reports/pmd").get().asFile // https://github.com/pmd/pmd/issues/876 ruleSets = [] ruleSetFiles = files("config/pmd/ruleset.xml") @@ -123,9 +123,9 @@ pmd { jacocoTestReport { executionData(test, integration) reports { - xml.enabled = true - csv.enabled = false - xml.destination file("${buildDir}/reports/jacoco/test/jacocoTestReport.xml") + xml.required.set(true) + csv.required.set(false) + xml.outputLocation.set(layout.buildDirectory.file("reports/jacoco/test/jacocoTestReport.xml")) } } @@ -136,7 +136,7 @@ sonarqube { property "sonar.projectName", "Reform :: reform-scan-notification-service" property "sonar.projectKey", "uk.gov.hmcts.reform:reform-scan-notification-service" property "sonar.exclusions", "**/config/**,**/service/JmsNotificationMessageProcessor.java" - property "sonar.coverage.jacoco.xmlReportPaths", "${jacocoTestReport.reports.xml.destination.path}" + property "sonar.coverage.jacoco.xmlReportPaths", jacocoTestReport.reports.xml.outputLocation.get().asFile.absolutePath } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 3e593191..b82aa23a 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index e9e6456e..fc648a8b 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -59,6 +59,10 @@ scheduling: send-delay-in-minute: ${PENDING_NOTIFICATIONS_SEND_DELAY_IN_MINUTE} # clients region +clients: + error-notifications: + secondary: + url: ${ERROR_NOTIFICATIONS_URL:AAAAAAA} idam: s2s-auth: