From 17bc77cd41bd7172287db29daed51352d6e4b119 Mon Sep 17 00:00:00 2001 From: Siva Reddy Date: Mon, 20 Feb 2023 14:28:00 +0530 Subject: [PATCH] Siva Reddy | BS-42 | deployment to SNOMED Environment (#183) --- .github/workflows/build_publish.yml | 22 +++++++++++++++++++++- admin/pom.xml | 2 +- bahmnicore-ui/pom.xml | 2 +- openmrs-elis-atomfeed-client-omod/pom.xml | 2 +- 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_publish.yml b/.github/workflows/build_publish.yml index 0d65180b02..f6cba6c2cf 100644 --- a/.github/workflows/build_publish.yml +++ b/.github/workflows/build_publish.yml @@ -1,7 +1,7 @@ name: Build and Publish package on: push: - branches: [ master ] + branches: [ snomed-master ] workflow_dispatch: jobs: @@ -37,3 +37,23 @@ jobs: NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }} NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} + trigger: + name: Trigger Deployment Workflow in Distro Bahmni + needs: + - build-publish-package + runs-on: ubuntu-latest + env: + ORG_NAME: Bahmni + REPOSITORY_NAME: openmrs-distro-bahmni + ENVIRONMENT: dev + steps: + - name: Create workflow_dispatch + run: | + trigger_result=$(curl -s -o trigger_response.txt -w "%{http_code}" -X POST -H "Accept: application/vnd.github.v3+json" -H 'authorization: Bearer ${{ secrets.BAHMNI_PAT }}' https://api.github.com/repos/${ORG_NAME}/${REPOSITORY_NAME}/actions/workflows/build_publish_openmrs.yml/dispatches -d '{"ref":"snomed-master","inputs":{}') + if [ $trigger_result == 204 ];then + echo "Trigger to $ORG_NAME/$REPOSITORY_NAME Success" + else + echo "Trigger to $ORG_NAME/$REPOSITORY_NAME Failed" + cat trigger_response.txt + exit 1 + fi diff --git a/admin/pom.xml b/admin/pom.xml index 66185a5bf6..9240daeb73 100644 --- a/admin/pom.xml +++ b/admin/pom.xml @@ -104,7 +104,7 @@ org.bahmni.module - bahmnicore-api + bahmnicore-ts-api ${project.parent.version} jar diff --git a/bahmnicore-ui/pom.xml b/bahmnicore-ui/pom.xml index c43c0c1438..20fce799bf 100644 --- a/bahmnicore-ui/pom.xml +++ b/bahmnicore-ui/pom.xml @@ -69,7 +69,7 @@ org.bahmni.module - bahmnicore-api + bahmnicore-ts-api ${project.version} diff --git a/openmrs-elis-atomfeed-client-omod/pom.xml b/openmrs-elis-atomfeed-client-omod/pom.xml index bf1ac4e8b1..c707bd661f 100644 --- a/openmrs-elis-atomfeed-client-omod/pom.xml +++ b/openmrs-elis-atomfeed-client-omod/pom.xml @@ -234,7 +234,7 @@ org.bahmni.module - bahmnicore-api + bahmnicore-ts-api ${project.version} provided