Skip to content

Commit

Permalink
Merge branch 'master' into feat/CIV-15612
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelMolina3691 authored Dec 10, 2024
2 parents fbbdaad + fc73049 commit 4e8997f
Show file tree
Hide file tree
Showing 184 changed files with 8,826 additions and 2,190 deletions.
4 changes: 4 additions & 0 deletions Jenkinsfile_CNP
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ def product = "civil"
def component = "service"
def ccdBranch = "master"
def camundaBranch = "master"
def dmnBranch = "master"
def yarnBuilder = new uk.gov.hmcts.contino.YarnBuilder(this)

AppPipelineConfig pipelineConf
Expand Down Expand Up @@ -48,6 +49,7 @@ def secrets = [
secret('microservicekey-ccd-gw', 'CCD_API_GATEWAY_S2S_KEY')
],
'civil-${env}': [
secret('case-document-am-api-s2s-secret', 'CASE_DOCUMENT_AM_API_S2S_SECRET'),
secret('microservicekey-civil-service', 'S2S_SECRET'),
secret('ccd-importer-username', 'CCD_CONFIGURER_IMPORTER_USERNAME'),
secret('ccd-importer-password', 'CCD_CONFIGURER_IMPORTER_PASSWORD'),
Expand Down Expand Up @@ -111,6 +113,7 @@ withPipeline(type, product, component) {
./bin/wait-for.sh definition-store
./bin/add-roles.sh
./bin/pull-latest-camunda-files.sh ${camundaBranch}
./bin/pull-latest-dmn-files.sh ${dmnBranch}
./bin/pull-latest-ccd-files.sh ${ccdBranch}
./bin/import-ccd-definition.sh "-e *-prod.json,*HNL-nonprod.json,AuthorisationCaseType-shuttered.json"
"""
Expand Down Expand Up @@ -144,6 +147,7 @@ withPipeline(type, product, component) {
eval \$(./bin/variables/load-staging-environment-variables.sh)
./bin/add-roles.sh
./bin/pull-latest-camunda-files.sh ${camundaBranch}
./bin/pull-latest-dmn-files.sh ${dmnBranch}
./bin/pull-latest-ccd-files.sh ${ccdBranch}
./bin/import-ccd-definition.sh "-e *-nonprod.json,*COS-nonprod.json,AuthorisationCaseType-shuttered.json"
./bin/import-bpmn-diagram.sh .
Expand Down
44 changes: 44 additions & 0 deletions bin/import-dmn-diagram.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/usr/bin/env bash

set -eu
workspace=${1}
tenant_id=${2}
product=${3}

s2sSecret=${S2S_SECRET:-AABBCCDDEEFFGGHH}

#if [[ "${env}" == 'prod' ]]; then
# s2sSecret=${S2S_SECRET_PROD}-
#fi

serviceToken=$($(realpath ".")/bin/utils/idam-lease-service-token.sh civil_service \
$(docker run --rm hmctspublic.azurecr.io/imported/toolbelt/oathtool --totp -b ${s2sSecret}))

dmnFilepath="$(realpath $workspace)/resources"

for file in $(find ${dmnFilepath} -name '*.dmn')
do
uploadResponse=$(curl --insecure -v --silent -w "\n%{http_code}" --show-error -X POST \
${CAMUNDA_BASE_URL:-http://localhost:9404}/engine-rest/deployment/create \
-H "Accept: application/json" \
-H "ServiceAuthorization: Bearer ${serviceToken}" \
-F "deployment-name=$(basename ${file})" \
-F "deploy-changed-only=true" \
-F "deployment-source=$product" \
${tenant_id:+'-F' "tenant-id=$tenant_id"} \
-F "file=@${dmnFilepath}/$(basename ${file})")

upload_http_code=$(echo "$uploadResponse" | tail -n1)
upload_response_content=$(echo "$uploadResponse" | sed '$d')

if [[ "${upload_http_code}" == '200' ]]; then
echo "$(basename ${file}) diagram uploaded successfully (${upload_response_content})"
continue;
fi

echo "$(basename ${file}) upload failed with http code ${upload_http_code} and response (${upload_response_content})"
continue;

done


19 changes: 19 additions & 0 deletions bin/pull-latest-dmn-files.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash

branchName=$1

#Checkout specific branch pf civil camunda bpmn definition
git clone https://github.com/hmcts/civil-wa-task-configuration.git
cd civil-wa-task-configuration

echo "Switch to ${branchName} branch on civil-wa-task-configuration"
git checkout ${branchName}
cd ..
mkdir wa-dmn

#Copy camunda folder to civil-ccd-def which contians dmn files
cp -r ./civil-wa-task-configuration/src/main/resources ./wa-dmn/.
rm -rf ./civil-wa-task-configuration

./bin/import-dmn-diagram.sh ./wa-dmn/. civil civil
rm -rf ./wa-dmn
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ dependencies {
def withoutJunit4 = {
exclude group: 'junit', module: 'junit'
}
implementation 'com.github.hmcts:civil-commons:v1.1.3'
implementation 'com.github.hmcts:civil-commons:v1.1.5'
implementation project(':dashboard-notifications')
implementation group: 'org.springframework.data', name: 'spring-data-jpa'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-web'
Expand Down
14 changes: 13 additions & 1 deletion charts/civil-service/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
description: A Helm chart for civil-service App
name: civil-service
home: https://github.com/hmcts/civil-service
version: 0.0.72
version: 0.0.74
maintainers:
- name: HMCTS Civil team

Expand Down Expand Up @@ -34,3 +34,15 @@ dependencies:
version: 0.0.5
repository: 'https://hmctspublic.azurecr.io/helm/v1/repo/'
condition: wiremock.enabled
- name: ccd-case-document-am-api
version: 1.7.14
repository: 'https://hmctspublic.azurecr.io/helm/v1/repo/'
condition: ccd-case-document-am-api.enabled
- name: em-ccdorc
version: 2.0.25
repository: 'https://hmctspublic.azurecr.io/helm/v1/repo/'
condition: em-ccdorc.enabled
- name: em-stitching
version: 1.0.55
repository: 'https://hmctspublic.azurecr.io/helm/v1/repo/'
condition: em-stitching.enabled
1 change: 1 addition & 0 deletions charts/civil-service/values.aat.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ java:
ROLE_ASSIGNMENT_URL: http://am-role-assignment-service-aat.service.core-compute-aat.internal
ROLE_INITIALISATION_ENABLED: true
CASE_FLAGS_LOGGING_ENABLED: true
COURT_LOCATION_WA_DMN_ENABLED: false
postgresql:
enabled: true
image:
Expand Down
71 changes: 67 additions & 4 deletions charts/civil-service/values.preview.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,22 @@ java:
CMC_DB_PASSWORD: ${POSTGRES_PASSWORD}
CMC_DB_CONNECTION_OPTIONS: '?sslmode=allow'
REFERENCE_DATABASE_MIGRATION: true
EM_CCD_ORCHESTRATOR_URL: http://${SERVICE_NAME}-em-ccdorc
CAMUNDA_URL: http://${SERVICE_NAME}-camunda/engine-rest/
SERVICE_REQUEST_UPDATE: https://${SERVICE_NAME}.preview.platform.hmcts.net/service-request-update
SERVICE_REQUEST_UPDATE_CLAIM_ISSUED: https://${SERVICE_NAME}.preview.platform.hmcts.net/service-request-update-claim-issued
LAUNCH_DARKLY_ENV: ${SERVICE_FQDN}
LAUNCH_DARKLY_ENV: aat
TESTING_SUPPORT_ENABLED: true
POLLING_EVENT_EMITTER_ENABLED: true
CASE_DOCUMENT_AM_URL: http://ccd-case-document-am-api-aat.service.core-compute-aat.internal
CASE_DOCUMENT_AM_URL: http://${SERVICE_NAME}-cdam
STITCHING_API_ENABLED: true
ACA_SERVICE_API_BASEURL: http://${SERVICE_NAME}-aac-manage-case-assignment
HMC_HEARINGS_SUBSCRIPTION_ENABLED: false
HMC_API_URL: http://${SERVICE_NAME}-wiremock
ROLE_ASSIGNMENT_URL: http://am-role-assignment-service-aat.service.core-compute-aat.internal
ROLE_INITIALISATION_ENABLED: true
CASE_FLAGS_LOGGING_ENABLED: true
COURT_LOCATION_WA_DMN_ENABLED: true
keyVaults:
civil:
resourceGroup: civil
Expand Down Expand Up @@ -94,6 +96,7 @@ java:
CREATE DATABASE "definition-store" WITH OWNER = hmcts ENCODING = 'UTF-8' CONNECTION LIMIT = -1;
CREATE DATABASE "camunda" WITH OWNER = hmcts ENCODING = 'UTF-8' CONNECTION LIMIT = -1;
CREATE DATABASE "role_assignment" WITH OWNER = hmcts ENCODING = 'UTF-8' CONNECTION LIMIT = -1;
CREATE DATABASE "emstitch" WITH OWNER = hmcts ENCODING = 'UTF-8' CONNECTION LIMIT = -1;
auth:
username: ${POSTGRES_USER}
password: ${POSTGRES_PASSWORD}
Expand All @@ -120,11 +123,13 @@ xui-webapp:
devmemoryLimits: 8Gi
devcpuLimits: 4500m
environment:
FEATURE_ACCESS_MANAGEMENT_ENABLED: true
HEALTH_CCD_COMPONENT_API: http://${SERVICE_NAME}-ccd-api-gw/health
HEALTH_CCD_DATA_API: http://${SERVICE_NAME}-ccd-data-store-api/health
HEALTH_TERMS_AND_CONDITIONS_API: http://xui-terms-and-conditions-${SERVICE_FQDN}.service.core-compute-preview.internal/health
SERVICES_CCD_COMPONENT_API: http://${SERVICE_NAME}-ccd-api-gw
SERVICES_CCD_DATA_STORE_API: http://${SERVICE_NAME}-ccd-data-store-api
SERVICES_DOCUMENTS_API_V2: http://${SERVICE_NAME}-cdam
SERVICES_TERMS_AND_CONDITIONS: http://xui-terms-and-conditions-${SERVICE_FQDN}.service.core-compute-preview.internal
JURISDICTIONS: CIVIL
LAUNCH_DARKLY_CLIENT_ID: ~
Expand Down Expand Up @@ -154,6 +159,7 @@ ccd:
global:
ccdApiGatewayIngress: http://${SERVICE_NAME}-ccd-api-gw
ccdDataStoreUrl: http://${SERVICE_NAME}-ccd-data-store-api
ccdStitchUrl: http://${SERVICE_NAME}-emstitch
ccdDefinitionStoreUrl: http://${SERVICE_NAME}-ccd-definition-store
ccdUserProfileUrl: http://ccd-user-profile-api-aat.service.core-compute-aat.internal
dmStoreUrl: http://dm-store-aat.service.core-compute-aat.internal
Expand Down Expand Up @@ -182,15 +188,15 @@ ccd:
autoscaling:
enabled: false
environment:
CASE_DOCUMENT_AM_API_ATTACH_DOCUMENT_ENABLED: false
CASE_DOCUMENT_AM_API_ATTACH_DOCUMENT_ENABLED: true
DATA_STORE_DB_HOST: ${SERVICE_NAME}-postgresql
DATA_STORE_IDAM_KEY: ${CCD_DATA_STORE_S2S_SECRET}
DATA_STORE_S2S_AUTHORISED_SERVICES: ccd_data,ccd_gw,ccd_ps,bulk_scan_orchestrator,ccpay_bubble,ctsc_work_allocation,em_ccd_orchestrator,xui_webapp,civil_service,ccd_case_document_am_api,aac_manage_case_assignment
IDAM_API_BASE_URL: https://idam-api.aat.platform.hmcts.net
IDAM_OIDC_URL: https://idam-web-public.aat.platform.hmcts.net
OIDC_ISSUER: https://forgerock-am.service.core-compute-idam-aat2.internal:8443/openam/oauth2/realms/root/realms/hmcts
CCD_S2S_AUTHORISED_SERVICES_CASE_USER_ROLES: civil_service,aac_manage_case_assignment
CASE_DOCUMENT_AM_URL: http://ccd-case-document-am-api-aat.service.core-compute-aat.internal
CASE_DOCUMENT_AM_URL: http://${SERVICE_NAME}-cdam
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 @@ -270,6 +276,63 @@ aac-manage-case-assignment:
autoscaling:
enabled: false

em-ccdorc:
enabled: true
java:
image: hmctspublic.azurecr.io/em/ccdorc:latest
releaseNameOverride: ${SERVICE_NAME}-em-ccdorc
ingressHost: em-ccdorc-${SERVICE_FQDN}
environment:
IDAM_API_BASE_URI: https://idam-api.aat.platform.hmcts.net
OPEN_ID_API_BASE_URI: https://idam-web-public.aat.platform.hmcts.net/o
S2S_BASE_URI: http://rpe-service-auth-provider-aat.service.core-compute-aat.internal
EM_STITCHING_API_URL: https://em-stitching-${SERVICE_FQDN}
DM_STORE_APP_URL: http://dm-store-aat.service.core-compute-aat.internal
CCD_DATA_API_URL: http://${SERVICE_NAME}-ccd-data-store-api
CALLBACK_HTTP_SCHEME: https
CALLBACK_DOMAIN: em-ccdorc-${SERVICE_FQDN}

em-stitching:
enabled: true
java:
imagePullPolicy: Always
releaseNameOverride: ${SERVICE_NAME}-em-stitching
image: hmctspublic.azurecr.io/em/stitching:latest
ingressHost: em-stitching-${SERVICE_FQDN}
environment:
IDAM_API_BASE_URI: https://idam-api.aat.platform.hmcts.net
OPEN_ID_API_BASE_URI: https://idam-web-public.aat.platform.hmcts.net/o
S2S_BASE_URI: http://rpe-service-auth-provider-aat.service.core-compute-aat.internal
DM_STORE_APP_URL: http://dm-store-aat.service.core-compute-aat.internal
CDAM_URL: http://${SERVICE_NAME}-cdam
SPRING_DATASOURCE_HOST: ${SERVICE_NAME}-postgresql
SPRING_DATASOURCE_NAME: emstitch
SPRING_DATASOURCE_OPTIONS: "?ssl=disable"
SPRING_DATASOURCE_PORT: 5432
SPRING_DATASOURCE_USERNAME: ${POSTGRES_USER}
SPRING_DATASOURCE_PASSWORD: ${POSTGRES_PASSWORD}
ENABLE_DB_MIGRATE: true
RUN_DB_MIGRATION_ON_STARTUP: true
FLYWAY_POSTGRESQL_TRANSACTIONAL_LOCK: false
LOGGING_LEVEL_UK_GOV_HMCTS_REFORM_EM: DEBUG

ccd-case-document-am-api:
enabled: true
java:
releaseNameOverride: ${SERVICE_NAME}-cdam
imagePullPolicy: Always
image: hmctspublic.azurecr.io/ccd/case-document-am-api:latest
ingressHost: ccd-case-document-am-api-${SERVICE_FQDN}
environment:
IDAM_API_URL: https://idam-api.aat.platform.hmcts.net
IDAM_OIDC_URL: https://idam-web-public.aat.platform.hmcts.net
OIDC_ISSUER: https://forgerock-am.service.core-compute-idam-aat.internal:8443/openam/oauth2/hmcts
S2S_URL: http://rpe-service-auth-provider-aat.service.core-compute-aat.internal
DM_STORE_BASE_URL: http://dm-store-aat.service.core-compute-aat.internal
CCD_DATA_STORE_API_BASE_URL: http://${SERVICE_NAME}-ccd-data-store-api
CASE_DOCUMENT_AM_API_S2S_SECRET: ${CASE_DOCUMENT_AM_API_S2S_SECRET}
keyVaults: []

wiremock:
enabled: true
image: "wiremock/wiremock"
Expand Down
12 changes: 12 additions & 0 deletions charts/civil-service/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,19 @@ camunda-bpm:

aac-manage-case-assignment:
enabled: false

ccd:
enabled: false

ccd-case-document-am-api:
enabled: false

em-ccdorc:
enabled: false

em-stitching:
enabled: false

java:
applicationPort: 4000
image: 'hmctspublic.azurecr.io/civil/service:latest'
Expand Down Expand Up @@ -73,6 +84,7 @@ java:
CIVIL_S2S_AUTHORISED_SERVICES: payment_app,ccd_data,civil_service,civil-citizen-ui
OCMC_CLIENT_ID: cmc_citizen
CONSOLE_LOG_PATTERN: '%d{${LOGBACK_DATE_FORMAT}} %-5level [%thread] %logger{${LOGGER_LENGTH}}%ex{${EXCEPTION_LENGTH}} %mdc %msg%n}'
COURT_LOCATION_WA_DMN_ENABLED: false

keyVaults:
civil:
Expand Down
Binary file not shown.
Loading

0 comments on commit 4e8997f

Please sign in to comment.