From dd16f27eda8bfc8ab0e51626632d6596abb5c8b9 Mon Sep 17 00:00:00 2001 From: vasudevganesanhmcts <100689363+vasudevganesanhmcts@users.noreply.github.com> Date: Fri, 11 Mar 2022 08:35:07 +0000 Subject: [PATCH] added pull latest camunda files branch - updated jenkins cnp to use the latest sh --- Jenkinsfile_CNP | 3 ++- bin/pull-latest-camunda-files.sh | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 bin/pull-latest-camunda-files.sh diff --git a/Jenkinsfile_CNP b/Jenkinsfile_CNP index 26144c439..baafed9a4 100644 --- a/Jenkinsfile_CNP +++ b/Jenkinsfile_CNP @@ -7,6 +7,7 @@ import uk.gov.hmcts.contino.AppPipelineDsl def type = "java" def product = "civil" def component = "general-apps-ccd-definition" +def camundaBranch = "master" AppPipelineConfig pipelineConf static Map secret(String secretName, String envVariable) { @@ -83,7 +84,7 @@ withPipeline(type, product, component) { ./bin/pull-latest-release-asset.sh civil-camunda-bpmn-definition civil-camunda-bpmn-definition.zip ./bin/import-ccd-definition.sh "-e *-prod.json,*-nonprod.json,*LRspec.json" ./bin/import-general-apps-ccd-definition.sh "-e *-prod.json,*-nonprod.json,*LRspec.json" - ./bin/import-bpmn-diagram.sh . + ./bin/pull-latest-camunda-files.sh ${camundaBranch} """ env.URL="https://xui-civil-general-apps-ccd-definition-pr-${CHANGE_ID}.service.core-compute-preview.internal" env.CIVIL_SERVICE_URL="http://civil-service-civil-general-apps-ccd-definition-pr-${CHANGE_ID}.service.core-compute-preview.internal" diff --git a/bin/pull-latest-camunda-files.sh b/bin/pull-latest-camunda-files.sh new file mode 100644 index 000000000..603cc47fa --- /dev/null +++ b/bin/pull-latest-camunda-files.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +branchName=$1 + +#Checkout specific branch pf civil camunda bpmn definition +git clone https://github.com/hmcts/civil-camunda-bpmn-definition.git +cd civil-camunda-bpmn-definition + +echo "Switch to ${branchName} branch on civil-camunda-bpmn-definition" +git checkout ${branchName} +cd .. + +#Copy camunda folder to civil-ccd-def which contians bpmn files +cp -r ./civil-camunda-bpmn-definition/src/main/resources/camunda . +rm -rf ./civil-camunda-bpmn-definition + +#upload bpmn files to environment +./bin/import-bpmn-diagram.sh .