Skip to content

Commit

Permalink
Update cicd_process.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Murithijoshua authored Aug 9, 2024
1 parent 6c20e72 commit 3f80dde
Showing 1 changed file with 32 additions and 32 deletions.
64 changes: 32 additions & 32 deletions .github/workflows/cicd_process.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
name: deploy to prod 8600
on:
push:
branches: [ master, 2.x ]
branches: [ master]
jobs:
build:
name: deploying to 2.x instance
if: github.ref == 'refs/heads/2.x'
runs-on: ubuntu-latest
steps:
- name: executing remote connection
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.CICD_SECRET }}
port: ${{ secrets.PORT }}
command_timeout: 200m
script: |
cd /apps/github-workflows/kenyaemr-modules/
sudo rm -rf openmrs-module-kenyaemr-machine-learning
sudo mkdir openmrs-module-kenyaemr-machine-learning
sudo chown -R cicd2:cicd2 openmrs-module-kenyaemr-machine-learning
cd openmrs-module-kenyaemr-machine-learning
git config --global --add safe.directory /apps/github-workflows/kenyaemr-modules/openmrs-module-kenyaemr-machine-learning
git clone -b 2.x https://github.com/palladiumkenya/openmrs-module-kenyaemr-machine-learning.git .
sudo chown -R cicd2:cicd2 /apps/github-workflows/kenyaemr-modules/openmrs-module-kenyaemr-machine-learning
git status
mvn clean install -DskipTests
sudo rm -rf /var/lib/OpenMRS/modules/kenyaemrml-*.omod
sudo cp /apps/github-workflows/kenyaemr-modules/openmrs-module-kenyaemr-machine-learning/omod/target/kenyaemrml-*.omod /var/lib/OpenMRS/modules/
sudo chown -R tomcat:tomcat /var/lib/OpenMRS/modules/
sudo chmod +r /var/lib/OpenMRS/modules/*.omod
sudo chmod 755 /var/lib/OpenMRS/modules/*.omod
sudo systemctl stop tomcat
sudo systemctl start tomcat
# build:
# name: deploying to 2.x instance
# if: github.ref == 'refs/heads/2.x'
# runs-on: ubuntu-latest
# steps:
# - name: executing remote connection
# uses: appleboy/ssh-action@master
# with:
# host: ${{ secrets.HOST }}
# username: ${{ secrets.USERNAME }}
# key: ${{ secrets.CICD_SECRET }}
# port: ${{ secrets.PORT }}
# command_timeout: 200m
# script: |
# cd /apps/github-workflows/kenyaemr-modules/
# sudo rm -rf openmrs-module-kenyaemr-machine-learning
# sudo mkdir openmrs-module-kenyaemr-machine-learning
# sudo chown -R cicd2:cicd2 openmrs-module-kenyaemr-machine-learning
# cd openmrs-module-kenyaemr-machine-learning
# git config --global --add safe.directory /apps/github-workflows/kenyaemr-modules/openmrs-module-kenyaemr-machine-learning
# git clone -b 2.x https://github.com/palladiumkenya/openmrs-module-kenyaemr-machine-learning.git .
# sudo chown -R cicd2:cicd2 /apps/github-workflows/kenyaemr-modules/openmrs-module-kenyaemr-machine-learning
# git status
# mvn clean install -DskipTests
# sudo rm -rf /var/lib/OpenMRS/modules/kenyaemrml-*.omod
# sudo cp /apps/github-workflows/kenyaemr-modules/openmrs-module-kenyaemr-machine-learning/omod/target/kenyaemrml-*.omod /var/lib/OpenMRS/modules/
# sudo chown -R tomcat:tomcat /var/lib/OpenMRS/modules/
# sudo chmod +r /var/lib/OpenMRS/modules/*.omod
# sudo chmod 755 /var/lib/OpenMRS/modules/*.omod
# sudo systemctl stop tomcat
# sudo systemctl start tomcat
dev_server_deployment:
name: deploying to 3.x dev instance
if: github.ref == 'refs/heads/master'
Expand Down

0 comments on commit 3f80dde

Please sign in to comment.