From f8bdf61a18a234cee975df5b57fcfaf2d6e2b152 Mon Sep 17 00:00:00 2001 From: "Dr. Alwin Simon" <003alwin@gmail.com> Date: Sun, 29 Oct 2023 10:05:18 +0530 Subject: [PATCH 1/2] Added K8s config for CD Auth Deployment restart. --- .github/workflows/CD - Deploy - Auth Service.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/CD - Deploy - Auth Service.yml b/.github/workflows/CD - Deploy - Auth Service.yml index 8463314..d21e01d 100644 --- a/.github/workflows/CD - Deploy - Auth Service.yml +++ b/.github/workflows/CD - Deploy - Auth Service.yml @@ -21,3 +21,8 @@ jobs: DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - run: docker push alwinsimon/bookmyseat-auth + - uses: digitalocean/action-doctl@v2 + with: + token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} + - run: doctl kubernetes cluster kubeconfig save bookmyseat-k8s + - run: kubectl rollout restart deployment auth-depl From c2906aa3312ce836a419f91d80f3b56c00ab47aa Mon Sep 17 00:00:00 2001 From: "Dr. Alwin Simon" <003alwin@gmail.com> Date: Sun, 29 Oct 2023 10:10:21 +0530 Subject: [PATCH 2/2] Added Deploy Manifest Config to apply all config inside infra/k8 directory to the cluster. --- .github/workflows/CD - Deploy - Manifests.yml | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/CD - Deploy - Manifests.yml diff --git a/.github/workflows/CD - Deploy - Manifests.yml b/.github/workflows/CD - Deploy - Manifests.yml new file mode 100644 index 0000000..0548316 --- /dev/null +++ b/.github/workflows/CD - Deploy - Manifests.yml @@ -0,0 +1,22 @@ +# ========================================= CD - Deploy - Manifests ========================================= + +name: CD - Deploy - Manifests + +on: + push: + branches: + - production + paths: + - "infra/**" + +jobs: + Deploy-Manifests-CD-Pipeline: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - uses: digitalocean/action-doctl@v2 + with: + token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} + - run: doctl kubernetes cluster kubeconfig save bookmyseat-k8s + - run: kubectl apply -f infra/k8s