From 65625215716b192cb067af6a2ceadf196265ab4f Mon Sep 17 00:00:00 2001 From: "Dr. Alwin Simon" <003alwin@gmail.com> Date: Sun, 29 Oct 2023 00:08:52 +0530 Subject: [PATCH 1/7] Added CD config file for Auth Service. --- .../workflows/CD - Deploy - Auth Service.yml | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/CD - Deploy - Auth Service.yml diff --git a/.github/workflows/CD - Deploy - Auth Service.yml b/.github/workflows/CD - Deploy - Auth Service.yml new file mode 100644 index 0000000..078b6ac --- /dev/null +++ b/.github/workflows/CD - Deploy - Auth Service.yml @@ -0,0 +1,23 @@ +# ========================================= CD - Deploy - Auth Service ========================================= + +name: CD - Deploy - Auth Service + +on: + push: + branches: + - production + paths: + - "auth/**" + +jobs: + Auth-Service-CD-Pipeline: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - run: cd auth && docker build -t alwinsimon/auth . + - run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD + env: + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + - run: docker push alwinsimon/auth From 58f6e742774e46741ba9f9d613938f1602fc5700 Mon Sep 17 00:00:00 2001 From: "Dr. Alwin Simon" <003alwin@gmail.com> Date: Sun, 29 Oct 2023 00:20:55 +0530 Subject: [PATCH 2/7] Made a change to test Auth CD Workflow. --- auth/src/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/auth/src/index.ts b/auth/src/index.ts index 254f16a..c5fc846 100644 --- a/auth/src/index.ts +++ b/auth/src/index.ts @@ -3,6 +3,8 @@ import mongoose from "mongoose"; import { app } from "./app"; const startServer = async () => { + + console.log("Starting up......."); const PORT = 3000; const SERVICE_NAME = "AUTH"; From 4bdf8c802d7b15c5f8896632dd299ba90f56dd05 Mon Sep 17 00:00:00 2001 From: "Dr. Alwin Simon" <003alwin@gmail.com> Date: Sun, 29 Oct 2023 00:31:08 +0530 Subject: [PATCH 3/7] Minor fix in docker repository name. --- .github/workflows/CD - Deploy - Auth Service.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CD - Deploy - Auth Service.yml b/.github/workflows/CD - Deploy - Auth Service.yml index 078b6ac..60b1e65 100644 --- a/.github/workflows/CD - Deploy - Auth Service.yml +++ b/.github/workflows/CD - Deploy - Auth Service.yml @@ -15,7 +15,7 @@ jobs: steps: - uses: actions/checkout@v3 - - run: cd auth && docker build -t alwinsimon/auth . + - run: cd auth && docker build -t alwinsimon/bookmyseat-auth . - run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD env: DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} From ab650ad61c9ccdd34a29c38645851dce3035f6ba Mon Sep 17 00:00:00 2001 From: "Dr. Alwin Simon" <003alwin@gmail.com> Date: Sun, 29 Oct 2023 00:32:42 +0530 Subject: [PATCH 4/7] Reverted change made for testing. --- auth/src/index.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/auth/src/index.ts b/auth/src/index.ts index c5fc846..6bcdcef 100644 --- a/auth/src/index.ts +++ b/auth/src/index.ts @@ -3,9 +3,6 @@ import mongoose from "mongoose"; import { app } from "./app"; const startServer = async () => { - - console.log("Starting up......."); - const PORT = 3000; const SERVICE_NAME = "AUTH"; From 41e9e384eaa193e0213e66aff9854bd771a9e157 Mon Sep 17 00:00:00 2001 From: "Dr. Alwin Simon" <003alwin@gmail.com> Date: Sun, 29 Oct 2023 00:44:24 +0530 Subject: [PATCH 5/7] Updated image name in docker push. --- .github/workflows/CD - Deploy - Auth Service.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CD - Deploy - Auth Service.yml b/.github/workflows/CD - Deploy - Auth Service.yml index 60b1e65..8463314 100644 --- a/.github/workflows/CD - Deploy - Auth Service.yml +++ b/.github/workflows/CD - Deploy - Auth Service.yml @@ -20,4 +20,4 @@ jobs: env: DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - - run: docker push alwinsimon/auth + - run: docker push alwinsimon/bookmyseat-auth From 3721ae9b87c49a3c07a19023b7606a03f0c1eebe Mon Sep 17 00:00:00 2001 From: "Dr. Alwin Simon" <003alwin@gmail.com> Date: Sun, 29 Oct 2023 00:48:12 +0530 Subject: [PATCH 6/7] Making a change to trigger CD workflow. --- auth/src/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/auth/src/index.ts b/auth/src/index.ts index 6bcdcef..c5fc846 100644 --- a/auth/src/index.ts +++ b/auth/src/index.ts @@ -3,6 +3,9 @@ import mongoose from "mongoose"; import { app } from "./app"; const startServer = async () => { + + console.log("Starting up......."); + const PORT = 3000; const SERVICE_NAME = "AUTH"; From 8999048ff95f6b41306b9c3d0d55f1ea761d8735 Mon Sep 17 00:00:00 2001 From: "Dr. Alwin Simon" <003alwin@gmail.com> Date: Sun, 29 Oct 2023 00:53:49 +0530 Subject: [PATCH 7/7] Reverted Change. --- auth/src/index.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/auth/src/index.ts b/auth/src/index.ts index c5fc846..6bcdcef 100644 --- a/auth/src/index.ts +++ b/auth/src/index.ts @@ -3,9 +3,6 @@ import mongoose from "mongoose"; import { app } from "./app"; const startServer = async () => { - - console.log("Starting up......."); - const PORT = 3000; const SERVICE_NAME = "AUTH";