-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feat/CIV-15612
- Loading branch information
Showing
184 changed files
with
8,826 additions
and
2,190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Oops, something went wrong.