Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
20 changes: 20 additions & 0 deletions .env.ccd.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
PR_NUMBER=${1}

AAC_MANAGE_CASE_ASSIGNMENT_URL=https://manage-case-assignment-civil-ccd-pr-${PR_NUMBER}.preview.platform.hmcts.net
AM_ROLE_ASSIGNMENT_SERVICE_URL=https://am-role-assignment-civil-ccd-pr-${PR_NUMBER}.preview.platform.hmcts.net
CAMUNDA_URL=https://camunda-civil-ccd-pr-${PR_NUMBER}.preview.platform.hmcts.net
CCD_API_GW_URL=https://gateway-civil-ccd-pr-${PR_NUMBER}.preview.platform.hmcts.net
CCD_DATA_STORE_API_URL=https://ccd-data-store-api-civil-ccd-pr-${PR_NUMBER}.preview.platform.hmcts.net
CCD_DEFINITION_STORE_API_URL=https://ccd-definition-store-civil-ccd-pr-${PR_NUMBER}.preview.platform.hmcts.net
CDAM_URL=https://ccd-case-document-am-api-civil-ccd-pr-${PR_NUMBER}.preview.platform.hmcts.net
CIVIL_SERVICE_URL=https://civil-ccd-pr-${PR_NUMBER}.preview.platform.hmcts.net
EM_CCDORC_URL=https://em-ccdorc-civil-ccd-pr-${PR_NUMBER}.preview.platform.hmcts.net
EM_STITCHING_URL=https://em-stitching-civil-ccd-pr-${PR_NUMBER}.preview.platform.hmcts.net
GENERAL_APPLICATIONS_URL=https://ga-civil-ccd-pr-${PR_NUMBER}.preview.platform.hmcts.net
TEST_URL=https://civil-citizen-ui-anirudha-pr-1.preview.platform.hmcts.net
XUI_WEBAPP_URL=https://xui-civil-ccd-pr-${PR_NUMBER}.preview.platform.hmcts.net
JAVA_URL=https://civil-ccd-pr-${PR_NUMBER}.preview.platform.hmcts.net
GA_URL=https://ga-civil-ccd-pr-${PR_NUMBER}.preview.platform.hmcts.net
CCD_DEF_CASE_SERVICE_BASE_URL=https://civil-ccd-pr-${PR_NUMBER}.preview.platform.hmcts.net
CCD_DEF_GEN_APP_SERVICE_BASE_URL=https://ga-civil-ccd-pr-${PR_NUMBER}.preview.platform.hmcts.net
CCD_DEF_AAC_URL=https://manage-case-assignment-civil-ccd-pr-${PR_NUMBER}.preview.platform.hmcts.net
20 changes: 20 additions & 0 deletions .env.cui.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
PR_NUMBER=${1}

AAC_MANAGE_CASE_ASSIGNMENT_URL=https://manage-case-assignment-civil-citizen-ui-pr-${PR_NUMBER}.preview.platform.hmcts.net
AM_ROLE_ASSIGNMENT_SERVICE_URL=https://am-role-assignment-civil-citizen-ui-pr-${PR_NUMBER}.preview.platform.hmcts.net
CAMUNDA_URL=https://camunda-civil-citizen-ui-pr-${PR_NUMBER}.preview.platform.hmcts.net
CCD_API_GW_URL=https://gateway-civil-citizen-ui-pr-${PR_NUMBER}.preview.platform.hmcts.net
CCD_DATA_STORE_API_URL=https://ccd-data-store-api-civil-citizen-ui-pr-${PR_NUMBER}.preview.platform.hmcts.net
CCD_DEFINITION_STORE_API_URL=https://ccd-definition-store-civil-citizen-ui-pr-${PR_NUMBER}.preview.platform.hmcts.net
CDAM_URL=https://ccd-case-document-am-api-civil-citizen-ui-pr-${PR_NUMBER}.preview.platform.hmcts.net
CIVIL_SERVICE_URL=https://civil-citizen-ui-pr-${PR_NUMBER}-civil-service.preview.platform.hmcts.net
EM_CCDORC_URL=https://em-ccdorc-civil-citizen-ui-pr-${PR_NUMBER}.preview.platform.hmcts.net
EM_STITCHING_URL=https://em-stitching-civil-citizen-ui-pr-${PR_NUMBER}.preview.platform.hmcts.net
GENERAL_APPLICATIONS_URL=https://civil-citizen-ui-pr-${PR_NUMBER}-general-applications.preview.platform.hmcts.net
TEST_URL=https://civil-citizen-ui-pr-${PR_NUMBER}.preview.platform.hmcts.net
XUI_WEBAPP_URL=https://xui-civil-citizen-ui-pr-${PR_NUMBER}.preview.platform.hmcts.net
JAVA_URL=https://civil-citizen-ui-pr-${PR_NUMBER}-civil-service.preview.platform.hmcts.net
GA_URL=https://civil-citizen-ui-pr-${PR_NUMBER}-general-applications.preview.platform.hmcts.net
CCD_DEF_CASE_SERVICE_BASE_URL=https://civil-citizen-ui-pr-${PR_NUMBER}-civil-service.preview.platform.hmcts.net
CCD_DEF_GEN_APP_SERVICE_BASE_URL=https://civil-citizen-ui-pr-${PR_NUMBER}-general-applications.preview.platform.hmcts.net
CCD_DEF_AAC_URL=https://manage-case-assignment-civil-citizen-ui-pr-${PR_NUMBER}.preview.platform.hmcts.net
33 changes: 33 additions & 0 deletions bin/import-local-definition-to-preview.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env bash

