From 9552d9be74cf374412520423e135fedd89561c37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D8=B4=D8=B1=D9=83=D8=A9=20=D8=AE=D8=A8=D9=8A=D8=B1=20?= =?UTF-8?q?=D8=A7=D9=84=D9=85=D8=AD=D8=AF=D9=88=D8=AF=D8=A9?= Date: Mon, 24 Jun 2024 13:50:30 +0300 Subject: [PATCH 1/9] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8b10e6960..6864725ce 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ -# odex25-standard-moduless +# odex25-standard-modules This Repo contains general standard modules for all projects. From a1bd323a518cf6ddc05b0c9d0f8bfd2e09cb4f0c Mon Sep 17 00:00:00 2001 From: expert Date: Mon, 24 Jun 2024 15:07:47 +0300 Subject: [PATCH 2/9] Add github actions file and CODEOWNER --- .github/workflows/ensan-project.yml | 45 ++++++++++ .gitignore | 128 ++++++++++++++++++++++++++++ CODEOWNERS | 2 + scripts/pull_code.sh | 34 ++++++++ 4 files changed, 209 insertions(+) create mode 100644 .github/workflows/ensan-project.yml create mode 100644 .gitignore create mode 100644 CODEOWNERS create mode 100644 scripts/pull_code.sh diff --git a/.github/workflows/ensan-project.yml b/.github/workflows/ensan-project.yml new file mode 100644 index 000000000..db2b23a7e --- /dev/null +++ b/.github/workflows/ensan-project.yml @@ -0,0 +1,45 @@ +name: Ensan Project - Pull Code + +on: + push: + branches: + - test + - preprod + workflow_dispatch: + + +jobs: + deploy_master_server: + name: Deploy to Master + runs-on: ensan-client-project-runner + if: github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/master' + steps: + - name: Checkout And Restart Project + run: | + echo "** [INFO] Running on branch --> ${{ github.ref }}" + + sudo chmod +x ${{ secrets.ENSAN_PROJECT_PATH }}/master/standard/scripts/pull_code.sh + sudo ${{ secrets.ENSAN_PROJECT_PATH }}/master/standard/scripts/pull_code.sh ${{ secrets.ENSAN_PROJECT_USER }} ${{ secrets.ENSAN_PROJECT_PATH }} standard ${{ secrets.ENSAN_MASTER_SERVICE }} master + + deploy_preprod_server: + name: Deploy to Preprod + runs-on: app-server-runner + if: github.ref == 'refs/heads/preprod' + steps: + - name: Checkout And Restart Project + run: | + echo "** [INFO] Running on branch --> ${{ github.ref }}" + + sudo chmod +x ${{ secrets.ENSAN_APP_PROJECT_PATH }}/preprod/standard/scripts/pull_code.sh + sudo ${{ secrets.ENSAN_APP_PROJECT_PATH }}/preprod/standard/scripts/pull_code.sh ${{ secrets.ENSAN_APP_PROJECT_USER }} ${{ secrets.ENSAN_APP_PROJECT_PATH }} standard ${{ secrets.ENSAN_PREPROD_SERVICE }} preprod + + deploy_test_server: + name: Deploy to Test + runs-on: app-server-runner + if: github.ref == 'refs/heads/test' + steps: + - name: Checkout And Restart Project + run: | + echo "** [INFO] Running on branch --> ${{ github.ref }}" + sudo chmod +x ${{ secrets.ENSAN_APP_PROJECT_PATH }}/test/standard/scripts/pull_code.sh + sudo ${{ secrets.ENSAN_APP_PROJECT_PATH }}/test/standard/scripts/pull_code.sh ${{ secrets.ENSAN_APP_PROJECT_USER }} ${{ secrets.ENSAN_APP_PROJECT_PATH }} standard ${{ secrets.ENSAN_TEST_SERVICE }} test diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..e3695b424 --- /dev/null +++ b/.gitignore @@ -0,0 +1,128 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +parts/ +sdist/ +wheels/ +pip-wheel-metadata/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +.python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + + + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# github action +.github/workflows/*yaml diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 000000000..8bc336739 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1,2 @@ +# This is a CODEOWNERS file managed by Terraform +* @moutazmuhammad @ahmadaking @ronozoro @hasan-exp @Abubaker-Altaib @AbuzarExp \ No newline at end of file diff --git a/scripts/pull_code.sh b/scripts/pull_code.sh new file mode 100644 index 000000000..e1972757f --- /dev/null +++ b/scripts/pull_code.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# Author: Moutaz Muhammad + +set -euo pipefail + +# Validate input parameters +if [ "$#" -lt 5 ]; then + echo "** [ERROR] Usage: $0 " + exit 1 +fi + +PROJECT_USER="$1" +PROJECT_PATH="$2" +REPO="$3" +PROJECT_SERVICE="$4" +BRANCH="$5" + +# Stash changes before pulling +sudo -u "$PROJECT_USER" bash -c "cd '$PROJECT_PATH/$BRANCH/$REPO' && git stash && git stash clear && git pull origin '$BRANCH'" +if [ $? -eq 0 ]; then + echo "** [INFO] Git pull origin $BRANCH command executed successfully." +else + echo "** [ERROR] Git pull origin $BRANCH command failed." + exit 1 +fi + +# Restart the project service +sudo systemctl restart "$PROJECT_SERVICE" +if [ $? -eq 0 ]; then + echo "** [INFO] $BRANCH service has been restarted." +else + echo "** [ERROR] Failed to restart $BRANCH service." + exit 1 +fi \ No newline at end of file From e5c6686e0b42d2c9b66be8fd14858b40889b02a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D8=B4=D8=B1=D9=83=D8=A9=20=D8=AE=D8=A8=D9=8A=D8=B1=20?= =?UTF-8?q?=D8=A7=D9=84=D9=85=D8=AD=D8=AF=D9=88=D8=AF=D8=A9?= Date: Mon, 24 Jun 2024 15:59:17 +0300 Subject: [PATCH 3/9] Create helpdesk-project.yml --- .github/workflows/helpdesk-project.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/workflows/helpdesk-project.yml diff --git a/.github/workflows/helpdesk-project.yml b/.github/workflows/helpdesk-project.yml new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/.github/workflows/helpdesk-project.yml @@ -0,0 +1 @@ + From bc94171586d397132f13944b0e9e1c5d98a19021 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D8=B4=D8=B1=D9=83=D8=A9=20=D8=AE=D8=A8=D9=8A=D8=B1=20?= =?UTF-8?q?=D8=A7=D9=84=D9=85=D8=AD=D8=AF=D9=88=D8=AF=D8=A9?= Date: Mon, 24 Jun 2024 16:35:29 +0300 Subject: [PATCH 4/9] Update helpdesk-project.yml --- .github/workflows/helpdesk-project.yml | 82 ++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/.github/workflows/helpdesk-project.yml b/.github/workflows/helpdesk-project.yml index 8b1378917..352d4dea0 100644 --- a/.github/workflows/helpdesk-project.yml +++ b/.github/workflows/helpdesk-project.yml @@ -1 +1,83 @@ +name: Helpdesk Project - Pull Code +on: + push: + branches: + - dev_odex-event + - dev_odex25_accounting + - dev_odex25_base + - dev_odex25_dms + - dev_odex25_fleet + - dev_odex25_helpdesk + - dev_odex25_hr + - dev_odex25_inventory + - dev_odex25_maintenance + - dev_odex25_mobile + - dev_odex25_pos + - dev_odex25_project + - dev_odex25_purchase + - dev_odex25_realstate + - dev_odex25_sales + - dev_odex25_survey + - dev_odex25_transactions + - dev_odex25_website + - dev_openeducat_erp-14.0.1.0 + - preprod_odex-event + - preprod_odex25_accounting + - preprod_odex25_base + - preprod_odex25_dms + - preprod_odex25_fleet + - preprod_odex25_helpdesk + - preprod_odex25_hr + - preprod_odex25_inventory + - preprod_odex25_maintenance + - preprod_odex25_mobile + - preprod_odex25_pos + - preprod_odex25_project + - preprod_odex25_purchase + - preprod_odex25_realstate + - preprod_odex25_sales + - preprod_odex25_survey + - preprod_odex25_transactions + - preprod_odex25_website + - preprod_openeducat_erp-14.0.1.0 + + workflow_dispatch: + + +jobs: + deploy_master_server: + name: Deploy to Master + runs-on: helpdesk-client-project-runner + if: github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/master_odex-event' || github.ref == 'refs/heads/master_odex25_accounting' || github.ref == 'refs/heads/master_odex25_base' || github.ref == 'refs/heads/master_odex25_dms' || github.ref == 'refs/heads/master_odex25_fleet' || github.ref == 'refs/heads/master_odex25_helpdesk' || github.ref == 'refs/heads/master_odex25_hr' || github.ref == 'refs/heads/master_odex25_inventory' || github.ref == 'refs/heads/master_odex25_maintenance' || github.ref == 'refs/heads/master_odex25_mobile' || github.ref == 'refs/heads/master_odex25_pos' || github.ref == 'refs/heads/master_odex25_project' || github.ref == 'refs/heads/master_odex25_purchase' || github.ref == 'refs/heads/master_odex25_realstate' || github.ref == 'refs/heads/master_odex25_sales' || github.ref == 'refs/heads/master_odex25_survey' || github.ref == 'refs/heads/master_odex25_transactions' || github.ref == 'refs/heads/master_odex25_website' || github.ref == 'refs/heads/master_openeducat_erp-14.0.1.0' + + steps: + - name: Checkout And Restart Project + run: | + echo "** [INFO] Running on branch --> ${{ github.ref }}" + + sudo chmod +x ${{ secrets.HELPDESK_PROJECT_PATH }}/scripts/pull_code.sh + sudo ${{ secrets.HELPDESK_PROJECT_PATH }}/scripts/pull_code.sh ${{ secrets.HELPDESK_PROJECT_USER }} ${{ secrets.HELPDESK_PROJECT_PATH }} ${{ secrets.HELPDESK_MASTER_SERVICE }} master ${GITHUB_REF#refs/heads/} + + deploy_preprod_server: + name: Deploy to Preprod + runs-on: app-server-runner + if: github.ref == 'refs/heads/preprod_odex-event' || github.ref == 'refs/heads/preprod_odex25_accounting' || github.ref == 'refs/heads/preprod_odex25_base' || github.ref == 'refs/heads/preprod_odex25_dms' || github.ref == 'refs/heads/preprod_odex25_fleet' || github.ref == 'refs/heads/preprod_odex25_helpdesk' || github.ref == 'refs/heads/preprod_odex25_hr' || github.ref == 'refs/heads/preprod_odex25_inventory' || github.ref == 'refs/heads/preprod_odex25_maintenance' || github.ref == 'refs/heads/preprod_odex25_mobile' || github.ref == 'refs/heads/preprod_odex25_pos' || github.ref == 'refs/heads/preprod_odex25_project' || github.ref == 'refs/heads/preprod_odex25_purchase' || github.ref == 'refs/heads/preprod_odex25_realstate' || github.ref == 'refs/heads/preprod_odex25_sales' || github.ref == 'refs/heads/preprod_odex25_survey' || github.ref == 'refs/heads/preprod_odex25_transactions' || github.ref == 'refs/heads/preprod_odex25_website' || github.ref == 'refs/heads/preprod_openeducat_erp-14.0.1.0' + steps: + - name: Checkout And Restart Project + run: | + echo "** [INFO] Running on branch --> ${{ github.ref }}" + + sudo chmod +x ${{ secrets.HELPDESK_PROJECT_PATH }}/scripts/pull_code.sh + sudo ${{ secrets.HELPDESK_PROJECT_PATH }}/scripts/pull_code.sh ${{ secrets.HELPDESK_PROJECT_USER }} ${{ secrets.HELPDESK_PROJECT_PATH }} ${{ secrets.HELPDESK_PREPROD_SERVICE }} preprod ${GITHUB_REF#refs/heads/} + + deploy_test_server: + name: Deploy to Test + runs-on: app-server-runner + if: github.ref == 'refs/heads/dev_odex-event' || github.ref == 'refs/heads/dev_odex25_accounting' || github.ref == 'refs/heads/dev_odex25_base' || github.ref == 'refs/heads/dev_odex25_dms' || github.ref == 'refs/heads/dev_odex25_fleet' || github.ref == 'refs/heads/dev_odex25_helpdesk' || github.ref == 'refs/heads/dev_odex25_hr' || github.ref == 'refs/heads/dev_odex25_inventory' || github.ref == 'refs/heads/dev_odex25_maintenance' || github.ref == 'refs/heads/dev_odex25_mobile' || github.ref == 'refs/heads/dev_odex25_pos' || github.ref == 'refs/heads/dev_odex25_project' || github.ref == 'refs/heads/dev_odex25_purchase' || github.ref == 'refs/heads/dev_odex25_realstate' || github.ref == 'refs/heads/dev_odex25_sales' || github.ref == 'refs/heads/dev_odex25_survey' || github.ref == 'refs/heads/dev_odex25_transactions' || github.ref == 'refs/heads/dev_odex25_website' || github.ref == 'refs/heads/preprod_openeducat_erp-14.0.1.0' + steps: + - name: Checkout And Restart Project + run: | + echo "** [INFO] Running on branch --> ${{ github.ref }}" + sudo chmod +x ${{ secrets.HELPDESK_PROJECT_PATH }}/scripts/pull_code.sh + sudo ${{ secrets.HELPDESK_PROJECT_PATH }}/scripts/pull_code.sh ${{ secrets.HELPDESK_PROJECT_USER }} ${{ secrets.HELPDESK_PROJECT_PATH }} ${{ secrets.HELPDESK_TEST_SERVICE }} test ${GITHUB_REF#refs/heads/} From fb5184bc506ebfe90a107f07878bd4f1028dffbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D8=B4=D8=B1=D9=83=D8=A9=20=D8=AE=D8=A8=D9=8A=D8=B1=20?= =?UTF-8?q?=D8=A7=D9=84=D9=85=D8=AD=D8=AF=D9=88=D8=AF=D8=A9?= Date: Mon, 24 Jun 2024 16:37:17 +0300 Subject: [PATCH 5/9] Update helpdesk-project.yml --- .github/workflows/helpdesk-project.yml | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/.github/workflows/helpdesk-project.yml b/.github/workflows/helpdesk-project.yml index 352d4dea0..97757a0d3 100644 --- a/.github/workflows/helpdesk-project.yml +++ b/.github/workflows/helpdesk-project.yml @@ -49,8 +49,27 @@ jobs: deploy_master_server: name: Deploy to Master runs-on: helpdesk-client-project-runner - if: github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/master_odex-event' || github.ref == 'refs/heads/master_odex25_accounting' || github.ref == 'refs/heads/master_odex25_base' || github.ref == 'refs/heads/master_odex25_dms' || github.ref == 'refs/heads/master_odex25_fleet' || github.ref == 'refs/heads/master_odex25_helpdesk' || github.ref == 'refs/heads/master_odex25_hr' || github.ref == 'refs/heads/master_odex25_inventory' || github.ref == 'refs/heads/master_odex25_maintenance' || github.ref == 'refs/heads/master_odex25_mobile' || github.ref == 'refs/heads/master_odex25_pos' || github.ref == 'refs/heads/master_odex25_project' || github.ref == 'refs/heads/master_odex25_purchase' || github.ref == 'refs/heads/master_odex25_realstate' || github.ref == 'refs/heads/master_odex25_sales' || github.ref == 'refs/heads/master_odex25_survey' || github.ref == 'refs/heads/master_odex25_transactions' || github.ref == 'refs/heads/master_odex25_website' || github.ref == 'refs/heads/master_openeducat_erp-14.0.1.0' - + if: github.event_name == 'workflow_dispatch' && ( + github.ref == 'refs/heads/master_odex-event' || + github.ref == 'refs/heads/master_odex25_accounting' || + github.ref == 'refs/heads/master_odex25_base' || + github.ref == 'refs/heads/master_odex25_dms' || + github.ref == 'refs/heads/master_odex25_fleet' || + github.ref == 'refs/heads/master_odex25_helpdesk' || + github.ref == 'refs/heads/master_odex25_hr' || + github.ref == 'refs/heads/master_odex25_inventory' || + github.ref == 'refs/heads/master_odex25_maintenance' || + github.ref == 'refs/heads/master_odex25_mobile' || + github.ref == 'refs/heads/master_odex25_pos' || + github.ref == 'refs/heads/master_odex25_project' || + github.ref == 'refs/heads/master_odex25_purchase' || + github.ref == 'refs/heads/master_odex25_realstate' || + github.ref == 'refs/heads/master_odex25_sales' || + github.ref == 'refs/heads/master_odex25_survey' || + github.ref == 'refs/heads/master_odex25_transactions' || + github.ref == 'refs/heads/master_odex25_website' || + github.ref == 'refs/heads/master_openeducat_erp-14.0.1.0' + ) steps: - name: Checkout And Restart Project run: | From 67ac158b9b1b0059ee16ee764113757a15ad9933 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D8=B4=D8=B1=D9=83=D8=A9=20=D8=AE=D8=A8=D9=8A=D8=B1=20?= =?UTF-8?q?=D8=A7=D9=84=D9=85=D8=AD=D8=AF=D9=88=D8=AF=D8=A9?= Date: Mon, 24 Jun 2024 16:38:56 +0300 Subject: [PATCH 6/9] Update helpdesk-project.yml --- .github/workflows/helpdesk-project.yml | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/.github/workflows/helpdesk-project.yml b/.github/workflows/helpdesk-project.yml index 97757a0d3..a04c3f42c 100644 --- a/.github/workflows/helpdesk-project.yml +++ b/.github/workflows/helpdesk-project.yml @@ -49,27 +49,7 @@ jobs: deploy_master_server: name: Deploy to Master runs-on: helpdesk-client-project-runner - if: github.event_name == 'workflow_dispatch' && ( - github.ref == 'refs/heads/master_odex-event' || - github.ref == 'refs/heads/master_odex25_accounting' || - github.ref == 'refs/heads/master_odex25_base' || - github.ref == 'refs/heads/master_odex25_dms' || - github.ref == 'refs/heads/master_odex25_fleet' || - github.ref == 'refs/heads/master_odex25_helpdesk' || - github.ref == 'refs/heads/master_odex25_hr' || - github.ref == 'refs/heads/master_odex25_inventory' || - github.ref == 'refs/heads/master_odex25_maintenance' || - github.ref == 'refs/heads/master_odex25_mobile' || - github.ref == 'refs/heads/master_odex25_pos' || - github.ref == 'refs/heads/master_odex25_project' || - github.ref == 'refs/heads/master_odex25_purchase' || - github.ref == 'refs/heads/master_odex25_realstate' || - github.ref == 'refs/heads/master_odex25_sales' || - github.ref == 'refs/heads/master_odex25_survey' || - github.ref == 'refs/heads/master_odex25_transactions' || - github.ref == 'refs/heads/master_odex25_website' || - github.ref == 'refs/heads/master_openeducat_erp-14.0.1.0' - ) + if: github.event_name == 'workflow_dispatch' && (github.ref == 'refs/heads/master_odex-event' || github.ref == 'refs/heads/master_odex25_accounting' || github.ref == 'refs/heads/master_odex25_base' || github.ref == 'refs/heads/master_odex25_dms' || github.ref == 'refs/heads/master_odex25_fleet' || github.ref == 'refs/heads/master_odex25_helpdesk' || github.ref == 'refs/heads/master_odex25_hr' || github.ref == 'refs/heads/master_odex25_inventory' || github.ref == 'refs/heads/master_odex25_maintenance' || github.ref == 'refs/heads/master_odex25_mobile' || github.ref == 'refs/heads/master_odex25_pos' || github.ref == 'refs/heads/master_odex25_project' || github.ref == 'refs/heads/master_odex25_purchase' || github.ref == 'refs/heads/master_odex25_realstate' || github.ref == 'refs/heads/master_odex25_sales' || github.ref == 'refs/heads/master_odex25_survey' || github.ref == 'refs/heads/master_odex25_transactions' || github.ref == 'refs/heads/master_odex25_website' || github.ref == 'refs/heads/master_openeducat_erp-14.0.1.0') steps: - name: Checkout And Restart Project run: | From 8d8d6f28059f76719736f849e8016b9eb27c6fd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D8=B4=D8=B1=D9=83=D8=A9=20=D8=AE=D8=A8=D9=8A=D8=B1=20?= =?UTF-8?q?=D8=A7=D9=84=D9=85=D8=AD=D8=AF=D9=88=D8=AF=D8=A9?= Date: Mon, 24 Jun 2024 16:45:14 +0300 Subject: [PATCH 7/9] Update helpdesk-project.yml --- .github/workflows/helpdesk-project.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/helpdesk-project.yml b/.github/workflows/helpdesk-project.yml index a04c3f42c..2d2bbc507 100644 --- a/.github/workflows/helpdesk-project.yml +++ b/.github/workflows/helpdesk-project.yml @@ -60,7 +60,7 @@ jobs: deploy_preprod_server: name: Deploy to Preprod - runs-on: app-server-runner + runs-on: helpdesk-client-project-runner if: github.ref == 'refs/heads/preprod_odex-event' || github.ref == 'refs/heads/preprod_odex25_accounting' || github.ref == 'refs/heads/preprod_odex25_base' || github.ref == 'refs/heads/preprod_odex25_dms' || github.ref == 'refs/heads/preprod_odex25_fleet' || github.ref == 'refs/heads/preprod_odex25_helpdesk' || github.ref == 'refs/heads/preprod_odex25_hr' || github.ref == 'refs/heads/preprod_odex25_inventory' || github.ref == 'refs/heads/preprod_odex25_maintenance' || github.ref == 'refs/heads/preprod_odex25_mobile' || github.ref == 'refs/heads/preprod_odex25_pos' || github.ref == 'refs/heads/preprod_odex25_project' || github.ref == 'refs/heads/preprod_odex25_purchase' || github.ref == 'refs/heads/preprod_odex25_realstate' || github.ref == 'refs/heads/preprod_odex25_sales' || github.ref == 'refs/heads/preprod_odex25_survey' || github.ref == 'refs/heads/preprod_odex25_transactions' || github.ref == 'refs/heads/preprod_odex25_website' || github.ref == 'refs/heads/preprod_openeducat_erp-14.0.1.0' steps: - name: Checkout And Restart Project @@ -72,7 +72,7 @@ jobs: deploy_test_server: name: Deploy to Test - runs-on: app-server-runner + runs-on: helpdesk-client-project-runner if: github.ref == 'refs/heads/dev_odex-event' || github.ref == 'refs/heads/dev_odex25_accounting' || github.ref == 'refs/heads/dev_odex25_base' || github.ref == 'refs/heads/dev_odex25_dms' || github.ref == 'refs/heads/dev_odex25_fleet' || github.ref == 'refs/heads/dev_odex25_helpdesk' || github.ref == 'refs/heads/dev_odex25_hr' || github.ref == 'refs/heads/dev_odex25_inventory' || github.ref == 'refs/heads/dev_odex25_maintenance' || github.ref == 'refs/heads/dev_odex25_mobile' || github.ref == 'refs/heads/dev_odex25_pos' || github.ref == 'refs/heads/dev_odex25_project' || github.ref == 'refs/heads/dev_odex25_purchase' || github.ref == 'refs/heads/dev_odex25_realstate' || github.ref == 'refs/heads/dev_odex25_sales' || github.ref == 'refs/heads/dev_odex25_survey' || github.ref == 'refs/heads/dev_odex25_transactions' || github.ref == 'refs/heads/dev_odex25_website' || github.ref == 'refs/heads/preprod_openeducat_erp-14.0.1.0' steps: - name: Checkout And Restart Project From 6f99c095036871851a6e0dbf72ce717c8b4bba62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D8=B4=D8=B1=D9=83=D8=A9=20=D8=AE=D8=A8=D9=8A=D8=B1=20?= =?UTF-8?q?=D8=A7=D9=84=D9=85=D8=AD=D8=AF=D9=88=D8=AF=D8=A9?= Date: Mon, 24 Jun 2024 16:53:42 +0300 Subject: [PATCH 8/9] Delete scripts directory --- scripts/pull_code.sh | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 scripts/pull_code.sh diff --git a/scripts/pull_code.sh b/scripts/pull_code.sh deleted file mode 100644 index e1972757f..000000000 --- a/scripts/pull_code.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash -# Author: Moutaz Muhammad - -set -euo pipefail - -# Validate input parameters -if [ "$#" -lt 5 ]; then - echo "** [ERROR] Usage: $0 " - exit 1 -fi - -PROJECT_USER="$1" -PROJECT_PATH="$2" -REPO="$3" -PROJECT_SERVICE="$4" -BRANCH="$5" - -# Stash changes before pulling -sudo -u "$PROJECT_USER" bash -c "cd '$PROJECT_PATH/$BRANCH/$REPO' && git stash && git stash clear && git pull origin '$BRANCH'" -if [ $? -eq 0 ]; then - echo "** [INFO] Git pull origin $BRANCH command executed successfully." -else - echo "** [ERROR] Git pull origin $BRANCH command failed." - exit 1 -fi - -# Restart the project service -sudo systemctl restart "$PROJECT_SERVICE" -if [ $? -eq 0 ]; then - echo "** [INFO] $BRANCH service has been restarted." -else - echo "** [ERROR] Failed to restart $BRANCH service." - exit 1 -fi \ No newline at end of file From 897a7284d5417b6ac584016038b34c321851f9ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D8=B4=D8=B1=D9=83=D8=A9=20=D8=AE=D8=A8=D9=8A=D8=B1=20?= =?UTF-8?q?=D8=A7=D9=84=D9=85=D8=AD=D8=AF=D9=88=D8=AF=D8=A9?= Date: Mon, 24 Jun 2024 16:53:57 +0300 Subject: [PATCH 9/9] Delete CODEOWNERS --- CODEOWNERS | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 CODEOWNERS diff --git a/CODEOWNERS b/CODEOWNERS deleted file mode 100644 index 8bc336739..000000000 --- a/CODEOWNERS +++ /dev/null @@ -1,2 +0,0 @@ -# This is a CODEOWNERS file managed by Terraform -* @moutazmuhammad @ahmadaking @ronozoro @hasan-exp @Abubaker-Altaib @AbuzarExp \ No newline at end of file