Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
209 commits
Select commit Hold shift + click to select a range
06fcbc9
poc
Jun 25, 2025
27d7667
poc
Jun 25, 2025
baf7e1c
ASB test
linusnorton Jul 7, 2025
bd0b68d
fix swagger test
linusnorton Jul 7, 2025
0d1e504
clean up tests
linusnorton Jul 7, 2025
a893185
clean up
linusnorton Jul 7, 2025
d0adc6f
remove config by default
linusnorton Jul 7, 2025
7e83136
ignore servicebus
linusnorton Jul 7, 2025
c531a35
ignore servicebus
linusnorton Jul 7, 2025
6c85f38
add SB string
linusnorton Jul 7, 2025
4c6b92a
try again
linusnorton Jul 7, 2025
2d3c457
fix subscription name
linusnorton Jul 7, 2025
af6bfde
Merge master and bump ccd config version
linusnorton Jul 7, 2025
27e26f0
merge
linusnorton Jul 7, 2025
a86534f
chart
linusnorton Jul 7, 2025
006449e
plug in preview vars
linusnorton Jul 7, 2025
f940de5
Add db init in preview
linusnorton Jul 7, 2025
7498fc4
fix local
linusnorton Jul 7, 2025
45e6293
Merge branch 'master' into DTSSTCI-1332-decentralisation
linusnorton Jul 7, 2025
029b022
test out profile
linusnorton Jul 7, 2025
528844d
Use h2 while running tests
linusnorton Jul 7, 2025
9596fd7
fix db name in preview
linusnorton Jul 8, 2025
3a3f7ce
bump lib
linusnorton Jul 8, 2025
16a18dc
fix port
linusnorton Jul 8, 2025
bcace24
remove app postgres and change es host
linusnorton Jul 8, 2025
df3ddc7
Use MI for ASB
linusnorton Jul 8, 2025
14e753a
use CCD PR image
linusnorton Jul 8, 2025
19bc1bd
turn off ES healthcheck
linusnorton Jul 8, 2025
65ec4c2
merge master
linusnorton Jul 9, 2025
5d93c94
merge master
linusnorton Jul 9, 2025
07ff47e
new data store image
Jul 11, 2025
be8a2a2
url
Jul 11, 2025
23e59dc
use new url config for decentralisation
Jul 11, 2025
a85c86f
bump decentralised sdk
Jul 11, 2025
537146c
restore ccd s2s key
Jul 11, 2025
a45060c
Add passwordless
EllisD-B Aug 6, 2025
75253b9
Merge branch 'master' into wa-asb-test
EllisD-B Aug 6, 2025
97f8d4f
fix conflict
EllisD-B Aug 6, 2025
1789a5c
latest tooling
Aug 6, 2025
b198876
Merge branch 'master' into DTSSTCI-1332-decentralisation
Aug 6, 2025
38ca07e
build time definition snapshots
Aug 6, 2025
8264ffb
bump tooling
Aug 7, 2025
6885c44
chore: empty commit
Sep 5, 2025
04c1b7e
Merge branch 'master' into DTSSTCI-1332-decentralisation
Sep 5, 2025
d4279d9
bump tooling
Sep 5, 2025
2c03fbd
Revert "turn off ES healthcheck"
Sep 5, 2025
6747dd2
update logstash config for decentralised indexing strategy
Sep 5, 2025
21d1847
sptribs no longer needs to push to es directly
Sep 8, 2025
eae749e
disable es healthcheck
Sep 8, 2025
e0f88af
fix logstash cast
Sep 8, 2025
29c43b3
fix es ingestion
Sep 9, 2025
0a6add6
bump tooling
Sep 10, 2025
7eaa9c0
update logstash query
Sep 10, 2025
3314290
bump tooling
Sep 11, 2025
eb38438
external es version
Sep 11, 2025
69f9f33
Connection String
EllisD-B Sep 18, 2025
54d493a
Merge branch 'master' into wa-asb-test
ed14537 Sep 18, 2025
f6381f0
Bumping chart version/ fixing aliases
hmcts-jenkins-j-to-z[bot] Sep 18, 2025
3ac6c4d
Remove passwordless
EllisD-B Sep 18, 2025
8d0c08c
Add Jms Config
EllisD-B Sep 19, 2025
6a4a0b5
debug logs
EllisD-B Sep 19, 2025
1335080
add secret
EllisD-B Sep 19, 2025
beb68f9
Remove endpoint prefix
EllisD-B Sep 22, 2025
108744e
Replace Endpoint Prefix
EllisD-B Sep 22, 2025
116ee3e
make primary
EllisD-B Sep 22, 2025
26ae7c4
topic name
EllisD-B Sep 22, 2025
4c2dfb9
add preview config
EllisD-B Sep 23, 2025
7a8518b
remove auto config
EllisD-B Sep 23, 2025
99c5be4
mucking about
EllisD-B Sep 23, 2025
0e78295
fix logstash indexing
Sep 24, 2025
9681c7d
fix: restore auto-configured service bus JMS factory
Sep 25, 2025
f482f89
fix config generation
Sep 25, 2025
e6e6264
fix: send preview events to ccd-case-events topic
Sep 25, 2025
9d0cbb9
fix: align preview service bus topic with aat
Sep 25, 2025
5227dbe
chore: gate preview service bus scheduler
Sep 25, 2025
ab3e04f
fix indentation
Sep 25, 2025
5cff29f
drop redundant ccd message publisher
Sep 25, 2025
2840a7b
smoke fix
Sep 25, 2025
c295f20
Merge branch 'wa-asb-test' into DTSSTCI-1332-decentralisation
Sep 25, 2025
0a4938c
fix cftlib
Sep 25, 2025
a6d85c3
add message publisher
Sep 25, 2025
4c89e1b
fix assemble\
Sep 25, 2025
be7838a
Enable service bus scheduler in preview
Sep 25, 2025
7badd57
Enable service bus scheduler in preview values
Sep 25, 2025
602333a
Fix logstash ES queue query aliasing
Sep 25, 2025
d5278ff
Scope service bus topics per preview release
Sep 25, 2025
a9ea8c4
latest tooling
Oct 1, 2025
2ea1798
composite build fixes
Oct 1, 2025
87204f3
remove unneeded repository
Oct 1, 2025
47b536c
remove unneeded repository
Oct 1, 2025
10dae03
Merge branch 'DTSSTCI-1332-decentralisation' of github.com:hmcts/sptr…
Oct 1, 2025
7cc6669
Include decentralised DB schema in preview WA values
Oct 2, 2025
facd892
latest tooling
Oct 3, 2025
2b53d7c
Use preview service bus connection string
Oct 3, 2025
2967ff5
Disable case event publishing when WA overlay absent
Oct 3, 2025
5757b1c
Remove direct Azure Service Bus dependencies
Oct 3, 2025
f159416
tidy
Oct 3, 2025
8a6e3cd
bump tooling
Oct 6, 2025
89b49c1
address comments
Oct 6, 2025
537d959
DTSSTCI-1418: initialise new decentralised approach to new correspond…
Oct 14, 2025
6889403
DTSSTCI-1418: add dependencies for springframework crud repo and jaka…
Oct 14, 2025
9d6911c
swap h2 for testcontainers
Oct 14, 2025
8042a7c
DTSSTCI-1418: update methods calling sendEmail and sendLetter, update…
Oct 15, 2025
4f888e2
DTSSTCI-1418: remove unused import
Oct 15, 2025
00bf099
fix generateCCDConfigIssue
EllisD-B Oct 15, 2025
81d889e
DTSSTCI-1418: use jpa instead of relying solely on jakarta
Oct 15, 2025
ff5eea4
bump
Oct 16, 2025
69ac6dd
DTSSTCI-1418: amend tests to accommodate extra parameter for sendEmai…
Oct 20, 2025
7e1302a
Merge branch 'master' into DTSSTCI-1418-decentralised
pr00279 Oct 20, 2025
4d001f9
add no-op case view
Oct 20, 2025
0b5c19f
latest tooling api
Oct 20, 2025
e2a9560
DTSSTCI-1418: amend integration tests
Oct 20, 2025
0f96a46
DTSSTCI-1418: amend more integration tests
Oct 21, 2025
a85f0e2
DTSSTCI-1418: amend sql ref to case number, amend test case ID used f…
Oct 21, 2025
8059183
DTSSTCI-1418: amend type of notification ID & fix integration tests f…
Oct 21, 2025
cff0a80
DTSSTCI-1418: add params for caseDataDocService & correspondenceRepo …
Oct 22, 2025
a0aacb0
DTSSTCI-1418: amend checkstyle issues
Oct 22, 2025
79c6ad2
DTSSTCI-1418: amend datatype for correspondence ID
Oct 22, 2025
906a633
DTSSTCI-1418: amend name for case ref number in sql file
Oct 22, 2025
14fabfd
bump cftilb
Oct 22, 2025
3523c27
Merge branch 'DTSSTCI-1418-decentralised' of github.com:hmcts/sptribs…
Oct 22, 2025
d0aea9c
DTSSTCI-1418: amend datatype in sql for case ref number
Oct 22, 2025
9be9dbf
Merge branch 'DTSSTCI-1418-decentralised' of https://github.com/hmcts…
Oct 22, 2025
9b87636
DTSSTCI-1332: bump cftlib
pr00279 Oct 22, 2025
be9a21e
DTSSTCI-1418: add id param to Correspondence constructor
Oct 22, 2025
ecfb700
DTSSTCI-1418: convert UUID to string for correspondence
Oct 22, 2025
65eeafa
DTSSTCI-1418: remove unused import
Oct 22, 2025
9e74e89
DTSSTCI-1418: change casedata correspondences type to listvalue
Oct 22, 2025
59750b7
DTSSTCI-1418: add typeparamoverride to correspondence in casedata
Oct 22, 2025
d8554a3
DTSSTCI-1418-decentralised: fix indentation for correspondence in cas…
Oct 22, 2025
e2098f0
fix definition
Oct 22, 2025
dd49920
Merge branch 'DTSSTCI-1418-decentralised' of github.com:hmcts/sptribs…
Oct 22, 2025
7ee1743
DTSSTCI-1418: add Correspondence typeparamoverride
Oct 22, 2025
b702b31
DTSSTCI-1418: fix tab ID in CaseTypeTab test
Oct 22, 2025
c37f075
bump
Oct 23, 2025
645bcce
DTSSTCI-1418: create new getPDF method to create pdf of correspondence
Oct 23, 2025
0abd9ee
update logstash indexing setup
Oct 24, 2025
3767728
Merge branch 'master' into DTSSTCI-1332-decentralisation
Oct 24, 2025
0c02768
trim
Oct 24, 2025
ab9dfef
DTSSTCI-1418: fix url for pdf service & update name for correspondenc…
Oct 24, 2025
176acdd
fix role assignment import
Oct 24, 2025
02774c9
DTSSTCI-1418: flatten document object saved in correspondence repo, f…
Oct 24, 2025
b9fb16c
Merge branch 'master' into DTSSTCI-1332-decentralisation
ed14537 Oct 27, 2025
03c3369
bump tooling
Oct 28, 2025
480ac36
DTSSTCI-1418: fix access permissions for correspondence, remove unnee…
Oct 28, 2025
9bdb2e2
Merge branch 'master' into DTSSTCI-1418-decentralised
pr00279 Oct 28, 2025
66c7a14
Merge branch 'master' into DTSSTCI-1332-decentralisation
pr00279 Oct 28, 2025
e4cb789
bump flyway
Oct 28, 2025
1618340
Merge branch 'DTSSTCI-1332-decentralisation' of github.com:hmcts/sptr…
Oct 28, 2025
d045a4b
DTSSTCI-1418: merge in changes from decentralisation branch DTSSTCI-1…
Oct 29, 2025
43ccc64
DTSSTCI-1418: continued merge from decentralisation branch DTSSTCI-13…
Oct 29, 2025
363cad8
Revert "bump flyway"
Oct 29, 2025
4c6e777
tighten access to new persistence endpoints
Oct 29, 2025
8e1addc
bump tooling
Oct 30, 2025
e39dcae
revert preview ccd chart to master
Oct 30, 2025
b134cd9
Merge branch 'master' into DTSSTCI-1332-decentralisation
pr00279 Oct 30, 2025
769df1a
DTSSTCI-1418: update gradle.build to amend flyway issue, change notif…
Oct 30, 2025
08dd537
DTSSTCI-1418: merge decentralised changes & remove flyway fix
Oct 30, 2025
84e980d
remove component scan let sdk handle it
Oct 30, 2025
c91e3a8
Revert "remove component scan let sdk handle it"
Oct 30, 2025
36e5b10
bump sdk
Oct 30, 2025
37ea1cd
DTSSTCI-1418: move pdfserviceconfig location, remove unused exception…
Oct 31, 2025
2a967ae
Merge branch 'master' into DTSSTCI-1418-decentralised
pr00279 Oct 31, 2025
0b333fe
DTSSTCI-1418: throw exception for failed pdf correspondence uploads &…
Oct 31, 2025
e159995
DTSSTCI-1418: add exception handling for getPDF errors, add tests for…
Oct 31, 2025
0af36c9
DTSSTCI-1418: remove if condition for elseif in getpdf
Oct 31, 2025
b7747a2
DTSSTCI-1418: add tests to check IOExceptions are caught by send emai…
Nov 3, 2025
51b7e92
DTSSTCI-1418: add test for instance where fromEmail is present in ema…
Nov 3, 2025
5a0cc4a
Merge branch 'DTSSTCI-1332-decentralisation' into DTSSTCI-1418-decent…
Nov 3, 2025
9450633
Merge branch 'master' into DTSSTCI-1332-decentralisation
pr00279 Nov 3, 2025
a3b093f
Merge branch 'master' into DTSSTCI-1332-decentralisation
pr00279 Nov 3, 2025
ad27076
Merge branch 'master' into DTSSTCI-1418-decentralised
pr00279 Nov 3, 2025
6c98803
DTSSTCI-1418: unwrap condition of correspondencePDF being null
Nov 3, 2025
33832dc
Merge branch 'DTSSTCI-1418-decentralised' of https://github.com/hmcts…
Nov 3, 2025
6130cc7
DTSSTCI-1418: collapse catch statement (logs will distinguish between…
Nov 3, 2025
df0cf12
Merge branch 'master' into DTSSTCI-1418-decentralised
pr00279 Nov 3, 2025
198a920
Merge branch 'master' into DTSSTCI-1332-decentralisation
pr00279 Nov 3, 2025
0309f13
DTSSTCI-1418: add handling for RestClientException
Nov 3, 2025
e28e685
Merge branch 'master' into DTSSTCI-1332-decentralisation
pr00279 Nov 3, 2025
f79462a
Merge branch 'master' into DTSSTCI-1418-decentralised
pr00279 Nov 3, 2025
f7b8dc0
DTSSTCI-1418: check that refactoring assertion test appeases sonarclo…
Nov 3, 2025
02957ca
Merge branch 'DTSSTCI-1418-decentralised' of https://github.com/hmcts…
Nov 3, 2025
8d22b06
DTSSTCI-1418: refactor autowired and error assertions
Nov 3, 2025
39cd4a7
DTSSTCI-1418: refactor assertions with new obj in RequestInterceptorTest
Nov 3, 2025
8657101
DTSSTCI-1418: refactor check for correspondence tab due to sonarcloud…
Nov 3, 2025
3aae47b
DTSSTCI-1418: fix casetypetabtest stubbing issue
Nov 3, 2025
4c8acc6
Merge branch 'DTSSTCI-1332-decentralisation' into DTSSTCI-1418-decent…
Nov 4, 2025
89b24a2
DTSSTCI-1418: fix integration tests
Nov 4, 2025
38b0f58
use postgres not h2
Nov 4, 2025
c5f5550
avoid loading spring boot context in smoke tests when not needed
Nov 4, 2025
32d5653
avoid loading spring boot context in smoke tests when not needed
Nov 4, 2025
e229d29
Merge branch 'DTSSTCI-1418-decentralised' of github.com:hmcts/sptribs…
Nov 4, 2025
2ea6260
DTSSTCI-1418: fix sentTo address attached to letters
Nov 4, 2025
f51ccc7
Merge branch 'DTSSTCI-1418-decentralised' of https://github.com/hmcts…
Nov 4, 2025
32739d6
tmp fix for config generation
Nov 4, 2025
eb6ed52
Merge branch 'DTSSTCI-1418-decentralised' of github.com:hmcts/sptribs…
Nov 4, 2025
ed556aa
fix broken test
Nov 4, 2025
fcf7f80
hibernate
Nov 4, 2025
004fb33
Merge branch 'master' into DTSSTCI-1332-decentralisation
pr00279 Nov 5, 2025
784dcc9
Merge branch 'master' into DTSSTCI-1418-decentralised
pr00279 Nov 5, 2025
ea5575e
DTSSTCI-1418: remove nested if statements and include mock address in…
Nov 5, 2025
ca5c501
Merge branch 'DTSSTCI-1332-decentralisation' into DTSSTCI-1418-decent…
Nov 5, 2025
37ef217
Merge branch 'master' into DTSSTCI-1418-decentralised
pr00279 Nov 5, 2025
7d67e33
DTSSTCI-1418: add test for missing recipient address and refactor rep…
Nov 5, 2025
6de31dd
DTSSTCI-1418: fix checkstyle issues
Nov 5, 2025
ebc1de4
DTSSTCI-1418: include empty values for address testing
Nov 5, 2025
bac81d8
Merge branch 'master' into DTSSTCI-1418-decentralised
pr00279 Nov 5, 2025
8df9eec
Merge branch 'master' into DTSSTCI-1418-decentralised
pr00279 Nov 6, 2025
3dbd49c
Bumping chart version/ fixing aliases
hmcts-jenkins-j-to-z[bot] Nov 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ USER hmcts

COPY build/libs/sptribs-case-api.jar /opt/app/
COPY lib/applicationinsights.json /opt/app/
COPY build/cftlib/definition-snapshots /opt/app/build/cftlib/definition-snapshots

EXPOSE 4013
CMD [ "sptribs-case-api.jar" ]
2 changes: 1 addition & 1 deletion bin/utils/idam-lease-user-token.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ PASSWORD=${2}
IDAM_URI=${IDAM_API_URL_BASE:-http://localhost:5000}
REDIRECT_URI=http://localhost:3451/oauth2redirect
CLIENT_ID="ccd_gateway"
CLIENT_SECRET=${CCD_API_GATEWAY_IDAM_CLIENT_SECRET:-ccd_gateway_secret}
CLIENT_SECRET=${CCD_API_GATEWAY_IDAM_CLIENT_SECRET:-${CCD_API_GATEWAY_OAUTH2_CLIENT_SECRET:-ccd_gateway_secret}}
SCOPE="openid%20profile%20roles"

curl --silent --show-error --fail \
Expand Down
49 changes: 40 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import uk.gov.hmcts.rse.AuthMode
import uk.gov.hmcts.rse.CftlibExec

buildscript {
repositories {
mavenLocal()
Expand Down Expand Up @@ -27,7 +30,7 @@ plugins {
id 'io.spring.dependency-management' version '1.1.7'
id 'org.springframework.boot' version '3.5.7'
id 'com.github.ben-manes.versions' version '0.50.0'
id 'hmcts.ccd.sdk' version '5.6.1'
id 'hmcts.ccd.sdk' version '6.4.3'
id "au.com.dius.pact" version "4.3.10"
id 'com.github.hmcts.rse-cft-lib' version '0.19.1911'
}
Expand All @@ -40,6 +43,16 @@ version = '0.0.1'

ccd {
configDir = file('ccd-definitions/definitions')
decentralised = true
caseEventServiceBus = true
}

project.tasks.named("generateCCDConfig") {
environment 'SPRING_PROFILES_ACTIVE', 'config-gen'
environment 'SPRING_FLYWAY_ENABLED', 'false'
environment 'SPRING_JMS_SERVICEBUS_ENABLED', 'false'
environment 'SPRING_DATASOURCE_URL',
'jdbc:h2:mem:configgen;MODE=PostgreSQL;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false'
}

sourceSets {
Expand Down Expand Up @@ -176,7 +189,7 @@ tasks.register('fortifyScan', JavaExec) {
checkstyle {
maxWarnings = 0
toolVersion = '9.3'
getConfigDirectory().set(new File(rootDir, 'config/checkstyle'))
getConfigDirectory().set(project.layout.projectDirectory.dir('config/checkstyle').asFile)
}

pmd {
Expand All @@ -185,7 +198,7 @@ pmd {
reportsDir = file("$project.buildDir/reports/pmd")
// https://github.com/pmd/pmd/issues/876
ruleSets = []
ruleSetFiles = files("${rootDir}/config/pmd/ruleset.xml")
ruleSetFiles = files(project.layout.projectDirectory.file('config/pmd/ruleset.xml'))
}

jacocoTestReport {
Expand Down Expand Up @@ -228,7 +241,7 @@ def sonarExclusions = [
'**/uk/gov/hmcts/sptribs/CaseApiApplication.java',
'**/uk/gov/hmcts/sptribs/notification/GetAllTemplatesFromNotify.java',
'**/uk/gov/hmcts/sptribs/ciccase/model/UserRolesForAccessProfiles.java',
'**/uk/gov/hmcts/sptribs/common/config/**'
'**/uk/gov/hmcts/sptribs/common/config/**',
]

sonarqube {
Expand Down Expand Up @@ -330,6 +343,7 @@ dependencies {
implementation group: 'com.github.hmcts', name: 'core-case-data-store-client', version: '5.1.1'
implementation group: 'com.github.hmcts', name:'ccd-case-document-am-client', version: '1.59.2'
implementation group: 'com.github.hmcts', name: 'idam-java-client', version: '3.0.4'
implementation group: 'com.github.hmcts', name: 'pdf-service-client', version: '8.0.2'
implementation group: 'com.github.hmcts.java-logging', name: 'logging', version: '6.1.9'
implementation group: 'com.github.hmcts', name: 'service-auth-provider-java-client', version: '5.3.3'
implementation group: 'net.logstash.logback', name: 'logstash-logback-encoder', version: '8.1'
Expand All @@ -339,21 +353,26 @@ dependencies {
implementation group: 'org.projectlombok', name: 'lombok', version: versions.lombok
implementation group: 'org.springdoc', name: 'springdoc-openapi-starter-webmvc-ui', version: '2.8.14'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-web'
runtimeOnly 'com.h2database:h2'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-jdbc'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-actuator'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-aop'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-json'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-data-jpa'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-validation', version: versions.springBoot
implementation group: 'org.springframework.retry', name: 'spring-retry', version: '2.0.12'
implementation group: 'org.springframework.cloud', name: 'spring-cloud-starter-netflix-hystrix', version: '2.2.10.RELEASE'
implementation group: 'org.springframework.cloud', name: 'spring-cloud-starter-bootstrap', version: '4.3.0'
implementation group: 'org.springframework.cloud', name: 'spring-cloud-starter-openfeign', version: '4.3.0'
implementation group: 'org.springframework.data', name: 'spring-data-commons', version: '3.5.3'
implementation group: 'uk.gov.service.notify', name: 'notifications-java-client', version: '5.2.1-RELEASE'
implementation group: 'com.launchdarkly', name: 'launchdarkly-java-server-sdk', version: '7.10.2'
implementation group: 'org.apache.commons', name: 'commons-collections4', version: '4.5.0'
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.18.0'
implementation group: 'com.github.ben-manes.caffeine', name: 'caffeine', version: '3.2.3'
implementation 'org.camunda.bpm:camunda-external-task-client:7.23.0'

implementation group: 'org.postgresql', name: 'postgresql', version: '42.7.5'
implementation 'org.flywaydb:flyway-database-postgresql:11.3.1'
annotationProcessor group: 'org.projectlombok', name: 'lombok', version: versions.lombok
testImplementation group: 'com.github.hmcts', name: 'fortify-client', version: '1.4.10', classifier: 'all'

Expand Down Expand Up @@ -385,9 +404,12 @@ dependencies {
testAnnotationProcessor group: 'org.projectlombok', name: 'lombok', version: versions.lombok
integrationTestImplementation sourceSets.main.runtimeClasspath
integrationTestImplementation sourceSets.test.runtimeClasspath
integrationTestImplementation group: 'org.testcontainers', name: 'junit-jupiter', version: '1.20.3'
integrationTestImplementation group: 'org.testcontainers', name: 'postgresql', version: '1.20.3'

functionalTestImplementation sourceSets.main.runtimeClasspath
functionalTestImplementation sourceSets.test.runtimeClasspath
functionalTestImplementation 'com.h2database:h2'

functionalTestImplementation group: 'com.github.hmcts', name: 'document-management-client', version: '7.0.1'
functionalTestImplementation group: 'com.github.hmcts', name: 'service-auth-provider-java-client', version: '5.3.3'
Expand All @@ -409,7 +431,7 @@ dependencies {

mainClassName = 'uk.gov.hmcts.sptribs.CaseApiApplication'

tasks.register('loadEnvSecrets') {
def loadEnvSecretsTask = tasks.register('loadEnvSecrets') {
doLast {
if (!project.file('./.aat-env').exists()) {
new ByteArrayOutputStream().withStream { os ->
Expand All @@ -424,7 +446,7 @@ tasks.register('loadEnvSecrets') {
}

tasks.register('reloadEnvSecrets') {
dependsOn[loadEnvSecrets]
dependsOn loadEnvSecretsTask
doFirst {
if (project.file('./.aat-env').exists()) {
project.file('./.aat-env').delete()
Expand Down Expand Up @@ -497,11 +519,19 @@ ccd {
configDir = file('build/definitions')
}

tasks.withType(CftlibExec).configureEach {
environment 'RSE_LIB_ADDITIONAL_DATABASES', 'sptribs'
environment 'CCD_DECENTRALISED_CASE-TYPE-SERVICE-URLS_CriminalInjuriesCompensation', 'http://localhost:4013'
environment 'SPRING_JMS_SERVICEBUS_ENABLED', 'false'
}

bootWithCCD {
environment 'XUI_JURISDICTIONS', 'ST_CIC'
environment 'CASE_DOCUMENT_S2S_AUTHORISED_SERVICES', 'ccd_case_document_am_api,ccd_gw,xui_webapp,ccd_data,bulk_scan_processor,em_npa_app,dg_docassembly_api,em_stitching_api,em_ccd_orchestrator,bulk_scan_orchestrator,sptribs_case_api,sptribs_frontend'
environment 'PDF_API_URL', 'http://rpe-pdf-service-aat.service.core-compute-aat.internal'
environment 'SPRING_JMS_SERVICEBUS_ENABLED', 'false'
group = 'ccd tasks'
dependsOn(loadEnvSecrets)
dependsOn loadEnvSecretsTask

doFirst() {
project.file('./.aat-env').readLines().each() {
Expand All @@ -513,6 +543,7 @@ bootWithCCD {
}
}

assemble.dependsOn(dumpCCDDefinitions)

cftlibTest {
// IDAM simulator will be started on port 5000,
Expand Down Expand Up @@ -560,7 +591,7 @@ configurations.testImplementation {
exclude group: 'ch.qos.logback', module: 'logback-classic'
}

rootProject.tasks.named("processContractTestResources") {
tasks.named("processContractTestResources") {
duplicatesStrategy = 'include'
}

Expand Down
6 changes: 1 addition & 5 deletions charts/sptribs-case-api/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ appVersion: "1.0"
description: A Helm chart for sptribs-case-api App
name: sptribs-case-api
home: https://github.com/hmcts/sptribs-case-api
version: 0.0.110
version: 0.0.111
maintainers:
- name: HMCTS sptribs team
dependencies:
Expand Down Expand Up @@ -48,10 +48,6 @@ dependencies:
version: ~1.1.0
repository: 'oci://hmctspublic.azurecr.io/helm'
condition: wa.enabled
- name: ccd-message-publisher
version: ~0.1.7
repository: 'oci://hmctspublic.azurecr.io/helm'
condition: wa.enabled
- name: servicebus
version: ~1.2.1
repository: 'oci://hmctspublic.azurecr.io/helm'
Expand Down
59 changes: 54 additions & 5 deletions charts/sptribs-case-api/values.preview.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,19 @@ java:
image: ${IMAGE_NAME}
ingressHost: ${SERVICE_FQDN}
environment:
PDF_API_URL: "http://rpe-pdf-service-aat.service.core-compute-aat.internal"
CASE_DATA_STORE_BASEURL: http://{{ .Release.Name }}-ccd-data-store-api
CASE_DOCUMENT_AM_BASEURL: http://${SERVICE_NAME}-ccd-case-document-am-api
BUNDLING_API_URL: https://em-ccdorc-${SERVICE_FQDN}
DB_NAME: "{{ .Values.global.databaseNamePrefix }}sptribs"
DB_HOST: '{{ tpl .Values.global.postgresHostname $}}'
DB_USER_NAME: "{{ .Values.global.postgresUsername}}"
DB_PORT: 5432
SPRING_JMS_SERVICEBUS_ENABLED: false
POSTGRES_HOST: '{{ tpl .Values.global.postgresHostname $}}'
POSTGRES_NAME: "{{ .Values.global.databaseNamePrefix }}sptribs-case-api"
POSTGRES_USERNAME: ${SPTRIBS_POSTGRES_USERNAME_PREVIEW}
POSTGRES_CONNECTION_OPTIONS: ""

keyVaults:
sptribs:
secrets:
Expand All @@ -34,7 +39,7 @@ java:
- name: launchdarkly-sdk-key
alias: LAUNCH_DARKLY_SDK_KEY
secrets:
POSTGRES_PASSWORD:
DB_PASSWORD:
secretRef: postgres
key: PASSWORD
disabled: false
Expand Down Expand Up @@ -100,6 +105,7 @@ ccd:
ELASTIC_SEARCH_HOSTS: ${SERVICE_NAME}-es-master:9200
ELASTIC_SEARCH_DATA_NODES_HOSTS: http://${SERVICE_NAME}-es-master:9200
CASE_DOCUMENT_AM_URL: http://${SERVICE_NAME}-ccd-case-document-am-api
CCD_DECENTRALISED_CASE-TYPE-SERVICE-URLS_CriminalInjuriesCompensation: https://${SERVICE_FQDN}
IDAM_OAUTH2_DATA_STORE_CLIENT_SECRET: ${IDAM_OAUTH2_DATA_STORE_CLIENT_SECRET}
IDAM_DATA_STORE_SYSTEM_USER_USERNAME: ${IDAM_DATA_STORE_SYSTEM_USER_USERNAME}
IDAM_DATA_STORE_SYSTEM_USER_PASSWORD: ${IDAM_DATA_STORE_SYSTEM_USER_PASSWORD}
Expand Down Expand Up @@ -261,14 +267,54 @@ ccd:
01_input.conf: |
input {
jdbc {
jdbc_connection_string => "jdbc:postgresql://sptribs-preview.postgres.database.azure.com:5432/pr-${CHANGE_ID}-data-store?sslmode-require&stringtype=unspecified"
jdbc_connection_string => "jdbc:postgresql://sptribs-preview.postgres.database.azure.com:5432/pr-${CHANGE_ID}-sptribs?sslmode=require"
jdbc_user => "hmcts"
jdbc_password_filepath => "/etc/logstash/secrets/PASSWORD"
jdbc_validate_connection => true
jdbc_driver_library => "/usr/share/logstash/ccd/postgresql.jar"
jdbc_driver_class => "org.postgresql.Driver"
jdbc_default_timezone => "UTC"
statement => "UPDATE case_data SET marked_by_logstash = true WHERE marked_by_logstash = false RETURNING id, created_date, last_modified, jurisdiction, case_type_id, state, last_state_modified_date, data::TEXT as json_data, data_classification::TEXT as json_data_classification, reference, security_classification, supplementary_data::TEXT as json_supplementary_data"
statement => "
WITH next_batch AS (
SELECT reference, case_revision
FROM ccd.es_queue
ORDER BY enqueued_at
LIMIT 1000
FOR UPDATE SKIP LOCKED
),
deleted AS (
DELETE FROM ccd.es_queue q
USING next_batch nb
WHERE q.reference = nb.reference
AND q.case_revision = nb.case_revision
RETURNING q.reference, q.case_revision
)
SELECT
cd.id AS case_data_id,
cd.reference,
ce.id AS event_id,
cd.case_type_id,
cd.created_date,
ce.created_date AS last_modified,
cd.jurisdiction,
cd.last_state_modified_date,
cd.state,
cd.security_classification::TEXT,
ce.data::TEXT AS json_data,
'{}' AS json_data_classification,
cd.supplementary_data::TEXT AS json_supplementary_data,
cd.case_revision
FROM deleted d
JOIN ccd.case_data cd ON cd.reference = d.reference
JOIN LATERAL (
SELECT ce.*
FROM ccd.case_event ce
WHERE ce.case_data_id = cd.id
ORDER BY ce.id DESC
LIMIT 1
) ce ON TRUE
WHERE cd.case_revision = d.case_revision
"
clean_run => false
schedule => "* * * * * *"
}
Expand Down Expand Up @@ -379,7 +425,9 @@ ccd:
sniffing => false
index => "%{[index_id]}"
document_type => "_doc"
document_id => "%{id}"
document_id => "%{case_data_id}"
version => "%{case_revision}"
version_type => "external"
timeout => 60
}
}
Expand Down Expand Up @@ -533,6 +581,7 @@ postgresql:
- name: "pr-${CHANGE_ID}-user-profile"
- name: "pr-${CHANGE_ID}-role_assignment"
- name: "pr-${CHANGE_ID}-emstitch"
- name: "pr-${CHANGE_ID}-sptribs"

servicebus:
enabled: false
Expand Down
39 changes: 14 additions & 25 deletions charts/sptribs-case-api/values.wa.preview.template.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@

java:
secrets:
AZURE_SERVICE_BUS_CONNECTION_STRING:
secretRef: sptribs-sb-preview
key: connectionString
AZURE_SERVICE_BUS_PREVIEW_CONNECTION_STRING:
secretRef: sptribs-sb-preview
key: connectionString
environment:
SPRING_JMS_SERVICEBUS_ENABLED: true
SPTRIBS_SERVICEBUS_SCHEDULER_ENABLED: true
AZURE_SERVICE_BUS_TOPIC_NAME: ${SERVICE_NAME}-asb-ccd-case-events
AZURE_SERVICE_BUS_SUBSCRIPTION_NAME: ${SERVICE_NAME}-asb-ccd-case-events

servicebus:
enabled: true
Expand Down Expand Up @@ -26,6 +38,7 @@ postgresql:
- name: "pr-${CHANGE_ID}-role_assignment"
- name: "pr-${CHANGE_ID}-user-profile"
- name: "pr-${CHANGE_ID}-emstitch"
- name: "pr-${CHANGE_ID}-sptribs"
- name: "pr-${CHANGE_ID}-camunda"
- name: "pr-${CHANGE_ID}-cft_task_db"
- name: "pr-${CHANGE_ID}-wa_workflow_api"
Expand Down Expand Up @@ -93,29 +106,6 @@ wa:
postgresql:
enabled: false

ccd-message-publisher:
java:
ingressHost: ccd-message-publisher-${SERVICE_FQDN}
releaseNameOverride: ${SERVICE_NAME}-ccd-message-publisher
keyVaults:
ccd:
secrets:
- name: AppInsightsInstrumentationKey
alias: azure.application-insights.instrumentation-key
environment:
DATA_STORE_DB_HOST: sptribs-preview.postgres.database.azure.com
DATA_STORE_DB_NAME: "pr-${CHANGE_ID}-data-store"
DATA_STORE_DB_USERNAME: ${CCD_GLOBAL_POSTGRES_USERNAME_PREVIEW}
DATA_STORE_DB_OPTIONS: "?stringtype=unspecified&reWriteBatchedInserts=true&sslmode=require"
CCD_CASE_EVENTS_DESTINATION: "${SERVICE_NAME}-asb-ccd-case-events"
secrets:
SERVICE_BUS_CONNECTION_STRING:
secretRef: sptribs-sb-preview
key: connectionString
DATA_STORE_DB_PASSWORD:
secretRef: "{{ .Values.global.postgresSecret }}"
key: PASSWORD

am-org-role-mapping-service:
enabled: true
java:
Expand Down Expand Up @@ -178,4 +168,3 @@ xui-webapp:
SERVICES_WORK_ALLOCATION_TASK_API: http://{{ .Release.Name }}-wa-task-management-api
SERVICES_ROLE_ASSIGNMENT_MAPPING_API: http://{{ .Release.Name }}-am-org-role-mapping-service
WA_SUPPORTED_JURISDICTIONS: ST_CIC

1 change: 1 addition & 0 deletions charts/sptribs-case-api/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ java:
CASE_DOCUMENT_AM_BASEURL: http://ccd-case-document-am-api-{{ .Values.global.environment }}.service.core-compute-{{ .Values.global.environment }}.internal
DOC_ASSEMBLY_URL: http://dg-docassembly-{{ .Values.global.environment }}.service.core-compute-{{ .Values.global.environment }}.internal
DOCUMENT_MANAGEMENT_URL: http://dm-store-{{ .Values.global.environment }}.service.core-compute-{{ .Values.global.environment }}.internal
PDF_API_URL: "http://rpe-pdf-service-{{ .Values.global.environment }}.service.core-compute-{{ .Values.global.environment }}.internal"

CASE_API_DOCUMENT_DOWNLOAD_URL: http://manage-case.{{ .Values.global.environment }}.platform.hmcts.net/
SEND_LETTER_SERVICE_BASEURL: "http://rpe-send-letter-service-{{ .Values.global.environment }}.service.core-compute-{{ .Values.global.environment }}.internal"
Expand Down
Loading
Loading