Skip to content

Commit

Permalink
FACT-1798 changes for 17 to 21 (#3333)
Browse files Browse the repository at this point in the history
* FACT-1798 changes for 17 to 21

* changed workflow and readme
  • Loading branch information
justiceia authored Sep 26, 2024
1 parent 5304fb2 commit e5db434
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ jobs:
SWAGGER_PUBLISHER_API_TOKEN: ${{ secrets.SWAGGER_PUBLISHER_API_TOKEN }}
with:
test_to_run: 'uk.gov.hmcts.reform.bulkscanprocessor.config.SwaggerPublisher'
java_version: 17
java_version: 21
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG APP_INSIGHTS_AGENT_VERSION=3.4.8
ARG APP_INSIGHTS_AGENT_VERSION=3.5.2

FROM hmctspublic.azurecr.io/base/java:17-distroless
FROM hmctspublic.azurecr.io/base/java:21-distroless

COPY lib/applicationinsights.json /opt/app/

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services fetch the new data.
## 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

### Installation
Expand Down
14 changes: 7 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ plugins {
id 'org.springframework.boot' version '3.3.3'
id 'org.owasp.dependencycheck' version '9.1.0'
id 'com.github.ben-manes.versions' version '0.51.0'
id 'org.sonarqube' version '4.4.1.3373'
id 'org.sonarqube' version '5.0.0.4638'
id 'info.solidsoft.pitest' version '1.15.0'
id 'au.com.dius.pact' version '4.3.14'
}
Expand All @@ -29,7 +29,7 @@ version = '0.1.0' // all the time it was 0.0.1. 0.1.0 marks migration to java 11

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

Expand Down Expand Up @@ -131,17 +131,17 @@ pmd {
toolVersion = "6.55.0"
ignoreFailures = true
sourceSets = [sourceSets.main, sourceSets.test, sourceSets.functionalTest, sourceSets.integrationTest, sourceSets.smokeTest]
reportsDir = file("$project.buildDir/reports/pmd")
reportsDir = layout.buildDirectory.dir("reports/pmd").get().asFile
ruleSetFiles = files("config/pmd/ruleset.xml")
ruleSets = []
}

jacocoTestReport {
executionData(test, integration)
reports {
xml.enabled = true
csv.enabled = false
xml.destination = file("${project.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"))
}
afterEvaluate {
getClassDirectories().from = getClassDirectories().files.collect {
Expand Down Expand Up @@ -193,7 +193,7 @@ pitest {
sonarqube {
properties {
property "sonar.projectName", "Reform :: Bulk Scan Processor"
property "sonar.coverage.jacoco.xmlReportPaths", jacocoTestReport.reports.xml.destination.path
property "sonar.coverage.jacoco.xmlReportPaths", jacocoTestReport.reports.xml.outputLocation.get().asFile.absolutePath
property "sonar.pitest.mode", "reuseReport"
property "sonar.pitest.reportsDirectory", "build/reports/pitest"
property "sonar.exclusions", "**/model/out/*,**/config/**,**/LeaseAcquirer.java"
Expand Down
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
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
zipStorePath=wrapper/dists
9 changes: 9 additions & 0 deletions src/test/resources/application.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

case_document_am:
url: ${CASE_DOCUMENT_AM_URL:http://localhost:4452}

idam:
api:
url: ${IDAM_API_URL:http://localhost:4501}
s2s-auth:
url: ${S2S_URL:http://localhost:4552}

0 comments on commit e5db434

Please sign in to comment.