set -eu
repoType=${1:-cui}
prNumber=${2:-'7233'}


# Ensure dependencies have execution permissions
chmod +x ./bin/variables/load-dev-user-preview-environment-variables.sh
chmod +x ./bin/utils/ccd-import-definition.sh
chmod +x ./bin/utils/idam-lease-user-token.sh
chmod +x ./bin/utils/idam-lease-service-token.sh

if [[ "${repoType}" == 'ccd' ]]; then
echo "Loading environment variables repoType : (${repoType}) prNumber: ${prNumber}";
source .env.ccd.local "${prNumber}"
fi

if [[ "${repoType}" == 'cui' ]]; then
echo "Loading environment variables repoType : (${repoType}) prNumber: ${prNumber}";
source .env.cui.local "${prNumber}"
fi

# Load environment variables for the preview environment
source ./bin/variables/load-dev-user-local-environment-variables.sh

export CCD_DEF_VERSION=""

# Generate local CCD definition
source ./bin/build-release-ccd-definition.sh local

# Import the local CCD definition
./bin/utils/ccd-import-definition.sh build/ccd-release-config/civil-ccd-local.xlsx
29 changes: 29 additions & 0 deletions bin/variables/load-dev-user-local-environment-variables.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env bash

set -eu
user=$(whoami)
echo "User directory: /Users/$user"

export ENVIRONMENT=preview
# urls
export URL=$XUI_WEBAPP_URL
export CIVIL_SERVICE_URL=$JAVA_URL
export SERVICE_AUTH_PROVIDER_API_BASE_URL="http://rpe-service-auth-provider-aat.service.core-compute-aat.internal"
export IDAM_API_BASE_URL="https://idam-api.aat.platform.hmcts.net"
export IDAM_API_URL="https://idam-api.aat.platform.hmcts.net"
export CCD_IDAM_REDIRECT_URL="https://ccd-case-management-web-aat.service.core-compute-aat.internal/oauth2redirect"
export CCD_DEFINITION_STORE_API_BASE_URL=${CCD_DEFINITION_STORE_API_URL:-"http://ccd-definition-store-api-aat.service.core-compute-aat.internal"}
export CAMUNDA_BASE_URL=$CAMUNDA_URL
export DEFINITION_IMPORTER_USERNAME=$(az keyvault secret show --vault-name civil-aat --name ccd-importer-username --query value -o tsv)
export DEFINITION_IMPORTER_PASSWORD=$(az keyvault secret show --vault-name civil-aat --name ccd-importer-password --query value -o tsv)
export CCD_CONFIGURER_IMPORTER_USERNAME=$DEFINITION_IMPORTER_USERNAME
export CCD_CONFIGURER_IMPORTER_PASSWORD=$DEFINITION_IMPORTER_PASSWORD
export CCD_API_GATEWAY_IDAM_CLIENT_SECRET=$(az keyvault secret show --vault-name ccd-aat --name ccd-api-gateway-oauth2-client-secret --query value -o tsv)
export CCD_API_GATEWAY_S2S_SECRET=$(az keyvault secret show --vault-name s2s-aat --name microservicekey-ccd-gw --query value -o tsv)
export S2S_SECRET=$(az keyvault secret show --vault-name civil-aat --name microservicekey-civil-service --query value -o tsv)
export HEALTH_WORK_ALLOCATION_TASK_API=TBD
# definition placeholders
export CCD_DEF_CASE_SERVICE_BASE_URL=$JAVA_URL
export CCD_DEF_GEN_APP_SERVICE_BASE_URL=$GA_URL
export CCD_DEF_VERSION="-${user}-1"
export ROLE_ASSIGNMENT_URL=$AM_ROLE_ASSIGNMENT_SERVICE_URL
Original file line number Diff line number Diff line change
Expand Up @@ -2341,7 +2341,8 @@
"AccessControl": [
{
"UserRoles": [
"CITIZEN-CLAIMANT-PROFILE"
"CITIZEN-CLAIMANT-PROFILE",
"CITIZEN-DEFENDANT-PROFILE"
],
"CRUD": "CRUD"
}
Expand Down