Skip to content

Commit

Permalink
Merge pull request #86 from UCSF-IGHS/dev
Browse files Browse the repository at this point in the history
Dev -> Working
  • Loading branch information
alaboso authored Aug 24, 2023
2 parents 3e357fc + 623ec37 commit 72227f6
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 0 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/ohri-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,70 @@ jobs:
cache-to: type=gha,mode=max
- name: Save image digest
run: echo "::set-output name=image::${{ steps.build-and-push.output.digest }}"

dev_server_status:
if: github.ref == 'refs/heads/dev-deploy'
runs-on: ubuntu-latest

steps:
- name: Wait for 5 minutos - Let Images reflect on Docker Hub
run: sleep 300
- name: Checkout repository
uses: actions/checkout@v3

- name: Copy files to /home/runner/
run: |
ls -la -t
cp -r $GITHUB_WORKSPACE/.ssh/ /home/runner/
- name: List contents of /home/runner/
run: ls -la /home/runner/

- name: webfactory/ssh-agent
uses: webfactory/ssh-agent@v0.8.0
with:
ssh-private-key: ${{ secrets.LL_SSH_PRIVATE_KEY }}

- name: Check SSH to remote OHRI Dev status
run: |
ssh-keygen -R 172.19.0.16
dev_server_connection_dev:
runs-on: ubuntu-latest
needs: dev_server_status
steps:
- name: SSH to remote OHRI Dev server
run: |
ssh -o StrictHostKeyChecking=no -T llemos@172.19.0.16 -p 2216 -J llemos@20.172.182.46 -p 2202
ls -la -t && \
cd /opt && \
ls -la -t
dev_deploy:
runs-on: ubuntu-latest
needs: dev_server_status

if: (github.event_name == 'push' || github.event.pull_request.merged)

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: webfactory/ssh-agent
uses: webfactory/ssh-agent@v0.8.0

with:
ssh-private-key: ${{ secrets.LL_SSH_PRIVATE_KEY }}

- name: SSH to remote OHRI Dev server via jump host
run: |
ssh -p 2216 \
-o "UserKnownHostsFile=/dev/null" \
-o "StrictHostKeyChecking=no" \
-o "ProxyCommand=ssh -o StrictHostKeyChecking=no -W %h:%p llemos@20.172.182.46 -p 2202" \
llemos@172.19.0.16 "\
cd /opt && \
docker compose -f docker-compose-ohri-dev.yml pull && \
docker compose -f docker-compose-ohri-dev.yml stop && \
docker compose -f docker-compose-ohri-dev.yml up -d"
6 changes: 6 additions & 0 deletions frontend/ohri-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@
"@ohri/openmrs-esm-ohri-pmtct": {
"identifiers": {
"preferredIdentifierSource": "8549f706-7e85-4c1d-9424-217d50a2988b"
},
"encounterTypes": {
"antenatal": "677d1a80-dbbe-4399-be34-aa7f54f11405",
"laborAndDelivery": "6dc5308d-27c9-4d49-b16f-2c5e3c759757",
"infantPostnatal": "af1f1b24-d2e8-4282-b308-0bf79b365584",
"motherPostnatal": "269bcc7f-04f8-4ddc-883d-7a3a0d569aad"
}
}
}

0 comments on commit 72227f6

Please sign in to comment.