From 16131b8257f3c9370fecf91e3f29924d923cbc6a Mon Sep 17 00:00:00 2001 From: mhmdksh Date: Thu, 9 May 2024 12:34:23 +0300 Subject: [PATCH] Updating the CI-CD Pipelines --- .github/workflows/pipeline-develop.yml | 5 ++--- .github/workflows/start-devouch.yml | 4 ++-- .github/workflows/stop-devouch.yml | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pipeline-develop.yml b/.github/workflows/pipeline-develop.yml index 4a85e50..7786ad5 100644 --- a/.github/workflows/pipeline-develop.yml +++ b/.github/workflows/pipeline-develop.yml @@ -16,13 +16,12 @@ jobs: username: ${{ secrets.STAGING_USERNAME }} key: ${{ secrets.STAGING_PRIVATE_KEY }} port: 22 - script: | + script: | cd $HOME/DeVouch-BE git checkout develop git checkout -- . git pull docker compose stop devouch squid-db docker compose rm -v -f devouch squid-db - docker volume prune -f + docker rmi $(docker images | grep 'devouch' | awk '{print $3}') docker compose up -d --build - docker image prune -a --force diff --git a/.github/workflows/start-devouch.yml b/.github/workflows/start-devouch.yml index fadeda5..762a6fa 100644 --- a/.github/workflows/start-devouch.yml +++ b/.github/workflows/start-devouch.yml @@ -16,6 +16,6 @@ jobs: username: ${{ secrets.STAGING_USERNAME }} key: ${{ secrets.STAGING_PRIVATE_KEY }} port: 22 - script: | + script: | cd $HOME/DeVouch-BE - docker compose up -d + docker compose up -d --build diff --git a/.github/workflows/stop-devouch.yml b/.github/workflows/stop-devouch.yml index 3d73ea8..4366760 100644 --- a/.github/workflows/stop-devouch.yml +++ b/.github/workflows/stop-devouch.yml @@ -16,8 +16,8 @@ jobs: username: ${{ secrets.STAGING_USERNAME }} key: ${{ secrets.STAGING_PRIVATE_KEY }} port: 22 - script: | + script: | cd $HOME/DeVouch-BE docker compose stop devouch squid-db docker compose rm -f -v devouch squid-db - docker volume prune -f + docker rmi $(docker images | grep 'devouch' | awk '{print $3}')