Skip to content

Commit

Permalink
Merge branch 'master' into DTSCCI-60
Browse files Browse the repository at this point in the history
  • Loading branch information
Jefex7 authored Apr 17, 2024
2 parents 120a89e + ab84e35 commit 5fb30bc
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 40 deletions.
13 changes: 8 additions & 5 deletions Jenkinsfile_CNP
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ withPipeline(type, product, component) {
eval \$(./bin/variables/load-preview-environment-variables.sh ${CHANGE_ID})
./bin/add-roles.sh
./bin/pull-latest-camunda-files.sh ${camundaBranch}
./bin/import-ccd-definition.sh "-e *-prod.json,*HNL-nonprod.json,*-shuttered.json" ${ccddefbranch}
./bin/pull-latest-ccd-files.sh ${ccddefbranch}
./bin/import-ccd-definition.sh "-e *-prod.json,*HNL-nonprod.json,AuthorisationCaseType-shuttered.json"
"""
}
env.IDAM_API_URL = "https://idam-api.aat.platform.hmcts.net"
Expand Down Expand Up @@ -103,13 +104,15 @@ withPipeline(type, product, component) {
}

before('smoketest:aat') {
sh """
retry (3) {
sh """
eval \$(./bin/variables/load-staging-environment-variables.sh)
./bin/add-roles.sh
./bin/import-ccd-definition.sh "-e *-prod.json,*HNL-nonprod.json,*-shuttered.json" ${ccddefbranch}
./bin/pull-latest-camunda-files.sh ${camundaBranch}
./bin/pull-latest-ccd-files.sh ${ccddefbranch}
./bin/import-ccd-definition.sh "-e *-prod.json,*HNL-nonprod.json,AuthorisationCaseType-shuttered.json"
"""

}
env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
env.IDAM_API_URL = "https://idam-api.aat.platform.hmcts.net"
env.CIVIL_ORCHESTRATOR_SERVICE_URL="https://civil-orchestrator-service-staging.aat.platform.hmcts.net"
Expand All @@ -128,7 +131,7 @@ withPipeline(type, product, component) {
}

onMaster {
env.ENVIRONMENT = "preview"
env.ENVIRONMENT = "aat"
env.YARN_ENABLE_IMMUTABLE_INSTALLS = false
loadVaultSecrets(secrets)
}
Expand Down
26 changes: 0 additions & 26 deletions bin/import-ccd-definition.sh
Original file line number Diff line number Diff line change
@@ -1,33 +1,7 @@
#!/usr/bin/env bash

set -ex

definition_input_dir=$(realpath 'ccd-definition')
definition_output_file="$(realpath ".")/build/ccd-development-config/ccd-civil-dev.xlsx"
params="$@"

params="$1"
branchName="$2"
rm -rf ./civil-ccd-definition

git clone https://github.com/hmcts/civil-ccd-definition.git
cd civil-ccd-definition

echo "Switch to ${branchName} branch on civil-ccd-definition"
git checkout ${branchName}
cd ..

cp -r ./civil-ccd-definition/ccd-definition .
cp -r ./civil-ccd-definition/e2e .
cp -r ./civil-ccd-definition/package.json .
cp -r ./civil-ccd-definition/yarn.lock .
cp -r ./civil-ccd-definition/codecept.conf.js .
echo *

cd civil-ccd-definition
definition_input_dir=$(realpath './ccd-definition')
definition_output_file="$(realpath ".")/ccd-definition/build/ccd-development-config/ccd-civil-dev.xlsx"


./bin/utils/import-ccd-definition.sh "${definition_input_dir}" "${definition_output_file}" "${params}"
cd ..
21 changes: 21 additions & 0 deletions bin/pull-latest-ccd-files.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash

branchName=$1

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

echo "Switch to ${branchName} branch on civil-ccd-definition"
git checkout ${branchName}
cd ..

#Copy ccd definition files to civil-ccd-def which contains ccd def files
cp -r ./civil-ccd-definition/ccd-definition .
cp -r ./civil-ccd-definition/e2e .
cp -r ./civil-ccd-definition/package.json .
cp -r ./civil-ccd-definition/yarn.lock .
cp -r ./civil-ccd-definition/codecept.conf.js .
cp -r ./civil-ccd-definition/saucelabs.conf.js .
echo *
rm -rf ./civil-ccd-definition
7 changes: 4 additions & 3 deletions bin/utils/ccd-import-definition.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ serviceToken=$(${dir}/idam-lease-service-token.sh ccd_gw $(docker run --rm toolb
version="n/a"
newVersion="n/a"

if [[ "${ENVIRONMENT}" == "preview" ]]; then
if [ "${ENVIRONMENT}" == "preview" ] || [ "${ENVIRONMENT}" == "aat" ]; then
version=$(curl --insecure --silent --show-error -X GET \
${CCD_DEFINITION_STORE_API_BASE_URL:-http://localhost:4451}/api/data/case-type/CIVIL/version \
-H "Authorization: Bearer ${userToken}" \
Expand All @@ -33,7 +33,8 @@ uploadResponse=$(curl --insecure --silent -w "\n%{http_code}" --show-error --ma
upload_http_code=$(echo "$uploadResponse" | tail -n1)
upload_response_content=$(echo "$uploadResponse" | sed '$d')

if [ "${ENVIRONMENT}" == "preview" ] && [ "${upload_http_code}" != "201" ]; then
if [ "${ENVIRONMENT}" == "preview" ] || [ "${ENVIRONMENT}" == "aat" ]; then
if [ "${upload_http_code}" != "201" ]; then
echo "Bypassing audit check as on preview - will wait 45s and then verify the version has changed"
sleep 45

Expand All @@ -47,7 +48,7 @@ if [ "${ENVIRONMENT}" == "preview" ] && [ "${upload_http_code}" != "201" ]; then
echo "Version has not changed - the definition was not imported successfully"
exit 1
fi

fi
echo "CCD definition version has changed, definition successfully uploaded"
exit 0
fi
Expand Down
7 changes: 4 additions & 3 deletions charts/civil-orchestrator-service/values.aat.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ civil-service:
image: 'hmctspublic.azurecr.io/civil/service:latest'
imagePullPolicy: Always
ingressHost: civil-orch-civil-service-staging.aat.platform.hmcts.net
devcpuRequests: 500m
devmemoryRequests: 2048Mi
devmemoryLimits: 4096Mi
keyVaults:
civil:
resourceGroup: civil
Expand Down Expand Up @@ -119,9 +122,7 @@ civil-service:
CMC_DB_USERNAME: ${POSTGRES_USER}
CMC_DB_PASSWORD: ${POSTGRES_PASSWORD}
REFERENCE_DATABASE_MIGRATION: true
FEIGN_CLIENT_CONFIG_REMOTERUNTIMESERVICE_URL: http://${SERVICE_NAME}-camunda/engine-rest/
FEIGN_CLIENT_CONFIG_REMOTEEXTERNALTASKSERVICE_URL: http://${SERVICE_NAME}-camunda/engine-rest/
FEIGN_CLIENT_CONFIG_REMOTEREPOSITORYSERVICE_URL: http://${SERVICE_NAME}-camunda/engine-rest/
CAMUNDA_URL: http://${SERVICE_NAME}-camunda/engine-rest/
POLLING_EVENT_EMITTER_ENABLED: false
STITCHING_API_ENABLED: false
DOCUMENT_MANAGEMENT_SECURED: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ civil-service:
image: 'hmctspublic.azurecr.io/civil/service:latest'
imagePullPolicy: Always
ingressHost: civil-service-${SERVICE_FQDN}
devcpuRequests: 500m
devmemoryRequests: 2048Mi
devmemoryLimits: 4096Mi
keyVaults:
civil:
resourceGroup: civil
Expand Down Expand Up @@ -118,9 +121,7 @@ civil-service:
CMC_DB_USERNAME: ${POSTGRES_USER}
CMC_DB_PASSWORD: ${POSTGRES_PASSWORD}
REFERENCE_DATABASE_MIGRATION: true
FEIGN_CLIENT_CONFIG_REMOTERUNTIMESERVICE_URL: http://${SERVICE_NAME}-camunda/engine-rest/
FEIGN_CLIENT_CONFIG_REMOTEEXTERNALTASKSERVICE_URL: http://${SERVICE_NAME}-camunda/engine-rest/
FEIGN_CLIENT_CONFIG_REMOTEREPOSITORYSERVICE_URL: http://${SERVICE_NAME}-camunda/engine-rest/
CAMUNDA_URL: http://${SERVICE_NAME}-camunda/engine-rest/
POLLING_EVENT_EMITTER_ENABLED: false
STITCHING_API_ENABLED: false
DOCUMENT_MANAGEMENT_SECURED: true
Expand Down

0 comments on commit 5fb30bc

Please sign in to comment.