From 814ba6c680d67974f7f44a978d8ff1c94bf79833 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 22 Dec 2023 17:23:35 +0530 Subject: [PATCH 001/664] Create node.js.yml --- .github/workflows/node.js.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/node.js.yml diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 0000000000..f5c2b70c11 --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,31 @@ +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs + +name: Node.js CI + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [14.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run build --if-present + - run: npm test From 7ae34dab908983589f43deef89007b172c7e7325 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 22 Dec 2023 17:32:39 +0530 Subject: [PATCH 002/664] Update node.js.yml --- .github/workflows/node.js.yml | 36 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index f5c2b70c11..019701287a 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -1,31 +1,29 @@ # This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs -name: Node.js CI +name: Node.js CI/CD on: push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] + branches: + - main jobs: build: - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [14.x] - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ - steps: - - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - run: npm ci - - run: npm run build --if-present - - run: npm test + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: 14 + cache: 'npm' + + - name: Install Dependencies + run: npm ci + + - name: Run Tests + run: npm test From fbb3a435b12c0b3a5d85cce92f332b65252f8b2f Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 22 Dec 2023 17:35:35 +0530 Subject: [PATCH 003/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 019701287a..b478847ff0 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -26,4 +26,4 @@ jobs: run: npm ci - name: Run Tests - run: npm test + run: npm test From 170de69925940d97dcb278c68c735f00acc1d10f Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 22 Dec 2023 17:39:18 +0530 Subject: [PATCH 004/664] Delete .github/workflows directory --- .github/workflows/main.yml | 33 --------------------------------- .github/workflows/node.js.yml | 29 ----------------------------- 2 files changed, 62 deletions(-) delete mode 100644 .github/workflows/main.yml delete mode 100644 .github/workflows/node.js.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 58c79cde54..0000000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Publish Docker image - -on: - push: - branches: ['master'] - -jobs: - push_to_registry: - name: Push Docker image to Docker Hub - runs-on: ubuntu-latest - steps: - - name: Check out the repo - uses: actions/checkout@v3 - - - name: Log in to Docker Hub - uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 - with: - images: thetips4you/testjodejsapp - - - name: Build and push Docker image - uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc - with: - context: . - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml deleted file mode 100644 index b478847ff0..0000000000 --- a/.github/workflows/node.js.yml +++ /dev/null @@ -1,29 +0,0 @@ -# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs - -name: Node.js CI/CD - -on: - push: - branches: - - main - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Checkout Repository - uses: actions/checkout@v2 - - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - node-version: 14 - cache: 'npm' - - - name: Install Dependencies - run: npm ci - - - name: Run Tests - run: npm test From 56e9808ed6bc8acfbf4f3034a7283e68f76c422d Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 22 Dec 2023 17:39:55 +0530 Subject: [PATCH 005/664] Create node.js.yml --- .github/workflows/node.js.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/node.js.yml diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 0000000000..f5c2b70c11 --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,31 @@ +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs + +name: Node.js CI + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [14.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run build --if-present + - run: npm test From aa30f91a6500ae9a5597c3e1f460069196ece684 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 22 Dec 2023 17:47:56 +0530 Subject: [PATCH 006/664] Delete .github/workflows directory --- .github/workflows/node.js.yml | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 .github/workflows/node.js.yml diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml deleted file mode 100644 index f5c2b70c11..0000000000 --- a/.github/workflows/node.js.yml +++ /dev/null @@ -1,31 +0,0 @@ -# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs - -name: Node.js CI - -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - -jobs: - build: - - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [14.x] - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ - - steps: - - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - run: npm ci - - run: npm run build --if-present - - run: npm test From 08b9b18b9444b0af60b0def808a158dd2015a197 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 22 Dec 2023 17:50:04 +0530 Subject: [PATCH 007/664] Create node.js.yml --- .github/workflows/node.js.yml | 51 +++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/node.js.yml diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 0000000000..8b7ca87e01 --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,51 @@ +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs + +name: Node.js CI + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [14.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run build --if-present + - run: npm test + + - name: code checkout + uses: actions/checkout@v2 + + - name: install the gcloud cli + uses: google-github-actions/setup-gcloud@v0 + with: + project_id: ${{ secrets.GOOGLE_PROJECT }} + service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} + install_components: 'gke-gcloud-auth-plugin' + export_default_credentials: true + + - name: build and push the docker image + env: + GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} + run: | + gcloud auth configure-docker us-central1-docker.pkg.dev + docker build -t us-central1-docker.pkg.dev/invertible-hook-406706/test-gcp/node:latest . + docker push us-central1-docker.pkg.dev/invertible-hook-406706/test-gcp/node:latest + From b11f3148616120fdab674aa2c73ee23f2f226672 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 22 Dec 2023 17:51:41 +0530 Subject: [PATCH 008/664] Delete .github/workflows directory --- .github/workflows/node.js.yml | 51 ----------------------------------- 1 file changed, 51 deletions(-) delete mode 100644 .github/workflows/node.js.yml diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml deleted file mode 100644 index 8b7ca87e01..0000000000 --- a/.github/workflows/node.js.yml +++ /dev/null @@ -1,51 +0,0 @@ -# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs - -name: Node.js CI - -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - -jobs: - build: - - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [14.x] - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ - - steps: - - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - run: npm ci - - run: npm run build --if-present - - run: npm test - - - name: code checkout - uses: actions/checkout@v2 - - - name: install the gcloud cli - uses: google-github-actions/setup-gcloud@v0 - with: - project_id: ${{ secrets.GOOGLE_PROJECT }} - service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} - install_components: 'gke-gcloud-auth-plugin' - export_default_credentials: true - - - name: build and push the docker image - env: - GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} - run: | - gcloud auth configure-docker us-central1-docker.pkg.dev - docker build -t us-central1-docker.pkg.dev/invertible-hook-406706/test-gcp/node:latest . - docker push us-central1-docker.pkg.dev/invertible-hook-406706/test-gcp/node:latest - From 7b870aa63e7456ff3512e904227eb7f4c63eb4dc Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 22 Dec 2023 17:52:39 +0530 Subject: [PATCH 009/664] Create node.js.yml --- .github/workflows/node.js.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/node.js.yml diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 0000000000..65541855ce --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,31 @@ +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs + +name: Node.js CI + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [14.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run build --if-present + - run: npm install From f1a817d026ca08935a71dc9c84b09de97640f95f Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 22 Dec 2023 17:54:29 +0530 Subject: [PATCH 010/664] Update node.js.yml --- .github/workflows/node.js.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 65541855ce..b8c87a8b4b 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -29,3 +29,19 @@ jobs: - run: npm ci - run: npm run build --if-present - run: npm install + + - name: install the gcloud cli + uses: google-github-actions/setup-gcloud@v0 + with: + project_id: ${{ secrets.GOOGLE_PROJECT }} + service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} + install_components: 'gke-gcloud-auth-plugin' + export_default_credentials: true + + - name: build and push the docker image + env: + GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} + run: | + gcloud auth configure-docker us-central1-docker.pkg.dev + docker build -t us-central1-docker.pkg.dev/invertible-hook-406706/test-gcp/code:latest . + docker push us-central1-docker.pkg.dev/invertible-hook-406706/test-gcp/code:latest From a5de5b6b2262a7cddddbe0a0a7def4df0010f234 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 22 Dec 2023 18:01:22 +0530 Subject: [PATCH 011/664] Update node.js.yml --- .github/workflows/node.js.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index b8c87a8b4b..73cf3ca095 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -45,3 +45,10 @@ jobs: gcloud auth configure-docker us-central1-docker.pkg.dev docker build -t us-central1-docker.pkg.dev/invertible-hook-406706/test-gcp/code:latest . docker push us-central1-docker.pkg.dev/invertible-hook-406706/test-gcp/code:latest + - name: deploy to gke + env: + GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} + run: | + gcloud container clusters get-credentials cluster-1 --region us-central1-c + sed -i "s/GOOGLE_PROJECT/$GOOGLE_PROJECT/g" deploymentservice.yml + kubectl apply -f deploymentservice.yml From 58a9416dde8b445f605bcfe8dc4989c03602d597 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 22 Dec 2023 18:09:34 +0530 Subject: [PATCH 012/664] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 668a9f8ed6..abe0d5b180 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ var express = require('express'); var app = express(); app.get('/', function (req, res) { - res.send('{ "response": "Hello From Thetips4you" }'); + res.send('{ "response": "Welcome to Innodata" }'); }); app.get('/will', function (req, res) { From 2d3b7b11ca9b8a96ffb9d3cc37205f9493036595 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 22 Dec 2023 18:14:19 +0530 Subject: [PATCH 013/664] Delete .github/workflows directory --- .github/workflows/node.js.yml | 54 ----------------------------------- 1 file changed, 54 deletions(-) delete mode 100644 .github/workflows/node.js.yml diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml deleted file mode 100644 index 73cf3ca095..0000000000 --- a/.github/workflows/node.js.yml +++ /dev/null @@ -1,54 +0,0 @@ -# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs - -name: Node.js CI - -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - -jobs: - build: - - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [14.x] - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ - - steps: - - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - run: npm ci - - run: npm run build --if-present - - run: npm install - - - name: install the gcloud cli - uses: google-github-actions/setup-gcloud@v0 - with: - project_id: ${{ secrets.GOOGLE_PROJECT }} - service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} - install_components: 'gke-gcloud-auth-plugin' - export_default_credentials: true - - - name: build and push the docker image - env: - GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} - run: | - gcloud auth configure-docker us-central1-docker.pkg.dev - docker build -t us-central1-docker.pkg.dev/invertible-hook-406706/test-gcp/code:latest . - docker push us-central1-docker.pkg.dev/invertible-hook-406706/test-gcp/code:latest - - name: deploy to gke - env: - GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} - run: | - gcloud container clusters get-credentials cluster-1 --region us-central1-c - sed -i "s/GOOGLE_PROJECT/$GOOGLE_PROJECT/g" deploymentservice.yml - kubectl apply -f deploymentservice.yml From fec758abd5530b36078ce6b397887de83cad6495 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 22 Dec 2023 18:18:01 +0530 Subject: [PATCH 014/664] Create node.js.yml --- .github/workflows/node.js.yml | 54 +++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/node.js.yml diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 0000000000..73cf3ca095 --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,54 @@ +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs + +name: Node.js CI + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [14.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run build --if-present + - run: npm install + + - name: install the gcloud cli + uses: google-github-actions/setup-gcloud@v0 + with: + project_id: ${{ secrets.GOOGLE_PROJECT }} + service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} + install_components: 'gke-gcloud-auth-plugin' + export_default_credentials: true + + - name: build and push the docker image + env: + GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} + run: | + gcloud auth configure-docker us-central1-docker.pkg.dev + docker build -t us-central1-docker.pkg.dev/invertible-hook-406706/test-gcp/code:latest . + docker push us-central1-docker.pkg.dev/invertible-hook-406706/test-gcp/code:latest + - name: deploy to gke + env: + GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} + run: | + gcloud container clusters get-credentials cluster-1 --region us-central1-c + sed -i "s/GOOGLE_PROJECT/$GOOGLE_PROJECT/g" deploymentservice.yml + kubectl apply -f deploymentservice.yml From 56fdf4285a946bc0ba7d9d90ed3698f8474999c7 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 22 Dec 2023 18:41:16 +0530 Subject: [PATCH 015/664] Update node.js.yml From 7bb51c066230f7d5cf5729896810dedab1457c0e Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 22 Dec 2023 18:47:13 +0530 Subject: [PATCH 016/664] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index abe0d5b180..b848ee1186 100644 --- a/index.js +++ b/index.js @@ -6,7 +6,7 @@ app.get('/', function (req, res) { }); app.get('/will', function (req, res) { - res.send('{ "response": "Hello World" }'); + res.send('{ "response": "Welcome" }'); }); app.get('/ready', function (req, res) { res.send('{ "response": " Great!, It works!" }'); From 4a27c60b9696af6fa025ddfe75aa740782cc3801 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 22 Dec 2023 18:49:23 +0530 Subject: [PATCH 017/664] Update test.js --- test/test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/test.js b/test/test.js index 2794ef1f03..bf4f29c332 100644 --- a/test/test.js +++ b/test/test.js @@ -1,7 +1,7 @@ var request = require('supertest'); var app = require('../index.js'); describe('GET /will', function() { - it('respond with hello world', function(done) { - request(app).get('/will').expect('{ "response": "Hello World" }', done); + it('respond with Welcome', function(done) { + request(app).get('/will').expect('{ "response": "Welcome" }', done); }); -}); \ No newline at end of file +}); From a4df0af9ea8b44c47bfb3369b236e01d4a3b4a80 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 22 Dec 2023 18:52:25 +0530 Subject: [PATCH 018/664] Update deploymentservice.yml --- deploymentservice.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deploymentservice.yml b/deploymentservice.yml index ab6f0b707d..6a5567b9f9 100644 --- a/deploymentservice.yml +++ b/deploymentservice.yml @@ -16,7 +16,7 @@ spec: spec: containers: - name: nodeserver - image: thetips4you/nodeapp:latest + image: us-central1-docker.pkg.dev/invertible-hook-406706/test-gcp/nodeapp:latest ports: - containerPort: 3000 @@ -33,6 +33,6 @@ spec: type: LoadBalancer ports: - protocol: TCP - port: 5000 + port: 8000 targetPort: 3000 nodePort: 31110 From 752d7407f886dee79ef276a52fa1f165b1616bb7 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 22 Dec 2023 18:53:14 +0530 Subject: [PATCH 019/664] Update deployment.yml --- deployment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment.yml b/deployment.yml index 8468bbd661..09fcc9e195 100644 --- a/deployment.yml +++ b/deployment.yml @@ -16,6 +16,6 @@ spec: spec: containers: - name: nodeserver - image: thetips4you/nodeapp:latest + image: us-central1-docker.pkg.dev/invertible-hook-406706/test-gcp/nodeapp:latest ports: - containerPort: 3000 From 745a162982d7ded162dbca5a73f012f93431c108 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 22 Dec 2023 18:53:30 +0530 Subject: [PATCH 020/664] Update service.yml --- service.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service.yml b/service.yml index 1a0ab51485..dae0bb5df9 100644 --- a/service.yml +++ b/service.yml @@ -8,6 +8,6 @@ spec: type: LoadBalancer ports: - protocol: TCP - port: 5000 + port: 8000 targetPort: 3000 nodePort: 31110 From db29626a3d69d9f1fd52eb4091e71e12b556702e Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 27 Dec 2023 10:56:21 +0530 Subject: [PATCH 021/664] Update deploymentservice.yml --- deploymentservice.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploymentservice.yml b/deploymentservice.yml index 6a5567b9f9..849efceaa7 100644 --- a/deploymentservice.yml +++ b/deploymentservice.yml @@ -16,7 +16,7 @@ spec: spec: containers: - name: nodeserver - image: us-central1-docker.pkg.dev/invertible-hook-406706/test-gcp/nodeapp:latest + image: asia-south1-docker.pkg.dev/goldengate-1/test-project/code:latest ports: - containerPort: 3000 From 88972c9a10fb4b3e468e444b02cfc4ef79dddfd2 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 27 Dec 2023 12:48:53 +0530 Subject: [PATCH 022/664] Update deployment.yml --- deployment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment.yml b/deployment.yml index 09fcc9e195..722f844855 100644 --- a/deployment.yml +++ b/deployment.yml @@ -16,6 +16,6 @@ spec: spec: containers: - name: nodeserver - image: us-central1-docker.pkg.dev/invertible-hook-406706/test-gcp/nodeapp:latest + image: us-central1-docker.pkg.dev/goldengate-1/test-project/nodeapp:latest ports: - containerPort: 3000 From 84f124d34da90f03885f346eb7c83a75900b961e Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 27 Dec 2023 13:07:32 +0530 Subject: [PATCH 023/664] Update node.js.yml --- .github/workflows/node.js.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 73cf3ca095..2d0bdd0b28 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -43,8 +43,8 @@ jobs: GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} run: | gcloud auth configure-docker us-central1-docker.pkg.dev - docker build -t us-central1-docker.pkg.dev/invertible-hook-406706/test-gcp/code:latest . - docker push us-central1-docker.pkg.dev/invertible-hook-406706/test-gcp/code:latest + docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/code/node:latest . + docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - name: deploy to gke env: GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} From 3b08ed1810a26e77571f39a371e272cd3e2b7550 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 27 Dec 2023 13:12:12 +0530 Subject: [PATCH 024/664] Update node.js.yml --- .github/workflows/node.js.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 2d0bdd0b28..f88f3c0027 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -43,12 +43,12 @@ jobs: GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} run: | gcloud auth configure-docker us-central1-docker.pkg.dev - docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/code/node:latest . + docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest . docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - name: deploy to gke env: GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} run: | - gcloud container clusters get-credentials cluster-1 --region us-central1-c + gcloud container clusters get-credentials test-cluster --region asia-south1-c-c sed -i "s/GOOGLE_PROJECT/$GOOGLE_PROJECT/g" deploymentservice.yml kubectl apply -f deploymentservice.yml From f57e684f7b7804584a796a7a3fdcf64dea7a22ad Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 27 Dec 2023 13:18:02 +0530 Subject: [PATCH 025/664] Update node.js.yml From bde795ea81d9dcdf3e5eee8cf3b715ebbff7c652 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 27 Dec 2023 13:21:19 +0530 Subject: [PATCH 026/664] Update node.js.yml --- .github/workflows/node.js.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index f88f3c0027..7d5dc62f98 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -5,9 +5,9 @@ name: Node.js CI on: push: - branches: [ "master" ] + branches: [ "main" ] pull_request: - branches: [ "master" ] + branches: [ "main" ] jobs: build: @@ -49,6 +49,6 @@ jobs: env: GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} run: | - gcloud container clusters get-credentials test-cluster --region asia-south1-c-c + gcloud container clusters get-credentials test-cluster --region asia-south1-c sed -i "s/GOOGLE_PROJECT/$GOOGLE_PROJECT/g" deploymentservice.yml kubectl apply -f deploymentservice.yml From a44ffbdcefa82c2bed5ad49edee3effcddbd1b63 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 27 Dec 2023 13:22:29 +0530 Subject: [PATCH 027/664] Update node.js.yml From b3a3fc3d324603408eced95443f9fb617733f9bc Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 27 Dec 2023 13:23:36 +0530 Subject: [PATCH 028/664] Update node.js.yml --- .github/workflows/node.js.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 7d5dc62f98..c340aacd2a 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -5,9 +5,9 @@ name: Node.js CI on: push: - branches: [ "main" ] + branches: [ "master" ] pull_request: - branches: [ "main" ] + branches: [ "master" ] jobs: build: From 58e430fd39a7ae37b60e232f06421103b7785a6a Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 27 Dec 2023 20:14:33 +0530 Subject: [PATCH 029/664] Update node.js.yml --- .github/workflows/node.js.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index c340aacd2a..ffe6e6b907 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -5,14 +5,14 @@ name: Node.js CI on: push: - branches: [ "master" ] + branches: [ "main" ] pull_request: - branches: [ "master" ] + branches: [ "main" ] jobs: build: - runs-on: ubuntu-latest + runs-on: self-hosted strategy: matrix: From 8e4d812fedf04269580637b2b6b0e5f062953e97 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 27 Dec 2023 20:33:36 +0530 Subject: [PATCH 030/664] Update node.js.yml From bed2c1b7323cf2f471154795561af5b179379cb2 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 27 Dec 2023 20:37:04 +0530 Subject: [PATCH 031/664] Update node.js.yml From 9071f070e679b1b234bcb9aec07e2ca9397bf99a Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 27 Dec 2023 20:51:39 +0530 Subject: [PATCH 032/664] Update node.js.yml From 0862e74a4a1958df3bf500350554d7c190fb8eed Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 27 Dec 2023 20:57:46 +0530 Subject: [PATCH 033/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index ffe6e6b907..972c1716cd 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -31,7 +31,7 @@ jobs: - run: npm install - name: install the gcloud cli - uses: google-github-actions/setup-gcloud@v0 + uses: google-github-actions/setup-gcloud@v2 with: project_id: ${{ secrets.GOOGLE_PROJECT }} service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} From dbd6616c70f351576ac53381ba55b47eb3eb7a56 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 27 Dec 2023 21:01:47 +0530 Subject: [PATCH 034/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 972c1716cd..ffe6e6b907 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -31,7 +31,7 @@ jobs: - run: npm install - name: install the gcloud cli - uses: google-github-actions/setup-gcloud@v2 + uses: google-github-actions/setup-gcloud@v0 with: project_id: ${{ secrets.GOOGLE_PROJECT }} service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} From 20675b2facfde13e31ad98e966ed7b90a932f23a Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 27 Dec 2023 21:38:14 +0530 Subject: [PATCH 035/664] Update node.js.yml --- .github/workflows/node.js.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index ffe6e6b907..47c43b73ce 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -34,6 +34,7 @@ jobs: uses: google-github-actions/setup-gcloud@v0 with: project_id: ${{ secrets.GOOGLE_PROJECT }} + service_account: '${{ vars.SERVICE_ACCOUNT_EMAIL }}' service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} install_components: 'gke-gcloud-auth-plugin' export_default_credentials: true From c7f11ddb682e41379dae5cee9db6fa19a34f430d Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 27 Dec 2023 21:43:41 +0530 Subject: [PATCH 036/664] Update node.js.yml --- .github/workflows/node.js.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 47c43b73ce..7d5dc62f98 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -12,7 +12,7 @@ on: jobs: build: - runs-on: self-hosted + runs-on: ubuntu-latest strategy: matrix: @@ -34,7 +34,6 @@ jobs: uses: google-github-actions/setup-gcloud@v0 with: project_id: ${{ secrets.GOOGLE_PROJECT }} - service_account: '${{ vars.SERVICE_ACCOUNT_EMAIL }}' service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} install_components: 'gke-gcloud-auth-plugin' export_default_credentials: true From f748d7c9dfd018ad447fc1b2be5e2986685b726e Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 27 Dec 2023 21:45:58 +0530 Subject: [PATCH 037/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 7d5dc62f98..c13117aa26 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -10,7 +10,7 @@ on: branches: [ "main" ] jobs: - build: + deploy: runs-on: ubuntu-latest From 8099589d45b0bc3ec8ea4258eca2dd494f0894bc Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 27 Dec 2023 21:56:12 +0530 Subject: [PATCH 038/664] deploymentservice.yml --- deploymentservice.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploymentservice.yml b/deploymentservice.yml index 849efceaa7..f0a3d1fdfd 100644 --- a/deploymentservice.yml +++ b/deploymentservice.yml @@ -16,7 +16,7 @@ spec: spec: containers: - name: nodeserver - image: asia-south1-docker.pkg.dev/goldengate-1/test-project/code:latest + image: us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest ports: - containerPort: 3000 From d0a9b3e124d4ed942581a79c60e6e2c3a27de2b1 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 27 Dec 2023 21:59:19 +0530 Subject: [PATCH 039/664] Delete deployment.yml --- deployment.yml | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 deployment.yml diff --git a/deployment.yml b/deployment.yml deleted file mode 100644 index 722f844855..0000000000 --- a/deployment.yml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: nodeapp-deployment - labels: - app: nodeapp -spec: - replicas: 1 - selector: - matchLabels: - app: nodeapp - template: - metadata: - labels: - app: nodeapp - spec: - containers: - - name: nodeserver - image: us-central1-docker.pkg.dev/goldengate-1/test-project/nodeapp:latest - ports: - - containerPort: 3000 From 31127ea6c64aa90ff931bef1760574fd056b4151 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 27 Dec 2023 21:59:33 +0530 Subject: [PATCH 040/664] Delete service.yml --- service.yml | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 service.yml diff --git a/service.yml b/service.yml deleted file mode 100644 index dae0bb5df9..0000000000 --- a/service.yml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: nodeapp-service -spec: - selector: - app: nodeapp - type: LoadBalancer - ports: - - protocol: TCP - port: 8000 - targetPort: 3000 - nodePort: 31110 From a50168a54a25bd284e204e2daa25b0f663676a74 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 27 Dec 2023 22:00:46 +0530 Subject: [PATCH 041/664] Update node.js.yml From 0d902a5f68ea96aaaf9a2cb96d80996f10b94f28 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 27 Dec 2023 22:04:37 +0530 Subject: [PATCH 042/664] Create README.md --- README.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000000..6d26216298 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +Node.js Application From ac872fbef119405a9f99c6119b27db35e7bc9987 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 29 Dec 2023 20:15:20 +0530 Subject: [PATCH 043/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index c13117aa26..2201a2285e 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -12,7 +12,7 @@ on: jobs: deploy: - runs-on: ubuntu-latest + runs-on: self-hosted strategy: matrix: From 7070877b3cf2f70e7f9f93388ad227420208716a Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 29 Dec 2023 21:26:23 +0530 Subject: [PATCH 044/664] Update node.js.yml --- .github/workflows/node.js.yml | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 2201a2285e..3a9ad87a00 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -33,22 +33,18 @@ jobs: - name: install the gcloud cli uses: google-github-actions/setup-gcloud@v0 with: - project_id: ${{ secrets.GOOGLE_PROJECT }} - service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} + project_id: ${{ secrets.PROJECT_ID }} + service_account_key: ${{ secrets.SERVICE_ACCOUNT_KEY }} install_components: 'gke-gcloud-auth-plugin' export_default_credentials: true + + - name: build and push the docker image env: - GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} + PROJECT_ID: ${{ secrets.PROJECT_ID }} run: | gcloud auth configure-docker us-central1-docker.pkg.dev - docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest . - docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - - name: deploy to gke - env: - GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} - run: | - gcloud container clusters get-credentials test-cluster --region asia-south1-c - sed -i "s/GOOGLE_PROJECT/$GOOGLE_PROJECT/g" deploymentservice.yml - kubectl apply -f deploymentservice.yml + docker build -t us-central1-docker.pkg.dev/invertible-hook-406706/test-gcp/node:latest . + docker push us-central1-docker.pkg.dev/invertible-hook-406706/test-gcp/node:latest + From f00884e954420e6c2acba825a40353ca2ccc780f Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 29 Dec 2023 21:30:53 +0530 Subject: [PATCH 045/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 3a9ad87a00..82371bb32f 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -31,7 +31,7 @@ jobs: - run: npm install - name: install the gcloud cli - uses: google-github-actions/setup-gcloud@v0 + uses: google-github-actions/setup-gcloud@v0.2.0 with: project_id: ${{ secrets.PROJECT_ID }} service_account_key: ${{ secrets.SERVICE_ACCOUNT_KEY }} From 59d5cd955b381683ab5f97043e7da8aeac94aace Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 29 Dec 2023 21:44:04 +0530 Subject: [PATCH 046/664] Update node.js.yml From 24d709cbc0018a60468d976cc105c4443578328d Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 29 Dec 2023 21:47:14 +0530 Subject: [PATCH 047/664] Update node.js.yml From 348082f8aa92969054167d830e5dd9b21138e5f3 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 29 Dec 2023 21:55:38 +0530 Subject: [PATCH 048/664] Update node.js.yml --- .github/workflows/node.js.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 82371bb32f..0bec91a8dd 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -47,4 +47,11 @@ jobs: gcloud auth configure-docker us-central1-docker.pkg.dev docker build -t us-central1-docker.pkg.dev/invertible-hook-406706/test-gcp/node:latest . docker push us-central1-docker.pkg.dev/invertible-hook-406706/test-gcp/node:latest + - name: deploy to gke + env: + PROJECT_ID: ${{ secrets.PROJECT_ID }} + run: | + gcloud container clusters get-credentials cluster-1 --region us-central1-c + sed -i "s/PROJECT_ID/$PROJECT_ID/g" deploymentservice.yml + kubectl apply -f deploymentservice.yml From 269148c514e7c0b9237d222d33744958bb50d3a6 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 29 Dec 2023 22:09:22 +0530 Subject: [PATCH 049/664] Update node.js.yml From add794cdd9504847c2f200fb68e7685e3f3a1d05 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 29 Dec 2023 22:16:51 +0530 Subject: [PATCH 050/664] Update node.js.yml --- .github/workflows/node.js.yml | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 0bec91a8dd..a02b36ecc6 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -29,29 +29,27 @@ jobs: - run: npm ci - run: npm run build --if-present - run: npm install - + - name: install the gcloud cli uses: google-github-actions/setup-gcloud@v0.2.0 with: - project_id: ${{ secrets.PROJECT_ID }} - service_account_key: ${{ secrets.SERVICE_ACCOUNT_KEY }} + project_id: ${{ secrets.GOOGLE_PROJECT }} + service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} install_components: 'gke-gcloud-auth-plugin' export_default_credentials: true - - - name: build and push the docker image env: - PROJECT_ID: ${{ secrets.PROJECT_ID }} + GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} run: | gcloud auth configure-docker us-central1-docker.pkg.dev - docker build -t us-central1-docker.pkg.dev/invertible-hook-406706/test-gcp/node:latest . - docker push us-central1-docker.pkg.dev/invertible-hook-406706/test-gcp/node:latest + docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest . + docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - name: deploy to gke env: - PROJECT_ID: ${{ secrets.PROJECT_ID }} + GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} run: | - gcloud container clusters get-credentials cluster-1 --region us-central1-c - sed -i "s/PROJECT_ID/$PROJECT_ID/g" deploymentservice.yml + gcloud container clusters get-credentials test-cluster --region asia-south1-c + sed -i "s/GOOGLE_PROJECT/$GOOGLE_PROJECT/g" deploymentservice.yml kubectl apply -f deploymentservice.yml - + From 7b72be3ee8ca788b1d3fa7126d3da3719ba1fe7b Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 4 Jan 2024 11:40:24 +0530 Subject: [PATCH 051/664] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index b848ee1186..dc29a23f3d 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ var express = require('express'); var app = express(); app.get('/', function (req, res) { - res.send('{ "response": "Welcome to Innodata" }'); + res.send('{ "response": "Welcome to testgcp project" }'); }); app.get('/will', function (req, res) { From 4412aed50167718bc144465019d7048a3100f838 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 4 Jan 2024 11:46:14 +0530 Subject: [PATCH 052/664] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index dc29a23f3d..dacd52b06b 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ var express = require('express'); var app = express(); app.get('/', function (req, res) { - res.send('{ "response": "Welcome to testgcp project" }'); + res.send('{ "response": "Welcome to testgcp-project" }'); }); app.get('/will', function (req, res) { From d0dd9b5d7cbda27806a12a1b2710d0f7baf37b9b Mon Sep 17 00:00:00 2001 From: mnagaraju5628 Date: Thu, 4 Jan 2024 08:10:11 +0000 Subject: [PATCH 053/664] updated tagname --- deploymentservice.yml | 2 +- dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deploymentservice.yml b/deploymentservice.yml index f0a3d1fdfd..7cc0b2dc30 100644 --- a/deploymentservice.yml +++ b/deploymentservice.yml @@ -16,7 +16,7 @@ spec: spec: containers: - name: nodeserver - image: us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + image: us-central1-docker.pkg.dev/goldengate-1/test-project/nodeapp:v1 ports: - containerPort: 3000 diff --git a/dockerfile b/dockerfile index bbb5d90735..1b445ca8a5 100644 --- a/dockerfile +++ b/dockerfile @@ -1,4 +1,4 @@ -FROM node:latest +FROM nodeapp:v1 WORKDIR /usr/src/app From 0c4023ed01c4e79f250147b54c2a6996c1523695 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 4 Jan 2024 13:48:26 +0530 Subject: [PATCH 054/664] Update node.js.yml --- .github/workflows/node.js.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index a02b36ecc6..1ce3120ed5 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -43,8 +43,8 @@ jobs: GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} run: | gcloud auth configure-docker us-central1-docker.pkg.dev - docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest . - docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/nodeapp:v1 . + docker push us-central1-docker.pkg.dev/goldengate-1/test-project/nodeapp:v1 - name: deploy to gke env: GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} From 05f155034b55649eb9884528b9d91166f32b2070 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 4 Jan 2024 14:00:10 +0530 Subject: [PATCH 055/664] Update node.js.yml From 25eb579f98667c8f8f603e3823177cd0dc659413 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 4 Jan 2024 14:09:05 +0530 Subject: [PATCH 056/664] Update dockerfile --- dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockerfile b/dockerfile index 1b445ca8a5..bbb5d90735 100644 --- a/dockerfile +++ b/dockerfile @@ -1,4 +1,4 @@ -FROM nodeapp:v1 +FROM node:latest WORKDIR /usr/src/app From 1d818933ee2700faa4b1ab7186e9cf825f5f9cde Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 4 Jan 2024 14:10:20 +0530 Subject: [PATCH 057/664] Update deploymentservice.yml --- deploymentservice.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploymentservice.yml b/deploymentservice.yml index 7cc0b2dc30..f0a3d1fdfd 100644 --- a/deploymentservice.yml +++ b/deploymentservice.yml @@ -16,7 +16,7 @@ spec: spec: containers: - name: nodeserver - image: us-central1-docker.pkg.dev/goldengate-1/test-project/nodeapp:v1 + image: us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest ports: - containerPort: 3000 From 31e4b3b6bac682cba2c282c62f244840485b9191 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 4 Jan 2024 14:12:56 +0530 Subject: [PATCH 058/664] Update node.js.yml --- .github/workflows/node.js.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 1ce3120ed5..6d2af70f94 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -51,5 +51,6 @@ jobs: run: | gcloud container clusters get-credentials test-cluster --region asia-south1-c sed -i "s/GOOGLE_PROJECT/$GOOGLE_PROJECT/g" deploymentservice.yml + kubectl delete -f deploymentservice.yml kubectl apply -f deploymentservice.yml From b2f7947fd79b193b65f521a9c070d58970baceaf Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 4 Jan 2024 14:35:11 +0530 Subject: [PATCH 059/664] Update deploymentservice.yml --- deploymentservice.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploymentservice.yml b/deploymentservice.yml index f0a3d1fdfd..bd6ecdbbea 100644 --- a/deploymentservice.yml +++ b/deploymentservice.yml @@ -35,4 +35,4 @@ spec: - protocol: TCP port: 8000 targetPort: 3000 - nodePort: 31110 + nodePort: 31111 From 61e51796809daeefb74e1357d0d1f277d042e373 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 4 Jan 2024 14:36:34 +0530 Subject: [PATCH 060/664] Update node.js.yml --- .github/workflows/node.js.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 6d2af70f94..64e0353321 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -43,8 +43,8 @@ jobs: GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} run: | gcloud auth configure-docker us-central1-docker.pkg.dev - docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/nodeapp:v1 . - docker push us-central1-docker.pkg.dev/goldengate-1/test-project/nodeapp:v1 + docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest . + docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - name: deploy to gke env: GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} From 1035d5be1e13484c06147768caa3542695657b69 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 4 Jan 2024 14:40:31 +0530 Subject: [PATCH 061/664] Update node.js.yml --- .github/workflows/node.js.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 64e0353321..a02b36ecc6 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -51,6 +51,5 @@ jobs: run: | gcloud container clusters get-credentials test-cluster --region asia-south1-c sed -i "s/GOOGLE_PROJECT/$GOOGLE_PROJECT/g" deploymentservice.yml - kubectl delete -f deploymentservice.yml kubectl apply -f deploymentservice.yml From 43fbd9a30fb90e436be420dbbceedb3f4c59753f Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 4 Jan 2024 14:46:22 +0530 Subject: [PATCH 062/664] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index dacd52b06b..bfbd452b1b 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ var express = require('express'); var app = express(); app.get('/', function (req, res) { - res.send('{ "response": "Welcome to testgcp-project" }'); + res.send('{ "response": "Welcome to innotestproject" }'); }); app.get('/will', function (req, res) { From 77b71614a6ddc2636523732448919e96f4d709b4 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 4 Jan 2024 14:48:52 +0530 Subject: [PATCH 063/664] Update node.js.yml --- .github/workflows/node.js.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index a02b36ecc6..64e0353321 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -51,5 +51,6 @@ jobs: run: | gcloud container clusters get-credentials test-cluster --region asia-south1-c sed -i "s/GOOGLE_PROJECT/$GOOGLE_PROJECT/g" deploymentservice.yml + kubectl delete -f deploymentservice.yml kubectl apply -f deploymentservice.yml From 880e866056d9f6b00c96521a7fb72c5d7510ee60 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 4 Jan 2024 15:08:52 +0530 Subject: [PATCH 064/664] Update and rename deploymentservice.yml to deployment.yaml --- deploymentservice.yml => deployment.yaml | 17 ----------------- 1 file changed, 17 deletions(-) rename deploymentservice.yml => deployment.yaml (64%) diff --git a/deploymentservice.yml b/deployment.yaml similarity index 64% rename from deploymentservice.yml rename to deployment.yaml index bd6ecdbbea..00ed737ef7 100644 --- a/deploymentservice.yml +++ b/deployment.yaml @@ -19,20 +19,3 @@ spec: image: us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest ports: - containerPort: 3000 - - ---- - -apiVersion: v1 -kind: Service -metadata: - name: nodeapp-service -spec: - selector: - app: nodeapp - type: LoadBalancer - ports: - - protocol: TCP - port: 8000 - targetPort: 3000 - nodePort: 31111 From 8a9cf538e87305ebe7b53f197ce6b8053be3d6c5 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 4 Jan 2024 15:09:23 +0530 Subject: [PATCH 065/664] Create service.yaml --- service.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 service.yaml diff --git a/service.yaml b/service.yaml new file mode 100644 index 0000000000..c8fcb44341 --- /dev/null +++ b/service.yaml @@ -0,0 +1,14 @@ +--- +apiVersion: v1 +kind: Service +metadata: + name: nodeapp-service +spec: + selector: + app: nodeapp + type: LoadBalancer + ports: + - protocol: TCP + port: 8000 + targetPort: 3000 + nodePort: 3111 From a904b79eca075f12935728ac192a291d09768396 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 4 Jan 2024 15:13:00 +0530 Subject: [PATCH 066/664] Update node.js.yml --- .github/workflows/node.js.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 64e0353321..d65445f397 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -50,7 +50,8 @@ jobs: GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} run: | gcloud container clusters get-credentials test-cluster --region asia-south1-c - sed -i "s/GOOGLE_PROJECT/$GOOGLE_PROJECT/g" deploymentservice.yml - kubectl delete -f deploymentservice.yml - kubectl apply -f deploymentservice.yml + sed -i "s/GOOGLE_PROJECT/$GOOGLE_PROJECT/g" deployment.yaml/service.yaml + kubectl delete -f deployment.yml + kubectl apply -f deployment.yml + kubectl apply -f service.yml From a4727130e174a967971f785c050eb6da90649f7f Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 4 Jan 2024 15:17:42 +0530 Subject: [PATCH 067/664] Update node.js.yml --- .github/workflows/node.js.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index d65445f397..8a1ac76b00 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -50,8 +50,8 @@ jobs: GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} run: | gcloud container clusters get-credentials test-cluster --region asia-south1-c - sed -i "s/GOOGLE_PROJECT/$GOOGLE_PROJECT/g" deployment.yaml/service.yaml - kubectl delete -f deployment.yml + sed -i "s/GOOGLE_PROJECT/$GOOGLE_PROJECT/g" deployment.yaml + sed -i "s/GOOGLE_PROJECT/$GOOGLE_PROJECT/g" service.yaml kubectl apply -f deployment.yml kubectl apply -f service.yml From a313414756dff21eaa1e4febeda5d1eb2483a050 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 4 Jan 2024 15:20:10 +0530 Subject: [PATCH 068/664] Update node.js.yml --- .github/workflows/node.js.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 8a1ac76b00..cf43e1f509 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -52,6 +52,6 @@ jobs: gcloud container clusters get-credentials test-cluster --region asia-south1-c sed -i "s/GOOGLE_PROJECT/$GOOGLE_PROJECT/g" deployment.yaml sed -i "s/GOOGLE_PROJECT/$GOOGLE_PROJECT/g" service.yaml - kubectl apply -f deployment.yml - kubectl apply -f service.yml + kubectl apply -f deployment.yaml + kubectl apply -f service.yaml From bcf99b3f116b52eb850fe74d344f99f46c73ab70 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 4 Jan 2024 15:21:50 +0530 Subject: [PATCH 069/664] Update service.yaml --- service.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service.yaml b/service.yaml index c8fcb44341..ac127aa422 100644 --- a/service.yaml +++ b/service.yaml @@ -11,4 +11,4 @@ spec: - protocol: TCP port: 8000 targetPort: 3000 - nodePort: 3111 + nodePort: 3112 From f9c268d5fab45e8f63dddccdde3759345073f9e6 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 4 Jan 2024 15:26:08 +0530 Subject: [PATCH 070/664] Update service.yaml --- service.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service.yaml b/service.yaml index ac127aa422..d26c2b0f39 100644 --- a/service.yaml +++ b/service.yaml @@ -11,4 +11,4 @@ spec: - protocol: TCP port: 8000 targetPort: 3000 - nodePort: 3112 + nodePort: 31000 From ae22ab1dd82b212c8df90c7246979b2ab4f039af Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 4 Jan 2024 15:29:06 +0530 Subject: [PATCH 071/664] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index bfbd452b1b..1bfe9d8724 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ var express = require('express'); var app = express(); app.get('/', function (req, res) { - res.send('{ "response": "Welcome to innotestproject" }'); + res.send('{ "response": "Welcome to inno-testproject" }'); }); app.get('/will', function (req, res) { From 083e5e20d364ba58f0b08abd81a93927a72c838c Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 4 Jan 2024 15:30:36 +0530 Subject: [PATCH 072/664] Update node.js.yml --- .github/workflows/node.js.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index cf43e1f509..591d4a4d4d 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -52,6 +52,7 @@ jobs: gcloud container clusters get-credentials test-cluster --region asia-south1-c sed -i "s/GOOGLE_PROJECT/$GOOGLE_PROJECT/g" deployment.yaml sed -i "s/GOOGLE_PROJECT/$GOOGLE_PROJECT/g" service.yaml + kubectl delete -f deployment.yaml kubectl apply -f deployment.yaml kubectl apply -f service.yaml From 14594b0defe8657c921f56204ee18f1fa1af67ba Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 4 Jan 2024 15:34:41 +0530 Subject: [PATCH 073/664] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 1bfe9d8724..8acca29d92 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ var express = require('express'); var app = express(); app.get('/', function (req, res) { - res.send('{ "response": "Welcome to inno-testproject" }'); + res.send('{ "response": "Welcome to nodejs application " }'); }); app.get('/will', function (req, res) { From 85e265a64bd0efc0445299ccb9d37437375ec648 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 4 Jan 2024 15:40:04 +0530 Subject: [PATCH 074/664] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 8acca29d92..e2cbb5c2b4 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ var express = require('express'); var app = express(); app.get('/', function (req, res) { - res.send('{ "response": "Welcome to nodejs application " }'); + res.send('{ "response": "Welcome to INNODATA-TESTPROJECT " }'); }); app.get('/will', function (req, res) { From 2f902d383e663412abd69852b037a1691f8308ae Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 4 Jan 2024 16:20:03 +0530 Subject: [PATCH 075/664] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index e2cbb5c2b4..847dee8655 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ var express = require('express'); var app = express(); app.get('/', function (req, res) { - res.send('{ "response": "Welcome to INNODATA-TESTPROJECT " }'); + res.send('{ "response": "Welcome to Inno-demoproject " }'); }); app.get('/will', function (req, res) { From 996c2904096e862a3750ad50612e1d92ccf50810 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 4 Jan 2024 16:23:43 +0530 Subject: [PATCH 076/664] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 847dee8655..dcf4fe91a6 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ var express = require('express'); var app = express(); app.get('/', function (req, res) { - res.send('{ "response": "Welcome to Inno-demoproject " }'); + res.send('{ "response": "Welcome to Inno-demogcp-project " }'); }); app.get('/will', function (req, res) { From 66e2ea93e62d859051784f1dffef40633c6c7c37 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 5 Jan 2024 11:06:20 +0530 Subject: [PATCH 077/664] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index dcf4fe91a6..71fb453dfc 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ var express = require('express'); var app = express(); app.get('/', function (req, res) { - res.send('{ "response": "Welcome to Inno-demogcp-project " }'); + res.send('{ "response": "Welcome to testproject " }'); }); app.get('/will', function (req, res) { From 47b77d9775735081c6e2fd5ebf4a8e429ed170f4 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 5 Jan 2024 11:29:56 +0530 Subject: [PATCH 078/664] Update node.js.yml --- .github/workflows/node.js.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 591d4a4d4d..d9a6d1cbcd 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -50,9 +50,8 @@ jobs: GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} run: | gcloud container clusters get-credentials test-cluster --region asia-south1-c - sed -i "s/GOOGLE_PROJECT/$GOOGLE_PROJECT/g" deployment.yaml - sed -i "s/GOOGLE_PROJECT/$GOOGLE_PROJECT/g" service.yaml - kubectl delete -f deployment.yaml + sed -i "s/GOOGLE_PROJECT/$GOOGLE_PROJECT/g" + kubectl set image deployment/ = kubectl apply -f deployment.yaml kubectl apply -f service.yaml From ed5f210f9707529035cc5f5e4cd79abfcb84aa00 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 5 Jan 2024 11:32:14 +0530 Subject: [PATCH 079/664] Update node.js.yml --- .github/workflows/node.js.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index d9a6d1cbcd..9a5706fd15 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -50,7 +50,6 @@ jobs: GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} run: | gcloud container clusters get-credentials test-cluster --region asia-south1-c - sed -i "s/GOOGLE_PROJECT/$GOOGLE_PROJECT/g" kubectl set image deployment/ = kubectl apply -f deployment.yaml kubectl apply -f service.yaml From 87263ed728c63cd02b39f9433127c915312465be Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 5 Jan 2024 11:35:09 +0530 Subject: [PATCH 080/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 9a5706fd15..36ed8a49f8 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -50,7 +50,7 @@ jobs: GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} run: | gcloud container clusters get-credentials test-cluster --region asia-south1-c - kubectl set image deployment/ = + kubectl set image deployment/nodeapp-deployment/nodeserver/Nodejs kubectl apply -f deployment.yaml kubectl apply -f service.yaml From 89be3d1aa0d85324bf309f3a74840965d1c43656 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 5 Jan 2024 11:39:43 +0530 Subject: [PATCH 081/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 36ed8a49f8..d368dd6352 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -50,7 +50,7 @@ jobs: GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} run: | gcloud container clusters get-credentials test-cluster --region asia-south1-c - kubectl set image deployment/nodeapp-deployment/nodeserver/Nodejs + kubectl set image deployment/nodeapp-deployment nodeserver=nodejs:latest kubectl apply -f deployment.yaml kubectl apply -f service.yaml From 0ffaebf904e9b0a97aadcea01da17e013421fed9 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 5 Jan 2024 12:05:39 +0530 Subject: [PATCH 082/664] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 71fb453dfc..c880b8d74a 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ var express = require('express'); var app = express(); app.get('/', function (req, res) { - res.send('{ "response": "Welcome to testproject " }'); + res.send('{ "response": "Welcome to demoproject " }'); }); app.get('/will', function (req, res) { From f3d2cd6aee4c8319d441d465ae95ce5af0f9d035 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 5 Jan 2024 12:06:31 +0530 Subject: [PATCH 083/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index d368dd6352..066d691cb2 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -50,7 +50,7 @@ jobs: GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} run: | gcloud container clusters get-credentials test-cluster --region asia-south1-c - kubectl set image deployment/nodeapp-deployment nodeserver=nodejs:latest + kubectl rollout restart deployment/nodeapp-deployment kubectl apply -f deployment.yaml kubectl apply -f service.yaml From b5cf0f79ff5cc1ed585658893726bc8db3b87959 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 5 Jan 2024 12:17:24 +0530 Subject: [PATCH 084/664] Update deployment.yaml --- deployment.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/deployment.yaml b/deployment.yaml index 00ed737ef7..71a231ed69 100644 --- a/deployment.yaml +++ b/deployment.yaml @@ -19,3 +19,4 @@ spec: image: us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest ports: - containerPort: 3000 + imagePullPolicy: Always From f3a913d432a85a3f6bc34b3945e4c3091c03e6ab Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 5 Jan 2024 12:18:34 +0530 Subject: [PATCH 085/664] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index c880b8d74a..24f1ea604c 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ var express = require('express'); var app = express(); app.get('/', function (req, res) { - res.send('{ "response": "Welcome to demoproject " }'); + res.send('{ "response": "Welcome to updated testproject " }'); }); app.get('/will', function (req, res) { From 716052f30af27af6c685c8c0d12ad033da1a545f Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 5 Jan 2024 12:19:41 +0530 Subject: [PATCH 086/664] Update node.js.yml --- .github/workflows/node.js.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 066d691cb2..7f5fe24f6a 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -50,7 +50,6 @@ jobs: GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} run: | gcloud container clusters get-credentials test-cluster --region asia-south1-c - kubectl rollout restart deployment/nodeapp-deployment kubectl apply -f deployment.yaml kubectl apply -f service.yaml From 1166dbb7085175fa530508a4072a2dbab7c0e7fe Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 5 Jan 2024 12:25:38 +0530 Subject: [PATCH 087/664] Update deployment.yaml --- deployment.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deployment.yaml b/deployment.yaml index 71a231ed69..364199a9a7 100644 --- a/deployment.yaml +++ b/deployment.yaml @@ -12,11 +12,11 @@ spec: template: metadata: labels: - app: nodeapp + app: nodeapp spec: containers: - name: nodeserver image: us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest ports: - containerPort: 3000 - imagePullPolicy: Always + imagePullPolicy: Always # Always pull the latest image From c6b4d68c9204271b1b50a2cdff2bbedd1d1cfc9d Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 5 Jan 2024 12:30:19 +0530 Subject: [PATCH 088/664] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 24f1ea604c..a4f7e90323 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ var express = require('express'); var app = express(); app.get('/', function (req, res) { - res.send('{ "response": "Welcome to updated testproject " }'); + res.send('{ "response": "Welcome to INNODATA-PROJECT " }'); }); app.get('/will', function (req, res) { From df19a023988bf901d5ff66794887a9269f170a14 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 5 Jan 2024 12:33:06 +0530 Subject: [PATCH 089/664] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index a4f7e90323..3b5c1e9c1d 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ var express = require('express'); var app = express(); app.get('/', function (req, res) { - res.send('{ "response": "Welcome to INNODATA-PROJECT " }'); + res.send('{ "response": "Welcome to TESTGCP-NAGARAJU " }'); }); app.get('/will', function (req, res) { From c67d1a724fd8abbd727307e718495af06470dd57 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 5 Jan 2024 13:03:12 +0530 Subject: [PATCH 090/664] Update deployment.yaml --- deployment.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/deployment.yaml b/deployment.yaml index 364199a9a7..00cab41847 100644 --- a/deployment.yaml +++ b/deployment.yaml @@ -5,7 +5,7 @@ metadata: labels: app: nodeapp spec: - replicas: 1 + replicas: 1 # Adjust the number based on your needs selector: matchLabels: app: nodeapp @@ -20,3 +20,5 @@ spec: ports: - containerPort: 3000 imagePullPolicy: Always # Always pull the latest image + strategy: + type: RollingUpdate # From 3028f3f52be075368103b45dba19f5d09ab305a9 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 5 Jan 2024 13:08:02 +0530 Subject: [PATCH 091/664] Update deployment.yaml --- deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment.yaml b/deployment.yaml index 00cab41847..3267b7f6b6 100644 --- a/deployment.yaml +++ b/deployment.yaml @@ -5,7 +5,7 @@ metadata: labels: app: nodeapp spec: - replicas: 1 # Adjust the number based on your needs + replicas: 3 # Adjust the number based on your needs selector: matchLabels: app: nodeapp From 50b3c034fd67d0a8bd6132cad9f683eb02c051c3 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 5 Jan 2024 13:08:34 +0530 Subject: [PATCH 092/664] Update deployment.yaml --- deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment.yaml b/deployment.yaml index 3267b7f6b6..534c0b03df 100644 --- a/deployment.yaml +++ b/deployment.yaml @@ -21,4 +21,4 @@ spec: - containerPort: 3000 imagePullPolicy: Always # Always pull the latest image strategy: - type: RollingUpdate # + type: RollingUpdate From 1300291b683dc2ca6d13ef0b04a6f4ba0b59e6c1 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 5 Jan 2024 14:36:28 +0530 Subject: [PATCH 093/664] Update deployment.yaml --- deployment.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/deployment.yaml b/deployment.yaml index 534c0b03df..9c1b580dfe 100644 --- a/deployment.yaml +++ b/deployment.yaml @@ -21,4 +21,7 @@ spec: - containerPort: 3000 imagePullPolicy: Always # Always pull the latest image strategy: - type: RollingUpdate + type: RollingUpdate + rollingUpdate: + maxSurge: 1 + maxUnavailable: 1 From 5ecd369ae30ccc45d1436fad10453b3bf9d7d3b4 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 5 Jan 2024 14:40:07 +0530 Subject: [PATCH 094/664] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 3b5c1e9c1d..1ec7bb7a44 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ var express = require('express'); var app = express(); app.get('/', function (req, res) { - res.send('{ "response": "Welcome to TESTGCP-NAGARAJU " }'); + res.send('{ "response": "Welcome to mnagarajuinno " }'); }); app.get('/will', function (req, res) { From 8946d8a088515511e97ccd3fdbd58be507b42c85 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 5 Jan 2024 14:47:34 +0530 Subject: [PATCH 095/664] Update deployment.yaml --- deployment.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/deployment.yaml b/deployment.yaml index 9c1b580dfe..9aaeb6606b 100644 --- a/deployment.yaml +++ b/deployment.yaml @@ -21,7 +21,4 @@ spec: - containerPort: 3000 imagePullPolicy: Always # Always pull the latest image strategy: - type: RollingUpdate - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 + type: Recreate From e477ed8d41b9e10c5c757561e4f88c089e76c587 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 5 Jan 2024 15:11:41 +0530 Subject: [PATCH 096/664] Update deployment.yaml --- deployment.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/deployment.yaml b/deployment.yaml index 9aaeb6606b..69ad443d9a 100644 --- a/deployment.yaml +++ b/deployment.yaml @@ -13,12 +13,10 @@ spec: metadata: labels: app: nodeapp - spec: + spec: containers: - name: nodeserver image: us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + imagePullPolicy: Always ports: - containerPort: 3000 - imagePullPolicy: Always # Always pull the latest image - strategy: - type: Recreate From 39961e02ff26b4fc015a91b169f61e0d8cd28bfe Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 5 Jan 2024 15:14:19 +0530 Subject: [PATCH 097/664] Update deployment.yaml --- deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment.yaml b/deployment.yaml index 69ad443d9a..52a18259d9 100644 --- a/deployment.yaml +++ b/deployment.yaml @@ -13,7 +13,7 @@ spec: metadata: labels: app: nodeapp - spec: + spec: containers: - name: nodeserver image: us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest From cbda22f6c03b7e55294759edebedffa3e48874ca Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 5 Jan 2024 16:33:46 +0530 Subject: [PATCH 098/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 7f5fe24f6a..4917af5b72 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -49,7 +49,7 @@ jobs: env: GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} run: | - gcloud container clusters get-credentials test-cluster --region asia-south1-c + gcloud container clusters get-credentials innotest-cluster --region us-central1-c kubectl apply -f deployment.yaml kubectl apply -f service.yaml From b07d02352bc60c85d70843c02aebc70ef8057793 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 5 Jan 2024 16:37:19 +0530 Subject: [PATCH 099/664] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 1ec7bb7a44..233c537874 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ var express = require('express'); var app = express(); app.get('/', function (req, res) { - res.send('{ "response": "Welcome to mnagarajuinno " }'); + res.send('{ "response": "Welcome to INNODATA " }'); }); app.get('/will', function (req, res) { From edd01d4140a1febfd996641a0f96e7a07fe3c522 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 5 Jan 2024 16:43:56 +0530 Subject: [PATCH 100/664] Update deployment.yaml --- deployment.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/deployment.yaml b/deployment.yaml index 52a18259d9..97b7fcb41f 100644 --- a/deployment.yaml +++ b/deployment.yaml @@ -17,6 +17,11 @@ spec: containers: - name: nodeserver image: us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - imagePullPolicy: Always ports: - containerPort: 3000 + imagePullPolicy: Always + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 1 + maxUnavailable: 1 From 9e1d46f0674138c8800045935c6b851e94591637 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 5 Jan 2024 16:56:40 +0530 Subject: [PATCH 101/664] Update deployment.yaml --- deployment.yaml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/deployment.yaml b/deployment.yaml index 97b7fcb41f..dbcb05f2ae 100644 --- a/deployment.yaml +++ b/deployment.yaml @@ -5,7 +5,7 @@ metadata: labels: app: nodeapp spec: - replicas: 3 # Adjust the number based on your needs + replicas: 3 selector: matchLabels: app: nodeapp @@ -19,9 +19,6 @@ spec: image: us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest ports: - containerPort: 3000 - imagePullPolicy: Always + imagePullPolicy: Always # Always pull the latest image strategy: - type: RollingUpdate - rollingUpdate: - maxSurge: 1 - maxUnavailable: 1 + type: Recreate # Use the Recreate strategy From 1d80d5ea9aca8bf4b93da4eb055bb9561f55eb69 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 5 Jan 2024 17:12:39 +0530 Subject: [PATCH 102/664] Update node.js.yml --- .github/workflows/node.js.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 4917af5b72..e8750d6d79 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -50,6 +50,7 @@ jobs: GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} run: | gcloud container clusters get-credentials innotest-cluster --region us-central1-c + kubectl set image deployment/nodeapp-deployment nodeserver=nodeapp:latest kubectl apply -f deployment.yaml kubectl apply -f service.yaml From 0decd4b99ac8e21153ffb3dfe4691f4ff91d98c0 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 5 Jan 2024 17:14:47 +0530 Subject: [PATCH 103/664] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 233c537874..3be7323800 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ var express = require('express'); var app = express(); app.get('/', function (req, res) { - res.send('{ "response": "Welcome to INNODATA " }'); + res.send('{ "response": "Welcome to PROJECT " }'); }); app.get('/will', function (req, res) { From ff62d54d07e7d669d95752ca75cc2697c782e8ba Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 5 Jan 2024 17:21:17 +0530 Subject: [PATCH 104/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index e8750d6d79..d4f5cff3e4 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -50,7 +50,7 @@ jobs: GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} run: | gcloud container clusters get-credentials innotest-cluster --region us-central1-c - kubectl set image deployment/nodeapp-deployment nodeserver=nodeapp:latest + kubectl set image deployment/nodeapp-deployment nodeserver=node:latest kubectl apply -f deployment.yaml kubectl apply -f service.yaml From b3a84bc02c8cf3e1f24b5087d1f06fc7f381aaf8 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 5 Jan 2024 17:23:57 +0530 Subject: [PATCH 105/664] Update deployment.yaml --- deployment.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/deployment.yaml b/deployment.yaml index dbcb05f2ae..52f29015fb 100644 --- a/deployment.yaml +++ b/deployment.yaml @@ -20,5 +20,3 @@ spec: ports: - containerPort: 3000 imagePullPolicy: Always # Always pull the latest image - strategy: - type: Recreate # Use the Recreate strategy From 0f60ae316846074e6d79922d70b7cf21d22fee2d Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 5 Jan 2024 17:25:23 +0530 Subject: [PATCH 106/664] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 3be7323800..c13cae5aaa 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ var express = require('express'); var app = express(); app.get('/', function (req, res) { - res.send('{ "response": "Welcome to PROJECT " }'); + res.send('{ "response": "Welcome to INNODATA-TECH-ORG " }'); }); app.get('/will', function (req, res) { From 9284e86c10bde8448ac510552b8b4959a237a402 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 5 Jan 2024 17:31:29 +0530 Subject: [PATCH 107/664] Update deployment.yaml --- deployment.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/deployment.yaml b/deployment.yaml index 52f29015fb..3bed741b65 100644 --- a/deployment.yaml +++ b/deployment.yaml @@ -20,3 +20,5 @@ spec: ports: - containerPort: 3000 imagePullPolicy: Always # Always pull the latest image + strategy: + type: RollingUpdate From a3c18adff3bb38ec09e1b5f3bc693890b8a7619b Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 5 Jan 2024 17:37:07 +0530 Subject: [PATCH 108/664] Update deployment.yaml --- deployment.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deployment.yaml b/deployment.yaml index 3bed741b65..13b74904be 100644 --- a/deployment.yaml +++ b/deployment.yaml @@ -20,5 +20,5 @@ spec: ports: - containerPort: 3000 imagePullPolicy: Always # Always pull the latest image - strategy: - type: RollingUpdate + strategy: + type: RollingUpdate From 5c08971801c35dd5b7e663b2f9b7a512ba5c9334 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 5 Jan 2024 17:39:59 +0530 Subject: [PATCH 109/664] Update deployment.yaml --- deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment.yaml b/deployment.yaml index 13b74904be..617c96ecc1 100644 --- a/deployment.yaml +++ b/deployment.yaml @@ -21,4 +21,4 @@ spec: - containerPort: 3000 imagePullPolicy: Always # Always pull the latest image strategy: - type: RollingUpdate + type: Recreate From 9e841b3bd440ce098e4eeeecbe4e4c21c9ae1ad2 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 5 Jan 2024 17:53:13 +0530 Subject: [PATCH 110/664] Update index.js From 15058d3db8942fe9cf85ef80d97481d5550246ca Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 5 Jan 2024 17:56:20 +0530 Subject: [PATCH 111/664] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index c13cae5aaa..047188175b 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ var express = require('express'); var app = express(); app.get('/', function (req, res) { - res.send('{ "response": "Welcome to INNODATA-TECH-ORG " }'); + res.send('{ "response": "Welcome to INNODATA-TECH " }'); }); app.get('/will', function (req, res) { From 0239ab199ecab7d54ebb2a9bfa1e4128b487d53f Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 5 Jan 2024 18:01:14 +0530 Subject: [PATCH 112/664] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 047188175b..4283eb34bd 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ var express = require('express'); var app = express(); app.get('/', function (req, res) { - res.send('{ "response": "Welcome to INNODATA-TECH " }'); + res.send('{ "response": "Welcome to Innodata-tech-org " }'); }); app.get('/will', function (req, res) { From 6c7445e2ec9d13dc569c5abed8129ade0f34a0ef Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 5 Jan 2024 18:05:29 +0530 Subject: [PATCH 113/664] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 4283eb34bd..351cd018b1 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ var express = require('express'); var app = express(); app.get('/', function (req, res) { - res.send('{ "response": "Welcome to Innodata-tech-org " }'); + res.send('{ "response": "Welcome to NODE JS APPLICATION " }'); }); app.get('/will', function (req, res) { From 323f906cb440c24b12b32ceddccc22a8a1dd243f Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 5 Jan 2024 18:09:44 +0530 Subject: [PATCH 114/664] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 351cd018b1..1672c6dc8c 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ var express = require('express'); var app = express(); app.get('/', function (req, res) { - res.send('{ "response": "Welcome to NODE JS APPLICATION " }'); + res.send('{ "response": "Welcome to TIRUPATI " }'); }); app.get('/will', function (req, res) { From 1d7d0c68d5a2e93dd0212a2bbc97eb47b6c3bdd2 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 5 Jan 2024 19:13:23 +0530 Subject: [PATCH 115/664] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 1672c6dc8c..e5cdc8bd5a 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ var express = require('express'); var app = express(); app.get('/', function (req, res) { - res.send('{ "response": "Welcome to TIRUPATI " }'); + res.send('{ "response": "Welcome to INNODATA INDIA PVT.LTD " }'); }); app.get('/will', function (req, res) { From cf800756c96ebbbc4564c52a1b06d8d9b1620b44 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 5 Jan 2024 19:29:58 +0530 Subject: [PATCH 116/664] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index e5cdc8bd5a..d6f54ca99b 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ var express = require('express'); var app = express(); app.get('/', function (req, res) { - res.send('{ "response": "Welcome to INNODATA INDIA PVT.LTD " }'); + res.send('{ "response": "Welcome to TEST-GCP PROJECT " }'); }); app.get('/will', function (req, res) { From 2ce714a0025d37c8b888e18be352c8660acd889f Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 5 Jan 2024 19:40:15 +0530 Subject: [PATCH 117/664] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index d6f54ca99b..dd70532a46 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ var express = require('express'); var app = express(); app.get('/', function (req, res) { - res.send('{ "response": "Welcome to TEST-GCP PROJECT " }'); + res.send('{ "response": "Welcome to Git-Hub Actions CI/CD Workflow " }'); }); app.get('/will', function (req, res) { From 337cb94ab432137dbdd2cf35eb4925edb1f0f006 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 8 Jan 2024 09:38:26 +0530 Subject: [PATCH 118/664] Update deployment.yaml --- deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment.yaml b/deployment.yaml index 617c96ecc1..13b74904be 100644 --- a/deployment.yaml +++ b/deployment.yaml @@ -21,4 +21,4 @@ spec: - containerPort: 3000 imagePullPolicy: Always # Always pull the latest image strategy: - type: Recreate + type: RollingUpdate From 3a6a7b50ac66c41ee7116b747e387887df09cc00 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 8 Jan 2024 09:40:37 +0530 Subject: [PATCH 119/664] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index dd70532a46..888c96385b 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ var express = require('express'); var app = express(); app.get('/', function (req, res) { - res.send('{ "response": "Welcome to Git-Hub Actions CI/CD Workflow " }'); + res.send('{ "response": "Welcome to Git-Hub Actions Gcp-test project " }'); }); app.get('/will', function (req, res) { From 955e8ab826eedeca19cb20aed006daf9fef6e257 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 8 Jan 2024 09:45:48 +0530 Subject: [PATCH 120/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index d4f5cff3e4..be01d98b72 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -50,7 +50,7 @@ jobs: GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} run: | gcloud container clusters get-credentials innotest-cluster --region us-central1-c - kubectl set image deployment/nodeapp-deployment nodeserver=node:latest + kubectl rollout restart deployment nodeapp-deployment kubectl apply -f deployment.yaml kubectl apply -f service.yaml From 4b2d5577cfdbbe0a9cd3dd6bfe91f7c73b89bc92 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 8 Jan 2024 09:48:43 +0530 Subject: [PATCH 121/664] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 888c96385b..1e59ea9f59 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ var express = require('express'); var app = express(); app.get('/', function (req, res) { - res.send('{ "response": "Welcome to Git-Hub Actions Gcp-test project " }'); + res.send('{ "response": "Welcome to Git-Hub Actions" }'); }); app.get('/will', function (req, res) { From 812f7f72d32dd0e0080de652dda4ff8f7fbeefbc Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 8 Jan 2024 09:52:55 +0530 Subject: [PATCH 122/664] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 1e59ea9f59..c10fe0bc9b 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ var express = require('express'); var app = express(); app.get('/', function (req, res) { - res.send('{ "response": "Welcome to Git-Hub Actions" }'); + res.send('{ "response": "Welcome to Innodata India pvt.ltd" }'); }); app.get('/will', function (req, res) { From 4081ee201cca79a521321683738f085155efc087 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 8 Jan 2024 09:56:55 +0530 Subject: [PATCH 123/664] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index c10fe0bc9b..faf946d384 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ var express = require('express'); var app = express(); app.get('/', function (req, res) { - res.send('{ "response": "Welcome to Innodata India pvt.ltd" }'); + res.send('{ "response": "Welcome to TESTGCP-PROJECT" }'); }); app.get('/will', function (req, res) { From 42e462b371aa5cb69d0fd75538f29b50e5b6f6f7 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 8 Jan 2024 10:02:05 +0530 Subject: [PATCH 124/664] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index faf946d384..874a1a0cd6 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ var express = require('express'); var app = express(); app.get('/', function (req, res) { - res.send('{ "response": "Welcome to TESTGCP-PROJECT" }'); + res.send('{ "response": "Welcome to Horizon GCP Project" }'); }); app.get('/will', function (req, res) { From 944dfd3ec43be4c39debd9765f9ca418d1692605 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 8 Jan 2024 10:24:13 +0530 Subject: [PATCH 125/664] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 874a1a0cd6..e87aa7f6bc 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ var express = require('express'); var app = express(); app.get('/', function (req, res) { - res.send('{ "response": "Welcome to Horizon GCP Project" }'); + res.send('{ "response": "Welcome to INNODATA INDIA PVT.LTD" }'); }); app.get('/will', function (req, res) { From 2a471995cbf6e7785ecf2529295f81c17cab66d0 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 8 Jan 2024 11:24:49 +0530 Subject: [PATCH 126/664] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index e87aa7f6bc..b28715680e 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ var express = require('express'); var app = express(); app.get('/', function (req, res) { - res.send('{ "response": "Welcome to INNODATA INDIA PVT.LTD" }'); + res.send('{ "response": "Welcome to NOIDA" }'); }); app.get('/will', function (req, res) { From 69f2225237611d1eecb5d3538815a7e957fd85a3 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 9 Jan 2024 11:55:53 +0530 Subject: [PATCH 127/664] Update node.js.yml --- .github/workflows/node.js.yml | 92 +++++++++++++++++------------------ 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index be01d98b72..ee7abfb7e8 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -1,56 +1,56 @@ # This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs -name: Node.js CI +#name: Node.js CI -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] +#on: +# push: +# branches: [ "main" ] +# pull_request: + # branches: [ "main" ] -jobs: - deploy: +#jobs: + # deploy: - runs-on: self-hosted +# runs-on: self-hosted - strategy: - matrix: - node-version: [14.x] +# strategy: +# matrix: +# node-version: [14.x] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ - steps: - - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - run: npm ci - - run: npm run build --if-present - - run: npm install +# steps: +# - uses: actions/checkout@v3 +# - name: Use Node.js ${{ matrix.node-version }} +# uses: actions/setup-node@v3 +# with: +# node-version: ${{ matrix.node-version }} +# cache: 'npm' +# - run: npm ci +# - run: npm run build --if-present +# - run: npm install - - name: install the gcloud cli - uses: google-github-actions/setup-gcloud@v0.2.0 - with: - project_id: ${{ secrets.GOOGLE_PROJECT }} - service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} - install_components: 'gke-gcloud-auth-plugin' - export_default_credentials: true - - - name: build and push the docker image - env: - GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} - run: | - gcloud auth configure-docker us-central1-docker.pkg.dev - docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest . - docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - - name: deploy to gke - env: - GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} - run: | - gcloud container clusters get-credentials innotest-cluster --region us-central1-c - kubectl rollout restart deployment nodeapp-deployment - kubectl apply -f deployment.yaml - kubectl apply -f service.yaml - +# - name: install the gcloud cli +# uses: google-github-actions/setup-gcloud@v0.2.0 +# with: +# project_id: ${{ secrets.GOOGLE_PROJECT }} +# service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} +# install_components: 'gke-gcloud-auth-plugin' +# export_default_credentials: true + + # - name: build and push the docker image + # env: + # GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} + # run: | + # gcloud auth configure-docker us-central1-docker.pkg.dev + docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest . + docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + # - name: deploy to gke + # env: + # GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} + # run: | + gcloud container clusters get-credentials innotest-cluster --region us-central1-c + kubectl rollout restart deployment nodeapp-deployment + kubectl apply -f deployment.yaml + kubectl apply -f service.yaml + From d9ac5a82136f3f118c5c0dbfba5980b047813496 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 9 Jan 2024 11:57:02 +0530 Subject: [PATCH 128/664] Create dev.yaml --- ansible/dev.yaml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 ansible/dev.yaml diff --git a/ansible/dev.yaml b/ansible/dev.yaml new file mode 100644 index 0000000000..ccb9200725 --- /dev/null +++ b/ansible/dev.yaml @@ -0,0 +1,36 @@ +--- +- name: Node.js CI - Development Environment + hosts: development + gather_facts: true + become: yes + + tasks: + - name: Clone repository + git: + repo: "https://github.com/your/repository.git" + dest: "/path/to/your/local/repo" + + - name: Set up Node.js environment + ansible.builtin.command: "cd /path/to/your/local/repo && npm ci" + + - name: Install gcloud CLI + community.general.gcp_auth: + project: "{{ lookup('env', 'GOOGLE_PROJECT') }}" + credentials_file: "{{ lookup('env', 'GOOGLE_APPLICATION_CREDENTIALS') }}" + export_default_credentials: true + install_components: + - 'gke-gcloud-auth-plugin' + + - name: Build and push Docker image + ansible.builtin.command: > + cd /path/to/your/local/repo && + gcloud auth configure-docker us-central1-docker.pkg.dev && + docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest . && + docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + + - name: Deploy to GKE + ansible.builtin.command: > + gcloud container clusters get-credentials innotest-cluster --region us-central1-c && + kubectl rollout restart deployment nodeapp-deployment && + kubectl apply -f /path/to/your/local/repo/deployment.yaml && + kubectl apply -f /path/to/your/local/repo/service.yaml From f790e691db8b04b00787404e2a8ce65ae0de95be Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 9 Jan 2024 11:57:51 +0530 Subject: [PATCH 129/664] Create stage.yaml --- ansible/stage.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 ansible/stage.yaml diff --git a/ansible/stage.yaml b/ansible/stage.yaml new file mode 100644 index 0000000000..9506ac16ae --- /dev/null +++ b/ansible/stage.yaml @@ -0,0 +1,8 @@ +--- +- name: Node.js CI - Staging Environment + hosts: staging + gather_facts: true + become: yes + + tasks: + # Similar tasks as in the development environment playbook with environment-specific adjustments From 885bc6a108f7ddc2cc5718378aff30889313d112 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 9 Jan 2024 11:59:21 +0530 Subject: [PATCH 130/664] Create production.yaml --- ansible/production.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 ansible/production.yaml diff --git a/ansible/production.yaml b/ansible/production.yaml new file mode 100644 index 0000000000..ae964b02e0 --- /dev/null +++ b/ansible/production.yaml @@ -0,0 +1,8 @@ +--- +- name: Node.js CI - Production Environment + hosts: production + gather_facts: true + become: yes + + tasks: + # Similar tasks as in the development environment playbook with environment-specific adjustments From 6fdcda237d0469e34d43b1b0c5efa7c6492d5403 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 9 Jan 2024 13:26:35 +0530 Subject: [PATCH 131/664] Delete ansible/dev.yaml --- ansible/dev.yaml | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 ansible/dev.yaml diff --git a/ansible/dev.yaml b/ansible/dev.yaml deleted file mode 100644 index ccb9200725..0000000000 --- a/ansible/dev.yaml +++ /dev/null @@ -1,36 +0,0 @@ ---- -- name: Node.js CI - Development Environment - hosts: development - gather_facts: true - become: yes - - tasks: - - name: Clone repository - git: - repo: "https://github.com/your/repository.git" - dest: "/path/to/your/local/repo" - - - name: Set up Node.js environment - ansible.builtin.command: "cd /path/to/your/local/repo && npm ci" - - - name: Install gcloud CLI - community.general.gcp_auth: - project: "{{ lookup('env', 'GOOGLE_PROJECT') }}" - credentials_file: "{{ lookup('env', 'GOOGLE_APPLICATION_CREDENTIALS') }}" - export_default_credentials: true - install_components: - - 'gke-gcloud-auth-plugin' - - - name: Build and push Docker image - ansible.builtin.command: > - cd /path/to/your/local/repo && - gcloud auth configure-docker us-central1-docker.pkg.dev && - docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest . && - docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - - - name: Deploy to GKE - ansible.builtin.command: > - gcloud container clusters get-credentials innotest-cluster --region us-central1-c && - kubectl rollout restart deployment nodeapp-deployment && - kubectl apply -f /path/to/your/local/repo/deployment.yaml && - kubectl apply -f /path/to/your/local/repo/service.yaml From f14dd77a34384fa3107144597bd9ef8a44d16303 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 9 Jan 2024 13:38:42 +0530 Subject: [PATCH 132/664] Update node.js.yml --- .github/workflows/node.js.yml | 87 ++++++++++++++++++----------------- 1 file changed, 45 insertions(+), 42 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index ee7abfb7e8..fd180e6c5f 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -1,56 +1,59 @@ # This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs +name: Node.js CI -#name: Node.js CI +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] -#on: -# push: -# branches: [ "main" ] -# pull_request: - # branches: [ "main" ] +jobs: + deploy: + runs-on: self-hosted -#jobs: - # deploy: + strategy: + matrix: + node-version: [14.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ -# runs-on: self-hosted + steps: + - name: Checkout code + uses: actions/checkout@v3 -# strategy: -# matrix: -# node-version: [14.x] - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + + - run: npm ci + + - run: npm run build --if-present -# steps: -# - uses: actions/checkout@v3 -# - name: Use Node.js ${{ matrix.node-version }} -# uses: actions/setup-node@v3 -# with: -# node-version: ${{ matrix.node-version }} -# cache: 'npm' -# - run: npm ci -# - run: npm run build --if-present -# - run: npm install - -# - name: install the gcloud cli -# uses: google-github-actions/setup-gcloud@v0.2.0 -# with: -# project_id: ${{ secrets.GOOGLE_PROJECT }} -# service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} -# install_components: 'gke-gcloud-auth-plugin' -# export_default_credentials: true - - # - name: build and push the docker image - # env: - # GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} - # run: | - # gcloud auth configure-docker us-central1-docker.pkg.dev + - run: npm install + + - name: Install the gcloud CLI + uses: google-github-actions/setup-gcloud@v0.2.0 + with: + project_id: ${{ secrets.GOOGLE_PROJECT }} + service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} + install_components: 'gke-gcloud-auth-plugin' + export_default_credentials: true + + - name: Build and push the Docker image + env: + GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} + run: | + gcloud auth configure-docker us-central1-docker.pkg.dev docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest . docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - # - name: deploy to gke - # env: - # GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} - # run: | + + - name: Deploy to GKE + env: + GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} + run: | gcloud container clusters get-credentials innotest-cluster --region us-central1-c kubectl rollout restart deployment nodeapp-deployment kubectl apply -f deployment.yaml kubectl apply -f service.yaml - From 8e7fd837eb2a324b207f3b6dd2a20edae1d3ccb6 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 9 Jan 2024 14:20:35 +0530 Subject: [PATCH 133/664] Update node.js.yml --- .github/workflows/node.js.yml | 70 +++++++++++++++++++---------------- 1 file changed, 39 insertions(+), 31 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index fd180e6c5f..f53d6f57fd 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -21,39 +21,47 @@ jobs: - name: Checkout code uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + - name: Setup Ansible + uses: ansible/ansible-setup@v2 with: - node-version: ${{ matrix.node-version }} - cache: 'npm' + ansible-version: '2.10' - - run: npm ci + - name: Clone Repository with Ansible + run: ansible-playbook clone-repo.yml - - run: npm run build --if-present + # - name: Use Node.js ${{ matrix.node-version }} + # uses: actions/setup-node@v3 + # with: + # node-version: ${{ matrix.node-version }} + # cache: 'npm' - - run: npm install + # - run: npm ci - - name: Install the gcloud CLI - uses: google-github-actions/setup-gcloud@v0.2.0 - with: - project_id: ${{ secrets.GOOGLE_PROJECT }} - service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} - install_components: 'gke-gcloud-auth-plugin' - export_default_credentials: true - - - name: Build and push the Docker image - env: - GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} - run: | - gcloud auth configure-docker us-central1-docker.pkg.dev - docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest . - docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - - - name: Deploy to GKE - env: - GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} - run: | - gcloud container clusters get-credentials innotest-cluster --region us-central1-c - kubectl rollout restart deployment nodeapp-deployment - kubectl apply -f deployment.yaml - kubectl apply -f service.yaml + # - run: npm run build --if-present + + # - run: npm install + + # - name: Install the gcloud CLI + # uses: google-github-actions/setup-gcloud@v0.2.0 + # with: + # project_id: ${{ secrets.GOOGLE_PROJECT }} + # service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} + # install_components: 'gke-gcloud-auth-plugin' + # export_default_credentials: true + + # - name: Build and push the Docker image + # env: + # GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} + # run: | + # gcloud auth configure-docker us-central1-docker.pkg.dev + # docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest . + # docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + + # - name: Deploy to GKE + # env: + # GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} + # run: | + # gcloud container clusters get-credentials innotest-cluster --region us-central1-c + # kubectl rollout restart deployment nodeapp-deployment + # kubectl apply -f deployment.yaml + # kubectl apply -f service.yaml From b16afde3c881649ca185c869a4b54fa719fd0980 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 9 Jan 2024 15:02:44 +0530 Subject: [PATCH 134/664] Delete ansible directory --- ansible/production.yaml | 8 -------- ansible/stage.yaml | 8 -------- 2 files changed, 16 deletions(-) delete mode 100644 ansible/production.yaml delete mode 100644 ansible/stage.yaml diff --git a/ansible/production.yaml b/ansible/production.yaml deleted file mode 100644 index ae964b02e0..0000000000 --- a/ansible/production.yaml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- name: Node.js CI - Production Environment - hosts: production - gather_facts: true - become: yes - - tasks: - # Similar tasks as in the development environment playbook with environment-specific adjustments diff --git a/ansible/stage.yaml b/ansible/stage.yaml deleted file mode 100644 index 9506ac16ae..0000000000 --- a/ansible/stage.yaml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- name: Node.js CI - Staging Environment - hosts: staging - gather_facts: true - become: yes - - tasks: - # Similar tasks as in the development environment playbook with environment-specific adjustments From 6ce528dd1a08c8d8705578d0710b0fed693a25d5 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 9 Jan 2024 15:23:44 +0530 Subject: [PATCH 135/664] Create repo.yaml --- repo.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 repo.yaml diff --git a/repo.yaml b/repo.yaml new file mode 100644 index 0000000000..f788b8f23f --- /dev/null +++ b/repo.yaml @@ -0,0 +1,15 @@ +--- +- name: Clone Repository + hosts: localhost + gather_facts: false + + tasks: + - name: Ensure directory exists + ansible.builtin.file: + path: "/path/to/destination" + state: directory + + - name: Clone GitHub Repository + ansible.builtin.git: + repo: "https://github.com/yourusername/your-repo.git" + dest: "/path/to/destination/your-repo" From 97804989e306fb2dd085a8bd77d4423cd69b2e40 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 9 Jan 2024 15:46:45 +0530 Subject: [PATCH 136/664] Update repo.yaml --- repo.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/repo.yaml b/repo.yaml index f788b8f23f..5441b6e98b 100644 --- a/repo.yaml +++ b/repo.yaml @@ -6,10 +6,10 @@ tasks: - name: Ensure directory exists ansible.builtin.file: - path: "/path/to/destination" + path: "/home/mnagaraju/actions-runner/Testproject-INNO" state: directory - name: Clone GitHub Repository ansible.builtin.git: - repo: "https://github.com/yourusername/your-repo.git" - dest: "/path/to/destination/your-repo" + repo: "https://github.com/mnagaraju5628/Testproject-INNO.git" + dest: "/home/mnagaraju/actions-runner/Testproject-INNO" From 9dc81579a1bf64291ed28f4cce3add5099c88211 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 9 Jan 2024 16:10:37 +0530 Subject: [PATCH 137/664] Update repo.yaml --- repo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repo.yaml b/repo.yaml index 5441b6e98b..089433999c 100644 --- a/repo.yaml +++ b/repo.yaml @@ -11,5 +11,5 @@ - name: Clone GitHub Repository ansible.builtin.git: - repo: "https://github.com/mnagaraju5628/Testproject-INNO.git" + repo: "https://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@github.com/mnagaraju5628/Testproject-INNO.git" dest: "/home/mnagaraju/actions-runner/Testproject-INNO" From 6512514da192f27bd128929c8fb667ea13fe928a Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 9 Jan 2024 16:20:13 +0530 Subject: [PATCH 138/664] Update node.js.yml From ebf6cab55a03025e4af2ca27ecdadc11c3a9ad59 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 9 Jan 2024 17:31:16 +0530 Subject: [PATCH 139/664] Update repo.yaml --- repo.yaml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/repo.yaml b/repo.yaml index 089433999c..92e086143a 100644 --- a/repo.yaml +++ b/repo.yaml @@ -1,15 +1,14 @@ --- -- name: Clone Repository - hosts: localhost - gather_facts: false +- name: git module demo + hosts: all + become: true tasks: - - name: Ensure directory exists - ansible.builtin.file: - path: "/home/mnagaraju/actions-runner/Testproject-INNO" - state: directory - - - name: Clone GitHub Repository - ansible.builtin.git: + - name: ensure git pkg installed + ansible.builtin.yum: + name: git + state: present + - name: checkout git repo + ansible.builtin.git: repo: "https://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@github.com/mnagaraju5628/Testproject-INNO.git" dest: "/home/mnagaraju/actions-runner/Testproject-INNO" From c23efe37cb1a5d99a386fb72eef2e23b91e7187e Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 9 Jan 2024 18:13:33 +0530 Subject: [PATCH 140/664] Update repo.yaml --- repo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repo.yaml b/repo.yaml index 92e086143a..6eb9f494cf 100644 --- a/repo.yaml +++ b/repo.yaml @@ -10,5 +10,5 @@ state: present - name: checkout git repo ansible.builtin.git: - repo: "https://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@github.com/mnagaraju5628/Testproject-INNO.git" + repo: "https://github.com/mnagaraju5628/Testproject-INNO.git" dest: "/home/mnagaraju/actions-runner/Testproject-INNO" From becdc0c2635dea46c95402c62164f3087c183e92 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 9 Jan 2024 18:18:31 +0530 Subject: [PATCH 141/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index f53d6f57fd..d88cd0af72 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -22,7 +22,7 @@ jobs: uses: actions/checkout@v3 - name: Setup Ansible - uses: ansible/ansible-setup@v2 + uses: ansible/setup-ansible@v2 with: ansible-version: '2.10' From f2f9923627dc01420c2877ad1753ae29657d32e1 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 10 Jan 2024 12:21:59 +0530 Subject: [PATCH 142/664] Update node.js.yml --- .github/workflows/node.js.yml | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index d88cd0af72..8b0f4e404e 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -9,8 +9,9 @@ on: branches: [ "main" ] jobs: - deploy: - runs-on: self-hosted + build: + + runs-on: ubuntu-latest strategy: matrix: @@ -18,16 +19,25 @@ jobs: # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: - - name: Checkout code - uses: actions/checkout@v3 + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run build --if-present + - run: npm install + + - name: Setup Ansible + run: | + sudo apt-get update + sudo apt-get install -y ansible - - name: Setup Ansible - uses: ansible/setup-ansible@v2 - with: - ansible-version: '2.10' + - name: Run Ansible playbook + run: | + ansible-playbook -i "localhost," -c local ansible/repo.yaml - - name: Clone Repository with Ansible - run: ansible-playbook clone-repo.yml # - name: Use Node.js ${{ matrix.node-version }} # uses: actions/setup-node@v3 From c3fcad0f38ae8b92744df41d8304a2ac3acc13c1 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 10 Jan 2024 12:29:45 +0530 Subject: [PATCH 143/664] Update repo.yaml --- repo.yaml | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/repo.yaml b/repo.yaml index 6eb9f494cf..7e53bd05ae 100644 --- a/repo.yaml +++ b/repo.yaml @@ -1,14 +1,17 @@ --- -- name: git module demo - hosts: all - become: true - +- name: Checkout Node.js Code + hosts: localhost + gather_facts: false tasks: - - name: ensure git pkg installed - ansible.builtin.yum: + - name: Ensure git is installed + become: true + apt: name: git state: present - - name: checkout git repo - ansible.builtin.git: - repo: "https://github.com/mnagaraju5628/Testproject-INNO.git" - dest: "/home/mnagaraju/actions-runner/Testproject-INNO" + + - name: Clone Node.js code from GitHub + git: + repo: https://github.com/mnagaraju5628/Testproject-INNO.git + dest: /path/to/your/local/repo + version: main # replace 'main' with your branch name if different + become: true From dd0ad6d8110381caa9b1dd8040b5cdf4284fd002 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 10 Jan 2024 12:31:23 +0530 Subject: [PATCH 144/664] Create repo.yaml --- ansible/repo.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 ansible/repo.yaml diff --git a/ansible/repo.yaml b/ansible/repo.yaml new file mode 100644 index 0000000000..7e53bd05ae --- /dev/null +++ b/ansible/repo.yaml @@ -0,0 +1,17 @@ +--- +- name: Checkout Node.js Code + hosts: localhost + gather_facts: false + tasks: + - name: Ensure git is installed + become: true + apt: + name: git + state: present + + - name: Clone Node.js code from GitHub + git: + repo: https://github.com/mnagaraju5628/Testproject-INNO.git + dest: /path/to/your/local/repo + version: main # replace 'main' with your branch name if different + become: true From 680d6c83c058844c1d35f436f9c164725a78c467 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 10 Jan 2024 12:31:43 +0530 Subject: [PATCH 145/664] Delete repo.yaml --- repo.yaml | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 repo.yaml diff --git a/repo.yaml b/repo.yaml deleted file mode 100644 index 7e53bd05ae..0000000000 --- a/repo.yaml +++ /dev/null @@ -1,17 +0,0 @@ ---- -- name: Checkout Node.js Code - hosts: localhost - gather_facts: false - tasks: - - name: Ensure git is installed - become: true - apt: - name: git - state: present - - - name: Clone Node.js code from GitHub - git: - repo: https://github.com/mnagaraju5628/Testproject-INNO.git - dest: /path/to/your/local/repo - version: main # replace 'main' with your branch name if different - become: true From f7c9a0177787c3ee23d286bf236b9e71bccf6f8a Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 10 Jan 2024 12:51:31 +0530 Subject: [PATCH 146/664] Update repo.yaml --- ansible/repo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 7e53bd05ae..fa7e15c24d 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -12,6 +12,6 @@ - name: Clone Node.js code from GitHub git: repo: https://github.com/mnagaraju5628/Testproject-INNO.git - dest: /path/to/your/local/repo + dest: /home/mnagaraju/actions-runner/Testproject-INNO version: main # replace 'main' with your branch name if different become: true From 6bdca6a6f4ea816bff3da582afc9d5f653e4f7e2 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 10 Jan 2024 13:17:25 +0530 Subject: [PATCH 147/664] Update node.js.yml --- .github/workflows/node.js.yml | 39 +++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 8b0f4e404e..970ad541ff 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -1,6 +1,7 @@ # This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs -name: Node.js CI + +name: Build and Deploy on: push: @@ -10,34 +11,46 @@ on: jobs: build: - runs-on: ubuntu-latest strategy: matrix: node-version: [14.x] - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: - - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Node.js uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} cache: 'npm' - - run: npm ci - - run: npm run build --if-present - - run: npm install - - name: Setup Ansible + - name: Install dependencies and build run: | - sudo apt-get update - sudo apt-get install -y ansible + npm ci + npm run build --if-present + npm install - - name: Run Ansible playbook + - name: Setup Ansible and Run Ansible playbook run: | - ansible-playbook -i "localhost," -c local ansible/repo.yaml + sudo apt-get update + sudo apt-get install -y ansible + ansible-playbook -i "localhost," -c local ansible/repo.yaml + + - name: Build and Push Docker Image + env: + GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} + GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} + run: | + gcloud auth configure-docker us-central1-docker.pkg.dev + gcloud components install gke-gcloud-auth-plugin + + docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/actions-runner/Testproject-INNO + docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + # - name: Use Node.js ${{ matrix.node-version }} # uses: actions/setup-node@v3 From 80dc49e030149cd449737491dcc795b5be4f9a5b Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 10 Jan 2024 13:19:39 +0530 Subject: [PATCH 148/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 970ad541ff..ce9256c34e 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -45,7 +45,7 @@ jobs: GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} run: | gcloud auth configure-docker us-central1-docker.pkg.dev - gcloud components install gke-gcloud-auth-plugin + sudo apt-get install google-cloud-sdk-gke-gcloud-auth-plugin docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/actions-runner/Testproject-INNO docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest From 5a20f1f02f67e6bdf25ba79c366d2b2bab379d43 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 10 Jan 2024 13:27:05 +0530 Subject: [PATCH 149/664] Update node.js.yml --- .github/workflows/node.js.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index ce9256c34e..cef9a92455 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -39,17 +39,22 @@ jobs: sudo apt-get install -y ansible ansible-playbook -i "localhost," -c local ansible/repo.yaml + - name: Install gcloud CLI and kubectl + run: | + curl -sSL https://sdk.cloud.google.com | bash + exec -l $SHELL + gcloud components install kubectl --quiet + - name: Build and Push Docker Image env: GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} run: | gcloud auth configure-docker us-central1-docker.pkg.dev - sudo apt-get install google-cloud-sdk-gke-gcloud-auth-plugin - docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/actions-runner/Testproject-INNO docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + # - name: Use Node.js ${{ matrix.node-version }} From c05a4945d2da0b2be31e7e310fce132cee3f49b7 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 10 Jan 2024 13:33:57 +0530 Subject: [PATCH 150/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index cef9a92455..f928b92999 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -7,7 +7,7 @@ on: push: branches: [ "main" ] pull_request: - branches: [ "main" ] + branches: [ "main" ] jobs: build: From 55f4ce5d9e259a23516f99b2800ddb626f58e9c3 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 10 Jan 2024 13:45:16 +0530 Subject: [PATCH 151/664] Update node.js.yml --- .github/workflows/node.js.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index f928b92999..016f56b71f 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -7,7 +7,7 @@ on: push: branches: [ "main" ] pull_request: - branches: [ "main" ] + branches: [ "main" ] jobs: build: @@ -45,6 +45,15 @@ jobs: exec -l $SHELL gcloud components install kubectl --quiet + - name: Add IAM Policy Binding + run: | + gcloud projects add-iam-policy-binding $GOOGLE_PROJECT \ + --member "serviceAccount:testproject-inno@goldengate-1.iam.gserviceaccount.com" \ + --role "roles/artifactregistry.writer" + + - name: Update gcloud CLI + run: gcloud components update + - name: Build and Push Docker Image env: GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} @@ -55,6 +64,7 @@ jobs: docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + # - name: Use Node.js ${{ matrix.node-version }} From 73b6b0340f6404036dbc74c929320d3bf2f652a8 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 10 Jan 2024 13:53:15 +0530 Subject: [PATCH 152/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 016f56b71f..68e06bddd7 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -44,7 +44,7 @@ jobs: curl -sSL https://sdk.cloud.google.com | bash exec -l $SHELL gcloud components install kubectl --quiet - + - name: Add IAM Policy Binding run: | gcloud projects add-iam-policy-binding $GOOGLE_PROJECT \ From c619cbb0025d7c6057d239a503619441aff04ecf Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 10 Jan 2024 14:39:46 +0530 Subject: [PATCH 153/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 68e06bddd7..0b18068292 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -44,6 +44,8 @@ jobs: curl -sSL https://sdk.cloud.google.com | bash exec -l $SHELL gcloud components install kubectl --quiet + env: + GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} - name: Add IAM Policy Binding run: | From ef7754c009d16819354a20d14d936044a212bb29 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 10 Jan 2024 14:42:43 +0530 Subject: [PATCH 154/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 0b18068292..d0b8c87f7f 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -49,7 +49,7 @@ jobs: - name: Add IAM Policy Binding run: | - gcloud projects add-iam-policy-binding $GOOGLE_PROJECT \ + gcloud projects add-iam-policy-binding $goldengate-1 \ --member "serviceAccount:testproject-inno@goldengate-1.iam.gserviceaccount.com" \ --role "roles/artifactregistry.writer" From 8f9b094153195abb6fc1a1c1f9f5a3a7355fb2dc Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 10 Jan 2024 14:45:09 +0530 Subject: [PATCH 155/664] Update node.js.yml --- .github/workflows/node.js.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index d0b8c87f7f..bb777f8343 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -47,11 +47,7 @@ jobs: env: GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} - - name: Add IAM Policy Binding - run: | - gcloud projects add-iam-policy-binding $goldengate-1 \ - --member "serviceAccount:testproject-inno@goldengate-1.iam.gserviceaccount.com" \ - --role "roles/artifactregistry.writer" + - name: Update gcloud CLI run: gcloud components update From 0fbb7f6fee54bb9664f18472cfe0c266336baeca Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 10 Jan 2024 14:48:41 +0530 Subject: [PATCH 156/664] Update node.js.yml --- .github/workflows/node.js.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index bb777f8343..072c764134 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -47,10 +47,6 @@ jobs: env: GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} - - - - name: Update gcloud CLI - run: gcloud components update - name: Build and Push Docker Image env: From ec9556f75a6f73569966a040e67bc97808738064 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 10 Jan 2024 15:00:24 +0530 Subject: [PATCH 157/664] Update node.js.yml --- .github/workflows/node.js.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 072c764134..1adb3b53d8 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -46,19 +46,33 @@ jobs: gcloud components install kubectl --quiet env: GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} - + + - name: Authenticate with Google Cloud + run: | + gcloud auth activate-service-account --key-file=${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} + gcloud config set project ${{ secrets.GOOGLE_PROJECT }} + + - name: Configure Docker for Artifact Registry + run: | + gcloud auth configure-docker us-central1-docker.pkg.dev + + - name: Grant Artifact Registry Writer Role + run: | + gcloud projects add-iam-policy-binding ${{ secrets.GOOGLE_PROJECT }} \ + --member "serviceAccount:testproject-inno@goldengate-1.iam.gserviceaccount.com" \ + --role "roles/artifactregistry.writer" - name: Build and Push Docker Image env: GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} run: | - gcloud auth configure-docker us-central1-docker.pkg.dev docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/actions-runner/Testproject-INNO docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + # - name: Use Node.js ${{ matrix.node-version }} From a656dbc3e22d7d26916c58a078f7ee4890e185fd Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 10 Jan 2024 15:13:02 +0530 Subject: [PATCH 158/664] Update node.js.yml --- .github/workflows/node.js.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 1adb3b53d8..5e9d211571 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -47,11 +47,7 @@ jobs: env: GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} - - name: Authenticate with Google Cloud - run: | - gcloud auth activate-service-account --key-file=${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} - gcloud config set project ${{ secrets.GOOGLE_PROJECT }} - + - name: Configure Docker for Artifact Registry run: | gcloud auth configure-docker us-central1-docker.pkg.dev From e6fd28ef034b5a9b3aaa3324d665a588a8cfa84c Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 10 Jan 2024 15:25:55 +0530 Subject: [PATCH 159/664] Update node.js.yml --- .github/workflows/node.js.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 5e9d211571..27f4cab315 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -45,7 +45,7 @@ jobs: exec -l $SHELL gcloud components install kubectl --quiet env: - GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} + PROJECT_ID: ${{ secrets.PROJECT_ID }} - name: Configure Docker for Artifact Registry @@ -54,14 +54,14 @@ jobs: - name: Grant Artifact Registry Writer Role run: | - gcloud projects add-iam-policy-binding ${{ secrets.GOOGLE_PROJECT }} \ + gcloud projects add-iam-policy-binding ${{ secrets .PROJECT_ID }} \ --member "serviceAccount:testproject-inno@goldengate-1.iam.gserviceaccount.com" \ --role "roles/artifactregistry.writer" - name: Build and Push Docker Image env: - GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} - GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} + PROJECT_ID: ${{ secrets.PROJECT_ID }} + PROJECT_APPLICATION_CREDENTIALS: ${{ secrets.PROJECT_APPLICATION_CREDENTIALS }} run: | docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/actions-runner/Testproject-INNO docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest From 3f8aa6f7c11736772fa0aac126c8e529d54c7d24 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 10 Jan 2024 15:35:19 +0530 Subject: [PATCH 160/664] Update node.js.yml --- .github/workflows/node.js.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 27f4cab315..d097947f97 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -54,9 +54,9 @@ jobs: - name: Grant Artifact Registry Writer Role run: | - gcloud projects add-iam-policy-binding ${{ secrets .PROJECT_ID }} \ - --member "serviceAccount:testproject-inno@goldengate-1.iam.gserviceaccount.com" \ - --role "roles/artifactregistry.writer" + gcloud projects add-iam-policy-binding ${{ secrets.PROJECT_ID }} \ + --member "serviceAccount:testproject-inno@goldengate-1.iam.gserviceaccount.com" \ + --role "roles/artifactregistry.writer" - name: Build and Push Docker Image env: From 7165ad8c9fa765ee7b55055cb117aa8d1a1adc76 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 10 Jan 2024 15:41:09 +0530 Subject: [PATCH 161/664] Update node.js.yml --- .github/workflows/node.js.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index d097947f97..a000516de8 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -54,9 +54,10 @@ jobs: - name: Grant Artifact Registry Writer Role run: | - gcloud projects add-iam-policy-binding ${{ secrets.PROJECT_ID }} \ - --member "serviceAccount:testproject-inno@goldengate-1.iam.gserviceaccount.com" \ - --role "roles/artifactregistry.writer" + gcloud projects add-iam-policy-binding goldengate-1 \ + --member="serviceAccount:testproject-inno@goldengate-1.iam.gserviceaccount.com" \ + --role="roles/artifactregistry.writer" + - name: Build and Push Docker Image env: From c4f0ef3b8e7629034ac39cdb532b8005c5d3d3b4 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 10 Jan 2024 15:46:33 +0530 Subject: [PATCH 162/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index a000516de8..871a0aabe6 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -11,7 +11,7 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: self-hosted strategy: matrix: From b305ef7f641d3a657f273c4d13554e45f997126e Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 10 Jan 2024 15:52:02 +0530 Subject: [PATCH 163/664] Update node.js.yml --- .github/workflows/node.js.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 871a0aabe6..b3416df490 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -11,7 +11,7 @@ on: jobs: build: - runs-on: self-hosted + runs-on: ubuntu-latest strategy: matrix: @@ -52,12 +52,6 @@ jobs: run: | gcloud auth configure-docker us-central1-docker.pkg.dev - - name: Grant Artifact Registry Writer Role - run: | - gcloud projects add-iam-policy-binding goldengate-1 \ - --member="serviceAccount:testproject-inno@goldengate-1.iam.gserviceaccount.com" \ - --role="roles/artifactregistry.writer" - - name: Build and Push Docker Image env: From 6f45d4e64687caaeafc8b0fde0af012d1b2146ca Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 10 Jan 2024 16:16:51 +0530 Subject: [PATCH 164/664] Update node.js.yml --- .github/workflows/node.js.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index b3416df490..421a71ac78 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -48,18 +48,22 @@ jobs: PROJECT_ID: ${{ secrets.PROJECT_ID }} - - name: Configure Docker for Artifact Registry + - name: Authenticate with Google Cloud run: | - gcloud auth configure-docker us-central1-docker.pkg.dev + echo "$PROJECT_APPLICATION_CREDENTIALS" > /tmp/keyfile.json + gcloud auth activate-service-account --key-file=/tmp/keyfile.json + gcloud config set project "$PROJECT_ID" + - name: Configure Docker for Artifact Registry + run: | + gcloud auth configure-docker us-central1-docker.pkg.dev - name: Build and Push Docker Image - env: - PROJECT_ID: ${{ secrets.PROJECT_ID }} - PROJECT_APPLICATION_CREDENTIALS: ${{ secrets.PROJECT_APPLICATION_CREDENTIALS }} run: | - docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/actions-runner/Testproject-INNO - docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/actions-runner/Testproject-INNO + docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + + From 7987a377f96b56a1050a4792b279ba30c4f5355f Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 10 Jan 2024 16:24:05 +0530 Subject: [PATCH 165/664] Update node.js.yml --- .github/workflows/node.js.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 421a71ac78..4d17298b69 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -48,11 +48,19 @@ jobs: PROJECT_ID: ${{ secrets.PROJECT_ID }} + - name: Display PROJECT_APPLICATION_CREDENTIALS + run: | + echo "$PROJECT_APPLICATION_CREDENTIALS" + + - name: Write keyfile.json + run: | + echo "$PROJECT_APPLICATION_CREDENTIALS" | tr -d '\r' > /tmp/keyfile.json + cat /tmp/keyfile.json + - name: Authenticate with Google Cloud run: | - echo "$PROJECT_APPLICATION_CREDENTIALS" > /tmp/keyfile.json - gcloud auth activate-service-account --key-file=/tmp/keyfile.json - gcloud config set project "$PROJECT_ID" + gcloud auth activate-service-account --key-file=/tmp/keyfile.json + gcloud config set project "$PROJECT_ID" - name: Configure Docker for Artifact Registry run: | @@ -63,10 +71,7 @@ jobs: docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/actions-runner/Testproject-INNO docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - - - - + From 6747a29d7bf5819e20cdcea887a0c48202359f13 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 10 Jan 2024 16:43:45 +0530 Subject: [PATCH 166/664] Update node.js.yml --- .github/workflows/node.js.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 4d17298b69..758d25d5a4 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -48,13 +48,13 @@ jobs: PROJECT_ID: ${{ secrets.PROJECT_ID }} - - name: Display PROJECT_APPLICATION_CREDENTIALS + - name: Display GCLOUD_KEYFILE_JSON run: | - echo "$PROJECT_APPLICATION_CREDENTIALS" + echo "$GCLOUD_KEYFILE_JSON" - name: Write keyfile.json run: | - echo "$PROJECT_APPLICATION_CREDENTIALS" | tr -d '\r' > /tmp/keyfile.json + echo "$GCLOUD_KEYFILE_JSON" | tr -d '\r' > /tmp/keyfile.json cat /tmp/keyfile.json - name: Authenticate with Google Cloud From 72b4fd4cf849d4737d836d59204ba309e19a5cc6 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 10 Jan 2024 16:53:21 +0530 Subject: [PATCH 167/664] Update node.js.yml --- .github/workflows/node.js.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 758d25d5a4..4bd824bd15 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -52,16 +52,18 @@ jobs: run: | echo "$GCLOUD_KEYFILE_JSON" - - name: Write keyfile.json - run: | - echo "$GCLOUD_KEYFILE_JSON" | tr -d '\r' > /tmp/keyfile.json - cat /tmp/keyfile.json + - name: Use keyfile.json + run: echo "${{ secrets.GCLOUD_KEYFILE_JSON }}" | tr -d '\r' > /tmp/keyfile.json + + - name: Display keyfile.json content + run: cat /tmp/keyfile.json - name: Authenticate with Google Cloud run: | gcloud auth activate-service-account --key-file=/tmp/keyfile.json gcloud config set project "$PROJECT_ID" + - name: Configure Docker for Artifact Registry run: | gcloud auth configure-docker us-central1-docker.pkg.dev From a53592d9c35e475239d42be787defd7db97aa5d0 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 10 Jan 2024 17:07:04 +0530 Subject: [PATCH 168/664] Update node.js.yml From 1e4cddf1cccc3ca73b09a1d8be4307e230ca246d Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 10 Jan 2024 17:27:04 +0530 Subject: [PATCH 169/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 4bd824bd15..4e9822cf13 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -61,7 +61,7 @@ jobs: - name: Authenticate with Google Cloud run: | gcloud auth activate-service-account --key-file=/tmp/keyfile.json - gcloud config set project "$PROJECT_ID" + gcloud config set project "$goldengate-1" - name: Configure Docker for Artifact Registry From 370549dae5d4902cecb4875fc282e834e5826671 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 24 Jan 2024 11:09:17 +0530 Subject: [PATCH 170/664] Update node.js.yml --- .github/workflows/node.js.yml | 79 +++++++++++++---------------------- 1 file changed, 30 insertions(+), 49 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 4e9822cf13..14b85cb51a 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -1,7 +1,7 @@ # This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs -name: Build and Deploy +name: Node.js CI on: push: @@ -10,68 +10,49 @@ on: branches: [ "main" ] jobs: - build: - runs-on: ubuntu-latest + deploy: + + runs-on: self-hosted strategy: matrix: node-version: [14.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Set up Node.js + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} cache: 'npm' - - - name: Install dependencies and build - run: | - npm ci - npm run build --if-present - npm install - - - name: Setup Ansible and Run Ansible playbook - run: | - sudo apt-get update - sudo apt-get install -y ansible - ansible-playbook -i "localhost," -c local ansible/repo.yaml - - - name: Install gcloud CLI and kubectl - run: | - curl -sSL https://sdk.cloud.google.com | bash - exec -l $SHELL - gcloud components install kubectl --quiet - env: - PROJECT_ID: ${{ secrets.PROJECT_ID }} - + - run: npm ci + - run: npm run build --if-present + - run: npm install - - name: Display GCLOUD_KEYFILE_JSON - run: | - echo "$GCLOUD_KEYFILE_JSON" - - - name: Use keyfile.json - run: echo "${{ secrets.GCLOUD_KEYFILE_JSON }}" | tr -d '\r' > /tmp/keyfile.json - - - name: Display keyfile.json content - run: cat /tmp/keyfile.json - - - name: Authenticate with Google Cloud - run: | - gcloud auth activate-service-account --key-file=/tmp/keyfile.json - gcloud config set project "$goldengate-1" - + - name: install the gcloud cli + uses: google-github-actions/setup-gcloud@v0.2.0 + with: + project_id: ${{ secrets.GOOGLE_PROJECT }} + service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} + install_components: 'gke-gcloud-auth-plugin' + export_default_credentials: true - - name: Configure Docker for Artifact Registry + - name: build and push the docker image + env: + GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} run: | - gcloud auth configure-docker us-central1-docker.pkg.dev - - - name: Build and Push Docker Image + gcloud auth configure-docker us-central1-docker.pkg.dev + docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest . + docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + - name: deploy to gke + env: + GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} run: | - docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/actions-runner/Testproject-INNO - docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + gcloud container clusters get-credentials innotest-cluster --region us-central1-c + kubectl rollout restart deployment nodeapp-deployment + kubectl apply -f deployment.yaml + kubectl apply -f service.yaml From 4c0434b59c0daf55e7a0dc14341cb925d8d13b0c Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 24 Jan 2024 11:33:54 +0530 Subject: [PATCH 171/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 14b85cb51a..8b22b12ecf 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -34,7 +34,7 @@ jobs: uses: google-github-actions/setup-gcloud@v0.2.0 with: project_id: ${{ secrets.GOOGLE_PROJECT }} - service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} + service_account_key: ${{ secrets.GOOGLE_PROJECT_CREDENTIALS }} install_components: 'gke-gcloud-auth-plugin' export_default_credentials: true From 335ca539a4ef82411f4708c4d97ef664a518edbe Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 24 Jan 2024 11:40:31 +0530 Subject: [PATCH 172/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 8b22b12ecf..29a154e2c3 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -30,7 +30,7 @@ jobs: - run: npm run build --if-present - run: npm install - - name: install the gcloud cli + - name: Install the gcloud cli uses: google-github-actions/setup-gcloud@v0.2.0 with: project_id: ${{ secrets.GOOGLE_PROJECT }} From 1716007e6053f3a9c9b309fdef149ff8a9b3abb2 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 24 Jan 2024 11:58:01 +0530 Subject: [PATCH 173/664] Update node.js.yml From d55e8311cfe6c9b8ef183eb265add3bfb1d6c703 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 24 Jan 2024 12:03:55 +0530 Subject: [PATCH 174/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 29a154e2c3..9dfa354ffe 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -34,7 +34,7 @@ jobs: uses: google-github-actions/setup-gcloud@v0.2.0 with: project_id: ${{ secrets.GOOGLE_PROJECT }} - service_account_key: ${{ secrets.GOOGLE_PROJECT_CREDENTIALS }} + service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} install_components: 'gke-gcloud-auth-plugin' export_default_credentials: true From aba3a092d9de542cc4397e247e632801301ae11d Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 24 Jan 2024 12:47:20 +0530 Subject: [PATCH 175/664] Update node.js.yml From 5a795d92275ced40bbf26a1432b881471acd2d8c Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 24 Jan 2024 12:57:32 +0530 Subject: [PATCH 176/664] Update node.js.yml --- .github/workflows/node.js.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 9dfa354ffe..d6c130b332 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -17,7 +17,6 @@ jobs: strategy: matrix: node-version: [14.x] - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: - uses: actions/checkout@v3 @@ -30,12 +29,18 @@ jobs: - run: npm run build --if-present - run: npm install + - name: Authenticate with gcloud + run: gcloud auth login + + - name: Set gcloud account + run: gcloud config set account testgcp-sa@goldengate-1.iam.gserviceaccount.com + # Replace with the email address associated with the service account. + - name: Install the gcloud cli uses: google-github-actions/setup-gcloud@v0.2.0 with: project_id: ${{ secrets.GOOGLE_PROJECT }} service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} - install_components: 'gke-gcloud-auth-plugin' export_default_credentials: true - name: build and push the docker image @@ -45,6 +50,7 @@ jobs: gcloud auth configure-docker us-central1-docker.pkg.dev docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest . docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + - name: deploy to gke env: GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} @@ -54,6 +60,7 @@ jobs: kubectl apply -f deployment.yaml kubectl apply -f service.yaml + From af1dd81c1e6fea5aa721b419246eb7d3cba5ba1b Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 24 Jan 2024 13:04:06 +0530 Subject: [PATCH 177/664] Update node.js.yml --- .github/workflows/node.js.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index d6c130b332..85904db775 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -29,9 +29,6 @@ jobs: - run: npm run build --if-present - run: npm install - - name: Authenticate with gcloud - run: gcloud auth login - - name: Set gcloud account run: gcloud config set account testgcp-sa@goldengate-1.iam.gserviceaccount.com # Replace with the email address associated with the service account. From bfe6eba5ca3871b638450f3b491ebe36f311ff8a Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 24 Jan 2024 13:09:31 +0530 Subject: [PATCH 178/664] Update node.js.yml From 0d2d8b54bb733a3924cf9aa9ec102e86e0557feb Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 24 Jan 2024 13:14:08 +0530 Subject: [PATCH 179/664] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index b28715680e..fa390e92c8 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ var express = require('express'); var app = express(); app.get('/', function (req, res) { - res.send('{ "response": "Welcome to NOIDA" }'); + res.send('{ "response": "Welcome to INNODATA" }'); }); app.get('/will', function (req, res) { From 25d3416373072163e79597a420c31b558e25e26b Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 29 Jan 2024 14:32:10 +0530 Subject: [PATCH 180/664] Create test ansible-build --- .github/workflows/testansible-build | 52 +++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/testansible-build diff --git a/.github/workflows/testansible-build b/.github/workflows/testansible-build new file mode 100644 index 0000000000..47e04a19e6 --- /dev/null +++ b/.github/workflows/testansible-build @@ -0,0 +1,52 @@ +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs + +name: Build and Deploy + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [14.x] + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + + - name: Install dependencies and build + run: | + npm ci + npm run build --if-present + npm install + - name: Setup Ansible and Run Ansible playbook + run: | + sudo apt-get update + sudo apt-get install -y ansible + ansible-playbook -i "localhost," -c local ansible/repo.yaml + - name: Install gcloud CLI and kubectl + run: | + curl -sSL https://sdk.cloud.google.com | bash + exec -l $SHELL + gcloud components install kubectl --quiet + - name: Build Docker Image + env: + GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} + GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} + run: | + gcloud auth configure-docker us-central1-docker.pkg.dev + docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/actions-runner/Testproject-INNO + From 5e145899a09d6bdb26024356f7390b93ee6838ec Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 29 Jan 2024 14:34:49 +0530 Subject: [PATCH 181/664] Update test ansible-build --- .github/workflows/node.js.yml | 59 +++++++++++++++-------------------- 1 file changed, 26 insertions(+), 33 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 85904db775..316d25ec6c 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -1,7 +1,7 @@ # This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs -name: Node.js CI +name: Build and Deploy on: push: @@ -10,53 +10,46 @@ on: branches: [ "main" ] jobs: - deploy: - - runs-on: self-hosted + build: + runs-on: ubuntu-latest strategy: matrix: node-version: [14.x] steps: - - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Node.js uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} cache: 'npm' - - run: npm ci - - run: npm run build --if-present - - run: npm install - - - name: Set gcloud account - run: gcloud config set account testgcp-sa@goldengate-1.iam.gserviceaccount.com - # Replace with the email address associated with the service account. - - name: Install the gcloud cli - uses: google-github-actions/setup-gcloud@v0.2.0 - with: - project_id: ${{ secrets.GOOGLE_PROJECT }} - service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} - export_default_credentials: true - - - name: build and push the docker image - env: - GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} + - name: Install dependencies and build run: | - gcloud auth configure-docker us-central1-docker.pkg.dev - docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest . - docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - - - name: deploy to gke + npm ci + npm run build --if-present + npm install + - name: Setup Ansible and Run Ansible playbook + run: | + sudo apt-get update + sudo apt-get install -y ansible + ansible-playbook -i "localhost," -c local ansible/repo.yaml + - name: Install gcloud CLI and kubectl + run: | + curl -sSL https://sdk.cloud.google.com | bash + exec -l $SHELL + gcloud components install kubectl --quiet + - name: Build and Push Docker Image env: GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} + GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} run: | - gcloud container clusters get-credentials innotest-cluster --region us-central1-c - kubectl rollout restart deployment nodeapp-deployment - kubectl apply -f deployment.yaml - kubectl apply -f service.yaml - + gcloud auth configure-docker us-central1-docker.pkg.dev + docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/actions-runner/Testproject-INNO + From 7d67a4eddc9d0d55f8356a7ba293f704f4150e71 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 30 Jan 2024 10:53:10 +0530 Subject: [PATCH 182/664] Update ansible-build --- .github/workflows/node.js.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 316d25ec6c..39a7582065 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -49,6 +49,7 @@ jobs: run: | gcloud auth configure-docker us-central1-docker.pkg.dev docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/actions-runner/Testproject-INNO + docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/actions-runner/Testproject-INNO From 83096d6e5a4e5dbd0aba98dce50bfb5e230f1fda Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 30 Jan 2024 11:02:13 +0530 Subject: [PATCH 183/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 39a7582065..ac0bc1bbeb 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -49,7 +49,7 @@ jobs: run: | gcloud auth configure-docker us-central1-docker.pkg.dev docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/actions-runner/Testproject-INNO - docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/actions-runner/Testproject-INNO + docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest From 00e4e6ef15f2e4ef7ae276ae1ca1892dbdafe083 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 30 Jan 2024 12:03:09 +0530 Subject: [PATCH 184/664] Update test ansible-build --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index ac0bc1bbeb..39a7582065 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -49,7 +49,7 @@ jobs: run: | gcloud auth configure-docker us-central1-docker.pkg.dev docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/actions-runner/Testproject-INNO - docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/actions-runner/Testproject-INNO From efc5f3378a22c4686c4a23275f3c6aa16e447cf4 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 30 Jan 2024 12:08:31 +0530 Subject: [PATCH 185/664] Update test ansible-build From beb083b4222757c0f5b5b38f4d957cca4eab9e36 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 30 Jan 2024 12:18:27 +0530 Subject: [PATCH 186/664] Update test ansible-build --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 39a7582065..4847b5cc68 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -48,7 +48,7 @@ jobs: GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} run: | gcloud auth configure-docker us-central1-docker.pkg.dev - docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/actions-runner/Testproject-INNO + docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest . /home/mnagaraju/actions-runner/Testproject-INNO docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/actions-runner/Testproject-INNO From 2efd74d45757342ab835733d3fdd65288b89f6c3 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 30 Jan 2024 12:21:23 +0530 Subject: [PATCH 187/664] Update test ansible-build --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 4847b5cc68..6ae7d22d00 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -49,7 +49,7 @@ jobs: run: | gcloud auth configure-docker us-central1-docker.pkg.dev docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest . /home/mnagaraju/actions-runner/Testproject-INNO - docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/actions-runner/Testproject-INNO + docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest From 2b5c982e3c0593cf3f5928f19d92d65c67bf6c6b Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 30 Jan 2024 12:25:02 +0530 Subject: [PATCH 188/664] Update test ansible-build --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 6ae7d22d00..8a90878fad 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -48,7 +48,7 @@ jobs: GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} run: | gcloud auth configure-docker us-central1-docker.pkg.dev - docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest . /home/mnagaraju/actions-runner/Testproject-INNO + docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/actions-runner/Testproject-INNO docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest From eb782fd2ee973b05cf024bcfcd0a33e990c32bb6 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 30 Jan 2024 12:41:20 +0530 Subject: [PATCH 189/664] Update repo.yaml --- ansible/repo.yaml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index fa7e15c24d..45fcdd2736 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -1,7 +1,8 @@ --- -- name: Checkout Node.js Code +- name: Checkout Node.js Code and Push Docker Image hosts: localhost gather_facts: false + tasks: - name: Ensure git is installed become: true @@ -15,3 +16,15 @@ dest: /home/mnagaraju/actions-runner/Testproject-INNO version: main # replace 'main' with your branch name if different become: true + + - name: Build Docker Image + command: "docker build -t us-central1-docker.pkg.dev/ goldengate-1/test-project/node:latest /home/mnagaraju/actions-runner/Testproject-INNO" + become: true + + - name: Authenticate Docker with Google Cloud + command: "gcloud auth configure-docker" + become: true + + - name: Push Docker Image to Artifact Registry + command: "docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest" + become: true From 6625741eef426a8fb41a89f1d06b23db02ce08fd Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 30 Jan 2024 12:51:36 +0530 Subject: [PATCH 190/664] Update repo.yaml --- ansible/repo.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 45fcdd2736..07cb4aa7c3 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -18,9 +18,10 @@ become: true - name: Build Docker Image - command: "docker build -t us-central1-docker.pkg.dev/ goldengate-1/test-project/node:latest /home/mnagaraju/actions-runner/Testproject-INNO" + command: "docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/actions-runner/Testproject-INNO" become: true + - name: Authenticate Docker with Google Cloud command: "gcloud auth configure-docker" become: true From fe30dfb6262a7a93b939bdc20ad583eb6343a8e5 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 30 Jan 2024 13:17:12 +0530 Subject: [PATCH 191/664] Update test-build ansible --- .github/workflows/node.js.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 8a90878fad..c3ff63a196 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -42,14 +42,19 @@ jobs: curl -sSL https://sdk.cloud.google.com | bash exec -l $SHELL gcloud components install kubectl --quiet - - name: Build and Push Docker Image + - name: Authenticate Docker with Google Cloud env: - GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} run: | gcloud auth configure-docker us-central1-docker.pkg.dev + - name: Build and Push Docker Image + env: + GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} + run: | + gcloud projects add-iam-policy-binding $GOOGLE_PROJECT --member="serviceAccount:testgcp-sa@goldengate-1.iam.gserviceaccount.com" --role="roles/artifactregistry.writer" docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/actions-runner/Testproject-INNO - docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + From 90f669d5f74b66d1a65289a3e0c38ef2e7e858de Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 30 Jan 2024 13:26:13 +0530 Subject: [PATCH 192/664] Update test ansible-build --- .github/workflows/node.js.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index c3ff63a196..6c9fde024c 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -44,14 +44,15 @@ jobs: gcloud components install kubectl --quiet - name: Authenticate Docker with Google Cloud env: - GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} + GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} run: | gcloud auth configure-docker us-central1-docker.pkg.dev + gcloud projects add-iam-policy-binding $GOOGLE_PROJECT --member="serviceAccount:testgcp-sa@goldengate-1.iam.gserviceaccount.com" --role="roles/artifactregistry.writer" + - name: Build and Push Docker Image env: - GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} + GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} run: | - gcloud projects add-iam-policy-binding $GOOGLE_PROJECT --member="serviceAccount:testgcp-sa@goldengate-1.iam.gserviceaccount.com" --role="roles/artifactregistry.writer" docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/actions-runner/Testproject-INNO docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest From c840ca3e5b478a57e8bf6fc648c28fe9ec65f36d Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 30 Jan 2024 19:42:46 +0530 Subject: [PATCH 193/664] Update test ansible-build --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 6c9fde024c..fc04cfe8e5 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -54,7 +54,7 @@ jobs: GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} run: | docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/actions-runner/Testproject-INNO - docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + From f82ba7ac54a023815606b7ce67008b8cbce40980 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 31 Jan 2024 12:22:20 +0530 Subject: [PATCH 194/664] Update repo.yaml --- ansible/repo.yaml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 07cb4aa7c3..9785589be3 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -17,15 +17,4 @@ version: main # replace 'main' with your branch name if different become: true - - name: Build Docker Image - command: "docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/actions-runner/Testproject-INNO" - become: true - - - - name: Authenticate Docker with Google Cloud - command: "gcloud auth configure-docker" - become: true - - - name: Push Docker Image to Artifact Registry - command: "docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest" - become: true + From e0d2302b65d9cfec204e2feda3a0b75212bcbf87 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 31 Jan 2024 12:25:40 +0530 Subject: [PATCH 195/664] Update ansible.yaml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index fc04cfe8e5..602ba7c820 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -47,7 +47,7 @@ jobs: GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} run: | gcloud auth configure-docker us-central1-docker.pkg.dev - gcloud projects add-iam-policy-binding $GOOGLE_PROJECT --member="serviceAccount:testgcp-sa@goldengate-1.iam.gserviceaccount.com" --role="roles/artifactregistry.writer" + gcloud projects add-iam-policy-binding goldengate-1 --member="serviceAccount:testgcp-sa@goldengate-1.iam.gserviceaccount.com" --role="roles/artifactregistry.writer" - name: Build and Push Docker Image env: From 2de90b6a3293474f9d2ef968613d939b0a106f19 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 31 Jan 2024 12:28:05 +0530 Subject: [PATCH 196/664] Update ansible.yaml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 602ba7c820..dc07266dc6 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -47,7 +47,7 @@ jobs: GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} run: | gcloud auth configure-docker us-central1-docker.pkg.dev - gcloud projects add-iam-policy-binding goldengate-1 --member="serviceAccount:testgcp-sa@goldengate-1.iam.gserviceaccount.com" --role="roles/artifactregistry.writer" + - name: Build and Push Docker Image env: From df460f9db00c49892a16ae72f8bff94aebc80898 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 31 Jan 2024 12:37:56 +0530 Subject: [PATCH 197/664] Update ansible.yaml --- .github/workflows/node.js.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index dc07266dc6..285defb409 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -32,29 +32,33 @@ jobs: npm ci npm run build --if-present npm install + - name: Setup Ansible and Run Ansible playbook run: | sudo apt-get update sudo apt-get install -y ansible ansible-playbook -i "localhost," -c local ansible/repo.yaml + - name: Install gcloud CLI and kubectl run: | curl -sSL https://sdk.cloud.google.com | bash exec -l $SHELL gcloud components install kubectl --quiet + - name: Authenticate Docker with Google Cloud env: - GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} + GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} run: | gcloud auth configure-docker us-central1-docker.pkg.dev - - name: Build and Push Docker Image env: - GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} + GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} run: | docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/actions-runner/Testproject-INNO - + + # Push the Docker image to Google Artifact Registry + docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest From b29c9b2f12a15e65628941eb027544e7706b44c2 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 31 Jan 2024 14:17:35 +0530 Subject: [PATCH 198/664] Update ansible.yaml --- ansible/repo.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 9785589be3..e468c448ab 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -17,4 +17,18 @@ version: main # replace 'main' with your branch name if different become: true + # Your existing tasks go here... + + - name: Build Docker Image + become: true + command: "docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/actions-runner/Testproject-INNO" + + - name: Authenticate Docker with Google Cloud + become: true + command: "gcloud auth configure-docker us-central1-docker.pkg.dev" + + - name: Push Docker Image to Google Artifact Registry + become: true + command: "docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest" + From b1c07bfe4d150a7a017298c7ff71aaec0532f5c6 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 1 Feb 2024 11:37:12 +0530 Subject: [PATCH 199/664] Update repo.yaml --- ansible/repo.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index e468c448ab..6ccfad3b4f 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -23,10 +23,7 @@ become: true command: "docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/actions-runner/Testproject-INNO" - - name: Authenticate Docker with Google Cloud - become: true - command: "gcloud auth configure-docker us-central1-docker.pkg.dev" - + - name: Push Docker Image to Google Artifact Registry become: true command: "docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest" From 1918e1729f3d87cafa142acb6226325eb22cb40d Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 1 Feb 2024 14:24:58 +0530 Subject: [PATCH 200/664] Update repo.yaml --- ansible/repo.yaml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 6ccfad3b4f..13c46c32a9 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -17,15 +17,4 @@ version: main # replace 'main' with your branch name if different become: true - # Your existing tasks go here... - - - name: Build Docker Image - become: true - command: "docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/actions-runner/Testproject-INNO" - - - name: Push Docker Image to Google Artifact Registry - become: true - command: "docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest" - - From 771cec274a9aee6c8ba243c50d1cbc4b3d65ae91 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 1 Feb 2024 15:28:14 +0530 Subject: [PATCH 201/664] Update repo.yaml --- ansible/repo.yaml | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 13c46c32a9..928afafe83 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -1,20 +1,34 @@ ---- -- name: Checkout Node.js Code and Push Docker Image +- name: Checkout Node.js Code, Build Docker Image, and Push to Artifact Registry hosts: localhost gather_facts: false tasks: - - name: Ensure git is installed + - name: Ensure git and Docker are installed become: true apt: - name: git + name: "{{ item }}" state: present + loop: + - git + - docker.io - name: Clone Node.js code from GitHub git: repo: https://github.com/mnagaraju5628/Testproject-INNO.git - dest: /home/mnagaraju/actions-runner/Testproject-INNO + dest: /home/mnagaraju/Testproject-INNO version: main # replace 'main' with your branch name if different become: true + - name: Build Docker image + command: "docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/Testproject-INNO" + become: true + + - name: Tag Docker image for artifact registry + command: "docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest" + become: true + + - name: Push Docker image to artifact registry + command: "docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latestt" + become: true + From 4733970eaaeb76c4d41bbe2b9693f1984c3dc17c Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 1 Feb 2024 15:28:24 +0530 Subject: [PATCH 202/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 285defb409..3a440d1968 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -55,7 +55,7 @@ jobs: env: GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} run: | - docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/actions-runner/Testproject-INNO + docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/Testproject-INNO # Push the Docker image to Google Artifact Registry docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest From 9a37302b51c59d97d00ad6240bfa81ccee943621 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 1 Feb 2024 15:42:05 +0530 Subject: [PATCH 203/664] Update repo.yaml --- ansible/repo.yaml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 928afafe83..f582f16f46 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -1,15 +1,22 @@ -- name: Checkout Node.js Code, Build Docker Image, and Push to Artifact Registry +--- +- name: Git Checkout, Docker Install, Build Image, and Push to Artifact Registry hosts: localhost gather_facts: false tasks: - - name: Ensure git and Docker are installed + - name: Ensure git is installed + become: true + apt: + name: git + state: present + + - name: Ensure Docker dependencies are installed become: true apt: name: "{{ item }}" state: present loop: - - git + - containerd - docker.io - name: Clone Node.js code from GitHub @@ -24,11 +31,12 @@ become: true - name: Tag Docker image for artifact registry - command: "docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest" + command: "docker tag node:latest registry.example.com/node:latest" become: true - name: Push Docker image to artifact registry - command: "docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latestt" + command: " docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest" become: true + From 127cfa88e3a8d5b5fcde39851d8bcd1d2ebf3180 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 1 Feb 2024 15:48:16 +0530 Subject: [PATCH 204/664] Update repo.yaml --- ansible/repo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index f582f16f46..6d9452e628 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -31,7 +31,7 @@ become: true - name: Tag Docker image for artifact registry - command: "docker tag node:latest registry.example.com/node:latest" + command: "docker tag node:latest us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest" become: true - name: Push Docker image to artifact registry From 8faaa754fb38491873f75ed2db4dcdd12455472b Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 1 Feb 2024 15:50:50 +0530 Subject: [PATCH 205/664] Update repo.yaml --- ansible/repo.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 6d9452e628..55a47a1ee8 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -30,10 +30,6 @@ command: "docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/Testproject-INNO" become: true - - name: Tag Docker image for artifact registry - command: "docker tag node:latest us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest" - become: true - - name: Push Docker image to artifact registry command: " docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest" become: true From ef0eda3ddfe5e3ed809035271be1206d8676aa37 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 1 Feb 2024 16:21:12 +0530 Subject: [PATCH 206/664] Update repo.yaml --- ansible/repo.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 55a47a1ee8..bc1114593d 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -29,6 +29,9 @@ - name: Build Docker image command: "docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/Testproject-INNO" become: true + - name: Tag Docker image for artifact registry + command: "docker tag node:latest https://console.cloud.google.com/artifacts/docker/goldengate-1/us-central1/test-project/node:latest" + become: true - name: Push Docker image to artifact registry command: " docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest" From e8f930c2873d73a13cacfd09078ce3d8103294e6 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 1 Feb 2024 16:25:40 +0530 Subject: [PATCH 207/664] Update repo.yaml --- ansible/repo.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index bc1114593d..bf92943cdf 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -29,13 +29,15 @@ - name: Build Docker image command: "docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/Testproject-INNO" become: true + - name: Tag Docker image for artifact registry - command: "docker tag node:latest https://console.cloud.google.com/artifacts/docker/goldengate-1/us-central1/test-project/node:latest" + command: "docker tag node:latest us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest" become: true - name: Push Docker image to artifact registry - command: " docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest" + command: "docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest" become: true + From da6a4f66812094406c0f3719eca343783142a80f Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 1 Feb 2024 16:34:34 +0530 Subject: [PATCH 208/664] Update repo.yaml --- ansible/repo.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index bf92943cdf..83620b7bfc 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -25,18 +25,26 @@ dest: /home/mnagaraju/Testproject-INNO version: main # replace 'main' with your branch name if different become: true - - name: Build Docker image command: "docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/Testproject-INNO" become: true + - name: Check if Docker image exists + command: "docker images -q node:latest" + register: docker_image_check + become: true + changed_when: false + - name: Tag Docker image for artifact registry command: "docker tag node:latest us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest" become: true + when: docker_image_check.stdout_lines | length > 0 - name: Push Docker image to artifact registry command: "docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest" become: true + when: docker_image_check.stdout_lines | length > 0 + From abac130105fee9fc864d1414a3a298a81b5a41f6 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 1 Feb 2024 16:53:21 +0530 Subject: [PATCH 209/664] Update ansible.yaml --- .github/workflows/node.js.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 3a440d1968..be03857f52 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -56,10 +56,10 @@ jobs: GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} run: | docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/Testproject-INNO - - # Push the Docker image to Google Artifact Registry + docker tag node:latest us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + From 3817de3fa5d98a4fa06dd7a61e4999bfb70e7c18 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 2 Feb 2024 12:44:18 +0530 Subject: [PATCH 210/664] Update ansible.yaml --- .github/workflows/node.js.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index be03857f52..c417fbc66b 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -32,31 +32,26 @@ jobs: npm ci npm run build --if-present npm install - - name: Setup Ansible and Run Ansible playbook run: | sudo apt-get update sudo apt-get install -y ansible ansible-playbook -i "localhost," -c local ansible/repo.yaml - - name: Install gcloud CLI and kubectl run: | curl -sSL https://sdk.cloud.google.com | bash exec -l $SHELL gcloud components install kubectl --quiet - - name: Authenticate Docker with Google Cloud env: GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} run: | - gcloud auth configure-docker us-central1-docker.pkg.dev - + gcloud auth configure-docker us-central1-docker.pkg.dev/goldengate-1/test-project - name: Build and Push Docker Image env: GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} run: | docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/Testproject-INNO - docker tag node:latest us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest From 175053e5210131cc1acc6cceac7a23d9ee8097d9 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 2 Feb 2024 13:03:23 +0530 Subject: [PATCH 211/664] Update ansible.yaml --- .github/workflows/node.js.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index c417fbc66b..891add9199 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -55,6 +55,7 @@ jobs: docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + From 15307f9538f42df598d083017836b20586ec9ef3 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 2 Feb 2024 13:22:01 +0530 Subject: [PATCH 212/664] Update ansible.yaml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 891add9199..2504dbf609 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -11,7 +11,7 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: self-hosted strategy: matrix: From f0d261d2fdfcc0784f58b855d15449836f66a52b Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 2 Feb 2024 13:26:10 +0530 Subject: [PATCH 213/664] Update ansible.yaml --- .github/workflows/node.js.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 2504dbf609..d1294320e2 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -34,8 +34,8 @@ jobs: npm install - name: Setup Ansible and Run Ansible playbook run: | - sudo apt-get update - sudo apt-get install -y ansible + apt-get update + apt-get install -y ansible ansible-playbook -i "localhost," -c local ansible/repo.yaml - name: Install gcloud CLI and kubectl run: | From ac3d24847ca0739ed1c3b780d9b6ed5eeba6f563 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 2 Feb 2024 14:38:29 +0530 Subject: [PATCH 214/664] Update ansible.yaml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index d1294320e2..575104afd5 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -11,7 +11,7 @@ on: jobs: build: - runs-on: self-hosted + runs-on: ubuntu-latest strategy: matrix: From 0b3b1802ba6ef11ce2de7aafd771268774558c27 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 2 Feb 2024 14:40:07 +0530 Subject: [PATCH 215/664] Update ansible --- .github/workflows/node.js.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 575104afd5..08908b28cf 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -34,8 +34,8 @@ jobs: npm install - name: Setup Ansible and Run Ansible playbook run: | - apt-get update - apt-get install -y ansible + sudo apt-get update + sudo apt-get install -y ansible ansible-playbook -i "localhost," -c local ansible/repo.yaml - name: Install gcloud CLI and kubectl run: | @@ -56,6 +56,7 @@ jobs: + From 109ea69f0ceeb484e6262c5d4b0787a9be003bbf Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 2 Feb 2024 15:05:14 +0530 Subject: [PATCH 216/664] Update ansible.yaml --- .github/workflows/node.js.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 08908b28cf..0435ca820f 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -46,13 +46,13 @@ jobs: env: GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} run: | - gcloud auth configure-docker us-central1-docker.pkg.dev/goldengate-1/test-project + gcloud auth configure-docker us-central1-docker.pkg.dev/goldengate-1/ansibletest-project - name: Build and Push Docker Image env: GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} run: | - docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/Testproject-INNO - docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + docker build -t us-central1-docker.pkg.dev/goldengate-1/ansibletest-project/node:latest /home/mnagaraju/Testproject-INNO + docker push us-central1-docker.pkg.dev/goldengate-1/ansibletest-project/node:latest From 8d35c32d611aaa10e663bfd90befb6b5cc87aebc Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 2 Feb 2024 15:33:20 +0530 Subject: [PATCH 217/664] Update ansible.yaml --- .github/workflows/node.js.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 0435ca820f..86788ab628 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -42,11 +42,16 @@ jobs: curl -sSL https://sdk.cloud.google.com | bash exec -l $SHELL gcloud components install kubectl --quiet + - name: Authenticate with Google Cloud + id: auth + uses: google-github-actions/auth@v1 + with: + credentials_json: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} + - name: Authenticate Docker with Google Cloud - env: - GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} run: | gcloud auth configure-docker us-central1-docker.pkg.dev/goldengate-1/ansibletest-project + - name: Build and Push Docker Image env: GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} From 3ebba45684bcf0983b7286364e1926d691eef431 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 2 Feb 2024 15:41:02 +0530 Subject: [PATCH 218/664] Update ansible.yaml --- .github/workflows/node.js.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 86788ab628..32aab62085 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -32,26 +32,36 @@ jobs: npm ci npm run build --if-present npm install + - name: Setup Ansible and Run Ansible playbook run: | sudo apt-get update sudo apt-get install -y ansible ansible-playbook -i "localhost," -c local ansible/repo.yaml + - name: Install gcloud CLI and kubectl run: | curl -sSL https://sdk.cloud.google.com | bash exec -l $SHELL gcloud components install kubectl --quiet + - name: Authenticate with Google Cloud id: auth uses: google-github-actions/auth@v1 with: credentials_json: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} - + - name: Authenticate Docker with Google Cloud run: | gcloud auth configure-docker us-central1-docker.pkg.dev/goldengate-1/ansibletest-project + - name: Set Artifact Registry permissions + run: | + gcloud projects add-iam-policy-binding ${{ secrets.GOOGLE_PROJECT }} \ + --member "serviceAccount:${{ steps.auth.outputs.client_email }}" \ + --role roles/artifactregistry.repositories.uploadArtifacts \ + --region us-central1 + - name: Build and Push Docker Image env: GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} From 7cb5852586139c44ddd0bed33426fde9f326bbd2 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 2 Feb 2024 15:52:48 +0530 Subject: [PATCH 219/664] Update ansible.yaml --- .github/workflows/node.js.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 32aab62085..7e80c0c44e 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -59,8 +59,7 @@ jobs: run: | gcloud projects add-iam-policy-binding ${{ secrets.GOOGLE_PROJECT }} \ --member "serviceAccount:${{ steps.auth.outputs.client_email }}" \ - --role roles/artifactregistry.repositories.uploadArtifacts \ - --region us-central1 + --role roles/artifactregistry.repositories.uploadArtifacts - name: Build and Push Docker Image env: @@ -72,6 +71,7 @@ jobs: + From 6f24b770b82c0c37e5a321ba928f89a0e6c4c4ae Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 2 Feb 2024 16:43:37 +0530 Subject: [PATCH 220/664] Update ansible.yaml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 7e80c0c44e..5003b10091 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -58,7 +58,7 @@ jobs: - name: Set Artifact Registry permissions run: | gcloud projects add-iam-policy-binding ${{ secrets.GOOGLE_PROJECT }} \ - --member "serviceAccount:${{ steps.auth.outputs.client_email }}" \ + --member "serviceAccount:${{ secrets.GCP_SA_KEY }}" \ --role roles/artifactregistry.repositories.uploadArtifacts - name: Build and Push Docker Image From a41296326869dc043394f83a4476058f3211105a Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 2 Feb 2024 17:24:44 +0530 Subject: [PATCH 221/664] Update ansible.yaml --- .github/workflows/node.js.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 5003b10091..954e50c27b 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -58,8 +58,11 @@ jobs: - name: Set Artifact Registry permissions run: | gcloud projects add-iam-policy-binding ${{ secrets.GOOGLE_PROJECT }} \ - --member "serviceAccount:${{ secrets.GCP_SA_KEY }}" \ + --member "serviceAccount:${{ secrets.GCP_SA_EMAIL }}" \ --role roles/artifactregistry.repositories.uploadArtifacts + gcloud projects add-iam-policy-binding ${{ secrets.GOOGLE_PROJECT }} \ + --member "user:${{ steps.auth.outputs.client_email }}" \ + --role roles/projects.setIamPolicy - name: Build and Push Docker Image env: From 26abfe9ff3b16e25c2988516af978fb1a98e0cd0 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 2 Feb 2024 17:34:12 +0530 Subject: [PATCH 222/664] Update ansible.yaml --- .github/workflows/node.js.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 954e50c27b..0f5067e940 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -61,7 +61,7 @@ jobs: --member "serviceAccount:${{ secrets.GCP_SA_EMAIL }}" \ --role roles/artifactregistry.repositories.uploadArtifacts gcloud projects add-iam-policy-binding ${{ secrets.GOOGLE_PROJECT }} \ - --member "user:${{ steps.auth.outputs.client_email }}" \ + --member "serviceAccount:${{ secrets.GCP_SA_EMAIL }}" \ --role roles/projects.setIamPolicy - name: Build and Push Docker Image @@ -75,6 +75,7 @@ jobs: + From 508864ed31545da1690ef0e1c269d75bfe2b6943 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 2 Feb 2024 18:35:48 +0530 Subject: [PATCH 223/664] Update ansible.yaml --- .github/workflows/node.js.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 0f5067e940..a947b730dd 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -60,6 +60,15 @@ jobs: gcloud projects add-iam-policy-binding ${{ secrets.GOOGLE_PROJECT }} \ --member "serviceAccount:${{ secrets.GCP_SA_EMAIL }}" \ --role roles/artifactregistry.repositories.uploadArtifacts + gcloud projects add-iam-policy-binding ${{ secrets.GOOGLE_PROJECT }} \ + --member "serviceAccount:${{ steps.auth.outputs.client_email }}" \ + --role roles/artifactregistry.repositories.uploadArtifacts + + - name: Set Iam Policy permissions + run: | + gcloud projects add-iam-policy-binding ${{ secrets.GOOGLE_PROJECT }} \ + --member "serviceAccount:${{ secrets.GCP_SA_EMAIL }}" \ + --role roles/projects.setIamPolicy gcloud projects add-iam-policy-binding ${{ secrets.GOOGLE_PROJECT }} \ --member "serviceAccount:${{ secrets.GCP_SA_EMAIL }}" \ --role roles/projects.setIamPolicy @@ -76,6 +85,7 @@ jobs: + From b9134baca50fe4db74f6ab992fe85aab1991e967 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 5 Feb 2024 11:48:49 +0530 Subject: [PATCH 224/664] Update node.js.yml --- .github/workflows/node.js.yml | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index a947b730dd..321e50397f 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -11,7 +11,7 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: self-hosted strategy: matrix: @@ -55,24 +55,6 @@ jobs: run: | gcloud auth configure-docker us-central1-docker.pkg.dev/goldengate-1/ansibletest-project - - name: Set Artifact Registry permissions - run: | - gcloud projects add-iam-policy-binding ${{ secrets.GOOGLE_PROJECT }} \ - --member "serviceAccount:${{ secrets.GCP_SA_EMAIL }}" \ - --role roles/artifactregistry.repositories.uploadArtifacts - gcloud projects add-iam-policy-binding ${{ secrets.GOOGLE_PROJECT }} \ - --member "serviceAccount:${{ steps.auth.outputs.client_email }}" \ - --role roles/artifactregistry.repositories.uploadArtifacts - - - name: Set Iam Policy permissions - run: | - gcloud projects add-iam-policy-binding ${{ secrets.GOOGLE_PROJECT }} \ - --member "serviceAccount:${{ secrets.GCP_SA_EMAIL }}" \ - --role roles/projects.setIamPolicy - gcloud projects add-iam-policy-binding ${{ secrets.GOOGLE_PROJECT }} \ - --member "serviceAccount:${{ secrets.GCP_SA_EMAIL }}" \ - --role roles/projects.setIamPolicy - - name: Build and Push Docker Image env: GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} From 9655974c08557ea51286f64e60fee7d36d1bfdf6 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 5 Feb 2024 11:51:08 +0530 Subject: [PATCH 225/664] Update node.js.yml --- .github/workflows/node.js.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 321e50397f..37f10e483c 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -35,8 +35,8 @@ jobs: - name: Setup Ansible and Run Ansible playbook run: | - sudo apt-get update - sudo apt-get install -y ansible + apt-get update + apt-get install -y ansible ansible-playbook -i "localhost," -c local ansible/repo.yaml - name: Install gcloud CLI and kubectl From daf97c50ae81794f7e5f4b63c29ce350732362db Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 5 Feb 2024 11:53:58 +0530 Subject: [PATCH 226/664] Update node.js.yml --- .github/workflows/node.js.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 37f10e483c..15c06342bb 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -55,6 +55,12 @@ jobs: run: | gcloud auth configure-docker us-central1-docker.pkg.dev/goldengate-1/ansibletest-project + - name: Update packages + run: | + apt-get update + apt-get install -y your-package-name + # Add more package installations or other necessary commands + - name: Build and Push Docker Image env: GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} @@ -68,6 +74,7 @@ jobs: + From ca72119df59e68236d9f9b9b28f93493c7a5a56f Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 5 Feb 2024 11:56:50 +0530 Subject: [PATCH 227/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 15c06342bb..508a074646 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -11,7 +11,7 @@ on: jobs: build: - runs-on: self-hosted + runs-on: ubuntu-latest strategy: matrix: From e2fbabacacdd910b6a9850323c6361404726cf98 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 5 Feb 2024 11:59:01 +0530 Subject: [PATCH 228/664] Update testansible-build From 3fe7a8aa52691e8f6adb68b3fbee67e070b7ea95 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 5 Feb 2024 12:01:48 +0530 Subject: [PATCH 229/664] Update testansible.yaml --- .github/workflows/node.js.yml | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 508a074646..2ded6508b4 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -32,42 +32,24 @@ jobs: npm ci npm run build --if-present npm install - - name: Setup Ansible and Run Ansible playbook run: | - apt-get update - apt-get install -y ansible + sudo apt-get update + sudo apt-get install -y ansible ansible-playbook -i "localhost," -c local ansible/repo.yaml - - name: Install gcloud CLI and kubectl run: | curl -sSL https://sdk.cloud.google.com | bash exec -l $SHELL gcloud components install kubectl --quiet - - - name: Authenticate with Google Cloud - id: auth - uses: google-github-actions/auth@v1 - with: - credentials_json: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} - - - name: Authenticate Docker with Google Cloud - run: | - gcloud auth configure-docker us-central1-docker.pkg.dev/goldengate-1/ansibletest-project - - - name: Update packages - run: | - apt-get update - apt-get install -y your-package-name - # Add more package installations or other necessary commands - - name: Build and Push Docker Image env: GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} + GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} run: | - docker build -t us-central1-docker.pkg.dev/goldengate-1/ansibletest-project/node:latest /home/mnagaraju/Testproject-INNO - docker push us-central1-docker.pkg.dev/goldengate-1/ansibletest-project/node:latest - + gcloud auth configure-docker us-central1-docker.pkg.dev + docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/actions-runner/Testproject-INNO + From f7cf1411387174c2962439e1677a34ed52da2691 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 5 Feb 2024 12:04:37 +0530 Subject: [PATCH 230/664] Update testansible.yaml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 2ded6508b4..679297aaed 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -48,7 +48,7 @@ jobs: GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} run: | gcloud auth configure-docker us-central1-docker.pkg.dev - docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/actions-runner/Testproject-INNO + docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/Testproject-INNO From 31b1f9cb5c7e4fdfbc7861039c99c3713642fd5a Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 5 Feb 2024 12:08:08 +0530 Subject: [PATCH 231/664] Update node.js.yml --- .github/workflows/node.js.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 679297aaed..c207e493cd 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -49,6 +49,7 @@ jobs: run: | gcloud auth configure-docker us-central1-docker.pkg.dev docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/Testproject-INNO + docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest From da083c1f72aa03100b7eeeec514af63df1a25c91 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 5 Feb 2024 12:17:08 +0530 Subject: [PATCH 232/664] Update node.js.yml --- .github/workflows/node.js.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index c207e493cd..e80749bab7 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -49,7 +49,8 @@ jobs: run: | gcloud auth configure-docker us-central1-docker.pkg.dev docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/Testproject-INNO - docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node/node:latest + From b2a145b6d6345d2be72b73d183baee22ed3670be Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 5 Feb 2024 12:20:04 +0530 Subject: [PATCH 233/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index e80749bab7..dcff4c54fb 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -49,7 +49,7 @@ jobs: run: | gcloud auth configure-docker us-central1-docker.pkg.dev docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/Testproject-INNO - docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node/node:latest + docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest From 5c6e072b317d3717a3e49c2775fa336d5f780e84 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 5 Feb 2024 12:24:39 +0530 Subject: [PATCH 234/664] Update node.js.yml From 5999e68dd22f2963fb1e1571ec960476a9f9e1e2 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 5 Feb 2024 12:31:05 +0530 Subject: [PATCH 235/664] Update node.js.yml --- .github/workflows/node.js.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index dcff4c54fb..c8fa5c48ce 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -32,24 +32,30 @@ jobs: npm ci npm run build --if-present npm install + - name: Setup Ansible and Run Ansible playbook run: | sudo apt-get update sudo apt-get install -y ansible ansible-playbook -i "localhost," -c local ansible/repo.yaml + - name: Install gcloud CLI and kubectl run: | curl -sSL https://sdk.cloud.google.com | bash exec -l $SHELL gcloud components install kubectl --quiet + + - name: Authenticate Docker with Google Cloud + run: | + gcloud auth activate-service-account --key-file=${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} + gcloud config set project ${{ secrets.GOOGLE_PROJECT }} + gcloud auth configure-docker us-central1-docker.pkg.dev/goldengate-1/test-project + - name: Build and Push Docker Image - env: - GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} - GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} run: | - gcloud auth configure-docker us-central1-docker.pkg.dev docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/Testproject-INNO docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + From fc1a219a25d8111059036cc1016c00c7be477171 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 5 Feb 2024 12:32:03 +0530 Subject: [PATCH 236/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index c8fa5c48ce..46a7179cf6 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -11,7 +11,7 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: self-hosted strategy: matrix: From 8bc8baf240f134809e419b6b44f99175aea8b81d Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 5 Feb 2024 12:38:27 +0530 Subject: [PATCH 237/664] Update node.js.yml --- .github/workflows/node.js.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 46a7179cf6..d9454fa1d6 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -47,9 +47,10 @@ jobs: - name: Authenticate Docker with Google Cloud run: | - gcloud auth activate-service-account --key-file=${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} + gcloud auth activate-service-account --key-file=${{ github.workspace }}/${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} gcloud config set project ${{ secrets.GOOGLE_PROJECT }} - gcloud auth configure-docker us-central1-docker.pkg.dev/goldengate-1/test-project + gcloud auth configure-docker us-central1-docker.pkg.dev/***/test-project + shell: /usr/bin/bash -e ***0*** - name: Build and Push Docker Image run: | From 83c3f5717a889cd61e023df6a505770eef334372 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 5 Feb 2024 12:45:32 +0530 Subject: [PATCH 238/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index d9454fa1d6..49bd73c9ef 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -11,7 +11,7 @@ on: jobs: build: - runs-on: self-hosted + runs-on: ubuntu-latest strategy: matrix: From dd545fd5ecfe9a0decde7ae0a1eb161f7580df6f Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 5 Feb 2024 12:49:07 +0530 Subject: [PATCH 239/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 49bd73c9ef..679e1f978c 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -49,7 +49,7 @@ jobs: run: | gcloud auth activate-service-account --key-file=${{ github.workspace }}/${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} gcloud config set project ${{ secrets.GOOGLE_PROJECT }} - gcloud auth configure-docker us-central1-docker.pkg.dev/***/test-project + gcloud auth configure-docker us-central1-docker.pkg.dev/goldengate-1/test-project shell: /usr/bin/bash -e ***0*** - name: Build and Push Docker Image From 0344c1efbf3b3157b7f1020158edb0b9046fa9b2 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 5 Feb 2024 12:52:55 +0530 Subject: [PATCH 240/664] Update node.js.yml --- .github/workflows/node.js.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 679e1f978c..bf5561b64e 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -45,13 +45,7 @@ jobs: exec -l $SHELL gcloud components install kubectl --quiet - - name: Authenticate Docker with Google Cloud - run: | - gcloud auth activate-service-account --key-file=${{ github.workspace }}/${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} - gcloud config set project ${{ secrets.GOOGLE_PROJECT }} - gcloud auth configure-docker us-central1-docker.pkg.dev/goldengate-1/test-project - shell: /usr/bin/bash -e ***0*** - + - name: Build and Push Docker Image run: | docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/Testproject-INNO From ff16cf58eb51ce4afca7541a116c1ec56d6f7f5d Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 5 Feb 2024 12:57:41 +0530 Subject: [PATCH 241/664] Update node.js.yml From 1267148415cc18b0bf83df752731d2f2e0da6224 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 5 Feb 2024 14:16:56 +0530 Subject: [PATCH 242/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index bf5561b64e..bd07c163fa 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -11,7 +11,7 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: self-hosted strategy: matrix: From 5ea5baf1a715b52a3b17cbdbe1353eec5a83bd85 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 5 Feb 2024 14:20:07 +0530 Subject: [PATCH 243/664] Update node.js.yml --- .github/workflows/node.js.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index bd07c163fa..8c3ee1f994 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -12,6 +12,9 @@ on: jobs: build: runs-on: self-hosted + defaults: + run: + shell: bash -l {0} strategy: matrix: From 65729e9940a2898e4d43141fcc39a55abbdb2536 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 5 Feb 2024 14:24:07 +0530 Subject: [PATCH 244/664] Update node.js.yml --- .github/workflows/node.js.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 8c3ee1f994..18a968111e 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -30,11 +30,11 @@ jobs: node-version: ${{ matrix.node-version }} cache: 'npm' - - name: Install dependencies and build - run: | - npm ci - npm run build --if-present - npm install + # - name: Install dependencies and build + # run: | + # npm ci + # npm run build --if-present + # npm install - name: Setup Ansible and Run Ansible playbook run: | From eacf00d888ce533d26bdd3e684e7074e57f3cb35 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 5 Feb 2024 15:04:31 +0530 Subject: [PATCH 245/664] Update node.js.yml From a95282b8cfd5508caa3eec04ac72473410a49340 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 5 Feb 2024 15:05:46 +0530 Subject: [PATCH 246/664] Update node.js.yml --- .github/workflows/node.js.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 18a968111e..ccbbf952d2 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -12,9 +12,9 @@ on: jobs: build: runs-on: self-hosted - defaults: - run: - shell: bash -l {0} + # defaults: + # run: + # shell: bash -l {0} strategy: matrix: From ab50b4cca2748d1f357c6060570592b4d9dc5011 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 5 Feb 2024 15:29:19 +0530 Subject: [PATCH 247/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index ccbbf952d2..ad03128f70 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -40,7 +40,7 @@ jobs: run: | sudo apt-get update sudo apt-get install -y ansible - ansible-playbook -i "localhost," -c local ansible/repo.yaml + ansible-playbook -i "localhost," -c local ansible/repo.yaml -K - name: Install gcloud CLI and kubectl run: | From 2d96b3776e038f286d47b8e91487ba42e9f85aa0 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 5 Feb 2024 15:37:20 +0530 Subject: [PATCH 248/664] Update node.js.yml --- .github/workflows/node.js.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index ad03128f70..8eb54d53b5 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -12,9 +12,9 @@ on: jobs: build: runs-on: self-hosted - # defaults: - # run: - # shell: bash -l {0} + defaults: + run: + shell: bash -l {0} strategy: matrix: From 0ba7b11b0ffb1dc7679a2837408b38eea778340d Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 5 Feb 2024 16:09:03 +0530 Subject: [PATCH 249/664] Update node.js.yml --- .github/workflows/node.js.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 8eb54d53b5..99f5be06a9 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -30,11 +30,11 @@ jobs: node-version: ${{ matrix.node-version }} cache: 'npm' - # - name: Install dependencies and build - # run: | - # npm ci - # npm run build --if-present - # npm install + # Uncomment the following block if you need to install dependencies and build + # - name: Install dependencies and build + # run: | + # npm ci + # npm run build --if-present - name: Setup Ansible and Run Ansible playbook run: | @@ -42,18 +42,19 @@ jobs: sudo apt-get install -y ansible ansible-playbook -i "localhost," -c local ansible/repo.yaml -K - - name: Install gcloud CLI and kubectl + - name: Install gcloud CLI and authenticate run: | curl -sSL https://sdk.cloud.google.com | bash exec -l $SHELL - gcloud components install kubectl --quiet + gcloud auth configure-docker - - name: Build and Push Docker Image run: | docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/Testproject-INNO docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + + From a93a52529818a97d925ecc1d1b9f600ec56b8538 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 5 Feb 2024 16:24:18 +0530 Subject: [PATCH 250/664] Update node.js.yml --- .github/workflows/node.js.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 99f5be06a9..32d8eef05e 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -36,6 +36,14 @@ jobs: # npm ci # npm run build --if-present + - name: Install the gcloud CLI + uses: google-github-actions/setup-gcloud@v0.2.0 + with: + project_id: ${{ secrets.GOOGLE_PROJECT }} + service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} + install_components: 'gke-gcloud-auth-plugin' + export_default_credentials: true + - name: Setup Ansible and Run Ansible playbook run: | sudo apt-get update @@ -49,12 +57,16 @@ jobs: gcloud auth configure-docker - name: Build and Push Docker Image + env: + GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} run: | - docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/Testproject-INNO + gcloud auth configure-docker us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/actions-runner/Testproject-INNO docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + From c2e340654b05dbe1deb042ceacdd824537c43c4f Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 5 Feb 2024 16:36:37 +0530 Subject: [PATCH 251/664] Update node.js.yml --- .github/workflows/node.js.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 32d8eef05e..8efb058a85 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -12,9 +12,7 @@ on: jobs: build: runs-on: self-hosted - defaults: - run: - shell: bash -l {0} + strategy: matrix: @@ -30,11 +28,11 @@ jobs: node-version: ${{ matrix.node-version }} cache: 'npm' - # Uncomment the following block if you need to install dependencies and build - # - name: Install dependencies and build - # run: | - # npm ci - # npm run build --if-present + + - name: Install dependencies and build + run: | + npm ci + npm run build --if-present - name: Install the gcloud CLI uses: google-github-actions/setup-gcloud@v0.2.0 From 19f4ed72fdca49e4b9eb9b8efc40a010c1809407 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 5 Feb 2024 16:39:46 +0530 Subject: [PATCH 252/664] Update repo.yaml --- ansible/repo.yaml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 83620b7bfc..cd9fb5c099 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -26,7 +26,7 @@ version: main # replace 'main' with your branch name if different become: true - name: Build Docker image - command: "docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/Testproject-INNO" + command: "docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/actions-runner/Testproject-INNO" become: true - name: Check if Docker image exists @@ -35,11 +35,6 @@ become: true changed_when: false - - name: Tag Docker image for artifact registry - command: "docker tag node:latest us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest" - become: true - when: docker_image_check.stdout_lines | length > 0 - - name: Push Docker image to artifact registry command: "docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest" become: true From 9d6b1943222287b88dce2d915283f6339de7be8c Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 5 Feb 2024 16:40:16 +0530 Subject: [PATCH 253/664] Update repo.yaml --- ansible/repo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index cd9fb5c099..6375751e57 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -22,7 +22,7 @@ - name: Clone Node.js code from GitHub git: repo: https://github.com/mnagaraju5628/Testproject-INNO.git - dest: /home/mnagaraju/Testproject-INNO + dest: /home/mnagaraju/actions-runner/Testproject-INNO version: main # replace 'main' with your branch name if different become: true - name: Build Docker image From 343dfb6abb020ce7cbb7c85af776e1804b90c9c9 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 5 Feb 2024 16:46:30 +0530 Subject: [PATCH 254/664] Update repo.yaml From 9e3b18c125e3de93fa9875e5ff5512d67863dc30 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 6 Feb 2024 11:33:39 +0530 Subject: [PATCH 255/664] Update node.js.yml --- .github/workflows/node.js.yml | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 8efb058a85..a54242ebaa 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -34,32 +34,20 @@ jobs: npm ci npm run build --if-present - - name: Install the gcloud CLI - uses: google-github-actions/setup-gcloud@v0.2.0 - with: - project_id: ${{ secrets.GOOGLE_PROJECT }} - service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} - install_components: 'gke-gcloud-auth-plugin' - export_default_credentials: true - + - name: Setup Ansible and Run Ansible playbook run: | - sudo apt-get update - sudo apt-get install -y ansible + apt-get update + apt-get install -y ansible ansible-playbook -i "localhost," -c local ansible/repo.yaml -K - - name: Install gcloud CLI and authenticate - run: | - curl -sSL https://sdk.cloud.google.com | bash - exec -l $SHELL - gcloud auth configure-docker - + - name: Build and Push Docker Image env: GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} run: | gcloud auth configure-docker us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/actions-runner/Testproject-INNO + docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest From b2ccb7552495f699bcd64015cf6983bf85eab34e Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 6 Feb 2024 11:41:08 +0530 Subject: [PATCH 256/664] Update node.js.yml --- .github/workflows/node.js.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index a54242ebaa..9d527c31df 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -37,8 +37,8 @@ jobs: - name: Setup Ansible and Run Ansible playbook run: | - apt-get update - apt-get install -y ansible + sudo apt-get update + sudo apt-get install -y ansible ansible-playbook -i "localhost," -c local ansible/repo.yaml -K From 11bbc290e79f4fe80c19003a590f19898a4a7fea Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 6 Feb 2024 11:48:39 +0530 Subject: [PATCH 257/664] Update repo.yaml --- ansible/repo.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 6375751e57..74c59eccd8 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -22,11 +22,11 @@ - name: Clone Node.js code from GitHub git: repo: https://github.com/mnagaraju5628/Testproject-INNO.git - dest: /home/mnagaraju/actions-runner/Testproject-INNO + dest: /home/ubuntu/actions-runner/Testproject-INNO version: main # replace 'main' with your branch name if different become: true - name: Build Docker image - command: "docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/actions-runner/Testproject-INNO" + command: "docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO" become: true - name: Check if Docker image exists From 7c083007bf1a4c43d7de8574ba987d1c161e1aeb Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 6 Feb 2024 11:55:18 +0530 Subject: [PATCH 258/664] Update repo.yaml --- ansible/repo.yaml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 74c59eccd8..b066243d60 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -29,14 +29,8 @@ command: "docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO" become: true - - name: Check if Docker image exists - command: "docker images -q node:latest" - register: docker_image_check - become: true - changed_when: false - - name: Push Docker image to artifact registry - command: "docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest" + command: "docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO" become: true when: docker_image_check.stdout_lines | length > 0 From 9d5bb5efff2d515f82c6320b553163b169e6778d Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 6 Feb 2024 11:58:21 +0530 Subject: [PATCH 259/664] Update repo.yaml --- ansible/repo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index b066243d60..bf437e73bd 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -32,7 +32,7 @@ - name: Push Docker image to artifact registry command: "docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO" become: true - when: docker_image_check.stdout_lines | length > 0 + # when: docker_image_check.stdout_lines | length > 0 From 69b4667cc86cea3d58589c759c1b969c75171f42 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 6 Feb 2024 12:04:02 +0530 Subject: [PATCH 260/664] Update node.js.yml --- .github/workflows/node.js.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 9d527c31df..f11056473f 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -43,10 +43,8 @@ jobs: - name: Build and Push Docker Image - env: - GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} run: | - gcloud auth configure-docker us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest From 45e3f0a6ac2a36e1e4e08b9b7bca613cb732b466 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 6 Feb 2024 12:05:30 +0530 Subject: [PATCH 261/664] Update repo.yaml --- ansible/repo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index bf437e73bd..da40bbdfcf 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -30,7 +30,7 @@ become: true - name: Push Docker image to artifact registry - command: "docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO" + command: "docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest" become: true # when: docker_image_check.stdout_lines | length > 0 From 3980f0e3f4af70b480500cb0c39689269762849c Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 6 Feb 2024 12:11:21 +0530 Subject: [PATCH 262/664] Update repo.yaml --- ansible/repo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index da40bbdfcf..bf437e73bd 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -30,7 +30,7 @@ become: true - name: Push Docker image to artifact registry - command: "docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest" + command: "docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO" become: true # when: docker_image_check.stdout_lines | length > 0 From 29dcac8087e5c1dec3041bcdc4246674f2b1db26 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 6 Feb 2024 12:18:11 +0530 Subject: [PATCH 263/664] Update node.js.yml From b3ed44679b4e6fada2268d1f3896f25f54b751d3 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 6 Feb 2024 12:21:50 +0530 Subject: [PATCH 264/664] Update node.js.yml From 0ba20f3e4cdab5e71fb729d3f085f085f167e8a5 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 6 Feb 2024 12:33:01 +0530 Subject: [PATCH 265/664] Update repo.yaml --- ansible/repo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index bf437e73bd..da40bbdfcf 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -30,7 +30,7 @@ become: true - name: Push Docker image to artifact registry - command: "docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO" + command: "docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest" become: true # when: docker_image_check.stdout_lines | length > 0 From 888e523db436ea15450634d83394cf9d14d6e7ac Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 6 Feb 2024 12:41:38 +0530 Subject: [PATCH 266/664] Update repo.yaml --- ansible/repo.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index da40bbdfcf..84a158b984 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -26,11 +26,11 @@ version: main # replace 'main' with your branch name if different become: true - name: Build Docker image - command: "docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO" + command: "docker build -t asia-south1-docker.pkg.dev/goldengate-1/testgcp-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO" become: true - name: Push Docker image to artifact registry - command: "docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest" + command: "docker push asia-south1-docker.pkg.dev/goldengate-1/testgcp-project/node:latest" become: true # when: docker_image_check.stdout_lines | length > 0 From a28a66912ba70ae381cd44d5bbf5cf830d8af29e Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 6 Feb 2024 12:41:55 +0530 Subject: [PATCH 267/664] Update node.js.yml --- .github/workflows/node.js.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index f11056473f..fc6c1da747 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -45,8 +45,8 @@ jobs: - name: Build and Push Docker Image run: | - docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO - docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + docker build -t asia-south1-docker.pkg.dev/goldengate-1/testgcp-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO + docker push asia-south1-docker.pkg.dev/goldengate-1/testgcp-project/node:latest From 8157357d3f2d3123a9ef522476fe73992e2406db Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 6 Feb 2024 12:48:10 +0530 Subject: [PATCH 268/664] Update repo.yaml --- ansible/repo.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 84a158b984..b9cab6de8f 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -26,13 +26,13 @@ version: main # replace 'main' with your branch name if different become: true - name: Build Docker image - command: "docker build -t asia-south1-docker.pkg.dev/goldengate-1/testgcp-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO" + command: "docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO" become: true - name: Push Docker image to artifact registry - command: "docker push asia-south1-docker.pkg.dev/goldengate-1/testgcp-project/node:latest" + command: "docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest" become: true - # when: docker_image_check.stdout_lines | length > 0 + when: docker_image_check.stdout_lines | length > 0 From ad8fde328910da24687af49fd9c93f7e60fb09a5 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 6 Feb 2024 12:53:24 +0530 Subject: [PATCH 269/664] Update repo.yaml --- ansible/repo.yaml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index b9cab6de8f..b78ccec048 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -25,14 +25,21 @@ dest: /home/ubuntu/actions-runner/Testproject-INNO version: main # replace 'main' with your branch name if different become: true + - name: Build Docker image command: "docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO" become: true + - name: Check if Docker image exists + command: docker image inspect us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + register: docker_image_check + ignore_errors: true + - name: Push Docker image to artifact registry - command: "docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest" - become: true - when: docker_image_check.stdout_lines | length > 0 + docker_image_push: + name: us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + when: docker_image_check is defined and docker_image_check.stdout_lines | length > 0 + From 7803679ef5674c8db90eee5e49c2ca5158db27ce Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 6 Feb 2024 12:58:20 +0530 Subject: [PATCH 270/664] Update repo.yaml --- ansible/repo.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index b78ccec048..0018176b83 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -36,7 +36,7 @@ ignore_errors: true - name: Push Docker image to artifact registry - docker_image_push: + community.docker.docker_image_push: name: us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest when: docker_image_check is defined and docker_image_check.stdout_lines | length > 0 @@ -44,4 +44,5 @@ + From 90c9ebe7c686f5e960abfa00e7e4ce9d54af1632 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 6 Feb 2024 13:04:10 +0530 Subject: [PATCH 271/664] Update repo.yaml --- ansible/repo.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 0018176b83..e2919a1a23 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -36,8 +36,9 @@ ignore_errors: true - name: Push Docker image to artifact registry - community.docker.docker_image_push: + docker_image_push: name: us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + source: build when: docker_image_check is defined and docker_image_check.stdout_lines | length > 0 @@ -45,4 +46,5 @@ + From 5c6e28a03a3de817ca3b84657cff76debcff9278 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 6 Feb 2024 14:36:04 +0530 Subject: [PATCH 272/664] Update repo.yaml --- ansible/repo.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index e2919a1a23..3905db1b62 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -36,7 +36,7 @@ ignore_errors: true - name: Push Docker image to artifact registry - docker_image_push: + community.general.docker_image: name: us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest source: build when: docker_image_check is defined and docker_image_check.stdout_lines | length > 0 @@ -47,4 +47,5 @@ + From 6555bc1a9118f42b90657309e7bb3ac961b9e064 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 6 Feb 2024 14:47:17 +0530 Subject: [PATCH 273/664] Update repo.yaml --- ansible/repo.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 3905db1b62..f128c55cb0 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -47,5 +47,4 @@ - From 7ba1482faa7464cb9144a89d531c610ceeb33d0e Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 6 Feb 2024 14:51:17 +0530 Subject: [PATCH 274/664] Update repo.yaml --- ansible/repo.yaml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index f128c55cb0..c060f11f68 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -1,4 +1,3 @@ ---- - name: Git Checkout, Docker Install, Build Image, and Push to Artifact Registry hosts: localhost gather_facts: false @@ -27,7 +26,7 @@ become: true - name: Build Docker image - command: "docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO" + command: "docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO/ansible" become: true - name: Check if Docker image exists @@ -40,11 +39,3 @@ name: us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest source: build when: docker_image_check is defined and docker_image_check.stdout_lines | length > 0 - - - - - - - - From f375b8c47a20f358e6e142935ac47e8cb78b4848 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 6 Feb 2024 14:56:01 +0530 Subject: [PATCH 275/664] Update repo.yaml --- ansible/repo.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index c060f11f68..243ffb0de4 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -37,5 +37,8 @@ - name: Push Docker image to artifact registry community.general.docker_image: name: us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + repository: us-central1-docker.pkg.dev/goldengate-1/test-project/node + tag: latest source: build when: docker_image_check is defined and docker_image_check.stdout_lines | length > 0 + From bdfd83c4dc4603386d257bc419e43f7cfd73322d Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 6 Feb 2024 15:00:24 +0530 Subject: [PATCH 276/664] Update repo.yaml --- ansible/repo.yaml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 243ffb0de4..b68370f4d9 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -25,20 +25,20 @@ version: main # replace 'main' with your branch name if different become: true - - name: Build Docker image - command: "docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO/ansible" - become: true + # - name: Build Docker image + # command: "docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO/ansible" + # become: true - - name: Check if Docker image exists - command: docker image inspect us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - register: docker_image_check - ignore_errors: true + # - name: Check if Docker image exists + # command: docker image inspect us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + # register: docker_image_check + # ignore_errors: true - - name: Push Docker image to artifact registry - community.general.docker_image: - name: us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - repository: us-central1-docker.pkg.dev/goldengate-1/test-project/node - tag: latest - source: build - when: docker_image_check is defined and docker_image_check.stdout_lines | length > 0 + # - name: Push Docker image to artifact registry + # community.general.docker_image: + # name: us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + # repository: us-central1-docker.pkg.dev/goldengate-1/test-project/node + # tag: latest + # source: build + # when: docker_image_check is defined and docker_image_check.stdout_lines | length > 0 From 973b78b0f52971e1323598e111132840a94880e7 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 6 Feb 2024 15:05:15 +0530 Subject: [PATCH 277/664] Update node.js.yml --- .github/workflows/node.js.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index fc6c1da747..f11056473f 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -45,8 +45,8 @@ jobs: - name: Build and Push Docker Image run: | - docker build -t asia-south1-docker.pkg.dev/goldengate-1/testgcp-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO - docker push asia-south1-docker.pkg.dev/goldengate-1/testgcp-project/node:latest + docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO + docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest From 1d51a0ce2c182acfb30e407bf0c8e9facca0bce0 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 6 Feb 2024 15:10:38 +0530 Subject: [PATCH 278/664] Update node.js.yml From 694b8c9c043b3c916c26f207af24b8451f19592d Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 6 Feb 2024 15:17:19 +0530 Subject: [PATCH 279/664] Update node.js.yml From 9e594b19e97497c5e909c0ac230ce5d9f0737372 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 6 Feb 2024 15:37:45 +0530 Subject: [PATCH 280/664] Update node.js.yml --- .github/workflows/node.js.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index f11056473f..4f6a17692d 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -47,6 +47,19 @@ jobs: docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + + - name: Install the gcloud plugin + uses: google-github-actions/setup-gcloud@v0.2.0 + with: + install_components: 'gke-gcloud-auth-plugin' + export_default_credentials: true + + - name: Deploy to GKE + run: | + gcloud container clusters get-credentials innotest-cluster --region us-central1-c + kubectl rollout restart deployment nodeapp-deployment + kubectl apply -f deployment.yaml + kubectl apply -f service.yaml From 84b35fe3c576a9a10a6b1b3f1de1c6ac075c9f01 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 6 Feb 2024 16:24:39 +0530 Subject: [PATCH 281/664] Update node.js.yml --- .github/workflows/node.js.yml | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 4f6a17692d..1506054af2 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -12,7 +12,6 @@ on: jobs: build: runs-on: self-hosted - strategy: matrix: @@ -28,32 +27,26 @@ jobs: node-version: ${{ matrix.node-version }} cache: 'npm' - - name: Install dependencies and build run: | npm ci npm run build --if-present - - name: Setup Ansible and Run Ansible playbook run: | sudo apt-get update sudo apt-get install -y ansible ansible-playbook -i "localhost," -c local ansible/repo.yaml -K - - - - name: Build and Push Docker Image - run: | - - docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO - docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - - name: Install the gcloud plugin uses: google-github-actions/setup-gcloud@v0.2.0 with: install_components: 'gke-gcloud-auth-plugin' export_default_credentials: true - + + - name: Build and Push Docker Image + run: | + docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO + docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - name: Deploy to GKE run: | gcloud container clusters get-credentials innotest-cluster --region us-central1-c @@ -64,6 +57,7 @@ jobs: + From 99ec0bccb23e1edd854795971aaf50cd29c18ad3 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 6 Feb 2024 16:28:26 +0530 Subject: [PATCH 282/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 1506054af2..da9288ab7f 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -38,7 +38,7 @@ jobs: sudo apt-get install -y ansible ansible-playbook -i "localhost," -c local ansible/repo.yaml -K - name: Install the gcloud plugin - uses: google-github-actions/setup-gcloud@v0.2.0 + uses: google-github-actions/setup-gcloud@v0.2.0 /home/ubuntu/actions-runner/Testproject-INNO with: install_components: 'gke-gcloud-auth-plugin' export_default_credentials: true From dd0e98340d1555f7a90c9f1a3d24f566ccc250b2 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 6 Feb 2024 16:35:46 +0530 Subject: [PATCH 283/664] Update node.js.yml --- .github/workflows/node.js.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index da9288ab7f..fe08bce282 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -37,11 +37,13 @@ jobs: sudo apt-get update sudo apt-get install -y ansible ansible-playbook -i "localhost," -c local ansible/repo.yaml -K - - name: Install the gcloud plugin - uses: google-github-actions/setup-gcloud@v0.2.0 /home/ubuntu/actions-runner/Testproject-INNO + - name: Install the gcloud CLI + uses: google-github-actions/setup-gcloud@v0.2.0 with: - install_components: 'gke-gcloud-auth-plugin' - export_default_credentials: true + project_id: ${{ secrets.GOOGLE_PROJECT }} + service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} + install_components: 'gke-gcloud-auth-plugin' + export_default_credentials: true - name: Build and Push Docker Image run: | From 42c14ca0cd12596e800aa65b05753c631c342364 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 6 Feb 2024 16:42:00 +0530 Subject: [PATCH 284/664] Update node.js.yml From d6f7a90faa5fda98a0c9320b549232299626d29e Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 6 Feb 2024 16:51:47 +0530 Subject: [PATCH 285/664] Update node.js.yml From f39b9dae071a0354755daec722733247c9c539b5 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 6 Feb 2024 18:16:37 +0530 Subject: [PATCH 286/664] Update node.js.yml From 288c61101ec41dee1e3196edcbde8a3f45dc5e43 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 6 Feb 2024 18:27:09 +0530 Subject: [PATCH 287/664] Update node.js.yml From dd17010ef9e5f5e4fa3477fba5210a683d867a8e Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 6 Feb 2024 18:32:33 +0530 Subject: [PATCH 288/664] Update node.js.yml From 91ef8285452f4714b5fa314b6b314aacdeb5ad4b Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 6 Feb 2024 18:56:13 +0530 Subject: [PATCH 289/664] Update node.js.yml --- .github/workflows/node.js.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index fe08bce282..9dc3b9d77f 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -37,7 +37,8 @@ jobs: sudo apt-get update sudo apt-get install -y ansible ansible-playbook -i "localhost," -c local ansible/repo.yaml -K - - name: Install the gcloud CLI + + - name: Install the gcloud-auth-plugin uses: google-github-actions/setup-gcloud@v0.2.0 with: project_id: ${{ secrets.GOOGLE_PROJECT }} @@ -49,6 +50,7 @@ jobs: run: | docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + - name: Deploy to GKE run: | gcloud container clusters get-credentials innotest-cluster --region us-central1-c From 973310e7f9b1bae8a84739d2727e49cc6f0573e6 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 6 Feb 2024 19:04:00 +0530 Subject: [PATCH 290/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 9dc3b9d77f..d52810f105 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -44,7 +44,7 @@ jobs: project_id: ${{ secrets.GOOGLE_PROJECT }} service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} install_components: 'gke-gcloud-auth-plugin' - export_default_credentials: true + # export_default_credentials: true - name: Build and Push Docker Image run: | From 06137e0d2a68318983b309ebc81c4ba594482ca7 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 6 Feb 2024 19:39:01 +0530 Subject: [PATCH 291/664] Update node.js.yml --- .github/workflows/node.js.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index d52810f105..5708224fc0 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -38,14 +38,6 @@ jobs: sudo apt-get install -y ansible ansible-playbook -i "localhost," -c local ansible/repo.yaml -K - - name: Install the gcloud-auth-plugin - uses: google-github-actions/setup-gcloud@v0.2.0 - with: - project_id: ${{ secrets.GOOGLE_PROJECT }} - service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} - install_components: 'gke-gcloud-auth-plugin' - # export_default_credentials: true - - name: Build and Push Docker Image run: | docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO From 999716988009b262278b21915ac7154c4c825a0a Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 6 Feb 2024 19:48:11 +0530 Subject: [PATCH 292/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 5708224fc0..62ef8e9461 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -45,7 +45,7 @@ jobs: - name: Deploy to GKE run: | - gcloud container clusters get-credentials innotest-cluster --region us-central1-c + gcloud container clusters get-credentials innotest-cluster --region us-central1-c /home/ubuntu/actions-runner/Testproject-INNO kubectl rollout restart deployment nodeapp-deployment kubectl apply -f deployment.yaml kubectl apply -f service.yaml From 46ac1108bdfb32afc66dffc74f3995d8c9c3dfb6 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 6 Feb 2024 19:51:44 +0530 Subject: [PATCH 293/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 62ef8e9461..cb3d2d862c 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -45,7 +45,7 @@ jobs: - name: Deploy to GKE run: | - gcloud container clusters get-credentials innotest-cluster --region us-central1-c /home/ubuntu/actions-runner/Testproject-INNO + gcloud container clusters get-credentials innotest-cluster --region us-central1-c kubectl rollout restart deployment nodeapp-deployment kubectl apply -f deployment.yaml kubectl apply -f service.yaml From 9f868bdd4598980f8cd69848d68460f53363536e Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 6 Feb 2024 19:55:45 +0530 Subject: [PATCH 294/664] Update node.js.yml --- .github/workflows/node.js.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index cb3d2d862c..538e32b341 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -1,6 +1,5 @@ # This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs - name: Build and Deploy on: @@ -38,6 +37,14 @@ jobs: sudo apt-get install -y ansible ansible-playbook -i "localhost," -c local ansible/repo.yaml -K + - name: Install the gcloud-auth-plugin + uses: google-github-actions/setup-gcloud@v0.2.0 + with: + project_id: ${{ secrets.GOOGLE_PROJECT }} + service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} + install_components: 'gke-gcloud-auth-plugin' + export_default_credentials: true + - name: Build and Push Docker Image run: | docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO @@ -45,7 +52,7 @@ jobs: - name: Deploy to GKE run: | - gcloud container clusters get-credentials innotest-cluster --region us-central1-c + gcloud container clusters get-credentials innotest-cluster --region us-central1-c kubectl rollout restart deployment nodeapp-deployment kubectl apply -f deployment.yaml kubectl apply -f service.yaml @@ -54,6 +61,7 @@ jobs: + From c7b78bfbaaca8d31bcc050f94c24b05df49181dd Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 7 Feb 2024 15:50:31 +0530 Subject: [PATCH 295/664] Update node.js.yml --- .github/workflows/node.js.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 538e32b341..6d92c629aa 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -37,13 +37,13 @@ jobs: sudo apt-get install -y ansible ansible-playbook -i "localhost," -c local ansible/repo.yaml -K - - name: Install the gcloud-auth-plugin - uses: google-github-actions/setup-gcloud@v0.2.0 - with: - project_id: ${{ secrets.GOOGLE_PROJECT }} - service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} - install_components: 'gke-gcloud-auth-plugin' - export_default_credentials: true + # - name: Install the gcloud-auth-plugin + # uses: google-github-actions/setup-gcloud@v0.2.0 + # with: + # project_id: ${{ secrets.GOOGLE_PROJECT }} + # service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} + # install_components: 'gke-gcloud-auth-plugin' + # export_default_credentials: true - name: Build and Push Docker Image run: | From ae75a51b69fe65c1ff5555c460cb955ad6511ddb Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 7 Feb 2024 15:59:43 +0530 Subject: [PATCH 296/664] Update node.js.yml --- .github/workflows/node.js.yml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 6d92c629aa..2e4ca11fe8 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -37,19 +37,16 @@ jobs: sudo apt-get install -y ansible ansible-playbook -i "localhost," -c local ansible/repo.yaml -K - # - name: Install the gcloud-auth-plugin - # uses: google-github-actions/setup-gcloud@v0.2.0 - # with: - # project_id: ${{ secrets.GOOGLE_PROJECT }} - # service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} - # install_components: 'gke-gcloud-auth-plugin' - # export_default_credentials: true - - name: Build and Push Docker Image run: | docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + - name: Authenticate with Google Cloud + uses: google-github-actions/auth@v0.2 + with: + service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} + - name: Deploy to GKE run: | gcloud container clusters get-credentials innotest-cluster --region us-central1-c From 0a0ceabbe167d84f552e48575b9f4ec24b98c8b1 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 7 Feb 2024 16:03:01 +0530 Subject: [PATCH 297/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 2e4ca11fe8..883fdc4472 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -43,7 +43,7 @@ jobs: docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - name: Authenticate with Google Cloud - uses: google-github-actions/auth@v0.2 + uses: google-github-actions/auth@v0.2.0 with: service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} From 750f993b53c3fba261a7b7a2fc7f97354e9b9762 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 7 Feb 2024 16:07:20 +0530 Subject: [PATCH 298/664] Update node.js.yml --- .github/workflows/node.js.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 883fdc4472..12f072b3c2 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -45,7 +45,7 @@ jobs: - name: Authenticate with Google Cloud uses: google-github-actions/auth@v0.2.0 with: - service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} + service_account: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} - name: Deploy to GKE run: | @@ -59,6 +59,8 @@ jobs: + + From de589663951d7bb6c23ee38a4fbb2f65aa25e361 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 7 Feb 2024 16:16:47 +0530 Subject: [PATCH 299/664] Update node.js.yml --- .github/workflows/node.js.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 12f072b3c2..8d989f128a 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -43,9 +43,10 @@ jobs: docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - name: Authenticate with Google Cloud - uses: google-github-actions/auth@v0.2.0 - with: - service_account: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} + env: + GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} + run: | + gcloud auth activate-service-account --key-file=$GOOGLE_APPLICATION_CREDENTIALS - name: Deploy to GKE run: | From 4b5f0452712fe91aa1228b0b2a00f66a47f97f36 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 7 Feb 2024 16:17:51 +0530 Subject: [PATCH 300/664] Update node.js.yml From 1e584f45109a65e71ac67c901c2783e94139d34c Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 7 Feb 2024 16:18:32 +0530 Subject: [PATCH 301/664] Update node.js.yml --- .github/workflows/node.js.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 8d989f128a..9493aa808b 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -42,12 +42,7 @@ jobs: docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - - name: Authenticate with Google Cloud - env: - GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} - run: | - gcloud auth activate-service-account --key-file=$GOOGLE_APPLICATION_CREDENTIALS - + - name: Deploy to GKE run: | gcloud container clusters get-credentials innotest-cluster --region us-central1-c From a40d1a21dc3bd39f641ba517e0ba22676761943b Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 7 Feb 2024 16:22:58 +0530 Subject: [PATCH 302/664] Update node.js.yml --- .github/workflows/node.js.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 9493aa808b..ea581d8239 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -11,7 +11,10 @@ on: jobs: build: runs-on: self-hosted - + defaults: + run: + shell: bash -l {0} + strategy: matrix: node-version: [14.x] From 0b9c3ac382c5338cf6ec557239a59d6a288feaef Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 7 Feb 2024 16:29:46 +0530 Subject: [PATCH 303/664] Update node.js.yml --- .github/workflows/node.js.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index ea581d8239..681212c822 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -39,6 +39,13 @@ jobs: sudo apt-get update sudo apt-get install -y ansible ansible-playbook -i "localhost," -c local ansible/repo.yaml -K + - name: Install the gcloud CLI + uses: google-github-actions/setup-gcloud@v0.2.0 + with: + project_id: ${{ secrets.GOOGLE_PROJECT }} + service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} + install_components: 'gke-gcloud-auth-plugin' + export_default_credentials: true - name: Build and Push Docker Image run: | From ad83e22ec1b82eb0b96a44e434fdb6f79527963d Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 7 Feb 2024 16:34:22 +0530 Subject: [PATCH 304/664] Update node.js.yml --- .github/workflows/node.js.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 681212c822..880e19248c 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -57,8 +57,8 @@ jobs: run: | gcloud container clusters get-credentials innotest-cluster --region us-central1-c kubectl rollout restart deployment nodeapp-deployment - kubectl apply -f deployment.yaml - kubectl apply -f service.yaml + kubectl apply -f deployment.yaml --validate=false + kubectl apply -f service.yaml --validate=false From fa888c29bf236be90092db65159117298f80b039 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Feb 2024 11:34:02 +0530 Subject: [PATCH 305/664] Update repo.yaml --- ansible/repo.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index b68370f4d9..0d93ecdfd9 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -25,6 +25,15 @@ version: main # replace 'main' with your branch name if different become: true + # Additional tasks for building Docker image and pushing it to Artifact Registry + - name: Build Docker image + command: "docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO" + become: true + + - name: Push Docker image to artifact registry + command: "docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest" + become: true + # - name: Build Docker image # command: "docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO/ansible" # become: true From f86903aaabdf1e622e2acf4ad5fb752a85a1d007 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Feb 2024 12:30:37 +0530 Subject: [PATCH 306/664] Update repo.yaml --- ansible/repo.yaml | 60 +++++++++++++++++++++++------------------------ 1 file changed, 29 insertions(+), 31 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 0d93ecdfd9..5acf554652 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -1,38 +1,36 @@ -- name: Git Checkout, Docker Install, Build Image, and Push to Artifact Registry +--- +- name: GitHub Actions Workflow with Ansible hosts: localhost - gather_facts: false - + gather_facts: no tasks: - - name: Ensure git is installed - become: true - apt: - name: git - state: present - - - name: Ensure Docker dependencies are installed - become: true - apt: - name: "{{ item }}" - state: present - loop: - - containerd - - docker.io - - - name: Clone Node.js code from GitHub - git: - repo: https://github.com/mnagaraju5628/Testproject-INNO.git - dest: /home/ubuntu/actions-runner/Testproject-INNO - version: main # replace 'main' with your branch name if different - become: true - - # Additional tasks for building Docker image and pushing it to Artifact Registry + - name: Run npm test + command: npm test + environment: + PATH: "{{ ansible_env.PATH }}" + - name: Build Docker image - command: "docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO" - become: true + command: docker build -t node . + args: + chdir: /home/ubuntu/actions-runner/Testproject-INNO + + - name: Push Docker image to Google Artifact Registry + command: > + docker tag node + us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + environment: + DOCKER_CLI_EXPERIMENTAL: enabled + + - name: Log in to Google Cloud + command:gcloud auth activate-service-account testgcp-sa@goldengate-1.iam.gserviceaccount.com --key-file=cred.json + environment: + GOOGLE_APPLICATION_CREDENTIALS: /home/ubuntu/actions-runner/ + + - name: Push Docker image to Google Artifact Registry + command: > + docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + environment: + GOOGLE_APPLICATION_CREDENTIALS: /home/ubuntu/actions-runner/ - - name: Push Docker image to artifact registry - command: "docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest" - become: true # - name: Build Docker image # command: "docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO/ansible" From b3a82b62356c5590d2238c831f106184edec0824 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Feb 2024 12:33:56 +0530 Subject: [PATCH 307/664] Update repo.yaml --- ansible/repo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 5acf554652..ecd7bfe41f 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -21,7 +21,7 @@ DOCKER_CLI_EXPERIMENTAL: enabled - name: Log in to Google Cloud - command:gcloud auth activate-service-account testgcp-sa@goldengate-1.iam.gserviceaccount.com --key-file=cred.json + command: gcloud auth activate-service-account testgcp-sa@goldengate-1.iam.gserviceaccount.com --key-file=cred.json environment: GOOGLE_APPLICATION_CREDENTIALS: /home/ubuntu/actions-runner/ From eeabf58300f5e96896e8772431ae7b46bbcfd93a Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Feb 2024 12:41:59 +0530 Subject: [PATCH 308/664] Update repo.yaml From fee100d022640c6b0fde54b43cd9b96d9388f04b Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Feb 2024 12:45:38 +0530 Subject: [PATCH 309/664] Update repo.yaml --- ansible/repo.yaml | 53 ++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 28 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index ecd7bfe41f..6a2103a85e 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -1,13 +1,29 @@ ---- -- name: GitHub Actions Workflow with Ansible +- name: Git Checkout, Docker Install, Build Image, and Push to Artifact Registry hosts: localhost - gather_facts: no - tasks: - - name: Run npm test - command: npm test - environment: - PATH: "{{ ansible_env.PATH }}" + gather_facts: false + tasks: + - name: Ensure git is installed + become: true + apt: + name: git + state: present + + - name: Ensure Docker dependencies are installed + become: true + apt: + name: "{{ item }}" + state: present + loop: + - containerd + - docker.io + + - name: Clone Node.js code from GitHub + git: + repo: https://github.com/mnagaraju5628/Testproject-INNO.git + dest: /home/ubuntu/actions-runner/Testproject-INNO + version: main # replace 'main' with your branch name if different + become: true - name: Build Docker image command: docker build -t node . args: @@ -21,7 +37,7 @@ DOCKER_CLI_EXPERIMENTAL: enabled - name: Log in to Google Cloud - command: gcloud auth activate-service-account testgcp-sa@goldengate-1.iam.gserviceaccount.com --key-file=cred.json + command:gcloud auth activate-service-account testgcp-sa@goldengate-1.iam.gserviceaccount.com --key-file=cred.json environment: GOOGLE_APPLICATION_CREDENTIALS: /home/ubuntu/actions-runner/ @@ -30,22 +46,3 @@ docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest environment: GOOGLE_APPLICATION_CREDENTIALS: /home/ubuntu/actions-runner/ - - - # - name: Build Docker image - # command: "docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO/ansible" - # become: true - - # - name: Check if Docker image exists - # command: docker image inspect us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - # register: docker_image_check - # ignore_errors: true - - # - name: Push Docker image to artifact registry - # community.general.docker_image: - # name: us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - # repository: us-central1-docker.pkg.dev/goldengate-1/test-project/node - # tag: latest - # source: build - # when: docker_image_check is defined and docker_image_check.stdout_lines | length > 0 - From 00f8ea98543927b75bd57577ef323bd7c5c70a0c Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Feb 2024 12:46:59 +0530 Subject: [PATCH 310/664] Update repo.yaml --- ansible/repo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 6a2103a85e..ace158f398 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -37,7 +37,7 @@ DOCKER_CLI_EXPERIMENTAL: enabled - name: Log in to Google Cloud - command:gcloud auth activate-service-account testgcp-sa@goldengate-1.iam.gserviceaccount.com --key-file=cred.json + command: gcloud auth activate-service-account testgcp-sa@goldengate-1.iam.gserviceaccount.com --key-file=cred.json environment: GOOGLE_APPLICATION_CREDENTIALS: /home/ubuntu/actions-runner/ From a86eaaefbe96af4ca44d5b4a2693d351d0973679 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Feb 2024 12:50:10 +0530 Subject: [PATCH 311/664] Update repo.yaml --- ansible/repo.yaml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index ace158f398..61cdd65541 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -24,6 +24,7 @@ dest: /home/ubuntu/actions-runner/Testproject-INNO version: main # replace 'main' with your branch name if different become: true + - name: Build Docker image command: docker build -t node . args: @@ -37,12 +38,8 @@ DOCKER_CLI_EXPERIMENTAL: enabled - name: Log in to Google Cloud - command: gcloud auth activate-service-account testgcp-sa@goldengate-1.iam.gserviceaccount.com --key-file=cred.json - environment: - GOOGLE_APPLICATION_CREDENTIALS: /home/ubuntu/actions-runner/ + command: gcloud auth activate-service-account testgcp-sa@goldengate-1.iam.gserviceaccount.com --key-file=/home/ubuntu/actions-runner/cred.json - name: Push Docker image to Google Artifact Registry command: > docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - environment: - GOOGLE_APPLICATION_CREDENTIALS: /home/ubuntu/actions-runner/ From 1d15545a8a70b47f4d64f34a12fa87a94ea9cbb2 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Feb 2024 12:58:12 +0530 Subject: [PATCH 312/664] Update node.js.yml --- .github/workflows/node.js.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 880e19248c..e454d60556 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -39,13 +39,13 @@ jobs: sudo apt-get update sudo apt-get install -y ansible ansible-playbook -i "localhost," -c local ansible/repo.yaml -K - - name: Install the gcloud CLI - uses: google-github-actions/setup-gcloud@v0.2.0 - with: - project_id: ${{ secrets.GOOGLE_PROJECT }} - service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} - install_components: 'gke-gcloud-auth-plugin' - export_default_credentials: true + # - name: Install the gcloud CLI + # uses: google-github-actions/setup-gcloud@v0.2.0 + # with: + # project_id: ${{ secrets.GOOGLE_PROJECT }} + # service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} + # install_components: 'gke-gcloud-auth-plugin' + # export_default_credentials: true - name: Build and Push Docker Image run: | @@ -53,12 +53,12 @@ jobs: docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - - name: Deploy to GKE - run: | - gcloud container clusters get-credentials innotest-cluster --region us-central1-c - kubectl rollout restart deployment nodeapp-deployment - kubectl apply -f deployment.yaml --validate=false - kubectl apply -f service.yaml --validate=false + # - name: Deploy to GKE + # run: | + # gcloud container clusters get-credentials innotest-cluster --region us-central1-c + # kubectl rollout restart deployment nodeapp-deployment + # kubectl apply -f deployment.yaml --validate=false + # kubectl apply -f service.yaml --validate=false From 0a2e301b181b42dc660c9c50c05ff6dc419d28a8 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Feb 2024 13:29:03 +0530 Subject: [PATCH 313/664] Update repo.yaml --- ansible/repo.yaml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 61cdd65541..8b4b95c935 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -1,4 +1,4 @@ -- name: Git Checkout, Docker Install, Build Image, and Push to Artifact Registry +- name: Git Checkout, Docker Install, Build Image, Push to Artifact Registry, and Deploy to GKE hosts: localhost gather_facts: false @@ -24,7 +24,7 @@ dest: /home/ubuntu/actions-runner/Testproject-INNO version: main # replace 'main' with your branch name if different become: true - + - name: Build Docker image command: docker build -t node . args: @@ -43,3 +43,13 @@ - name: Push Docker image to Google Artifact Registry command: > docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + + - name: Configure kubectl + command: gcloud container clusters get-credentials innotest-cluster --zone us-central1-c + environment: + CLOUDSDK_CORE_DISABLE_PROMPTS: "true" + + - name: Apply Kubernetes manifests + command: kubectl apply -f deployment.yaml + kubectl apply -f service.yaml + From f7c98a21d3e4a9f9e48406e9a383e6130551167d Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Feb 2024 14:24:16 +0530 Subject: [PATCH 314/664] Update repo.yaml --- ansible/repo.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 8b4b95c935..c69219f19c 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -49,7 +49,8 @@ environment: CLOUDSDK_CORE_DISABLE_PROMPTS: "true" - - name: Apply Kubernetes manifests + - name: Apply Kubernetes deployment manifest command: kubectl apply -f deployment.yaml - kubectl apply -f service.yaml - + + - name: Apply Kubernetes service manifest + command: kubectl apply -f service.yaml From f555b58ce42a02ef3e593024c9c0552aa27b5458 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Feb 2024 14:29:43 +0530 Subject: [PATCH 315/664] Update repo.yaml --- ansible/repo.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index c69219f19c..71931f0551 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -50,7 +50,7 @@ CLOUDSDK_CORE_DISABLE_PROMPTS: "true" - name: Apply Kubernetes deployment manifest - command: kubectl apply -f deployment.yaml + command: kubectl apply -f /home/ubuntu/actions-runner/Testproject-INNO/deployment.yaml - name: Apply Kubernetes service manifest - command: kubectl apply -f service.yaml + command: kubectl apply -f /home/ubuntu/actions-runner/Testproject-INNO/service.yaml From e55b2d4bd0acb32cb45d8eb58012f2253665f4f7 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Feb 2024 14:37:11 +0530 Subject: [PATCH 316/664] Update repo.yaml --- ansible/repo.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 71931f0551..f76652b03a 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -50,7 +50,7 @@ CLOUDSDK_CORE_DISABLE_PROMPTS: "true" - name: Apply Kubernetes deployment manifest - command: kubectl apply -f /home/ubuntu/actions-runner/Testproject-INNO/deployment.yaml + command: kubectl apply -f deployment.yaml /home/ubuntu/actions-runner/Testproject-INNO/ - name: Apply Kubernetes service manifest - command: kubectl apply -f /home/ubuntu/actions-runner/Testproject-INNO/service.yaml + command: kubectl apply -f service.yaml /home/ubuntu/actions-runner/Testproject-INNO/ From 138346f89266188f9807d857c6d0edca9e378723 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Feb 2024 14:41:13 +0530 Subject: [PATCH 317/664] Update node.js.yml --- .github/workflows/node.js.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index e454d60556..eee37b9892 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -53,12 +53,12 @@ jobs: docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - # - name: Deploy to GKE - # run: | - # gcloud container clusters get-credentials innotest-cluster --region us-central1-c - # kubectl rollout restart deployment nodeapp-deployment - # kubectl apply -f deployment.yaml --validate=false - # kubectl apply -f service.yaml --validate=false + - name: Deploy to GKE + run: | + gcloud container clusters get-credentials innotest-cluster --region us-central1-c + kubectl rollout restart deployment nodeapp-deployment + kubectl apply -f deployment.yaml --validate=false + kubectl apply -f service.yaml --validate=false From 70ad6e4c4892a4d9c15f4c1dbd45d1b0bc037a3a Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Feb 2024 14:41:23 +0530 Subject: [PATCH 318/664] Update repo.yaml --- ansible/repo.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index f76652b03a..c69219f19c 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -50,7 +50,7 @@ CLOUDSDK_CORE_DISABLE_PROMPTS: "true" - name: Apply Kubernetes deployment manifest - command: kubectl apply -f deployment.yaml /home/ubuntu/actions-runner/Testproject-INNO/ + command: kubectl apply -f deployment.yaml - name: Apply Kubernetes service manifest - command: kubectl apply -f service.yaml /home/ubuntu/actions-runner/Testproject-INNO/ + command: kubectl apply -f service.yaml From 06c3d190d837a2ff46720b404418f3ee9421192f Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Feb 2024 14:53:30 +0530 Subject: [PATCH 319/664] Update repo.yaml --- ansible/repo.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index c69219f19c..f4a557f665 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -51,6 +51,10 @@ - name: Apply Kubernetes deployment manifest command: kubectl apply -f deployment.yaml + args: + chdir: /home/ubuntu/actions-runner/Testproject-INNO - name: Apply Kubernetes service manifest command: kubectl apply -f service.yaml + args: + chdir: /home/ubuntu/actions-runner/Testproject-INNO From 0afd7b5baef77e14c82082058a708f7045ddfe39 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Feb 2024 15:02:49 +0530 Subject: [PATCH 320/664] Update repo.yaml --- ansible/repo.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index f4a557f665..8820d97276 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -50,11 +50,11 @@ CLOUDSDK_CORE_DISABLE_PROMPTS: "true" - name: Apply Kubernetes deployment manifest - command: kubectl apply -f deployment.yaml - args: - chdir: /home/ubuntu/actions-runner/Testproject-INNO + k8s: + state: present + src: deployment.yaml - name: Apply Kubernetes service manifest - command: kubectl apply -f service.yaml - args: - chdir: /home/ubuntu/actions-runner/Testproject-INNO + k8s: + state: present + src: service.yaml From e7c734252e28ea8432b09f8c845b2674729a558f Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Feb 2024 15:08:26 +0530 Subject: [PATCH 321/664] Update repo.yaml --- ansible/repo.yaml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 8820d97276..e5621abcc1 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -1,3 +1,6 @@ +fix the error and correct the below workflowfile + + - name: Git Checkout, Docker Install, Build Image, Push to Artifact Registry, and Deploy to GKE hosts: localhost gather_facts: false @@ -49,12 +52,8 @@ environment: CLOUDSDK_CORE_DISABLE_PROMPTS: "true" - - name: Apply Kubernetes deployment manifest - k8s: - state: present - src: deployment.yaml + - name: Apply Kubernetes deployment manifest using kubectl + command: kubectl apply -f deployment.yaml - - name: Apply Kubernetes service manifest - k8s: - state: present - src: service.yaml + - name: Apply Kubernetes service manifest using kubectl + command: kubectl apply -f service.yaml From e7200696479d4377addb5b8f550fd2c76a84364a Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Feb 2024 15:12:08 +0530 Subject: [PATCH 322/664] Update repo.yaml --- ansible/repo.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index e5621abcc1..4f4f94a80f 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -1,6 +1,3 @@ -fix the error and correct the below workflowfile - - - name: Git Checkout, Docker Install, Build Image, Push to Artifact Registry, and Deploy to GKE hosts: localhost gather_facts: false From cc961279007cf33f2e0d1bf0daee4dc43728d414 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Feb 2024 15:19:31 +0530 Subject: [PATCH 323/664] Update repo.yaml --- ansible/repo.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 4f4f94a80f..dd93b5123e 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -50,7 +50,8 @@ CLOUDSDK_CORE_DISABLE_PROMPTS: "true" - name: Apply Kubernetes deployment manifest using kubectl - command: kubectl apply -f deployment.yaml + command: kubectl apply -f ./deployment.yaml - name: Apply Kubernetes service manifest using kubectl - command: kubectl apply -f service.yaml + command: kubectl apply -f ./service.yaml + From bf885dcac8648c1006a1dd025d7339f4bece2a3e Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Feb 2024 15:22:30 +0530 Subject: [PATCH 324/664] Update node.js.yml --- .github/workflows/node.js.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index eee37b9892..e76146a2c6 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -57,8 +57,8 @@ jobs: run: | gcloud container clusters get-credentials innotest-cluster --region us-central1-c kubectl rollout restart deployment nodeapp-deployment - kubectl apply -f deployment.yaml --validate=false - kubectl apply -f service.yaml --validate=false + kubectl apply -f deployment.yaml + kubectl apply -f service.yaml From 4377ec5b613f206157fd98f0df1057de80c0e1d8 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Feb 2024 15:27:25 +0530 Subject: [PATCH 325/664] Update repo.yaml --- ansible/repo.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index dd93b5123e..3d8b6edee0 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -50,8 +50,8 @@ CLOUDSDK_CORE_DISABLE_PROMPTS: "true" - name: Apply Kubernetes deployment manifest using kubectl - command: kubectl apply -f ./deployment.yaml + command: kubectl apply -f /home/ubuntu/actions-runner/Testproject-INNO/deployment.yaml - name: Apply Kubernetes service manifest using kubectl - command: kubectl apply -f ./service.yaml + command: kubectl apply -f /home/ubuntu/actions-runner/Testproject-INNO/service.yaml From 5512ddc788bced9f0c3e395e5627c5bc507d582b Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Feb 2024 15:43:08 +0530 Subject: [PATCH 326/664] Update repo.yaml --- ansible/repo.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 3d8b6edee0..591160f1b8 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -51,7 +51,10 @@ - name: Apply Kubernetes deployment manifest using kubectl command: kubectl apply -f /home/ubuntu/actions-runner/Testproject-INNO/deployment.yaml + args: + creates: /home/ubuntu/actions-runner/Testproject-INNO/deployment.yaml # Ensures idempotence - name: Apply Kubernetes service manifest using kubectl command: kubectl apply -f /home/ubuntu/actions-runner/Testproject-INNO/service.yaml - + args: + creates: /home/ubuntu/actions-runner/Testproject-INNO/service.yaml # Ensures idempotence From be5f7202b1e8a2cce32dee9a91c16171a3d6d13a Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Feb 2024 15:54:00 +0530 Subject: [PATCH 327/664] Update node.js.yml --- .github/workflows/node.js.yml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index e76146a2c6..ee6fd73c66 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -51,14 +51,29 @@ jobs: run: | docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + - + - name: Configure Google Cloud SDK + uses: google-github-actions/setup-gcloud@v0.2.0 + with: + service_account_key: ${{ secrets.GCP_SA_KEY }} + project_id: goldengate-1 + export_default_credentials: true - name: Deploy to GKE run: | gcloud container clusters get-credentials innotest-cluster --region us-central1-c kubectl rollout restart deployment nodeapp-deployment - kubectl apply -f deployment.yaml - kubectl apply -f service.yaml + kubectl apply -f /home/ubuntu/actions-runner/Testproject-INNO/deployment.yaml + kubectl apply -f /home/ubuntu/actions-runner/Testproject-INNO/service.yaml + + + + # - name: Deploy to GKE + # run: | + # gcloud container clusters get-credentials innotest-cluster --region us-central1-c + # kubectl rollout restart deployment nodeapp-deployment + # kubectl apply -f deployment.yaml + # kubectl apply -f service.yaml From f71573b037b4b2f1d57f7885254eb53ed31b4c16 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Feb 2024 16:28:14 +0530 Subject: [PATCH 328/664] Update node.js.yml --- .github/workflows/node.js.yml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index ee6fd73c66..38417889bd 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -51,20 +51,18 @@ jobs: run: | docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - - - name: Configure Google Cloud SDK - uses: google-github-actions/setup-gcloud@v0.2.0 - with: - service_account_key: ${{ secrets.GCP_SA_KEY }} - project_id: goldengate-1 - export_default_credentials: true + - name: Log in to Google Cloud + run: | + gcloud auth activate-service-account testgcp-sa@goldengate-1.iam.gserviceaccount.com --key-file=/home/ubuntu/actions-runner/cred.json + - name: Deploy to GKE run: | gcloud container clusters get-credentials innotest-cluster --region us-central1-c - kubectl rollout restart deployment nodeapp-deployment - kubectl apply -f /home/ubuntu/actions-runner/Testproject-INNO/deployment.yaml - kubectl apply -f /home/ubuntu/actions-runner/Testproject-INNO/service.yaml + kubectl rollout restart deployment nodeapp-deployment -n your-namespace + kubectl apply -f /home/ubuntu/actions-runner/Testproject-INNO/deployment.yaml -n your-namespace + kubectl apply -f /home/ubuntu/actions-runner/Testproject-INNO/service.yaml -n your-namespace + From c58aa9fd58d196ba6ca7d55d0bd0b801e5cf64a9 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Feb 2024 16:32:14 +0530 Subject: [PATCH 329/664] Update node.js.yml --- .github/workflows/node.js.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 38417889bd..6d2fda3e5b 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -47,21 +47,21 @@ jobs: # install_components: 'gke-gcloud-auth-plugin' # export_default_credentials: true - - name: Build and Push Docker Image - run: | - docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO - docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - - - name: Log in to Google Cloud - run: | - gcloud auth activate-service-account testgcp-sa@goldengate-1.iam.gserviceaccount.com --key-file=/home/ubuntu/actions-runner/cred.json - - - name: Deploy to GKE - run: | - gcloud container clusters get-credentials innotest-cluster --region us-central1-c - kubectl rollout restart deployment nodeapp-deployment -n your-namespace - kubectl apply -f /home/ubuntu/actions-runner/Testproject-INNO/deployment.yaml -n your-namespace - kubectl apply -f /home/ubuntu/actions-runner/Testproject-INNO/service.yaml -n your-namespace + # - name: Build and Push Docker Image + # run: | + # docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO + # docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + + # - name: Log in to Google Cloud + # run: | + # gcloud auth activate-service-account testgcp-sa@goldengate-1.iam.gserviceaccount.com --key-file=/home/ubuntu/actions-runner/cred.json + + # - name: Deploy to GKE + # run: | + # gcloud container clusters get-credentials innotest-cluster --region us-central1-c + # kubectl rollout restart deployment nodeapp-deployment -n your-namespace + # kubectl apply -f /home/ubuntu/actions-runner/Testproject-INNO/deployment.yaml -n your-namespace + # kubectl apply -f /home/ubuntu/actions-runner/Testproject-INNO/service.yaml -n your-namespace From a8aa8cbd584eb27b447642f62f931f2b12a71dc6 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Feb 2024 16:45:52 +0530 Subject: [PATCH 330/664] Update repo.yaml --- ansible/repo.yaml | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 591160f1b8..91ca89d903 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -44,17 +44,27 @@ command: > docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + - name: Install gke-gcloud-auth-plugin + command: curl -o /usr/local/bin/gke-gcloud-auth-plugin https://path/to/latest/gke-gcloud-auth-plugin && chmod +x /usr/local/bin/gke-gcloud-auth-plugin + - name: Configure kubectl command: gcloud container clusters get-credentials innotest-cluster --zone us-central1-c environment: CLOUDSDK_CORE_DISABLE_PROMPTS: "true" - - name: Apply Kubernetes deployment manifest using kubectl - command: kubectl apply -f /home/ubuntu/actions-runner/Testproject-INNO/deployment.yaml - args: - creates: /home/ubuntu/actions-runner/Testproject-INNO/deployment.yaml # Ensures idempotence +- name: Deploy to GKE + hosts: localhost + gather_facts: false - - name: Apply Kubernetes service manifest using kubectl - command: kubectl apply -f /home/ubuntu/actions-runner/Testproject-INNO/service.yaml - args: - creates: /home/ubuntu/actions-runner/Testproject-INNO/service.yaml # Ensures idempotence + tasks: + - name: Get credentials for GKE cluster + command: gcloud container clusters get-credentials innotest-cluster --region us-central1-c + + - name: Restart Deployment + command: kubectl rollout restart deployment nodeapp-deployment + + - name: Apply Deployment YAML + command: kubectl apply -f /home/ubuntu/actions-runner/Testproject-INNO/deployment.yaml + + - name: Apply Service YAML + command: kubectl apply -f /home/ubuntu/actions-runner/Testproject-INNO/service.yaml From 80141bb7429c8ed4f549ba7e1fbe08759bf74d09 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Feb 2024 16:50:18 +0530 Subject: [PATCH 331/664] Update repo.yaml --- ansible/repo.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 91ca89d903..6ddfdd344b 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -32,8 +32,7 @@ - name: Push Docker image to Google Artifact Registry command: > - docker tag node - us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + docker tag node us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest environment: DOCKER_CLI_EXPERIMENTAL: enabled @@ -45,7 +44,11 @@ docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - name: Install gke-gcloud-auth-plugin - command: curl -o /usr/local/bin/gke-gcloud-auth-plugin https://path/to/latest/gke-gcloud-auth-plugin && chmod +x /usr/local/bin/gke-gcloud-auth-plugin + become: true + get_url: + url: "https://path/to/latest/gke-gcloud-auth-plugin" + dest: /usr/local/bin/gke-gcloud-auth-plugin + mode: '0755' - name: Configure kubectl command: gcloud container clusters get-credentials innotest-cluster --zone us-central1-c From 8dae7db2d8ce474eb905aaa7aa496aff69fe74b6 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Feb 2024 17:07:11 +0530 Subject: [PATCH 332/664] Update repo.yaml --- ansible/repo.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 6ddfdd344b..13614237b3 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -43,12 +43,12 @@ command: > docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - - name: Install gke-gcloud-auth-plugin - become: true - get_url: - url: "https://path/to/latest/gke-gcloud-auth-plugin" - dest: /usr/local/bin/gke-gcloud-auth-plugin - mode: '0755' + # - name: Install gke-gcloud-auth-plugin + # become: true + # get_url: + # url: "https://path/to/latest/gke-gcloud-auth-plugin" + # dest: /usr/local/bin/gke-gcloud-auth-plugin + # mode: '0755' - name: Configure kubectl command: gcloud container clusters get-credentials innotest-cluster --zone us-central1-c From ce767e7accb592aeb97d71723688283ef7abb94a Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Feb 2024 17:13:11 +0530 Subject: [PATCH 333/664] Update repo.yaml --- ansible/repo.yaml | 60 +++++++---------------------------------------- 1 file changed, 9 insertions(+), 51 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 13614237b3..cadcbcad83 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -3,57 +3,7 @@ gather_facts: false tasks: - - name: Ensure git is installed - become: true - apt: - name: git - state: present - - - name: Ensure Docker dependencies are installed - become: true - apt: - name: "{{ item }}" - state: present - loop: - - containerd - - docker.io - - - name: Clone Node.js code from GitHub - git: - repo: https://github.com/mnagaraju5628/Testproject-INNO.git - dest: /home/ubuntu/actions-runner/Testproject-INNO - version: main # replace 'main' with your branch name if different - become: true - - - name: Build Docker image - command: docker build -t node . - args: - chdir: /home/ubuntu/actions-runner/Testproject-INNO - - - name: Push Docker image to Google Artifact Registry - command: > - docker tag node us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - environment: - DOCKER_CLI_EXPERIMENTAL: enabled - - - name: Log in to Google Cloud - command: gcloud auth activate-service-account testgcp-sa@goldengate-1.iam.gserviceaccount.com --key-file=/home/ubuntu/actions-runner/cred.json - - - name: Push Docker image to Google Artifact Registry - command: > - docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - - # - name: Install gke-gcloud-auth-plugin - # become: true - # get_url: - # url: "https://path/to/latest/gke-gcloud-auth-plugin" - # dest: /usr/local/bin/gke-gcloud-auth-plugin - # mode: '0755' - - - name: Configure kubectl - command: gcloud container clusters get-credentials innotest-cluster --zone us-central1-c - environment: - CLOUDSDK_CORE_DISABLE_PROMPTS: "true" + # Existing tasks are kept as they are - name: Deploy to GKE hosts: localhost @@ -62,9 +12,17 @@ tasks: - name: Get credentials for GKE cluster command: gcloud container clusters get-credentials innotest-cluster --region us-central1-c + register: get_creds_result + ignore_errors: yes # Ignoring errors if the command fails + + - name: Ensure Kubernetes credentials are retrieved successfully + fail: + msg: "Failed to retrieve Kubernetes credentials: {{ get_creds_result.stderr }}" + when: get_creds_result.rc != 0 # Fail the task if the command failed - name: Restart Deployment command: kubectl rollout restart deployment nodeapp-deployment + ignore_errors: yes # Ignore errors since the deployment might already be up to date - name: Apply Deployment YAML command: kubectl apply -f /home/ubuntu/actions-runner/Testproject-INNO/deployment.yaml From d6ca207163bf8b5e30451b72ba8eb2c6ac740d40 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Feb 2024 17:21:06 +0530 Subject: [PATCH 334/664] Update repo.yaml --- ansible/repo.yaml | 67 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 47 insertions(+), 20 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index cadcbcad83..2fa609a792 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -3,29 +3,56 @@ gather_facts: false tasks: - # Existing tasks are kept as they are + - name: Ensure git is installed + become: true + apt: + name: git + state: present -- name: Deploy to GKE - hosts: localhost - gather_facts: false + - name: Ensure Docker dependencies are installed + become: true + apt: + name: "{{ item }}" + state: present + loop: + - containerd + - docker.io - tasks: - - name: Get credentials for GKE cluster - command: gcloud container clusters get-credentials innotest-cluster --region us-central1-c - register: get_creds_result - ignore_errors: yes # Ignoring errors if the command fails + - name: Clone Node.js code from GitHub + git: + repo: https://github.com/mnagaraju5628/Testproject-INNO.git + dest: /home/ubuntu/actions-runner/Testproject-INNO + version: main # replace 'main' with your branch name if different + become: true + + - name: Build Docker image + command: docker build -t node . + args: + chdir: /home/ubuntu/actions-runner/Testproject-INNO - - name: Ensure Kubernetes credentials are retrieved successfully - fail: - msg: "Failed to retrieve Kubernetes credentials: {{ get_creds_result.stderr }}" - when: get_creds_result.rc != 0 # Fail the task if the command failed + - name: Push Docker image to Google Artifact Registry + command: > + docker tag node us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + environment: + DOCKER_CLI_EXPERIMENTAL: enabled + + - name: Log in to Google Cloud + command: gcloud auth activate-service-account testgcp-sa@goldengate-1.iam.gserviceaccount.com --key-file=/home/ubuntu/actions-runner/cred.json + + - name: Push Docker image to Google Artifact Registry + command: > + docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + + - name: Set Kubernetes cluster credentials + command: gcloud container clusters get-credentials innotest-cluster --region us-central1-c + environment: + CLOUDSDK_CORE_PROJECT: "goldengate-1" - - name: Restart Deployment - command: kubectl rollout restart deployment nodeapp-deployment - ignore_errors: yes # Ignore errors since the deployment might already be up to date + - name: Restart deployment + command: kubectl rollout restart deployment nodeapp-deployment - - name: Apply Deployment YAML - command: kubectl apply -f /home/ubuntu/actions-runner/Testproject-INNO/deployment.yaml + - name: Apply deployment configuration + command: kubectl apply -f deployment.yaml --validate=false - - name: Apply Service YAML - command: kubectl apply -f /home/ubuntu/actions-runner/Testproject-INNO/service.yaml + - name: Apply service configuration + command: kubectl apply -f service.yaml --validate=false From 4670be580adfd3f77f4af1ccab5449f6e7883ea1 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Feb 2024 17:26:27 +0530 Subject: [PATCH 335/664] Update repo.yaml From 1c53f489c0dabe4b0f1b828a4180561511ddcfca Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Feb 2024 17:39:36 +0530 Subject: [PATCH 336/664] Update repo.yaml --- ansible/repo.yaml | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 2fa609a792..0737ab3249 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -43,16 +43,14 @@ command: > docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - - name: Set Kubernetes cluster credentials - command: gcloud container clusters get-credentials innotest-cluster --region us-central1-c - environment: - CLOUDSDK_CORE_PROJECT: "goldengate-1" - - - name: Restart deployment - command: kubectl rollout restart deployment nodeapp-deployment + - name: Set project and zone for GKE + command: gcloud config set project goldengate-1 && gcloud config set compute/zone us-central1-c + become: true - - name: Apply deployment configuration - command: kubectl apply -f deployment.yaml --validate=false + - name: Get credentials for the GKE cluster + command: gcloud container clusters get-credentials innotest-cluster + become: true - - name: Apply service configuration - command: kubectl apply -f service.yaml --validate=false + - name: Deploy Docker image to GKE + command: kubectl set image deployment/nodeapp-deployment nodeserver=us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + become: true From d465b3f07c9eb1d5ca36e16423f2ff0adc616e65 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Feb 2024 17:45:26 +0530 Subject: [PATCH 337/664] Update repo.yaml --- ansible/repo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 0737ab3249..75faa95f41 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -44,7 +44,7 @@ docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - name: Set project and zone for GKE - command: gcloud config set project goldengate-1 && gcloud config set compute/zone us-central1-c + shell: gcloud config set project goldengate-1 && gcloud config set compute/zone us-central1-c become: true - name: Get credentials for the GKE cluster From 311bcccc7444f5393a2daf98739f8ee94f1d782a Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Feb 2024 17:55:26 +0530 Subject: [PATCH 338/664] Update repo.yaml --- ansible/repo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 75faa95f41..0ff618eb35 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -48,7 +48,7 @@ become: true - name: Get credentials for the GKE cluster - command: gcloud container clusters get-credentials innotest-cluster + command: gcloud container clusters get-credentials innotest-cluster --project=goldengate-1 --zone=us-central1-c --service-account=testgcp-sa@goldengate-1.iam.gserviceaccount.com --key-file=/home/ubuntu/actions-runner/cred.json become: true - name: Deploy Docker image to GKE From a710ec86cc6dcd2dc2f9e748e407d85c3040e8af Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Feb 2024 19:32:05 +0530 Subject: [PATCH 339/664] Update repo.yaml --- ansible/repo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 0ff618eb35..5f1b44f230 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -48,7 +48,7 @@ become: true - name: Get credentials for the GKE cluster - command: gcloud container clusters get-credentials innotest-cluster --project=goldengate-1 --zone=us-central1-c --service-account=testgcp-sa@goldengate-1.iam.gserviceaccount.com --key-file=/home/ubuntu/actions-runner/cred.json + command: gcloud container clusters get-credentials innotest-cluster --region us-central1-c --project=goldengate-1 --service-account=testgcp-sa@goldengate-1.iam.gserviceaccount.com --key-file=/home/ubuntu/actions-runner/cred.json become: true - name: Deploy Docker image to GKE From 0ae9948817f21271e21028ba68d60785ac3ff53d Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Feb 2024 19:39:50 +0530 Subject: [PATCH 340/664] Update repo.yaml --- ansible/repo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 5f1b44f230..db71747678 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -48,7 +48,7 @@ become: true - name: Get credentials for the GKE cluster - command: gcloud container clusters get-credentials innotest-cluster --region us-central1-c --project=goldengate-1 --service-account=testgcp-sa@goldengate-1.iam.gserviceaccount.com --key-file=/home/ubuntu/actions-runner/cred.json + shell: gcloud container clusters get-credentials innotest-cluster --region=us-central1 --project=goldengate-1 --impersonate-service-account=testgcp-sa@goldengate-1.iam.gserviceaccount.com --key-file=/home/ubuntu/actions-runner/cred.json become: true - name: Deploy Docker image to GKE From b91823c2a3cea58146d4ef72cbfe43ea99d55ce3 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Feb 2024 19:43:37 +0530 Subject: [PATCH 341/664] Update repo.yaml --- ansible/repo.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index db71747678..dc99d85e2c 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -47,8 +47,12 @@ shell: gcloud config set project goldengate-1 && gcloud config set compute/zone us-central1-c become: true + - name: Set GOOGLE_APPLICATION_CREDENTIALS environment variable + shell: export GOOGLE_APPLICATION_CREDENTIALS=/home/ubuntu/actions-runner/cred.json + become: true + - name: Get credentials for the GKE cluster - shell: gcloud container clusters get-credentials innotest-cluster --region=us-central1 --project=goldengate-1 --impersonate-service-account=testgcp-sa@goldengate-1.iam.gserviceaccount.com --key-file=/home/ubuntu/actions-runner/cred.json + shell: gcloud container clusters get-credentials innotest-cluster --region=us-central1 --project=goldengate-1 become: true - name: Deploy Docker image to GKE From 18bb66346a296e73cc2e90f829dddaf8c6a373b1 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 9 Feb 2024 12:06:23 +0530 Subject: [PATCH 342/664] Update repo.yaml --- ansible/repo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index dc99d85e2c..80a86b1198 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -52,7 +52,7 @@ become: true - name: Get credentials for the GKE cluster - shell: gcloud container clusters get-credentials innotest-cluster --region=us-central1 --project=goldengate-1 + shell: gcloud container clusters get-credentials innotest-cluster --region us-central1-c become: true - name: Deploy Docker image to GKE From 11107e71444fb04ae2f738a3f3d5c29921ffdcc0 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 9 Feb 2024 14:20:40 +0530 Subject: [PATCH 343/664] Update repo.yaml --- ansible/repo.yaml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 80a86b1198..27fdae188d 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -36,8 +36,8 @@ environment: DOCKER_CLI_EXPERIMENTAL: enabled - - name: Log in to Google Cloud - command: gcloud auth activate-service-account testgcp-sa@goldengate-1.iam.gserviceaccount.com --key-file=/home/ubuntu/actions-runner/cred.json + # - name: Log in to Google Cloud + # command: gcloud auth activate-service-account testgcp-sa@goldengate-1.iam.gserviceaccount.com --key-file=/home/ubuntu/actions-runner/cred.json - name: Push Docker image to Google Artifact Registry command: > @@ -47,14 +47,17 @@ shell: gcloud config set project goldengate-1 && gcloud config set compute/zone us-central1-c become: true - - name: Set GOOGLE_APPLICATION_CREDENTIALS environment variable - shell: export GOOGLE_APPLICATION_CREDENTIALS=/home/ubuntu/actions-runner/cred.json - become: true + # - name: Set GOOGLE_APPLICATION_CREDENTIALS environment variable + # shell: export GOOGLE_APPLICATION_CREDENTIALS=/home/ubuntu/actions-runner/cred.json + # become: true - name: Get credentials for the GKE cluster shell: gcloud container clusters get-credentials innotest-cluster --region us-central1-c become: true - name: Deploy Docker image to GKE - command: kubectl set image deployment/nodeapp-deployment nodeserver=us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + command: kubectl apply -f deployment.yaml + become: true + - name: Deploy Docker image to GKE + command: kubectl apply -f service.yaml become: true From 64ceb4c07e3c97d8c03496dc4eb56b945b8c6236 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 9 Feb 2024 14:38:03 +0530 Subject: [PATCH 344/664] Update repo.yaml --- ansible/repo.yaml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 27fdae188d..b61126d405 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -36,9 +36,6 @@ environment: DOCKER_CLI_EXPERIMENTAL: enabled - # - name: Log in to Google Cloud - # command: gcloud auth activate-service-account testgcp-sa@goldengate-1.iam.gserviceaccount.com --key-file=/home/ubuntu/actions-runner/cred.json - - name: Push Docker image to Google Artifact Registry command: > docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest @@ -47,17 +44,23 @@ shell: gcloud config set project goldengate-1 && gcloud config set compute/zone us-central1-c become: true - # - name: Set GOOGLE_APPLICATION_CREDENTIALS environment variable - # shell: export GOOGLE_APPLICATION_CREDENTIALS=/home/ubuntu/actions-runner/cred.json - # become: true + - name: Add IAM policy binding for GKE cluster access + gcp_iam_policy: + auth_kind: serviceaccount + service_account_file: /home/ubuntu/actions-runner/Testproject-INNO + project: goldengate-1 + resource: projects/goldengate-1 + role: roles/container.admin + member: serviceAccount: testgcp-sa@goldengate-1.iam.gserviceaccount.com - name: Get credentials for the GKE cluster - shell: gcloud container clusters get-credentials innotest-cluster --region us-central1-c + shell: gcloud container clusters get-credentials innotest-cluster --region us-central1-c become: true - - name: Deploy Docker image to GKE + - name: Deploy Docker image to GKE (deployment) command: kubectl apply -f deployment.yaml become: true - - name: Deploy Docker image to GKE + + - name: Deploy Docker image to GKE (service) command: kubectl apply -f service.yaml become: true From 135222526dfb551cee0eb82d85ff1ec8f75bffb6 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 9 Feb 2024 14:39:38 +0530 Subject: [PATCH 345/664] Update repo.yaml --- ansible/repo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index b61126d405..6846c942d7 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -51,7 +51,7 @@ project: goldengate-1 resource: projects/goldengate-1 role: roles/container.admin - member: serviceAccount: testgcp-sa@goldengate-1.iam.gserviceaccount.com + member: serviceAccount:testgcp-sa@goldengate-1.iam.gserviceaccount.com - name: Get credentials for the GKE cluster shell: gcloud container clusters get-credentials innotest-cluster --region us-central1-c From d937614c0fbd213535661c4d0431db3122a27c49 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 9 Feb 2024 14:48:52 +0530 Subject: [PATCH 346/664] Update repo.yaml --- ansible/repo.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 6846c942d7..337afdc00f 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -45,13 +45,13 @@ become: true - name: Add IAM policy binding for GKE cluster access - gcp_iam_policy: + community.general.gcp_iam_policy: auth_kind: serviceaccount - service_account_file: /home/ubuntu/actions-runner/Testproject-INNO + service_account_file: /path/to/your/service/account/keyfile.json project: goldengate-1 resource: projects/goldengate-1 role: roles/container.admin - member: serviceAccount:testgcp-sa@goldengate-1.iam.gserviceaccount.com + member: serviceAccount:your-service-account-email@example.com - name: Get credentials for the GKE cluster shell: gcloud container clusters get-credentials innotest-cluster --region us-central1-c From e525353f36d54983dffb61ba2f649f05045f5b9a Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 9 Feb 2024 14:51:44 +0530 Subject: [PATCH 347/664] Update repo.yaml --- ansible/repo.yaml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 337afdc00f..c958bfd3c2 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -44,15 +44,6 @@ shell: gcloud config set project goldengate-1 && gcloud config set compute/zone us-central1-c become: true - - name: Add IAM policy binding for GKE cluster access - community.general.gcp_iam_policy: - auth_kind: serviceaccount - service_account_file: /path/to/your/service/account/keyfile.json - project: goldengate-1 - resource: projects/goldengate-1 - role: roles/container.admin - member: serviceAccount:your-service-account-email@example.com - - name: Get credentials for the GKE cluster shell: gcloud container clusters get-credentials innotest-cluster --region us-central1-c become: true From 7a8cdf6b0c5073a31cf88743672a07fedd21b28c Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 9 Feb 2024 15:13:51 +0530 Subject: [PATCH 348/664] Update node.js.yml --- .github/workflows/node.js.yml | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 6d2fda3e5b..ee4eb68b91 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -51,20 +51,6 @@ jobs: # run: | # docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO # docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - - # - name: Log in to Google Cloud - # run: | - # gcloud auth activate-service-account testgcp-sa@goldengate-1.iam.gserviceaccount.com --key-file=/home/ubuntu/actions-runner/cred.json - - # - name: Deploy to GKE - # run: | - # gcloud container clusters get-credentials innotest-cluster --region us-central1-c - # kubectl rollout restart deployment nodeapp-deployment -n your-namespace - # kubectl apply -f /home/ubuntu/actions-runner/Testproject-INNO/deployment.yaml -n your-namespace - # kubectl apply -f /home/ubuntu/actions-runner/Testproject-INNO/service.yaml -n your-namespace - - - # - name: Deploy to GKE # run: | From a4581c36da5b799e6af82fac716d8100f027a3a1 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 12 Feb 2024 12:23:29 +0530 Subject: [PATCH 349/664] Update repo.yaml From 2140d8fa79fa20f1637602ae20e19539df51267d Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 12 Feb 2024 12:28:33 +0530 Subject: [PATCH 350/664] Update repo.yaml --- ansible/repo.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index c958bfd3c2..63f9371b2c 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -47,6 +47,14 @@ - name: Get credentials for the GKE cluster shell: gcloud container clusters get-credentials innotest-cluster --region us-central1-c become: true + ignore_errors: yes # ignore errors for now + + - name: Retry getting credentials with additional authentication scopes + shell: gcloud container clusters get-credentials innotest-cluster --region us-central1-c + become: true + retries: 3 + delay: 10 + until: "'ERROR: (gcloud.container.clusters.get-credentials)' not in previous_result.stderr" - name: Deploy Docker image to GKE (deployment) command: kubectl apply -f deployment.yaml From 4476f7bdde1b88cc511ff0cf3face58550ab445b Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 12 Feb 2024 12:36:03 +0530 Subject: [PATCH 351/664] Update repo.yaml --- ansible/repo.yaml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 63f9371b2c..49b6550845 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -46,16 +46,12 @@ - name: Get credentials for the GKE cluster shell: gcloud container clusters get-credentials innotest-cluster --region us-central1-c + args: + chdir: /home/ubuntu/actions-runner/Testproject-INNO become: true ignore_errors: yes # ignore errors for now - - name: Retry getting credentials with additional authentication scopes - shell: gcloud container clusters get-credentials innotest-cluster --region us-central1-c - become: true - retries: 3 - delay: 10 - until: "'ERROR: (gcloud.container.clusters.get-credentials)' not in previous_result.stderr" - + - name: Deploy Docker image to GKE (deployment) command: kubectl apply -f deployment.yaml become: true From 2fd95b1246980cf4cc6d22ca4a97e6de5a21fa7e Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 12 Feb 2024 12:49:37 +0530 Subject: [PATCH 352/664] Update repo.yaml --- ansible/repo.yaml | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 49b6550845..46c14cefe4 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -52,8 +52,37 @@ ignore_errors: yes # ignore errors for now + - name: Git Checkout, Docker Install, Build Image, Push to Artifact Registry, and Deploy to GKE + hosts: localhost + gather_facts: false + + tasks: + # Your existing tasks... + + - name: Set project and zone for GKE + shell: gcloud config set project goldengate-1 && gcloud config set compute/zone us-central1-c + args: + chdir: /home/ubuntu/actions-runner/Testproject-INNO # Change directory if needed + become: true + + - name: Get credentials for the GKE cluster + shell: gcloud container clusters get-credentials innotest-cluster --region us-central1-c + args: + chdir: /home/ubuntu/actions-runner/Testproject-INNO # Change directory if needed + become: true + ignore_errors: yes # ignore errors for now + + - name: Retry getting credentials with additional authentication scopes + shell: gcloud container clusters get-credentials innotest-cluster --region us-central1-c + args: + chdir: /home/ubuntu/actions-runner/Testproject-INNO # Change directory if needed + become: true + + - name: Deploy Docker image to GKE (deployment) - command: kubectl apply -f deployment.yaml + command: kubectl apply -f deployment.yaml # Update the path to deployment.yaml + args: + chdir: /home/ubuntu/actions-runner/Testproject-INNO # Change directory if needed become: true - name: Deploy Docker image to GKE (service) From c0e7733157ffb89129f68300ccc81490646163ae Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 12 Feb 2024 12:55:04 +0530 Subject: [PATCH 353/664] Update repo.yaml --- ansible/repo.yaml | 34 +--------------------------------- 1 file changed, 1 insertion(+), 33 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 46c14cefe4..dc17ab690e 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -46,43 +46,11 @@ - name: Get credentials for the GKE cluster shell: gcloud container clusters get-credentials innotest-cluster --region us-central1-c - args: - chdir: /home/ubuntu/actions-runner/Testproject-INNO become: true ignore_errors: yes # ignore errors for now - - - name: Git Checkout, Docker Install, Build Image, Push to Artifact Registry, and Deploy to GKE - hosts: localhost - gather_facts: false - - tasks: - # Your existing tasks... - - - name: Set project and zone for GKE - shell: gcloud config set project goldengate-1 && gcloud config set compute/zone us-central1-c - args: - chdir: /home/ubuntu/actions-runner/Testproject-INNO # Change directory if needed - become: true - - - name: Get credentials for the GKE cluster - shell: gcloud container clusters get-credentials innotest-cluster --region us-central1-c - args: - chdir: /home/ubuntu/actions-runner/Testproject-INNO # Change directory if needed - become: true - ignore_errors: yes # ignore errors for now - - - name: Retry getting credentials with additional authentication scopes - shell: gcloud container clusters get-credentials innotest-cluster --region us-central1-c - args: - chdir: /home/ubuntu/actions-runner/Testproject-INNO # Change directory if needed - become: true - - - name: Deploy Docker image to GKE (deployment) - command: kubectl apply -f deployment.yaml # Update the path to deployment.yaml - args: - chdir: /home/ubuntu/actions-runner/Testproject-INNO # Change directory if needed + command: kubectl apply -f deployment.yaml become: true - name: Deploy Docker image to GKE (service) From 10cff386af4233725615e634618eaa3f782e4fb2 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 12 Feb 2024 15:16:08 +0530 Subject: [PATCH 354/664] Update repo.yaml --- ansible/repo.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index dc17ab690e..ed8cdb8776 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -47,12 +47,15 @@ - name: Get credentials for the GKE cluster shell: gcloud container clusters get-credentials innotest-cluster --region us-central1-c become: true - ignore_errors: yes # ignore errors for now - name: Deploy Docker image to GKE (deployment) command: kubectl apply -f deployment.yaml + args: + chdir: /home/ubuntu/actions-runner/Testproject-INNO become: true - name: Deploy Docker image to GKE (service) command: kubectl apply -f service.yaml + args: + chdir: /home/ubuntu/actions-runner/Testproject-INNO become: true From 5cf1c296a9d58b20e971cfacc67f214ae58d80cb Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 12 Feb 2024 15:19:27 +0530 Subject: [PATCH 355/664] Update repo.yaml --- ansible/repo.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index ed8cdb8776..64a710ebe4 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -40,9 +40,9 @@ command: > docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - - name: Set project and zone for GKE - shell: gcloud config set project goldengate-1 && gcloud config set compute/zone us-central1-c - become: true + # - name: Set project and zone for GKE + # shell: gcloud config set project goldengate-1 && gcloud config set compute/zone us-central1-c + # become: true - name: Get credentials for the GKE cluster shell: gcloud container clusters get-credentials innotest-cluster --region us-central1-c From 804264ac2bd033cdf7ce492cb369197a617837b6 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 13 Feb 2024 10:22:03 +0530 Subject: [PATCH 356/664] Update repo.yaml From 02fbc9a521ca4a763d0f0b61bf403cd7f265469d Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 13 Feb 2024 10:28:05 +0530 Subject: [PATCH 357/664] Update repo.yaml --- ansible/repo.yaml | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 64a710ebe4..ef9799129f 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -32,30 +32,24 @@ - name: Push Docker image to Google Artifact Registry command: > - docker tag node us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + docker tag node + us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest environment: DOCKER_CLI_EXPERIMENTAL: enabled + # - name: Log in to Google Cloud + # command: gcloud auth activate-service-account testgcp-sa@goldengate-1.iam.gserviceaccount.com --key-file=/home/ubuntu/actions-runner/cred.json + - name: Push Docker image to Google Artifact Registry command: > docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - # - name: Set project and zone for GKE - # shell: gcloud config set project goldengate-1 && gcloud config set compute/zone us-central1-c - # become: true - - - name: Get credentials for the GKE cluster - shell: gcloud container clusters get-credentials innotest-cluster --region us-central1-c - become: true + - name: Configure kubectl + command: gcloud container clusters get-credentials innotest-cluster --zone us-central1-c + environment: + CLOUDSDK_CORE_DISABLE_PROMPTS: "true" - - name: Deploy Docker image to GKE (deployment) + - name: Apply Kubernetes manifests command: kubectl apply -f deployment.yaml - args: - chdir: /home/ubuntu/actions-runner/Testproject-INNO - become: true - - - name: Deploy Docker image to GKE (service) - command: kubectl apply -f service.yaml - args: - chdir: /home/ubuntu/actions-runner/Testproject-INNO - become: true + kubectl apply -f service.yaml + From cc6c44413e79ae3394d9be5111644d6ed810c803 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 13 Feb 2024 10:31:10 +0530 Subject: [PATCH 358/664] Update repo.yaml From 2fc26a87621b6e318faf1b8322e84f808e0d3bb4 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 13 Feb 2024 10:38:37 +0530 Subject: [PATCH 359/664] Update repo.yaml --- ansible/repo.yaml | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index ef9799129f..d7657cc637 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -26,30 +26,20 @@ become: true - name: Build Docker image - command: docker build -t node . + command: docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest . args: chdir: /home/ubuntu/actions-runner/Testproject-INNO - name: Push Docker image to Google Artifact Registry command: > - docker tag node - us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest environment: DOCKER_CLI_EXPERIMENTAL: enabled - # - name: Log in to Google Cloud - # command: gcloud auth activate-service-account testgcp-sa@goldengate-1.iam.gserviceaccount.com --key-file=/home/ubuntu/actions-runner/cred.json - - - name: Push Docker image to Google Artifact Registry - command: > - docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - - name: Configure kubectl command: gcloud container clusters get-credentials innotest-cluster --zone us-central1-c environment: CLOUDSDK_CORE_DISABLE_PROMPTS: "true" - name: Apply Kubernetes manifests - command: kubectl apply -f deployment.yaml - kubectl apply -f service.yaml - + command: kubectl apply -f deployment.yaml -f service.yaml From 5ac4584a05775927134f4e452ed36eddd1bd8438 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 13 Feb 2024 10:52:14 +0530 Subject: [PATCH 360/664] Update repo.yaml --- ansible/repo.yaml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index d7657cc637..8b4b95c935 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -26,20 +26,30 @@ become: true - name: Build Docker image - command: docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest . + command: docker build -t node . args: chdir: /home/ubuntu/actions-runner/Testproject-INNO - name: Push Docker image to Google Artifact Registry command: > - docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + docker tag node + us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest environment: DOCKER_CLI_EXPERIMENTAL: enabled + - name: Log in to Google Cloud + command: gcloud auth activate-service-account testgcp-sa@goldengate-1.iam.gserviceaccount.com --key-file=/home/ubuntu/actions-runner/cred.json + + - name: Push Docker image to Google Artifact Registry + command: > + docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + - name: Configure kubectl command: gcloud container clusters get-credentials innotest-cluster --zone us-central1-c environment: CLOUDSDK_CORE_DISABLE_PROMPTS: "true" - name: Apply Kubernetes manifests - command: kubectl apply -f deployment.yaml -f service.yaml + command: kubectl apply -f deployment.yaml + kubectl apply -f service.yaml + From 8b5fc1aa52670c982bbdc399151e77903f5b85e2 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 13 Feb 2024 10:56:56 +0530 Subject: [PATCH 361/664] Update repo.yaml --- ansible/repo.yaml | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 8b4b95c935..28755a8e03 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -25,31 +25,21 @@ version: main # replace 'main' with your branch name if different become: true - - name: Build Docker image - command: docker build -t node . + - name: Build Docker image using BuildKit + command: DOCKER_BUILDKIT=1 docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest . args: chdir: /home/ubuntu/actions-runner/Testproject-INNO - name: Push Docker image to Google Artifact Registry command: > - docker tag node - us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest environment: DOCKER_CLI_EXPERIMENTAL: enabled - - name: Log in to Google Cloud - command: gcloud auth activate-service-account testgcp-sa@goldengate-1.iam.gserviceaccount.com --key-file=/home/ubuntu/actions-runner/cred.json - - - name: Push Docker image to Google Artifact Registry - command: > - docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - - name: Configure kubectl command: gcloud container clusters get-credentials innotest-cluster --zone us-central1-c environment: CLOUDSDK_CORE_DISABLE_PROMPTS: "true" - name: Apply Kubernetes manifests - command: kubectl apply -f deployment.yaml - kubectl apply -f service.yaml - + command: kubectl apply -f deployment.yaml -f service.yaml From 4da92b8fa1aac823057e2bf14bb8c0314d67e0cd Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 13 Feb 2024 11:00:09 +0530 Subject: [PATCH 362/664] Update repo.yaml --- ansible/repo.yaml | 43 +++++++++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 28755a8e03..733d02f1f1 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -1,14 +1,14 @@ - name: Git Checkout, Docker Install, Build Image, Push to Artifact Registry, and Deploy to GKE hosts: localhost gather_facts: false - + tasks: - name: Ensure git is installed become: true apt: name: git state: present - + - name: Ensure Docker dependencies are installed become: true apt: @@ -17,29 +17,40 @@ loop: - containerd - docker.io - + - name: Clone Node.js code from GitHub git: repo: https://github.com/mnagaraju5628/Testproject-INNO.git dest: /home/ubuntu/actions-runner/Testproject-INNO version: main # replace 'main' with your branch name if different become: true - - - name: Build Docker image using BuildKit - command: DOCKER_BUILDKIT=1 docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest . + + - name: Build Docker image + command: docker build -t node . args: chdir: /home/ubuntu/actions-runner/Testproject-INNO - + - name: Push Docker image to Google Artifact Registry command: > - docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + docker tag node us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest environment: DOCKER_CLI_EXPERIMENTAL: enabled - - - name: Configure kubectl - command: gcloud container clusters get-credentials innotest-cluster --zone us-central1-c - environment: - CLOUDSDK_CORE_DISABLE_PROMPTS: "true" - - - name: Apply Kubernetes manifests - command: kubectl apply -f deployment.yaml -f service.yaml + + - name: Push Docker image to Google Artifact Registry + command: > + docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + + - name: Set project and zone for GKE + shell: gcloud config set project goldengate-1 && gcloud config set compute/zone us-central1-c + become: true + + - name: Get credentials for the GKE cluster + shell: gcloud container clusters get-credentials innotest-cluster --region us-central1-c + become: true + + - name: Deploy Docker image to GKE + command: kubectl apply -f deployment.yaml + become: true + - name: Deploy Docker image to GKE + command: kubectl apply -f service.yaml + become: true From 27798f318d46222424f21dba00386e154f355be6 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 13 Feb 2024 11:20:55 +0530 Subject: [PATCH 363/664] Update repo.yaml --- ansible/repo.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 733d02f1f1..ca264e1bd1 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -26,10 +26,10 @@ become: true - name: Build Docker image - command: docker build -t node . + command: DOCKER_BUILDKIT=0 docker build -t node . args: - chdir: /home/ubuntu/actions-runner/Testproject-INNO - + chdir: /home/ubuntu/actions-runner/Testproject-INNO + - name: Push Docker image to Google Artifact Registry command: > docker tag node us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest From 90e6f04e1c08ddecad204542fb7e43a4bbe20119 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 13 Feb 2024 11:23:28 +0530 Subject: [PATCH 364/664] Update repo.yaml --- ansible/repo.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index ca264e1bd1..c462c77196 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -26,10 +26,11 @@ become: true - name: Build Docker image - command: DOCKER_BUILDKIT=0 docker build -t node . + command: env DOCKER_BUILDKIT=0 docker build -t node . args: chdir: /home/ubuntu/actions-runner/Testproject-INNO + - name: Push Docker image to Google Artifact Registry command: > docker tag node us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest From 3f3b04b2b61e297d5a9658bb6152f995a9da2340 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 13 Feb 2024 11:26:03 +0530 Subject: [PATCH 365/664] Update repo.yaml --- ansible/repo.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index c462c77196..964aba8fef 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -26,11 +26,12 @@ become: true - name: Build Docker image - command: env DOCKER_BUILDKIT=0 docker build -t node . + command: docker build -t node . args: chdir: /home/ubuntu/actions-runner/Testproject-INNO + - name: Push Docker image to Google Artifact Registry command: > docker tag node us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest From 2331496ecce164285cef608193775b98502ff3b6 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 13 Feb 2024 12:28:40 +0530 Subject: [PATCH 366/664] Update repo.yaml --- ansible/repo.yaml | 46 ++++++++++++++++++++++------------------------ 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 964aba8fef..71931f0551 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -1,14 +1,14 @@ - name: Git Checkout, Docker Install, Build Image, Push to Artifact Registry, and Deploy to GKE hosts: localhost gather_facts: false - + tasks: - name: Ensure git is installed become: true apt: name: git state: present - + - name: Ensure Docker dependencies are installed become: true apt: @@ -17,42 +17,40 @@ loop: - containerd - docker.io - + - name: Clone Node.js code from GitHub git: repo: https://github.com/mnagaraju5628/Testproject-INNO.git dest: /home/ubuntu/actions-runner/Testproject-INNO version: main # replace 'main' with your branch name if different become: true - + - name: Build Docker image command: docker build -t node . args: - chdir: /home/ubuntu/actions-runner/Testproject-INNO - - + chdir: /home/ubuntu/actions-runner/Testproject-INNO - name: Push Docker image to Google Artifact Registry command: > - docker tag node us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + docker tag node + us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest environment: DOCKER_CLI_EXPERIMENTAL: enabled - + + - name: Log in to Google Cloud + command: gcloud auth activate-service-account testgcp-sa@goldengate-1.iam.gserviceaccount.com --key-file=/home/ubuntu/actions-runner/cred.json + - name: Push Docker image to Google Artifact Registry command: > docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - - - name: Set project and zone for GKE - shell: gcloud config set project goldengate-1 && gcloud config set compute/zone us-central1-c - become: true - - - name: Get credentials for the GKE cluster - shell: gcloud container clusters get-credentials innotest-cluster --region us-central1-c - become: true - - - name: Deploy Docker image to GKE - command: kubectl apply -f deployment.yaml - become: true - - name: Deploy Docker image to GKE - command: kubectl apply -f service.yaml - become: true + + - name: Configure kubectl + command: gcloud container clusters get-credentials innotest-cluster --zone us-central1-c + environment: + CLOUDSDK_CORE_DISABLE_PROMPTS: "true" + + - name: Apply Kubernetes deployment manifest + command: kubectl apply -f /home/ubuntu/actions-runner/Testproject-INNO/deployment.yaml + + - name: Apply Kubernetes service manifest + command: kubectl apply -f /home/ubuntu/actions-runner/Testproject-INNO/service.yaml From ed99b655006d973182d01312f5fd168e75e5c68c Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 13 Feb 2024 12:31:32 +0530 Subject: [PATCH 367/664] Update repo.yaml --- ansible/repo.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 71931f0551..6ce2fb473a 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -37,8 +37,8 @@ environment: DOCKER_CLI_EXPERIMENTAL: enabled - - name: Log in to Google Cloud - command: gcloud auth activate-service-account testgcp-sa@goldengate-1.iam.gserviceaccount.com --key-file=/home/ubuntu/actions-runner/cred.json + # - name: Log in to Google Cloud + # command: gcloud auth activate-service-account testgcp-sa@goldengate-1.iam.gserviceaccount.com --key-file=/home/ubuntu/actions-runner/cred.json - name: Push Docker image to Google Artifact Registry command: > From e60937f23fce30c074c26d8957d87b746f4f6bc6 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 13 Feb 2024 12:37:26 +0530 Subject: [PATCH 368/664] Update repo.yaml --- ansible/repo.yaml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 6ce2fb473a..8b4b95c935 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -37,8 +37,8 @@ environment: DOCKER_CLI_EXPERIMENTAL: enabled - # - name: Log in to Google Cloud - # command: gcloud auth activate-service-account testgcp-sa@goldengate-1.iam.gserviceaccount.com --key-file=/home/ubuntu/actions-runner/cred.json + - name: Log in to Google Cloud + command: gcloud auth activate-service-account testgcp-sa@goldengate-1.iam.gserviceaccount.com --key-file=/home/ubuntu/actions-runner/cred.json - name: Push Docker image to Google Artifact Registry command: > @@ -49,8 +49,7 @@ environment: CLOUDSDK_CORE_DISABLE_PROMPTS: "true" - - name: Apply Kubernetes deployment manifest - command: kubectl apply -f /home/ubuntu/actions-runner/Testproject-INNO/deployment.yaml - - - name: Apply Kubernetes service manifest - command: kubectl apply -f /home/ubuntu/actions-runner/Testproject-INNO/service.yaml + - name: Apply Kubernetes manifests + command: kubectl apply -f deployment.yaml + kubectl apply -f service.yaml + From 4d121c85e66fb50555a35f73fd5f160eea143de2 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 13 Feb 2024 12:40:21 +0530 Subject: [PATCH 369/664] Update repo.yaml --- ansible/repo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 8b4b95c935..bfcdf8a2f7 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -38,7 +38,7 @@ DOCKER_CLI_EXPERIMENTAL: enabled - name: Log in to Google Cloud - command: gcloud auth activate-service-account testgcp-sa@goldengate-1.iam.gserviceaccount.com --key-file=/home/ubuntu/actions-runner/cred.json + command: gcloud auth activate-service-account testgcp-sa@goldengate-1.iam.gserviceaccount.com --key-file=cred.json /home/ubuntu/actions-runner/cred.json - name: Push Docker image to Google Artifact Registry command: > From 3abbc50c0d23096ee677f6c2eb102a2e6542f107 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 13 Feb 2024 12:42:43 +0530 Subject: [PATCH 370/664] Update repo.yaml --- ansible/repo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index bfcdf8a2f7..2ebca77307 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -38,7 +38,7 @@ DOCKER_CLI_EXPERIMENTAL: enabled - name: Log in to Google Cloud - command: gcloud auth activate-service-account testgcp-sa@goldengate-1.iam.gserviceaccount.com --key-file=cred.json /home/ubuntu/actions-runner/cred.json + command: gcloud auth activate-service-account testgcp-sa@goldengate-1.iam.gserviceaccount.com --key-file=cred.json /home/ubuntu/actions-runner/Testproject-INNO - name: Push Docker image to Google Artifact Registry command: > From 8b0e4eef533387d9a1bdbd18c92ffc91a88f2565 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 13 Feb 2024 14:32:51 +0530 Subject: [PATCH 371/664] Update repo.yaml --- ansible/repo.yaml | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 2ebca77307..733d02f1f1 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -1,14 +1,14 @@ - name: Git Checkout, Docker Install, Build Image, Push to Artifact Registry, and Deploy to GKE hosts: localhost gather_facts: false - + tasks: - name: Ensure git is installed become: true apt: name: git state: present - + - name: Ensure Docker dependencies are installed become: true apt: @@ -17,39 +17,40 @@ loop: - containerd - docker.io - + - name: Clone Node.js code from GitHub git: repo: https://github.com/mnagaraju5628/Testproject-INNO.git dest: /home/ubuntu/actions-runner/Testproject-INNO version: main # replace 'main' with your branch name if different become: true - + - name: Build Docker image command: docker build -t node . args: chdir: /home/ubuntu/actions-runner/Testproject-INNO - + - name: Push Docker image to Google Artifact Registry command: > - docker tag node - us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + docker tag node us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest environment: DOCKER_CLI_EXPERIMENTAL: enabled - - - name: Log in to Google Cloud - command: gcloud auth activate-service-account testgcp-sa@goldengate-1.iam.gserviceaccount.com --key-file=cred.json /home/ubuntu/actions-runner/Testproject-INNO - + - name: Push Docker image to Google Artifact Registry command: > docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - - - name: Configure kubectl - command: gcloud container clusters get-credentials innotest-cluster --zone us-central1-c - environment: - CLOUDSDK_CORE_DISABLE_PROMPTS: "true" - - - name: Apply Kubernetes manifests + + - name: Set project and zone for GKE + shell: gcloud config set project goldengate-1 && gcloud config set compute/zone us-central1-c + become: true + + - name: Get credentials for the GKE cluster + shell: gcloud container clusters get-credentials innotest-cluster --region us-central1-c + become: true + + - name: Deploy Docker image to GKE command: kubectl apply -f deployment.yaml - kubectl apply -f service.yaml - + become: true + - name: Deploy Docker image to GKE + command: kubectl apply -f service.yaml + become: true From 5a7c953e1e966954fefc503faf9eb5b42f29205c Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 13 Feb 2024 14:35:53 +0530 Subject: [PATCH 372/664] Update repo.yaml --- ansible/repo.yaml | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 733d02f1f1..ccbdb4cd04 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -1,14 +1,14 @@ - name: Git Checkout, Docker Install, Build Image, Push to Artifact Registry, and Deploy to GKE hosts: localhost gather_facts: false - + tasks: - name: Ensure git is installed become: true apt: name: git state: present - + - name: Ensure Docker dependencies are installed become: true apt: @@ -17,40 +17,41 @@ loop: - containerd - docker.io - + - name: Clone Node.js code from GitHub git: repo: https://github.com/mnagaraju5628/Testproject-INNO.git dest: /home/ubuntu/actions-runner/Testproject-INNO version: main # replace 'main' with your branch name if different become: true - + - name: Build Docker image command: docker build -t node . args: chdir: /home/ubuntu/actions-runner/Testproject-INNO - - - name: Push Docker image to Google Artifact Registry - command: > - docker tag node us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - environment: - DOCKER_CLI_EXPERIMENTAL: enabled - + + - name: Authenticate Docker with Google Artifact Registry + command: gcloud auth configure-docker + become: true + + - name: Tag Docker image for Google Artifact Registry + command: docker tag node us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + - name: Push Docker image to Google Artifact Registry - command: > - docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - + command: docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + - name: Set project and zone for GKE shell: gcloud config set project goldengate-1 && gcloud config set compute/zone us-central1-c become: true - + - name: Get credentials for the GKE cluster - shell: gcloud container clusters get-credentials innotest-cluster --region us-central1-c + shell: gcloud container clusters get-credentials innotest-cluster --region us-central1-c become: true - + - name: Deploy Docker image to GKE command: kubectl apply -f deployment.yaml become: true + - name: Deploy Docker image to GKE command: kubectl apply -f service.yaml become: true From 75566092ad68b9ba0a679e4b12af415ba48027dd Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 13 Feb 2024 14:45:23 +0530 Subject: [PATCH 373/664] Update repo.yaml --- ansible/repo.yaml | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index ccbdb4cd04..6ce2fb473a 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -30,28 +30,27 @@ args: chdir: /home/ubuntu/actions-runner/Testproject-INNO - - name: Authenticate Docker with Google Artifact Registry - command: gcloud auth configure-docker - become: true + - name: Push Docker image to Google Artifact Registry + command: > + docker tag node + us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + environment: + DOCKER_CLI_EXPERIMENTAL: enabled - - name: Tag Docker image for Google Artifact Registry - command: docker tag node us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + # - name: Log in to Google Cloud + # command: gcloud auth activate-service-account testgcp-sa@goldengate-1.iam.gserviceaccount.com --key-file=/home/ubuntu/actions-runner/cred.json - name: Push Docker image to Google Artifact Registry - command: docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + command: > + docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - - name: Set project and zone for GKE - shell: gcloud config set project goldengate-1 && gcloud config set compute/zone us-central1-c - become: true + - name: Configure kubectl + command: gcloud container clusters get-credentials innotest-cluster --zone us-central1-c + environment: + CLOUDSDK_CORE_DISABLE_PROMPTS: "true" - - name: Get credentials for the GKE cluster - shell: gcloud container clusters get-credentials innotest-cluster --region us-central1-c - become: true + - name: Apply Kubernetes deployment manifest + command: kubectl apply -f /home/ubuntu/actions-runner/Testproject-INNO/deployment.yaml - - name: Deploy Docker image to GKE - command: kubectl apply -f deployment.yaml - become: true - - - name: Deploy Docker image to GKE - command: kubectl apply -f service.yaml - become: true + - name: Apply Kubernetes service manifest + command: kubectl apply -f /home/ubuntu/actions-runner/Testproject-INNO/service.yaml From 12709d2957f06b3489e08147a2a16e403f143c34 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 13 Feb 2024 14:49:21 +0530 Subject: [PATCH 374/664] Update repo.yaml --- ansible/repo.yaml | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 6ce2fb473a..4b6fe00784 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -30,27 +30,12 @@ args: chdir: /home/ubuntu/actions-runner/Testproject-INNO - - name: Push Docker image to Google Artifact Registry - command: > - docker tag node - us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - environment: - DOCKER_CLI_EXPERIMENTAL: enabled + - name: Authenticate Docker with Google Artifact Registry + command: gcloud auth configure-docker + become: true - # - name: Log in to Google Cloud - # command: gcloud auth activate-service-account testgcp-sa@goldengate-1.iam.gserviceaccount.com --key-file=/home/ubuntu/actions-runner/cred.json + - name: Tag Docker image for Google Artifact Registry + command: docker tag node us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - name: Push Docker image to Google Artifact Registry - command: > - docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - - - name: Configure kubectl - command: gcloud container clusters get-credentials innotest-cluster --zone us-central1-c - environment: - CLOUDSDK_CORE_DISABLE_PROMPTS: "true" - - - name: Apply Kubernetes deployment manifest - command: kubectl apply -f /home/ubuntu/actions-runner/Testproject-INNO/deployment.yaml - - - name: Apply Kubernetes service manifest - command: kubectl apply -f /home/ubuntu/actions-runner/Testproject-INNO/service.yaml + command: docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest From fd629d1ee7b071d057749aaf2d2ba5373561d776 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 13 Feb 2024 15:30:44 +0530 Subject: [PATCH 375/664] Update repo.yaml --- ansible/repo.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 4b6fe00784..a6d78eecf1 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -39,3 +39,5 @@ - name: Push Docker image to Google Artifact Registry command: docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + ignore_errors: yes # Ignore errors in case the push fails + From 74e6900ab422df43dea54e3636fe5f22beb6f297 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 14 Feb 2024 11:38:02 +0530 Subject: [PATCH 376/664] Update repo.yaml --- ansible/repo.yaml | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index a6d78eecf1..65514e324b 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -1,3 +1,6 @@ +253701001460 + + - name: Git Checkout, Docker Install, Build Image, Push to Artifact Registry, and Deploy to GKE hosts: localhost gather_facts: false @@ -25,19 +28,25 @@ version: main # replace 'main' with your branch name if different become: true - - name: Build Docker image - command: docker build -t node . - args: - chdir: /home/ubuntu/actions-runner/Testproject-INNO + - name: Build Docker Image + command: docker build -t node . /home/ubuntu/actions-runner/Testproject-INNO + become: true - - name: Authenticate Docker with Google Artifact Registry - command: gcloud auth configure-docker + - name: Ensure Docker Image is built successfully + command: docker images node + register: docker_image_check become: true + # failed_when: docker_image_check.rc != 0 - - name: Tag Docker image for Google Artifact Registry + - name: Tag Docker Image command: docker tag node us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + become: true - - name: Push Docker image to Google Artifact Registry + - name: Push Docker Image to Artifact Registry command: docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - ignore_errors: yes # Ignore errors in case the push fails - + become: true + + # Additional tasks for GKE deployment + + + From 4c1930681b64aa7cf520ffadbb25bdf78934e98a Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 14 Feb 2024 11:39:06 +0530 Subject: [PATCH 377/664] Update repo.yaml --- ansible/repo.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 65514e324b..c9f7c44cac 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -1,6 +1,3 @@ -253701001460 - - - name: Git Checkout, Docker Install, Build Image, Push to Artifact Registry, and Deploy to GKE hosts: localhost gather_facts: false From 35ab56aec826f9b963048fa07ce0b02b2f69a4a1 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 14 Feb 2024 11:41:04 +0530 Subject: [PATCH 378/664] Update repo.yaml --- ansible/repo.yaml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index c9f7c44cac..75e90b95db 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -29,11 +29,10 @@ command: docker build -t node . /home/ubuntu/actions-runner/Testproject-INNO become: true - - name: Ensure Docker Image is built successfully - command: docker images node - register: docker_image_check - become: true - # failed_when: docker_image_check.rc != 0 + - name: Build Docker image + command: docker build -t node . + args: + chdir: /home/ubuntu/actions-runner/Testproject-INNO - name: Tag Docker Image command: docker tag node us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest From 74282202e559b9a79cbfed59e9f74b9568c1909d Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 14 Feb 2024 11:46:42 +0530 Subject: [PATCH 379/664] Update repo.yaml --- ansible/repo.yaml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 75e90b95db..66a637a50f 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -25,14 +25,15 @@ version: main # replace 'main' with your branch name if different become: true - - name: Build Docker Image - command: docker build -t node . /home/ubuntu/actions-runner/Testproject-INNO - become: true +# - name: Build Docker Image +# command: docker build -t node . /home/ubuntu/actions-runner/Testproject-INNO +# become: true - - name: Build Docker image - command: docker build -t node . + - name: Build Docker Image + command: docker build -t node args: chdir: /home/ubuntu/actions-runner/Testproject-INNO + become: true - name: Tag Docker Image command: docker tag node us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest From 1ef853888d09621dc0507b4627facb279dafbb08 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 14 Feb 2024 11:48:26 +0530 Subject: [PATCH 380/664] Update repo.yaml --- ansible/repo.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 66a637a50f..a2abb47fe3 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -30,11 +30,12 @@ # become: true - name: Build Docker Image - command: docker build -t node + command: docker build -t my-docker-image . args: - chdir: /home/ubuntu/actions-runner/Testproject-INNO + chdir: /home/ubuntu/actions-runner/Testproject-INNO become: true + - name: Tag Docker Image command: docker tag node us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest become: true From d0553e2679b6f570de8020b0184cb3f2d205c886 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 14 Feb 2024 12:40:41 +0530 Subject: [PATCH 381/664] Update node.js.yml --- .github/workflows/node.js.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index ee4eb68b91..180facedb9 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -47,10 +47,10 @@ jobs: # install_components: 'gke-gcloud-auth-plugin' # export_default_credentials: true - # - name: Build and Push Docker Image - # run: | - # docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO - # docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + - name: Build and Push Docker Image + run: | + docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO + docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest # - name: Deploy to GKE # run: | From 86b8db3adec266fa3902ce054bb024db2070fb3b Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 14 Feb 2024 12:54:43 +0530 Subject: [PATCH 382/664] Update repo.yaml --- ansible/repo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index a2abb47fe3..f920f4491a 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -30,7 +30,7 @@ # become: true - name: Build Docker Image - command: docker build -t my-docker-image . + command: docker build -t node . args: chdir: /home/ubuntu/actions-runner/Testproject-INNO become: true From b1bd43d1d2efab10c58f66e891fcd3b61a51aabe Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 14 Feb 2024 12:57:20 +0530 Subject: [PATCH 383/664] Update repo.yaml --- ansible/repo.yaml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index f920f4491a..8eb39963a5 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -25,16 +25,15 @@ version: main # replace 'main' with your branch name if different become: true -# - name: Build Docker Image -# command: docker build -t node . /home/ubuntu/actions-runner/Testproject-INNO -# become: true - - name: Build Docker Image command: docker build -t node . args: - chdir: /home/ubuntu/actions-runner/Testproject-INNO + chdir: /home/ubuntu/actions-runner/Testproject-INNO become: true + - name: Authenticate Docker with Google Cloud + command: gcloud auth configure-docker --quiet + become: true - name: Tag Docker Image command: docker tag node us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest @@ -45,6 +44,3 @@ become: true # Additional tasks for GKE deployment - - - From bd6530166ca34bfb16f5b460cb59c4c1c00a544d Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 14 Feb 2024 13:01:16 +0530 Subject: [PATCH 384/664] Update repo.yaml --- ansible/repo.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 8eb39963a5..0f684a6a56 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -42,5 +42,7 @@ - name: Push Docker Image to Artifact Registry command: docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest become: true + environment: + DOCKER_CONFIG: /root/.docker # Set Docker config directory to root user's home to ensure gcloud credential is used # Additional tasks for GKE deployment From 76ba55c1acae154229433c0548582b7118d18f4d Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 14 Feb 2024 13:03:23 +0530 Subject: [PATCH 385/664] Update repo.yaml --- ansible/repo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 0f684a6a56..fc3009f178 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -43,6 +43,6 @@ command: docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest become: true environment: - DOCKER_CONFIG: /root/.docker # Set Docker config directory to root user's home to ensure gcloud credential is used + DOCKER_CONFIG: /root/.docker # Ensure correct Docker configuration directory # Additional tasks for GKE deployment From 44e8f7bece201c8946a07f9d2e8219a784af315d Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 14 Feb 2024 13:05:05 +0530 Subject: [PATCH 386/664] Update repo.yaml --- ansible/repo.yaml | 44 ++++++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index fc3009f178..733d02f1f1 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -1,14 +1,14 @@ - name: Git Checkout, Docker Install, Build Image, Push to Artifact Registry, and Deploy to GKE hosts: localhost gather_facts: false - + tasks: - name: Ensure git is installed become: true apt: name: git state: present - + - name: Ensure Docker dependencies are installed become: true apt: @@ -17,32 +17,40 @@ loop: - containerd - docker.io - + - name: Clone Node.js code from GitHub git: repo: https://github.com/mnagaraju5628/Testproject-INNO.git dest: /home/ubuntu/actions-runner/Testproject-INNO version: main # replace 'main' with your branch name if different become: true - - - name: Build Docker Image + + - name: Build Docker image command: docker build -t node . args: chdir: /home/ubuntu/actions-runner/Testproject-INNO + + - name: Push Docker image to Google Artifact Registry + command: > + docker tag node us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + environment: + DOCKER_CLI_EXPERIMENTAL: enabled + + - name: Push Docker image to Google Artifact Registry + command: > + docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + + - name: Set project and zone for GKE + shell: gcloud config set project goldengate-1 && gcloud config set compute/zone us-central1-c become: true - - - name: Authenticate Docker with Google Cloud - command: gcloud auth configure-docker --quiet + + - name: Get credentials for the GKE cluster + shell: gcloud container clusters get-credentials innotest-cluster --region us-central1-c become: true - - - name: Tag Docker Image - command: docker tag node us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + + - name: Deploy Docker image to GKE + command: kubectl apply -f deployment.yaml become: true - - - name: Push Docker Image to Artifact Registry - command: docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + - name: Deploy Docker image to GKE + command: kubectl apply -f service.yaml become: true - environment: - DOCKER_CONFIG: /root/.docker # Ensure correct Docker configuration directory - - # Additional tasks for GKE deployment From 4f684f5cfd0a00d6cb8d08922e66582d574cdd01 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 15 Feb 2024 11:35:33 +0530 Subject: [PATCH 387/664] Update repo.yaml From 43c46978df52b1c6d3039cee649059ebc649d5fa Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 15 Feb 2024 11:48:24 +0530 Subject: [PATCH 388/664] Update repo.yaml --- ansible/repo.yaml | 35 +++++++++++++---------------------- 1 file changed, 13 insertions(+), 22 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 733d02f1f1..7c09466675 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -1,14 +1,14 @@ - name: Git Checkout, Docker Install, Build Image, Push to Artifact Registry, and Deploy to GKE hosts: localhost gather_facts: false - + tasks: - name: Ensure git is installed become: true apt: name: git state: present - + - name: Ensure Docker dependencies are installed become: true apt: @@ -17,40 +17,31 @@ loop: - containerd - docker.io - + - name: Clone Node.js code from GitHub git: repo: https://github.com/mnagaraju5628/Testproject-INNO.git dest: /home/ubuntu/actions-runner/Testproject-INNO version: main # replace 'main' with your branch name if different become: true - + - name: Build Docker image command: docker build -t node . args: chdir: /home/ubuntu/actions-runner/Testproject-INNO - + - name: Push Docker image to Google Artifact Registry command: > - docker tag node us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + docker tag node + us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest environment: DOCKER_CLI_EXPERIMENTAL: enabled - + + - name: Log in to Google Cloud + command: gcloud auth activate-service-account testgcp-sa@goldengate-1.iam.gserviceaccount.com --key-file=/home/ubuntu/actions-runner/cred.json + - name: Push Docker image to Google Artifact Registry command: > docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - - - name: Set project and zone for GKE - shell: gcloud config set project goldengate-1 && gcloud config set compute/zone us-central1-c - become: true - - - name: Get credentials for the GKE cluster - shell: gcloud container clusters get-credentials innotest-cluster --region us-central1-c - become: true - - - name: Deploy Docker image to GKE - command: kubectl apply -f deployment.yaml - become: true - - name: Deploy Docker image to GKE - command: kubectl apply -f service.yaml - become: true + + From db9d318ae3d88f4867480c9517c9289c89eb5e15 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 15 Feb 2024 11:54:23 +0530 Subject: [PATCH 389/664] Update repo.yaml From cfc14da73e6d23441ee5fdc606e055936c445259 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 15 Feb 2024 12:03:03 +0530 Subject: [PATCH 390/664] Update repo.yaml From 0f34335e0198687e87f97a1163c9002765a40947 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 15 Feb 2024 12:07:20 +0530 Subject: [PATCH 391/664] Update repo.yaml --- ansible/repo.yaml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 7c09466675..585b3bf15e 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -30,18 +30,14 @@ args: chdir: /home/ubuntu/actions-runner/Testproject-INNO - - name: Push Docker image to Google Artifact Registry - command: > - docker tag node - us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - environment: - DOCKER_CLI_EXPERIMENTAL: enabled + - name: Authenticate Docker with Google Artifact Registry + command: gcloud auth configure-docker + become: true - - name: Log in to Google Cloud - command: gcloud auth activate-service-account testgcp-sa@goldengate-1.iam.gserviceaccount.com --key-file=/home/ubuntu/actions-runner/cred.json + - name: Tag Docker image for Google Artifact Registry + command: docker tag node us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - name: Push Docker image to Google Artifact Registry - command: > - docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + command: docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest From cca9aa393cf1646073070c692ef57e58bbe1f0e4 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 15 Feb 2024 12:46:15 +0530 Subject: [PATCH 392/664] Update repo.yaml --- ansible/repo.yaml | 58 +++++++++++++++-------------------------------- 1 file changed, 18 insertions(+), 40 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 585b3bf15e..6fe1384dbb 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -1,43 +1,21 @@ -- name: Git Checkout, Docker Install, Build Image, Push to Artifact Registry, and Deploy to GKE +- name: Trigger GitHub Actions workflow hosts: localhost gather_facts: false - tasks: - - name: Ensure git is installed - become: true - apt: - name: git - state: present - - - name: Ensure Docker dependencies are installed - become: true - apt: - name: "{{ item }}" - state: present - loop: - - containerd - - docker.io - - - name: Clone Node.js code from GitHub - git: - repo: https://github.com/mnagaraju5628/Testproject-INNO.git - dest: /home/ubuntu/actions-runner/Testproject-INNO - version: main # replace 'main' with your branch name if different - become: true - - - name: Build Docker image - command: docker build -t node . - args: - chdir: /home/ubuntu/actions-runner/Testproject-INNO - - - name: Authenticate Docker with Google Artifact Registry - command: gcloud auth configure-docker - become: true - - - name: Tag Docker image for Google Artifact Registry - command: docker tag node us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - - - name: Push Docker image to Google Artifact Registry - command: docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - - + - name: Trigger GitHub Actions workflow + uri: + url: "https://api.github.com/repos/owner/repository/actions/workflows/workflow-file/dispatches" + method: POST + headers: + Authorization: "token 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" + Accept: "application/vnd.github.v3+json" + Content-Type: "application/json" + body_format: json + body: + ref: "main" + inputs: {} # If your workflow file has inputs, you can specify them here + environment: + OWNER: "mnagaraju" # Replace with your GitHub username or organization name + REPO: "https://github.com/mnagaraju5628/Testproject-INNO.git" # Replace with the name of your GitHub repository + WORKFLOW_FILE: "nodejs.yml" # Replace with the name of your workflow file + delegate_to: localhost From 2e3e2ce96accf0ac2ae04405bda422740b0d8d0c Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 15 Feb 2024 12:58:01 +0530 Subject: [PATCH 393/664] Update node.js.yml --- .github/workflows/node.js.yml | 124 +++++----------------------------- 1 file changed, 16 insertions(+), 108 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 180facedb9..6b9426be79 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -1,119 +1,27 @@ -# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs -name: Build and Deploy +name: Build and Push Docker Image on: push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] + branches: + - main # Trigger the workflow on pushes to the main branch jobs: - build: + build_and_push_docker_image: runs-on: self-hosted - defaults: - run: - shell: bash -l {0} - - strategy: - matrix: - node-version: [14.x] steps: - - name: Checkout code - uses: actions/checkout@v3 + - name: Checkout code + uses: actions/checkout@v2 - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' + - name: Install Ansible + run: sudo apt update && sudo apt install -y ansible - - name: Install dependencies and build - run: | - npm ci - npm run build --if-present + - name: Install Docker dependencies + run: | + sudo apt update + sudo apt install -y containerd docker.io - - name: Setup Ansible and Run Ansible playbook - run: | - sudo apt-get update - sudo apt-get install -y ansible - ansible-playbook -i "localhost," -c local ansible/repo.yaml -K - # - name: Install the gcloud CLI - # uses: google-github-actions/setup-gcloud@v0.2.0 - # with: - # project_id: ${{ secrets.GOOGLE_PROJECT }} - # service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} - # install_components: 'gke-gcloud-auth-plugin' - # export_default_credentials: true - - - name: Build and Push Docker Image - run: | - docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO - docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - - # - name: Deploy to GKE - # run: | - # gcloud container clusters get-credentials innotest-cluster --region us-central1-c - # kubectl rollout restart deployment nodeapp-deployment - # kubectl apply -f deployment.yaml - # kubectl apply -f service.yaml - - - - - - - - - - - - - - - - - - - - - - - - # - name: Use Node.js ${{ matrix.node-version }} - # uses: actions/setup-node@v3 - # with: - # node-version: ${{ matrix.node-version }} - # cache: 'npm' - - # - run: npm ci - - # - run: npm run build --if-present - - # - run: npm install - - # - name: Install the gcloud CLI - # uses: google-github-actions/setup-gcloud@v0.2.0 - # with: - # project_id: ${{ secrets.GOOGLE_PROJECT }} - # service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} - # install_components: 'gke-gcloud-auth-plugin' - # export_default_credentials: true - - # - name: Build and push the Docker image - # env: - # GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} - # run: | - # gcloud auth configure-docker us-central1-docker.pkg.dev - # docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest . - # docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - - # - name: Deploy to GKE - # env: - # GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} - # run: | - # gcloud container clusters get-credentials innotest-cluster --region us-central1-c - # kubectl rollout restart deployment nodeapp-deployment - # kubectl apply -f deployment.yaml - # kubectl apply -f service.yaml + - name: Run Ansible playbook to build Docker image + run: ansible-playbook ansible/repo.yaml + env: + PAT: ${{ secrets.PAT }} # Required for Ansible to access the repository From 3e907fc6f5b6f0eefdabbd5b797dac35171322f2 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 15 Feb 2024 13:04:17 +0530 Subject: [PATCH 394/664] Update repo.yaml --- ansible/repo.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 6fe1384dbb..ed95893c29 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -4,10 +4,10 @@ tasks: - name: Trigger GitHub Actions workflow uri: - url: "https://api.github.com/repos/owner/repository/actions/workflows/workflow-file/dispatches" + url: "https://api.github.com/repos/{{ OWNER }}/{{ REPO }}/actions/workflows/{{ WORKFLOW_FILE }}/dispatches" method: POST headers: - Authorization: "token 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" + Authorization: "token {{ PAT }}" Accept: "application/vnd.github.v3+json" Content-Type: "application/json" body_format: json @@ -16,6 +16,6 @@ inputs: {} # If your workflow file has inputs, you can specify them here environment: OWNER: "mnagaraju" # Replace with your GitHub username or organization name - REPO: "https://github.com/mnagaraju5628/Testproject-INNO.git" # Replace with the name of your GitHub repository + REPO: "Testproject-INNO" # Replace with the name of your GitHub repository (without the full URL) WORKFLOW_FILE: "nodejs.yml" # Replace with the name of your workflow file delegate_to: localhost From 5d101a0a802f4fcd7fffd52d213d991049613c3b Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 15 Feb 2024 13:08:55 +0530 Subject: [PATCH 395/664] Update repo.yaml --- ansible/repo.yaml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index ed95893c29..176d24e30e 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -1,21 +1,22 @@ - name: Trigger GitHub Actions workflow hosts: localhost gather_facts: false + vars: + OWNER: "mnagaraju" + REPO: "Testproject-INNO" + WORKFLOW_FILE: "nodejs.yml" + YOUR_GITHUB_TOKEN: "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" tasks: - name: Trigger GitHub Actions workflow uri: url: "https://api.github.com/repos/{{ OWNER }}/{{ REPO }}/actions/workflows/{{ WORKFLOW_FILE }}/dispatches" method: POST headers: - Authorization: "token {{ PAT }}" + Authorization: "token {{ YOUR_GITHUB_TOKEN }}" Accept: "application/vnd.github.v3+json" Content-Type: "application/json" body_format: json body: ref: "main" inputs: {} # If your workflow file has inputs, you can specify them here - environment: - OWNER: "mnagaraju" # Replace with your GitHub username or organization name - REPO: "Testproject-INNO" # Replace with the name of your GitHub repository (without the full URL) - WORKFLOW_FILE: "nodejs.yml" # Replace with the name of your workflow file delegate_to: localhost From 0f2d88205768f0f378c763758d08bb663b281ce4 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 15 Feb 2024 13:15:01 +0530 Subject: [PATCH 396/664] Update repo.yaml --- ansible/repo.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 176d24e30e..e53de6214c 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -5,14 +5,14 @@ OWNER: "mnagaraju" REPO: "Testproject-INNO" WORKFLOW_FILE: "nodejs.yml" - YOUR_GITHUB_TOKEN: "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" + YOUR_GITHUB_TOKEN: "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" # Update this with your GitHub Personal Access Token tasks: - name: Trigger GitHub Actions workflow uri: url: "https://api.github.com/repos/{{ OWNER }}/{{ REPO }}/actions/workflows/{{ WORKFLOW_FILE }}/dispatches" method: POST headers: - Authorization: "token {{ YOUR_GITHUB_TOKEN }}" + Authorization: "token {{ PAT }}" Accept: "application/vnd.github.v3+json" Content-Type: "application/json" body_format: json From a57ba44411e16768207d85c73a61666ea5afeead Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 15 Feb 2024 13:18:04 +0530 Subject: [PATCH 397/664] Update repo.yaml --- ansible/repo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index e53de6214c..233cb55ce7 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -12,7 +12,7 @@ url: "https://api.github.com/repos/{{ OWNER }}/{{ REPO }}/actions/workflows/{{ WORKFLOW_FILE }}/dispatches" method: POST headers: - Authorization: "token {{ PAT }}" + Authorization: "token {{ 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 }}" Accept: "application/vnd.github.v3+json" Content-Type: "application/json" body_format: json From 64e9e28662f24e465d5c1f3678b7ca42ad2ea129 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 15 Feb 2024 14:07:10 +0530 Subject: [PATCH 398/664] Update repo.yaml --- ansible/repo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 233cb55ce7..b66abc68a9 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -12,7 +12,7 @@ url: "https://api.github.com/repos/{{ OWNER }}/{{ REPO }}/actions/workflows/{{ WORKFLOW_FILE }}/dispatches" method: POST headers: - Authorization: "token {{ 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 }}" + Authorization: "token {{ YOUR_GITHUB_TOKEN }}" Accept: "application/vnd.github.v3+json" Content-Type: "application/json" body_format: json From 83752670a218b0ab4643203c1cf7af8fdf41c203 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 15 Feb 2024 14:19:00 +0530 Subject: [PATCH 399/664] Update node.js.yml --- .github/workflows/node.js.yml | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 6b9426be79..8b13789179 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -1,27 +1 @@ -name: Build and Push Docker Image -on: - push: - branches: - - main # Trigger the workflow on pushes to the main branch - -jobs: - build_and_push_docker_image: - runs-on: self-hosted - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Install Ansible - run: sudo apt update && sudo apt install -y ansible - - - name: Install Docker dependencies - run: | - sudo apt update - sudo apt install -y containerd docker.io - - - name: Run Ansible playbook to build Docker image - run: ansible-playbook ansible/repo.yaml - env: - PAT: ${{ secrets.PAT }} # Required for Ansible to access the repository From c6d6cf2c547297515d0028e9738773ef86752213 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 15 Feb 2024 14:20:04 +0530 Subject: [PATCH 400/664] Update repo.yaml --- ansible/repo.yaml | 59 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 41 insertions(+), 18 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index b66abc68a9..950696cdf2 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -1,22 +1,45 @@ -- name: Trigger GitHub Actions workflow +--- +- name: Deploy Node.js Application to Google Artifact Registry hosts: localhost gather_facts: false + vars: - OWNER: "mnagaraju" - REPO: "Testproject-INNO" - WORKFLOW_FILE: "nodejs.yml" - YOUR_GITHUB_TOKEN: "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" # Update this with your GitHub Personal Access Token + # Define variables for your project + git_repo: "https://github.com/mnagaraju5628/Testproject-INNO.git" + git_version: "main" # Or specify a branch or tag + app_directory: "/home/ubuntu/actions-runner/Testproject-INNO" + artifact_registry_project_id: "goldengate-1" + artifact_registry_repository: "test-project" + docker_image_name: "node" + docker_image_tag: "latest" + gcp_service_account_key_file: "/home/ubuntu/actions-runner/Testproject-INNO/cred.json" + tasks: - - name: Trigger GitHub Actions workflow - uri: - url: "https://api.github.com/repos/{{ OWNER }}/{{ REPO }}/actions/workflows/{{ WORKFLOW_FILE }}/dispatches" - method: POST - headers: - Authorization: "token {{ YOUR_GITHUB_TOKEN }}" - Accept: "application/vnd.github.v3+json" - Content-Type: "application/json" - body_format: json - body: - ref: "main" - inputs: {} # If your workflow file has inputs, you can specify them here - delegate_to: localhost + - name: Checkout Node.js Application from Git + git: + repo: "{{ git_repo }}" + dest: "{{ app_directory }}" + version: "{{ git_version }}" + + - name: Install Node.js Dependencies + npm: + path: "{{ app_directory }}" + state: present + + - name: Build Docker Image + docker_image: + name: "{{ docker_image_name }}" + path: "{{ app_directory }}" + tag: "{{ docker_image_tag }}" + + - name: Configure gcloud CLI + environment: + CLOUDSDK_AUTH_CREDENTIAL_FILE_OVERRIDE: "{{ gcp_service_account_key_file }}" + become: true + command: "gcloud auth activate-service-account --key-file={{ gcp_service_account_key_file }}" + + - name: Tag Docker Image for Artifact Registry + command: "docker tag {{ docker_image_name }}:{{ docker_image_tag }} gcr.io/{{ artifact_registry_project_id }}/{{ artifact_registry_repository }}/{{ docker_image_name }}:{{ docker_image_tag }}" + + - name: Push Docker Image to Google Artifact Registry + command: "docker push gcr.io/{{ artifact_registry_project_id }}/{{ artifact_registry_repository }}/{{ docker_image_name }}:{{ docker_image_tag }}" From fdd945790368e6923269d78de5e47cef5766ae80 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 15 Feb 2024 14:21:22 +0530 Subject: [PATCH 401/664] Update node.js.yml --- .github/workflows/node.js.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 8b13789179..0cdb7feb07 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -1 +1,28 @@ +name: Build and Push Docker Image + +on: + push: + branches: + - main # Trigger the workflow on pushes to the main branch + +jobs: + build_and_push_docker_image: + runs-on: self-hosted + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install Ansible + run: sudo apt update && sudo apt install -y ansible + + - name: Install Docker dependencies + run: | + sudo apt update + sudo apt install -y containerd docker.io + + - name: Run Ansible playbook to build Docker image + run: ansible-playbook ansible/repo.yaml + # env: + # PAT: ${{ secrets.PAT }} # Required for Ansible to access the repository From f0f115a1b5f8a6f15cb4d691b2fbf2e41b2672d9 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 15 Feb 2024 14:25:35 +0530 Subject: [PATCH 402/664] Update node.js.yml --- .github/workflows/node.js.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 0cdb7feb07..6b9426be79 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -23,6 +23,5 @@ jobs: - name: Run Ansible playbook to build Docker image run: ansible-playbook ansible/repo.yaml - # env: - # PAT: ${{ secrets.PAT }} # Required for Ansible to access the repository - + env: + PAT: ${{ secrets.PAT }} # Required for Ansible to access the repository From 00f792bc6f3a818ef8f00a8e089909f3109b6560 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 15 Feb 2024 14:26:28 +0530 Subject: [PATCH 403/664] Update repo.yaml From 8cfd0b81f97bbc63b36d62041d11fff29cb04e5f Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 15 Feb 2024 18:02:31 +0530 Subject: [PATCH 404/664] Update repo.yaml --- ansible/repo.yaml | 115 +++++++++++++++++++++++++++++++++------------- 1 file changed, 82 insertions(+), 33 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 950696cdf2..66fc845617 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -1,45 +1,94 @@ ---- -- name: Deploy Node.js Application to Google Artifact Registry +[Friday 12:34 PM] Nagaraju, Mendragurthi +- name: Git Checkout, Docker Install, Build Image, Push to Artifact Registry, and Deploy to GKE + hosts: localhost + gather_facts: false + + tasks: - vars: - # Define variables for your project - git_repo: "https://github.com/mnagaraju5628/Testproject-INNO.git" - git_version: "main" # Or specify a branch or tag - app_directory: "/home/ubuntu/actions-runner/Testproject-INNO" - artifact_registry_project_id: "goldengate-1" - artifact_registry_repository: "test-project" - docker_image_name: "node" - docker_image_tag: "latest" - gcp_service_account_key_file: "/home/ubuntu/actions-runner/Testproject-INNO/cred.json" + - name: Ensure git is installed - tasks: - - name: Checkout Node.js Application from Git - git: - repo: "{{ git_repo }}" - dest: "{{ app_directory }}" - version: "{{ git_version }}" + become: true + + apt: + + name: git - - name: Install Node.js Dependencies - npm: - path: "{{ app_directory }}" state: present + + - name: Ensure Docker dependencies are installed + + become: true + + apt: + + name: "{{ item }}" + + state: present + + loop: + + - containerd + + - docker.io + + - name: Clone Node.js code from GitHub + + git: + + repo: https://github.com/mnagaraju5628/Testproject-INNO.git + + dest: /home/ubuntu/actions-runner/Testproject-INNO - - name: Build Docker Image - docker_image: - name: "{{ docker_image_name }}" - path: "{{ app_directory }}" - tag: "{{ docker_image_tag }}" + version: main # replace 'main' with your branch name if different + + become: true + + - name: Build Docker image + + command: docker build -t node . + + args: + + chdir: /home/ubuntu/actions-runner/Testproject-INNO + + - name: Push Docker image to Google Artifact Registry + + command: > + + docker tag node us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - - name: Configure gcloud CLI environment: - CLOUDSDK_AUTH_CREDENTIAL_FILE_OVERRIDE: "{{ gcp_service_account_key_file }}" + + DOCKER_CLI_EXPERIMENTAL: enabled + + - name: Push Docker image to Google Artifact Registry + + command: > + + docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + + - name: Set project and zone for GKE + + shell: gcloud config set project goldengate-1 && gcloud config set compute/zone us-central1-c + + become: true + + - name: Get credentials for the GKE cluster + + shell: gcloud container clusters get-credentials innotest-cluster --region us-central1-c + become: true - command: "gcloud auth activate-service-account --key-file={{ gcp_service_account_key_file }}" + + - name: Deploy Docker image to GKE - - name: Tag Docker Image for Artifact Registry - command: "docker tag {{ docker_image_name }}:{{ docker_image_tag }} gcr.io/{{ artifact_registry_project_id }}/{{ artifact_registry_repository }}/{{ docker_image_name }}:{{ docker_image_tag }}" + command: kubectl apply -f deployment.yaml - - name: Push Docker Image to Google Artifact Registry - command: "docker push gcr.io/{{ artifact_registry_project_id }}/{{ artifact_registry_repository }}/{{ docker_image_name }}:{{ docker_image_tag }}" + become: true + + - name: Deploy Docker image to GKE + + command: kubectl apply -f service.yaml + + become: true From b30eac5cbdd7ee9e92a99bb6ed1db3824982c722 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 15 Feb 2024 18:04:26 +0530 Subject: [PATCH 405/664] Update repo.yaml --- ansible/repo.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 66fc845617..0c0284feee 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -1,4 +1,3 @@ -[Friday 12:34 PM] Nagaraju, Mendragurthi - name: Git Checkout, Docker Install, Build Image, Push to Artifact Registry, and Deploy to GKE hosts: localhost From 11ab14240f618c20304bbe670185d33451de6c2b Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 15 Feb 2024 18:05:44 +0530 Subject: [PATCH 406/664] Delete .github/workflows/node.js.yml --- .github/workflows/node.js.yml | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 .github/workflows/node.js.yml diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml deleted file mode 100644 index 6b9426be79..0000000000 --- a/.github/workflows/node.js.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Build and Push Docker Image - -on: - push: - branches: - - main # Trigger the workflow on pushes to the main branch - -jobs: - build_and_push_docker_image: - runs-on: self-hosted - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Install Ansible - run: sudo apt update && sudo apt install -y ansible - - - name: Install Docker dependencies - run: | - sudo apt update - sudo apt install -y containerd docker.io - - - name: Run Ansible playbook to build Docker image - run: ansible-playbook ansible/repo.yaml - env: - PAT: ${{ secrets.PAT }} # Required for Ansible to access the repository From 3342df122d30df123b4534345d08cc707435e1d0 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 15 Feb 2024 18:07:18 +0530 Subject: [PATCH 407/664] Update testansible-build --- .github/workflows/testansible-build | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/testansible-build b/.github/workflows/testansible-build index 47e04a19e6..18283ba723 100644 --- a/.github/workflows/testansible-build +++ b/.github/workflows/testansible-build @@ -11,7 +11,7 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: self-hosted strategy: matrix: @@ -43,9 +43,6 @@ jobs: exec -l $SHELL gcloud components install kubectl --quiet - name: Build Docker Image - env: - GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} - GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} run: | gcloud auth configure-docker us-central1-docker.pkg.dev docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/actions-runner/Testproject-INNO From 42f8a6638f2fd5dc2f90025205ef54f32253c7e5 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 15 Feb 2024 18:07:53 +0530 Subject: [PATCH 408/664] Update repo.yaml From 58df0b46ac966a67faae088ad1bcf601663ca30b Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 15 Feb 2024 18:08:40 +0530 Subject: [PATCH 409/664] Delete .github/workflows/testansible-build --- .github/workflows/testansible-build | 49 ----------------------------- 1 file changed, 49 deletions(-) delete mode 100644 .github/workflows/testansible-build diff --git a/.github/workflows/testansible-build b/.github/workflows/testansible-build deleted file mode 100644 index 18283ba723..0000000000 --- a/.github/workflows/testansible-build +++ /dev/null @@ -1,49 +0,0 @@ -# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs - -name: Build and Deploy - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - build: - runs-on: self-hosted - - strategy: - matrix: - node-version: [14.x] - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - - name: Install dependencies and build - run: | - npm ci - npm run build --if-present - npm install - - name: Setup Ansible and Run Ansible playbook - run: | - sudo apt-get update - sudo apt-get install -y ansible - ansible-playbook -i "localhost," -c local ansible/repo.yaml - - name: Install gcloud CLI and kubectl - run: | - curl -sSL https://sdk.cloud.google.com | bash - exec -l $SHELL - gcloud components install kubectl --quiet - - name: Build Docker Image - run: | - gcloud auth configure-docker us-central1-docker.pkg.dev - docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/mnagaraju/actions-runner/Testproject-INNO - From 092076543a6a0ca5a4c24166ee19b87d27045707 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 15 Feb 2024 18:11:35 +0530 Subject: [PATCH 410/664] Create node.js.yml --- .github/workflows/node.js.yml | 48 +++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/node.js.yml diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 0000000000..355daeb96b --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,48 @@ +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs + +name: Build and Deploy + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + runs-on: self-hosted + + strategy: + matrix: + node-version: [14.x] + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + + - name: Install dependencies and build + run: | + npm ci + npm run build --if-present + npm install + - name: Setup Ansible and Run Ansible playbook + run: | + sudo apt-get update + sudo apt-get install -y ansible + ansible-playbook -i "localhost," -c local ansible/repo.yaml + - name: Install gcloud CLI and kubectl + run: | + curl -sSL https://sdk.cloud.google.com | bash + exec -l $SHELL + gcloud components install kubectl --quiet + - name: Build and Push Docker Image + run: | + gcloud auth configure-docker us-central1-docker.pkg.dev + docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO From 2b24d73e6f8534186e7f91f05bfeac9d33f06194 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 15 Feb 2024 18:14:59 +0530 Subject: [PATCH 411/664] Update repo.yaml --- ansible/repo.yaml | 61 +++++++++-------------------------------------- 1 file changed, 11 insertions(+), 50 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 0c0284feee..3a963e6860 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -1,93 +1,54 @@ - name: Git Checkout, Docker Install, Build Image, Push to Artifact Registry, and Deploy to GKE - hosts: localhost - gather_facts: false - tasks: - - name: Ensure git is installed - become: true - apt: - name: git - state: present - - - name: Ensure Docker dependencies are installed + - name: Ensure Docker dependencies are installed become: true - apt: - name: "{{ item }}" - state: present - loop: - - containerd - - docker.io - - - name: Clone Node.js code from GitHub + - name: Clone Node.js code from GitHub git: - repo: https://github.com/mnagaraju5628/Testproject-INNO.git - dest: /home/ubuntu/actions-runner/Testproject-INNO - version: main # replace 'main' with your branch name if different - become: true - - - name: Build Docker image + - name: Build Docker image command: docker build -t node . - args: - chdir: /home/ubuntu/actions-runner/Testproject-INNO - - - name: Push Docker image to Google Artifact Registry - - command: > - - docker tag node us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + - name: Tag Docker image for Google Artifact Registry + command: docker tag node us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest environment: - DOCKER_CLI_EXPERIMENTAL: enabled - - - name: Push Docker image to Google Artifact Registry - command: > + - name: Push Docker image to Google Artifact Registry + command: docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - - name: Set project and zone for GKE - shell: gcloud config set project goldengate-1 && gcloud config set compute/zone us-central1-c - become: true - - - name: Get credentials for the GKE cluster - - shell: gcloud container clusters get-credentials innotest-cluster --region us-central1-c + - name: Get credentials for the GKE cluster + shell: gcloud container clusters get-credentials innotest-cluster --region us-central1-c become: true - - - name: Deploy Docker image to GKE + - name: Deploy Docker image to GKE (deployment) command: kubectl apply -f deployment.yaml - become: true - - name: Deploy Docker image to GKE - + - name: Deploy Docker image to GKE (service) command: kubectl apply -f service.yaml - become: true From 308fcc27412b20703b684c8cdad193e249e668ba Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 15 Feb 2024 18:17:32 +0530 Subject: [PATCH 412/664] Update repo.yaml --- ansible/repo.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 3a963e6860..a9cd787855 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -24,6 +24,13 @@ version: main # replace 'main' with your branch name if different become: true + - name: Add current user to Docker group + become: true + user: + name: "{{ ansible_user }}" + groups: docker + append: yes + - name: Build Docker image command: docker build -t node . args: From d29f3f04efbabb9969feff794abad71d6473c0c1 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 15 Feb 2024 18:19:28 +0530 Subject: [PATCH 413/664] Update repo.yaml --- ansible/repo.yaml | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index a9cd787855..dee0e9ad08 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -24,38 +24,34 @@ version: main # replace 'main' with your branch name if different become: true - - name: Add current user to Docker group - become: true - user: - name: "{{ ansible_user }}" - groups: docker - append: yes - - name: Build Docker image + become: true command: docker build -t node . args: chdir: /home/ubuntu/actions-runner/Testproject-INNO - name: Tag Docker image for Google Artifact Registry + become: true command: docker tag node us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest environment: DOCKER_CLI_EXPERIMENTAL: enabled - name: Push Docker image to Google Artifact Registry + become: true command: docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - name: Set project and zone for GKE - shell: gcloud config set project goldengate-1 && gcloud config set compute/zone us-central1-c become: true + shell: gcloud config set project goldengate-1 && gcloud config set compute/zone us-central1-c - name: Get credentials for the GKE cluster - shell: gcloud container clusters get-credentials innotest-cluster --region us-central1-c become: true + shell: gcloud container clusters get-credentials innotest-cluster --region us-central1-c - name: Deploy Docker image to GKE (deployment) - command: kubectl apply -f deployment.yaml become: true + command: kubectl apply -f deployment.yaml - name: Deploy Docker image to GKE (service) - command: kubectl apply -f service.yaml become: true + command: kubectl apply -f service.yaml From 7a287708592f395792982aa7873f8b2934d37a14 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 15 Feb 2024 18:33:53 +0530 Subject: [PATCH 414/664] Update repo.yaml --- ansible/repo.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index dee0e9ad08..9f5504f49e 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -30,6 +30,10 @@ args: chdir: /home/ubuntu/actions-runner/Testproject-INNO + - name: Authenticate Docker with Google Artifact Registry + become: true + shell: gcloud auth configure-docker + - name: Tag Docker image for Google Artifact Registry become: true command: docker tag node us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest From b1766400187889db6b0343ad0143df15f03bc95b Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 15 Feb 2024 19:03:41 +0530 Subject: [PATCH 415/664] Update repo.yaml --- ansible/repo.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 9f5504f49e..e0b2eb23a0 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -30,9 +30,13 @@ args: chdir: /home/ubuntu/actions-runner/Testproject-INNO - - name: Authenticate Docker with Google Artifact Registry + - name: Authenticate Docker with Google Cloud SDK become: true - shell: gcloud auth configure-docker + environment: + CLOUDSDK_CONFIG: /home/ubuntu/.config/gcloud + shell: | + gcloud auth activate-service-account --key-file=/home/ubuntu/actions-runner/Testproject-INNOt-cred.json + gcloud auth configure-docker - name: Tag Docker image for Google Artifact Registry become: true From 51b74d90be34e6b6f7fee5d2d295b1d10b53c3d5 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 15 Feb 2024 19:07:22 +0530 Subject: [PATCH 416/664] Update repo.yaml --- ansible/repo.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index e0b2eb23a0..5b8f45cbed 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -33,10 +33,8 @@ - name: Authenticate Docker with Google Cloud SDK become: true environment: - CLOUDSDK_CONFIG: /home/ubuntu/.config/gcloud - shell: | - gcloud auth activate-service-account --key-file=/home/ubuntu/actions-runner/Testproject-INNOt-cred.json - gcloud auth configure-docker + GOOGLE_APPLICATION_CREDENTIALS: /home/ubuntu/actions-runner/Testproject-INNOt-cred.json + shell: gcloud auth activate-service-account --key-file=/home/ubuntu/actions-runner/Testproject-INNOt-cred.json && gcloud auth configure-docker - name: Tag Docker image for Google Artifact Registry become: true From 4ff260030995eda3008a203ce72e3b6388ff621b Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 16 Feb 2024 10:41:51 +0530 Subject: [PATCH 417/664] Update repo.yaml --- ansible/repo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 5b8f45cbed..34faf132cc 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -34,7 +34,7 @@ become: true environment: GOOGLE_APPLICATION_CREDENTIALS: /home/ubuntu/actions-runner/Testproject-INNOt-cred.json - shell: gcloud auth activate-service-account --key-file=/home/ubuntu/actions-runner/Testproject-INNOt-cred.json && gcloud auth configure-docker + shell: gcloud auth activate-service-account --key-file= /home/ubuntu/actions-runner/Testproject-INNO-cred.json && gcloud auth configure-docker - name: Tag Docker image for Google Artifact Registry become: true From 3fe44ce9b3b0d03dd989dbf236a98d005fcf0b1e Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 16 Feb 2024 10:45:22 +0530 Subject: [PATCH 418/664] Update repo.yaml --- ansible/repo.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 34faf132cc..60afc5c399 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -32,9 +32,7 @@ - name: Authenticate Docker with Google Cloud SDK become: true - environment: - GOOGLE_APPLICATION_CREDENTIALS: /home/ubuntu/actions-runner/Testproject-INNOt-cred.json - shell: gcloud auth activate-service-account --key-file= /home/ubuntu/actions-runner/Testproject-INNO-cred.json && gcloud auth configure-docker + shell: gcloud auth activate-service-account inno-test-sa@goldengate-1.iam.gserviceaccount.com --key-file= cred.json && gcloud auth configure-docker - name: Tag Docker image for Google Artifact Registry become: true From 9dd5fb446fc7b9997929e8f0a248aa41661ec46c Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 16 Feb 2024 10:47:38 +0530 Subject: [PATCH 419/664] Update repo.yaml --- ansible/repo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 60afc5c399..9c3d4e3f58 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -32,7 +32,7 @@ - name: Authenticate Docker with Google Cloud SDK become: true - shell: gcloud auth activate-service-account inno-test-sa@goldengate-1.iam.gserviceaccount.com --key-file= cred.json && gcloud auth configure-docker + shell: gcloud auth activate-service-account inno-test-sa@goldengate-1.iam.gserviceaccount.com --key-file=cred.json - name: Tag Docker image for Google Artifact Registry become: true From 7a749878ddfd830dcccb6332c63f62282657ca47 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 16 Feb 2024 10:49:10 +0530 Subject: [PATCH 420/664] Update repo.yaml --- ansible/repo.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 9c3d4e3f58..5c462f9cc1 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -30,9 +30,9 @@ args: chdir: /home/ubuntu/actions-runner/Testproject-INNO - - name: Authenticate Docker with Google Cloud SDK - become: true - shell: gcloud auth activate-service-account inno-test-sa@goldengate-1.iam.gserviceaccount.com --key-file=cred.json + # - name: Authenticate Docker with Google Cloud SDK + # become: true + # shell: gcloud auth activate-service-account inno-test-sa@goldengate-1.iam.gserviceaccount.com --key-file=cred.json - name: Tag Docker image for Google Artifact Registry become: true From 6d2c7cb566b513eaf13173a819dbda732423da04 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 16 Feb 2024 11:27:13 +0530 Subject: [PATCH 421/664] Update repo.yaml --- ansible/repo.yaml | 100 +++++++++++++++++++++++----------------------- 1 file changed, 51 insertions(+), 49 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 5c462f9cc1..fce3d545ea 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -1,61 +1,63 @@ -- name: Git Checkout, Docker Install, Build Image, Push to Artifact Registry, and Deploy to GKE +--- +- name: Run Node.js CI workflow hosts: localhost gather_facts: false + tasks: - - name: Ensure git is installed - become: true - apt: - name: git - state: present - - - name: Ensure Docker dependencies are installed - become: true - apt: - name: "{{ item }}" - state: present - loop: - - containerd - - docker.io - - - name: Clone Node.js code from GitHub - git: - repo: https://github.com/mnagaraju5628/Testproject-INNO.git + - name: Checkout repository + ansible.builtin.git: + repo: "https://github.com/mnagaraju5628/Testproject-INNO.git" dest: /home/ubuntu/actions-runner/Testproject-INNO - version: main # replace 'main' with your branch name if different - become: true + version: main + register: checkout - - name: Build Docker image - become: true - command: docker build -t node . - args: - chdir: /home/ubuntu/actions-runner/Testproject-INNO + - name: Use Node.js 14.x + ansible.builtin.shell: | + curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash - + sudo apt-get install -y nodejs + sudo npm install -g npm@latest - # - name: Authenticate Docker with Google Cloud SDK - # become: true - # shell: gcloud auth activate-service-account inno-test-sa@goldengate-1.iam.gserviceaccount.com --key-file=cred.json + - name: Install dependencies + ansible.builtin.shell: npm ci + args: + chdir: /path/to/your/repository - - name: Tag Docker image for Google Artifact Registry - become: true - command: docker tag node us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - environment: - DOCKER_CLI_EXPERIMENTAL: enabled + - name: Run build script if present + ansible.builtin.shell: npm run build --if-present + args: + chdir: /home/ubuntu/actions-runner/Testproject-INNO - - name: Push Docker image to Google Artifact Registry - become: true - command: docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + - name: Install npm packages + ansible.builtin.shell: npm install + args: + chdir: /home/ubuntu/actions-runner/Testproject-INNO - - name: Set project and zone for GKE - become: true - shell: gcloud config set project goldengate-1 && gcloud config set compute/zone us-central1-c + - name: Set gcloud account + ansible.builtin.shell: gcloud config set account inno-test-sa@goldengate-1.iam.gserviceaccount.com - - name: Get credentials for the GKE cluster - become: true - shell: gcloud container clusters get-credentials innotest-cluster --region us-central1-c + - name: Install the gcloud cli + community.general.gcp_auth: + service_account_file: "{{ lookup('env', 'GOOGLE_APPLICATION_CREDENTIALS') }}" + project_id: "{{ lookup('env', 'GOOGLE_PROJECT') }}" + export_default_credentials: true - - name: Deploy Docker image to GKE (deployment) - become: true - command: kubectl apply -f deployment.yaml + - name: Build and push the docker image + ansible.builtin.shell: | + gcloud auth configure-docker us-central1-docker.pkg.dev + docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest . + docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + environment: + GOOGLE_PROJECT: "{{ lookup('env', 'GOOGLE_PROJECT') }}" + args: + chdir: /home/ubuntu/actions-runner/Testproject-INNO - - name: Deploy Docker image to GKE (service) - become: true - command: kubectl apply -f service.yaml + - name: Deploy to GKE + ansible.builtin.shell: | + gcloud container clusters get-credentials innotest-cluster --region us-central1-c + kubectl rollout restart deployment nodeapp-deployment + kubectl apply -f deployment.yaml + kubectl apply -f service.yaml + environment: + GOOGLE_PROJECT: "{{ lookup('env', 'GOOGLE_PROJECT') }}" + args: + chdir: /home/ubuntu/actions-runner/Testproject-INNO From 33d710fa9fc3de686f994a11448ee75f50e698b1 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 16 Feb 2024 11:29:17 +0530 Subject: [PATCH 422/664] Update repo.yaml --- ansible/repo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index fce3d545ea..a849770f7b 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -20,7 +20,7 @@ - name: Install dependencies ansible.builtin.shell: npm ci args: - chdir: /path/to/your/repository + chdir: /home/ubuntu/actions-runner/Testproject-INNO - name: Run build script if present ansible.builtin.shell: npm run build --if-present From 535960d003095220bcfd3b6b8e1e75152872481f Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 16 Feb 2024 11:31:04 +0530 Subject: [PATCH 423/664] Update repo.yaml --- ansible/repo.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index a849770f7b..2ee237f0fc 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -12,28 +12,28 @@ register: checkout - name: Use Node.js 14.x - ansible.builtin.shell: | + shell: | curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash - sudo apt-get install -y nodejs sudo npm install -g npm@latest - name: Install dependencies - ansible.builtin.shell: npm ci + shell: npm ci args: chdir: /home/ubuntu/actions-runner/Testproject-INNO - name: Run build script if present - ansible.builtin.shell: npm run build --if-present + shell: npm run build --if-present args: chdir: /home/ubuntu/actions-runner/Testproject-INNO - name: Install npm packages - ansible.builtin.shell: npm install + shell: npm install args: chdir: /home/ubuntu/actions-runner/Testproject-INNO - name: Set gcloud account - ansible.builtin.shell: gcloud config set account inno-test-sa@goldengate-1.iam.gserviceaccount.com + shell: gcloud config set account inno-test-sa@goldengate-1.iam.gserviceaccount.com - name: Install the gcloud cli community.general.gcp_auth: @@ -42,7 +42,7 @@ export_default_credentials: true - name: Build and push the docker image - ansible.builtin.shell: | + shell: | gcloud auth configure-docker us-central1-docker.pkg.dev docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest . docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest @@ -52,7 +52,7 @@ chdir: /home/ubuntu/actions-runner/Testproject-INNO - name: Deploy to GKE - ansible.builtin.shell: | + shell: | gcloud container clusters get-credentials innotest-cluster --region us-central1-c kubectl rollout restart deployment nodeapp-deployment kubectl apply -f deployment.yaml From ff5dd1b387c5a99facae9edadebc1963f902b162 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 16 Feb 2024 11:36:33 +0530 Subject: [PATCH 424/664] Update repo.yaml From ba995e9770820eb5f31f224f8c9fff6614fe082a Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 16 Feb 2024 11:38:03 +0530 Subject: [PATCH 425/664] Update repo.yaml --- ansible/repo.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 2ee237f0fc..26707a9e7e 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -35,6 +35,13 @@ - name: Set gcloud account shell: gcloud config set account inno-test-sa@goldengate-1.iam.gserviceaccount.com + - name: Debug environment variables + ansible.builtin.debug: + var: item + with_items: + - GOOGLE_APPLICATION_CREDENTIALS + - GOOGLE_PROJECT + - name: Install the gcloud cli community.general.gcp_auth: service_account_file: "{{ lookup('env', 'GOOGLE_APPLICATION_CREDENTIALS') }}" From 3c59d4ea3083025db6b1721e6f3cc02834e9e91a Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 16 Feb 2024 11:49:59 +0530 Subject: [PATCH 426/664] Update repo.yaml --- ansible/repo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 26707a9e7e..48b48b002d 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -43,7 +43,7 @@ - GOOGLE_PROJECT - name: Install the gcloud cli - community.general.gcp_auth: + # community.general.gcp_auth: service_account_file: "{{ lookup('env', 'GOOGLE_APPLICATION_CREDENTIALS') }}" project_id: "{{ lookup('env', 'GOOGLE_PROJECT') }}" export_default_credentials: true From 3f2ce260231659763ac7a7c48552cc07b113911c Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 16 Feb 2024 11:53:31 +0530 Subject: [PATCH 427/664] Update repo.yaml --- ansible/repo.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 48b48b002d..0bf4d20017 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -43,7 +43,6 @@ - GOOGLE_PROJECT - name: Install the gcloud cli - # community.general.gcp_auth: service_account_file: "{{ lookup('env', 'GOOGLE_APPLICATION_CREDENTIALS') }}" project_id: "{{ lookup('env', 'GOOGLE_PROJECT') }}" export_default_credentials: true From 640441397171b0cc992ff6dcbf129644c74072a0 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 16 Feb 2024 11:56:35 +0530 Subject: [PATCH 428/664] Update repo.yaml --- ansible/repo.yaml | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 0bf4d20017..fa789420c1 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -35,25 +35,16 @@ - name: Set gcloud account shell: gcloud config set account inno-test-sa@goldengate-1.iam.gserviceaccount.com - - name: Debug environment variables - ansible.builtin.debug: - var: item - with_items: - - GOOGLE_APPLICATION_CREDENTIALS - - GOOGLE_PROJECT - - - name: Install the gcloud cli - service_account_file: "{{ lookup('env', 'GOOGLE_APPLICATION_CREDENTIALS') }}" - project_id: "{{ lookup('env', 'GOOGLE_PROJECT') }}" - export_default_credentials: true + - name: Authenticate Docker with gcloud + shell: gcloud auth configure-docker us-central1-docker.pkg.dev - name: Build and push the docker image shell: | - gcloud auth configure-docker us-central1-docker.pkg.dev docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest . docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest environment: - GOOGLE_PROJECT: "{{ lookup('env', 'GOOGLE_PROJECT') }}" + GOOGLE_APPLICATION_CREDENTIALS: $GOOGLE_APPLICATION_CREDENTIALS + GOOGLE_PROJECT: $GOOGLE_PROJECT args: chdir: /home/ubuntu/actions-runner/Testproject-INNO @@ -64,6 +55,6 @@ kubectl apply -f deployment.yaml kubectl apply -f service.yaml environment: - GOOGLE_PROJECT: "{{ lookup('env', 'GOOGLE_PROJECT') }}" + GOOGLE_PROJECT: $GOOGLE_PROJECT args: chdir: /home/ubuntu/actions-runner/Testproject-INNO From a966bb8287c561f6a78622e964c105ac3135f3ef Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 16 Feb 2024 11:58:40 +0530 Subject: [PATCH 429/664] Update repo.yaml --- ansible/repo.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index fa789420c1..529c8ca638 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -1,7 +1,9 @@ --- +--- - name: Run Node.js CI workflow hosts: localhost gather_facts: false + become: yes tasks: - name: Checkout repository @@ -11,6 +13,9 @@ version: main register: checkout + # Remaining tasks... + + - name: Use Node.js 14.x shell: | curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash - From dc7d5e2e659dab28ae731d469cd038f7e1ad3c5c Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 16 Feb 2024 11:59:47 +0530 Subject: [PATCH 430/664] Update repo.yaml --- ansible/repo.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 529c8ca638..271a75b013 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -1,5 +1,4 @@ --- ---- - name: Run Node.js CI workflow hosts: localhost gather_facts: false From db4402c686aebd2497fcc5263a961032790a4a50 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 16 Feb 2024 12:07:40 +0530 Subject: [PATCH 431/664] Update repo.yaml --- ansible/repo.yaml | 38 +++++++++++++++----------------------- 1 file changed, 15 insertions(+), 23 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 271a75b013..0a1b1571c1 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -5,6 +5,20 @@ become: yes tasks: + - name: Ensure git is installed + become: true + apt: + name: git + state: present + + - name: Ensure Docker dependencies are installed + become: true + apt: + name: "{{ item }}" + state: present + loop: + - containerd + - docker.io - name: Checkout repository ansible.builtin.git: repo: "https://github.com/mnagaraju5628/Testproject-INNO.git" @@ -12,29 +26,7 @@ version: main register: checkout - # Remaining tasks... - - - - name: Use Node.js 14.x - shell: | - curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash - - sudo apt-get install -y nodejs - sudo npm install -g npm@latest - - - name: Install dependencies - shell: npm ci - args: - chdir: /home/ubuntu/actions-runner/Testproject-INNO - - - name: Run build script if present - shell: npm run build --if-present - args: - chdir: /home/ubuntu/actions-runner/Testproject-INNO - - - name: Install npm packages - shell: npm install - args: - chdir: /home/ubuntu/actions-runner/Testproject-INNO + # Remaining tasks.. - name: Set gcloud account shell: gcloud config set account inno-test-sa@goldengate-1.iam.gserviceaccount.com From b42c2d50700c962d1f7211c36249f63f264be7a0 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 16 Feb 2024 12:10:39 +0530 Subject: [PATCH 432/664] Update repo.yaml --- ansible/repo.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 0a1b1571c1..254f21a226 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -19,6 +19,7 @@ loop: - containerd - docker.io + - name: Checkout repository ansible.builtin.git: repo: "https://github.com/mnagaraju5628/Testproject-INNO.git" @@ -38,9 +39,6 @@ shell: | docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest . docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - environment: - GOOGLE_APPLICATION_CREDENTIALS: $GOOGLE_APPLICATION_CREDENTIALS - GOOGLE_PROJECT: $GOOGLE_PROJECT args: chdir: /home/ubuntu/actions-runner/Testproject-INNO From 86116a47e950a0999b36b3f67d35f077b6a49ff7 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 19 Feb 2024 11:13:41 +0530 Subject: [PATCH 433/664] Update repo.yaml --- ansible/repo.yaml | 96 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 68 insertions(+), 28 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 254f21a226..bb72d24c21 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -1,54 +1,94 @@ ---- -- name: Run Node.js CI workflow + +- name: Git Checkout, Docker Install, Build Image, Push to Artifact Registry, and Deploy to GKE + hosts: localhost - gather_facts: false - become: yes + gather_facts: false + tasks: + - name: Ensure git is installed + become: true + apt: + name: git - state: present + state: present + - name: Ensure Docker dependencies are installed + become: true + apt: + name: "{{ item }}" + state: present + loop: + - containerd + - docker.io + + - name: Clone Node.js code from GitHub + + git: + + repo: https://github.com/mnagaraju5628/Testproject-INNO.git - - name: Checkout repository - ansible.builtin.git: - repo: "https://github.com/mnagaraju5628/Testproject-INNO.git" dest: /home/ubuntu/actions-runner/Testproject-INNO - version: main - register: checkout - # Remaining tasks.. + version: main # replace 'main' with your branch name if different - - name: Set gcloud account - shell: gcloud config set account inno-test-sa@goldengate-1.iam.gserviceaccount.com + become: true + + - name: Build Docker image - - name: Authenticate Docker with gcloud - shell: gcloud auth configure-docker us-central1-docker.pkg.dev + command: docker build -t node . - - name: Build and push the docker image - shell: | - docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest . - docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest args: + chdir: /home/ubuntu/actions-runner/Testproject-INNO + + - name: Push Docker image to Google Artifact Registry + + command: > + + docker tag node us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - - name: Deploy to GKE - shell: | - gcloud container clusters get-credentials innotest-cluster --region us-central1-c - kubectl rollout restart deployment nodeapp-deployment - kubectl apply -f deployment.yaml - kubectl apply -f service.yaml environment: - GOOGLE_PROJECT: $GOOGLE_PROJECT - args: - chdir: /home/ubuntu/actions-runner/Testproject-INNO + + DOCKER_CLI_EXPERIMENTAL: enabled + + - name: Push Docker image to Google Artifact Registry + + command: > + + docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + + - name: Set project and zone for GKE + + shell: gcloud config set project goldengate-1 && gcloud config set compute/zone us-central1-c + + become: true + + - name: Get credentials for the GKE cluster + + shell: gcloud container clusters get-credentials innotest-cluster --region us-central1-c + + become: true + + - name: Deploy Docker image to GKE + + command: kubectl apply -f deployment.yaml + + become: true + + - name: Deploy Docker image to GKE + + command: kubectl apply -f service.yaml + + become: true From 05858f5f3be8d02e0211e3caf1f4fea884657f2f Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 19 Feb 2024 11:23:35 +0530 Subject: [PATCH 434/664] Update repo.yaml --- ansible/repo.yaml | 44 +++----------------------------------------- 1 file changed, 3 insertions(+), 41 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index bb72d24c21..9a27231328 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -1,94 +1,56 @@ - - name: Git Checkout, Docker Install, Build Image, Push to Artifact Registry, and Deploy to GKE - hosts: localhost - gather_facts: false - tasks: - - name: Ensure git is installed - become: true - apt: - name: git - state: present - name: Ensure Docker dependencies are installed - become: true - apt: - name: "{{ item }}" - state: present - loop: - - containerd - - docker.io - name: Clone Node.js code from GitHub - git: - repo: https://github.com/mnagaraju5628/Testproject-INNO.git - dest: /home/ubuntu/actions-runner/Testproject-INNO - version: main # replace 'main' with your branch name if different - become: true - name: Build Docker image - command: docker build -t node . - args: - chdir: /home/ubuntu/actions-runner/Testproject-INNO - name: Push Docker image to Google Artifact Registry - command: > - docker tag node us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - environment: - DOCKER_CLI_EXPERIMENTAL: enabled - - - name: Push Docker image to Google Artifact Registry + - name: Push Docker image to Google Artifact Registry command: > - docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - - - name: Set project and zone for GKE + - name: Set project and zone for GKE shell: gcloud config set project goldengate-1 && gcloud config set compute/zone us-central1-c - become: true - name: Get credentials for the GKE cluster - - shell: gcloud container clusters get-credentials innotest-cluster --region us-central1-c - + shell: gcloud container clusters get-credentials innotest-cluster --region us-central1-c become: true - name: Deploy Docker image to GKE - command: kubectl apply -f deployment.yaml - become: true - name: Deploy Docker image to GKE - command: kubectl apply -f service.yaml - become: true From 9facb84a10482f28756619449450c2ddd4c235b2 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 19 Feb 2024 11:35:06 +0530 Subject: [PATCH 435/664] Update repo.yaml --- ansible/repo.yaml | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 9a27231328..1ec64e3660 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -29,28 +29,28 @@ args: chdir: /home/ubuntu/actions-runner/Testproject-INNO - - name: Push Docker image to Google Artifact Registry - command: > - docker tag node us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - environment: - DOCKER_CLI_EXPERIMENTAL: enabled + # - name: Push Docker image to Google Artifact Registry + # command: > + # docker tag node us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + # environment: + # DOCKER_CLI_EXPERIMENTAL: enabled - - name: Push Docker image to Google Artifact Registry - command: > - docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + # - name: Push Docker image to Google Artifact Registry + # command: > + # docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - - name: Set project and zone for GKE - shell: gcloud config set project goldengate-1 && gcloud config set compute/zone us-central1-c - become: true + # - name: Set project and zone for GKE + # shell: gcloud config set project goldengate-1 && gcloud config set compute/zone us-central1-c + # become: true - - name: Get credentials for the GKE cluster - shell: gcloud container clusters get-credentials innotest-cluster --region us-central1-c - become: true + # - name: Get credentials for the GKE cluster + # shell: gcloud container clusters get-credentials innotest-cluster --region us-central1-c + # become: true - - name: Deploy Docker image to GKE - command: kubectl apply -f deployment.yaml - become: true + # - name: Deploy Docker image to GKE + # command: kubectl apply -f deployment.yaml + # become: true - - name: Deploy Docker image to GKE - command: kubectl apply -f service.yaml - become: true + # - name: Deploy Docker image to GKE + # command: kubectl apply -f service.yaml + # become: true From 2e0e2b61a7e79ad5795cf35cb788af2d5e8b5e3d Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 19 Feb 2024 11:41:34 +0530 Subject: [PATCH 436/664] Update node.js.yml --- .github/workflows/node.js.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 355daeb96b..24cd2fa67b 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -37,12 +37,13 @@ jobs: sudo apt-get update sudo apt-get install -y ansible ansible-playbook -i "localhost," -c local ansible/repo.yaml - - name: Install gcloud CLI and kubectl - run: | - curl -sSL https://sdk.cloud.google.com | bash - exec -l $SHELL - gcloud components install kubectl --quiet + # - name: Install gcloud CLI and kubectl + # run: | + # curl -sSL https://sdk.cloud.google.com | bash + # exec -l $SHELL + # gcloud components install kubectl --quiet - name: Build and Push Docker Image run: | gcloud auth configure-docker us-central1-docker.pkg.dev docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO + docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest From 388e7845107f883a8a243039f652cbddfe7a6a82 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 19 Feb 2024 13:53:42 +0530 Subject: [PATCH 437/664] Update repo.yaml --- ansible/repo.yaml | 50 ++++++++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 1ec64e3660..97f9a99974 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -1,33 +1,39 @@ -- name: Git Checkout, Docker Install, Build Image, Push to Artifact Registry, and Deploy to GKE +--- +- name: Build and Deploy hosts: localhost gather_facts: false + tasks: - - name: Ensure git is installed - become: true - apt: - name: git - state: present - - - name: Ensure Docker dependencies are installed - become: true - apt: - name: "{{ item }}" - state: present - loop: - - containerd - - docker.io - - - name: Clone Node.js code from GitHub + - name: Checkout code git: - repo: https://github.com/mnagaraju5628/Testproject-INNO.git + repo: https://github.com/yourusername/yourrepository.git dest: /home/ubuntu/actions-runner/Testproject-INNO - version: main # replace 'main' with your branch name if different + version: main become: true - - - name: Build Docker image - command: docker build -t node . + + - name: Set up Node.js + ansible.builtin.shell: | + curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash - + sudo apt-get install -y nodejs + become: true + + - name: Install dependencies and build + ansible.builtin.command: npm ci && npm run build --if-present && npm install args: chdir: /home/ubuntu/actions-runner/Testproject-INNO + + - name: Setup Docker authentication + ansible.builtin.command: gcloud auth configure-docker us-central1-docker.pkg.dev + become: true + + - name: Build Docker Image + ansible.builtin.command: docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO + become: true + + - name: Push Docker Image + ansible.builtin.command: docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + become: true + # - name: Push Docker image to Google Artifact Registry # command: > From 94bfc7d90413fd81f96d01c1642ee99ad6f307e3 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 19 Feb 2024 13:55:09 +0530 Subject: [PATCH 438/664] Update repo.yaml --- ansible/repo.yaml | 39 +++++++++------------------------------ 1 file changed, 9 insertions(+), 30 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 97f9a99974..7257e475d5 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -12,9 +12,15 @@ become: true - name: Set up Node.js - ansible.builtin.shell: | - curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash - - sudo apt-get install -y nodejs + ansible.builtin.apt: + name: nodejs + update_cache: yes + become: true + + - name: Install npm + ansible.builtin.apt: + name: npm + update_cache: yes become: true - name: Install dependencies and build @@ -33,30 +39,3 @@ - name: Push Docker Image ansible.builtin.command: docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest become: true - - - # - name: Push Docker image to Google Artifact Registry - # command: > - # docker tag node us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - # environment: - # DOCKER_CLI_EXPERIMENTAL: enabled - - # - name: Push Docker image to Google Artifact Registry - # command: > - # docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - - # - name: Set project and zone for GKE - # shell: gcloud config set project goldengate-1 && gcloud config set compute/zone us-central1-c - # become: true - - # - name: Get credentials for the GKE cluster - # shell: gcloud container clusters get-credentials innotest-cluster --region us-central1-c - # become: true - - # - name: Deploy Docker image to GKE - # command: kubectl apply -f deployment.yaml - # become: true - - # - name: Deploy Docker image to GKE - # command: kubectl apply -f service.yaml - # become: true From 6d58cf03cd115be5c23904135e0af8eb7d0334f2 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 19 Feb 2024 13:56:42 +0530 Subject: [PATCH 439/664] Update repo.yaml --- ansible/repo.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 7257e475d5..f7f7504908 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -24,9 +24,10 @@ become: true - name: Install dependencies and build - ansible.builtin.command: npm ci && npm run build --if-present && npm install - args: + ansible.builtin.shell: + cmd: npm ci && npm run build --if-present && npm install chdir: /home/ubuntu/actions-runner/Testproject-INNO + become: true - name: Setup Docker authentication ansible.builtin.command: gcloud auth configure-docker us-central1-docker.pkg.dev From 693aaf8f0dc157ec162b02bce5f7faeaac68badb Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 19 Feb 2024 13:58:09 +0530 Subject: [PATCH 440/664] Update repo.yaml --- ansible/repo.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index f7f7504908..c4f9feed7b 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -31,12 +31,9 @@ - name: Setup Docker authentication ansible.builtin.command: gcloud auth configure-docker us-central1-docker.pkg.dev - become: true - name: Build Docker Image ansible.builtin.command: docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO - become: true - name: Push Docker Image ansible.builtin.command: docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - become: true From 876181779f38fda2ff2ab9db9a169b4900e04194 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 19 Feb 2024 13:59:26 +0530 Subject: [PATCH 441/664] Update repo.yaml --- ansible/repo.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index c4f9feed7b..d832f1098f 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -30,10 +30,14 @@ become: true - name: Setup Docker authentication - ansible.builtin.command: gcloud auth configure-docker us-central1-docker.pkg.dev + ansible.builtin.shell: + cmd: gcloud auth configure-docker us-central1-docker.pkg.dev + become: true - name: Build Docker Image ansible.builtin.command: docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO + become: true - name: Push Docker Image ansible.builtin.command: docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + become: true From a5d051f71db8533bdebb967e0ef31a81bb86f7fd Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 19 Feb 2024 14:00:53 +0530 Subject: [PATCH 442/664] Update repo.yaml --- ansible/repo.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index d832f1098f..1c56eca241 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -35,7 +35,9 @@ become: true - name: Build Docker Image - ansible.builtin.command: docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO + ansible.builtin.command: docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest . + args: + chdir: /home/ubuntu/actions-runner/Testproject-INNO become: true - name: Push Docker Image From 3e527879f5ad71092ddd231ae7616edd2cfd234d Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 19 Feb 2024 14:03:04 +0530 Subject: [PATCH 443/664] Update repo.yaml From cfc979b03148089778da9bbd14ee61c2c4d77bec Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 19 Feb 2024 14:04:51 +0530 Subject: [PATCH 444/664] Update repo.yaml --- ansible/repo.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 1c56eca241..6196b7dcc5 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -38,7 +38,6 @@ ansible.builtin.command: docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest . args: chdir: /home/ubuntu/actions-runner/Testproject-INNO - become: true - name: Push Docker Image ansible.builtin.command: docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest From 48168d01de7b9630d741f46a52c67b050a514a22 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 19 Feb 2024 14:06:48 +0530 Subject: [PATCH 445/664] Update repo.yaml --- ansible/repo.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 6196b7dcc5..9386bde057 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -36,8 +36,7 @@ - name: Build Docker Image ansible.builtin.command: docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest . - args: - chdir: /home/ubuntu/actions-runner/Testproject-INNO + become: true - name: Push Docker Image ansible.builtin.command: docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest From 350e4dedb21f21a64bcfb93027432b8843bb6012 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 19 Feb 2024 14:09:55 +0530 Subject: [PATCH 446/664] Update repo.yaml --- ansible/repo.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 9386bde057..f5e290855b 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -36,8 +36,7 @@ - name: Build Docker Image ansible.builtin.command: docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest . - become: true - + - name: Push Docker Image ansible.builtin.command: docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest become: true From 2f36a60232c8909ad8548fbbf4d6a105b3dc9597 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 19 Feb 2024 14:14:09 +0530 Subject: [PATCH 447/664] Update repo.yaml --- ansible/repo.yaml | 51 ++++++++++++++++++++--------------------------- 1 file changed, 22 insertions(+), 29 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index f5e290855b..020fff5c36 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -1,42 +1,35 @@ ---- -- name: Build and Deploy +- name: Git Checkout, Docker Install, Build Image, and Push to Artifact Registry hosts: localhost gather_facts: false tasks: - - name: Checkout code - git: - repo: https://github.com/yourusername/yourrepository.git - dest: /home/ubuntu/actions-runner/Testproject-INNO - version: main - become: true - - - name: Set up Node.js - ansible.builtin.apt: - name: nodejs - update_cache: yes + - name: Ensure git is installed become: true + apt: + name: git + state: present - - name: Install npm - ansible.builtin.apt: - name: npm - update_cache: yes + - name: Ensure Docker dependencies are installed become: true + apt: + name: "{{ item }}" + state: present + loop: + - containerd + - docker.io - - name: Install dependencies and build - ansible.builtin.shell: - cmd: npm ci && npm run build --if-present && npm install - chdir: /home/ubuntu/actions-runner/Testproject-INNO + - name: Clone Node.js code from GitHub + git: + repo: https://github.com/mnagaraju5628/Testproject-INNO.git + dest: /home/ubuntu/actions-runner/Testproject-INNO + version: main # replace 'main' with your branch name if different become: true - - name: Setup Docker authentication - ansible.builtin.shell: - cmd: gcloud auth configure-docker us-central1-docker.pkg.dev + # Additional tasks for building Docker image and pushing it to Artifact Registry + - name: Build Docker image + command: "docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO" become: true - - name: Build Docker Image - ansible.builtin.command: docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest . - - - name: Push Docker Image - ansible.builtin.command: docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + - name: Push Docker image to artifact registry + command: "docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest" become: true From 08002a5755ec2c3e1a564d4e9001554e19140137 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 19 Feb 2024 14:17:47 +0530 Subject: [PATCH 448/664] Update repo.yaml --- ansible/repo.yaml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 020fff5c36..3ab81f3f81 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -1,3 +1,4 @@ +--- - name: Git Checkout, Docker Install, Build Image, and Push to Artifact Registry hosts: localhost gather_facts: false @@ -22,10 +23,18 @@ git: repo: https://github.com/mnagaraju5628/Testproject-INNO.git dest: /home/ubuntu/actions-runner/Testproject-INNO - version: main # replace 'main' with your branch name if different + version: main become: true - # Additional tasks for building Docker image and pushing it to Artifact Registry + - name: Authenticate with gcloud + command: "gcloud auth login" + become: true + + - name: Activate service account if necessary + command: "gcloud auth activate-service-account inno-test-sa@goldengate-1.iam.gserviceaccount.com" + become: true + # Replace ACCOUNT with the service account email + - name: Build Docker image command: "docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO" become: true From 465ecb1043fa1259a9e2fe4cd9ef20da176b0099 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 19 Feb 2024 14:20:20 +0530 Subject: [PATCH 449/664] Update repo.yaml --- ansible/repo.yaml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 3ab81f3f81..181283313c 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -26,14 +26,17 @@ version: main become: true - - name: Authenticate with gcloud - command: "gcloud auth login" + - name: Set up gcloud CLI become: true + command: "curl -sSL https://sdk.cloud.google.com | bash" + environment: + CLOUDSDK_CORE_DISABLE_PROMPTS: "1" - - name: Activate service account if necessary - command: "gcloud auth activate-service-account inno-test-sa@goldengate-1.iam.gserviceaccount.com" + - name: Authenticate with service account key become: true - # Replace ACCOUNT with the service account email + command: "gcloud auth activate-service-account --key-file=/home/ubuntu/actions-runner/Testproject-INNO-cred.json" + environment: + CLOUDSDK_CORE_DISABLE_PROMPTS: "1" - name: Build Docker image command: "docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO" From 827e1dd579b5515c2146855d325958f700f31d1d Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 19 Feb 2024 14:22:35 +0530 Subject: [PATCH 450/664] Update repo.yaml --- ansible/repo.yaml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 181283313c..3cf053e8f1 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -26,11 +26,18 @@ version: main become: true - - name: Set up gcloud CLI + - name: Download gcloud CLI install script + get_url: + url: https://dl.google.com/dl/cloudsdk/channels/rapid/install_google_cloud_sdk.bash + dest: /tmp/install_google_cloud_sdk.bash + mode: u+x become: true - command: "curl -sSL https://sdk.cloud.google.com | bash" - environment: - CLOUDSDK_CORE_DISABLE_PROMPTS: "1" + + - name: Run gcloud CLI install script + command: "/tmp/install_google_cloud_sdk.bash" + become: true + args: + creates: /usr/bin/gcloud # Skip if already installed - name: Authenticate with service account key become: true From 7013a0f1678968677e72064604c787adb9540eb6 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 19 Feb 2024 14:24:44 +0530 Subject: [PATCH 451/664] Update repo.yaml --- ansible/repo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 3cf053e8f1..b9de8034c8 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -41,7 +41,7 @@ - name: Authenticate with service account key become: true - command: "gcloud auth activate-service-account --key-file=/home/ubuntu/actions-runner/Testproject-INNO-cred.json" + command: "gcloud auth activate-service-account inno-test-sa@goldengate-1.iam.gserviceaccount.com --key-file=cred.json" environment: CLOUDSDK_CORE_DISABLE_PROMPTS: "1" From d00b64400b9c9ed68fc0bc1436e3a4da9d7ede5d Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 19 Feb 2024 14:27:23 +0530 Subject: [PATCH 452/664] Update repo.yaml --- ansible/repo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index b9de8034c8..aa18cc98a6 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -41,7 +41,7 @@ - name: Authenticate with service account key become: true - command: "gcloud auth activate-service-account inno-test-sa@goldengate-1.iam.gserviceaccount.com --key-file=cred.json" + command: "gcloud auth activate-service-account inno-test-sa@goldengate-1.iam.gserviceaccount.com --key-file=/home/ubuntu/actions-runner/Testproject-INNO/cred.json" environment: CLOUDSDK_CORE_DISABLE_PROMPTS: "1" From 263a1e1774e72f9958999fb6cbd257959f68d92c Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 19 Feb 2024 14:30:05 +0530 Subject: [PATCH 453/664] Update node.js.yml --- .github/workflows/node.js.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 24cd2fa67b..e6c5e076ba 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -42,8 +42,8 @@ jobs: # curl -sSL https://sdk.cloud.google.com | bash # exec -l $SHELL # gcloud components install kubectl --quiet - - name: Build and Push Docker Image - run: | - gcloud auth configure-docker us-central1-docker.pkg.dev - docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO - docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + # - name: Build and Push Docker Image + # run: | + # gcloud auth configure-docker us-central1-docker.pkg.dev + # docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO + # docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest From b68c65f63ce4941e65d732f495fd7bfe203988b7 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 19 Feb 2024 14:35:57 +0530 Subject: [PATCH 454/664] Update repo.yaml --- ansible/repo.yaml | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index aa18cc98a6..768328077f 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -26,24 +26,24 @@ version: main become: true - - name: Download gcloud CLI install script - get_url: - url: https://dl.google.com/dl/cloudsdk/channels/rapid/install_google_cloud_sdk.bash - dest: /tmp/install_google_cloud_sdk.bash - mode: u+x - become: true - - - name: Run gcloud CLI install script - command: "/tmp/install_google_cloud_sdk.bash" - become: true - args: - creates: /usr/bin/gcloud # Skip if already installed - - - name: Authenticate with service account key - become: true - command: "gcloud auth activate-service-account inno-test-sa@goldengate-1.iam.gserviceaccount.com --key-file=/home/ubuntu/actions-runner/Testproject-INNO/cred.json" - environment: - CLOUDSDK_CORE_DISABLE_PROMPTS: "1" + # - name: Download gcloud CLI install script + # get_url: + # url: https://dl.google.com/dl/cloudsdk/channels/rapid/install_google_cloud_sdk.bash + # dest: /tmp/install_google_cloud_sdk.bash + # mode: u+x + # become: true + + # - name: Run gcloud CLI install script + # command: "/tmp/install_google_cloud_sdk.bash" + # become: true + # args: + # creates: /usr/bin/gcloud # Skip if already installed + + # - name: Authenticate with service account key + # become: true + # command: "gcloud auth activate-service-account inno-test-sa@goldengate-1.iam.gserviceaccount.com --key-file=/home/ubuntu/actions-runner/Testproject-INNO/cred.json" + # environment: + # CLOUDSDK_CORE_DISABLE_PROMPTS: "1" - name: Build Docker image command: "docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO" From cb90aeb290e2456e357be01f28771c2f0a55de93 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 19 Feb 2024 14:39:35 +0530 Subject: [PATCH 455/664] Update repo.yaml From 349f4fe437207368079fb36843970ac346694136 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 19 Feb 2024 14:45:59 +0530 Subject: [PATCH 456/664] Update repo.yaml --- ansible/repo.yaml | 42 +++++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 768328077f..8f8d05bdc9 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -1,5 +1,5 @@ --- -- name: Git Checkout, Docker Install, Build Image, and Push to Artifact Registry +- name: Git Checkout, Docker Install, Build Image, Push to Artifact Registry, and Deploy to GKE hosts: localhost gather_facts: false @@ -26,24 +26,24 @@ version: main become: true - # - name: Download gcloud CLI install script - # get_url: - # url: https://dl.google.com/dl/cloudsdk/channels/rapid/install_google_cloud_sdk.bash - # dest: /tmp/install_google_cloud_sdk.bash - # mode: u+x - # become: true + - name: Download gcloud CLI install script + get_url: + url: https://dl.google.com/dl/cloudsdk/channels/rapid/install_google_cloud_sdk.bash + dest: /tmp/install_google_cloud_sdk.bash + mode: u+x + become: true - # - name: Run gcloud CLI install script - # command: "/tmp/install_google_cloud_sdk.bash" - # become: true - # args: - # creates: /usr/bin/gcloud # Skip if already installed + - name: Run gcloud CLI install script + command: "/tmp/install_google_cloud_sdk.bash" + become: true + args: + creates: /usr/bin/gcloud # Skip if already installed - # - name: Authenticate with service account key - # become: true - # command: "gcloud auth activate-service-account inno-test-sa@goldengate-1.iam.gserviceaccount.com --key-file=/home/ubuntu/actions-runner/Testproject-INNO/cred.json" - # environment: - # CLOUDSDK_CORE_DISABLE_PROMPTS: "1" + - name: Authenticate with service account key + become: true + command: "gcloud auth activate-service-account inno-test-sa@goldengate-1.iam.gserviceaccount.com --key-file=/home/ubuntu/actions-runner/Testproject-INNO/cred.json" + environment: + CLOUDSDK_CORE_DISABLE_PROMPTS: "1" - name: Build Docker image command: "docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO" @@ -52,3 +52,11 @@ - name: Push Docker image to artifact registry command: "docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest" become: true + + - name: Deploy to GKE + become: true + shell: | + gcloud container clusters get-credentials innotest-cluster --region us-central1-c + kubectl rollout restart deployment nodeapp-deployment + kubectl apply -f deployment.yaml + kubectl apply -f service.yaml From b98ff76bac23f6f1d6ca5c3c4560cb95dd5374d3 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 19 Feb 2024 14:51:20 +0530 Subject: [PATCH 457/664] Update repo.yaml --- ansible/repo.yaml | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/ansible/repo.yaml b/ansible/repo.yaml index 8f8d05bdc9..c18ce6cf90 100644 --- a/ansible/repo.yaml +++ b/ansible/repo.yaml @@ -25,26 +25,7 @@ dest: /home/ubuntu/actions-runner/Testproject-INNO version: main become: true - - - name: Download gcloud CLI install script - get_url: - url: https://dl.google.com/dl/cloudsdk/channels/rapid/install_google_cloud_sdk.bash - dest: /tmp/install_google_cloud_sdk.bash - mode: u+x - become: true - - - name: Run gcloud CLI install script - command: "/tmp/install_google_cloud_sdk.bash" - become: true - args: - creates: /usr/bin/gcloud # Skip if already installed - - - name: Authenticate with service account key - become: true - command: "gcloud auth activate-service-account inno-test-sa@goldengate-1.iam.gserviceaccount.com --key-file=/home/ubuntu/actions-runner/Testproject-INNO/cred.json" - environment: - CLOUDSDK_CORE_DISABLE_PROMPTS: "1" - + - name: Build Docker image command: "docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO" become: true @@ -56,6 +37,7 @@ - name: Deploy to GKE become: true shell: | + cd /home/ubuntu/actions-runner/Testproject-INNO/ gcloud container clusters get-credentials innotest-cluster --region us-central1-c kubectl rollout restart deployment nodeapp-deployment kubectl apply -f deployment.yaml From d96ec75b842a5e0e54d3972404bca637344a649a Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 19 Feb 2024 14:57:16 +0530 Subject: [PATCH 458/664] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index fa390e92c8..8583dd1059 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ var express = require('express'); var app = express(); app.get('/', function (req, res) { - res.send('{ "response": "Welcome to INNODATA" }'); + res.send('{ "response": "Welcome to Node application via ansible" }'); }); app.get('/will', function (req, res) { From 3f3f9c48830a17b831beeb93df90cea8f7c64b53 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 19 Feb 2024 15:48:00 +0530 Subject: [PATCH 459/664] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 8583dd1059..b050d0d070 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ var express = require('express'); var app = express(); app.get('/', function (req, res) { - res.send('{ "response": "Welcome to Node application via ansible" }'); + res.send('{ "response": "Welcome to Node application" }'); }); app.get('/will', function (req, res) { From 25f1c71ca1e8b86567bc014d412155627808cacd Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 19 Feb 2024 15:52:39 +0530 Subject: [PATCH 460/664] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index b050d0d070..fa390e92c8 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ var express = require('express'); var app = express(); app.get('/', function (req, res) { - res.send('{ "response": "Welcome to Node application" }'); + res.send('{ "response": "Welcome to INNODATA" }'); }); app.get('/will', function (req, res) { From ec4e4c7a30f8e0790b7d82623765f8bc5837c1a0 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 19 Feb 2024 16:01:46 +0530 Subject: [PATCH 461/664] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index fa390e92c8..e6a19a6ac0 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ var express = require('express'); var app = express(); app.get('/', function (req, res) { - res.send('{ "response": "Welcome to INNODATA" }'); + res.send('{ "response": "Welcome to Innodata india pvt.ltd" }'); }); app.get('/will', function (req, res) { From b675c48cf4f5261b810688fb26bf76bbc5188f25 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 19 Feb 2024 16:07:22 +0530 Subject: [PATCH 462/664] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index e6a19a6ac0..5b4e6a50a3 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,7 @@ var express = require('express'); var app = express(); app.get('/', function (req, res) { - res.send('{ "response": "Welcome to Innodata india pvt.ltd" }'); + res.send('{ "response": "Welcome to Github-action CI/CD via ansible " }'); }); app.get('/will', function (req, res) { From b1af08386bde21f4c073c3d54cac16455a38bd77 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 21 Feb 2024 11:43:44 +0530 Subject: [PATCH 463/664] Update node.js.yml --- .github/workflows/node.js.yml | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index e6c5e076ba..69ddaa14dc 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -32,18 +32,24 @@ jobs: npm ci npm run build --if-present npm install - - name: Setup Ansible and Run Ansible playbook + - name: Checkout code + uses: actions/checkout@v2 + with: + path: /home/ubuntu/actions-runner/Testproject-INNO + + - name: Set up Google Cloud SDK + uses: google-github-actions/setup-gcloud@main + with: + version: 'latest' + + - name: Configure Docker with gcloud credentials + run: | + gcloud auth configure-docker + + - name: Build Docker image + run: | + docker build -t gcr.io/${{ secrets.GCP_PROJECT_ID }}/node:latest /home/ubuntu/actions-runner/Testproject-INNO + + - name: Push Docker image to GCR run: | - sudo apt-get update - sudo apt-get install -y ansible - ansible-playbook -i "localhost," -c local ansible/repo.yaml - # - name: Install gcloud CLI and kubectl - # run: | - # curl -sSL https://sdk.cloud.google.com | bash - # exec -l $SHELL - # gcloud components install kubectl --quiet - # - name: Build and Push Docker Image - # run: | - # gcloud auth configure-docker us-central1-docker.pkg.dev - # docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest /home/ubuntu/actions-runner/Testproject-INNO - # docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + docker push gcr.io/${{ secrets.GCP_PROJECT_ID }}/node:latest From 03d8c95ff034f332ce5e5a8432cf598d9d1819bb Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 21 Feb 2024 11:44:51 +0530 Subject: [PATCH 464/664] Update node.js.yml --- .github/workflows/node.js.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 69ddaa14dc..4a0e69f280 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -32,11 +32,7 @@ jobs: npm ci npm run build --if-present npm install - - name: Checkout code - uses: actions/checkout@v2 - with: - path: /home/ubuntu/actions-runner/Testproject-INNO - + - name: Set up Google Cloud SDK uses: google-github-actions/setup-gcloud@main with: From be464db92a7df46086a5bdc0d7c1fd98a52cb9e2 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 21 Feb 2024 11:48:50 +0530 Subject: [PATCH 465/664] Update node.js.yml --- .github/workflows/node.js.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 4a0e69f280..1bcea7d7c7 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -34,18 +34,16 @@ jobs: npm install - name: Set up Google Cloud SDK - uses: google-github-actions/setup-gcloud@main + uses: google-github-actions/setup-gcloud@v0.2.0 with: version: 'latest' - name: Configure Docker with gcloud credentials run: | gcloud auth configure-docker - - name: Build Docker image run: | - docker build -t gcr.io/${{ secrets.GCP_PROJECT_ID }}/node:latest /home/ubuntu/actions-runner/Testproject-INNO - + docker build -t gcr.io/goldengate-1/node:latest /home/ubuntu/actions-runner/Testproject-INNO - name: Push Docker image to GCR run: | - docker push gcr.io/${{ secrets.GCP_PROJECT_ID }}/node:latest + docker push gcr.io/goldengate-1/node:latest From b2ee57b7f8cc245bc8aa735998248649bfdc84f6 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 21 Feb 2024 11:52:14 +0530 Subject: [PATCH 466/664] Update node.js.yml From 3a8b73d0c85a1f0018df125340d4387955326d77 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 21 Feb 2024 11:56:03 +0530 Subject: [PATCH 467/664] Update node.js.yml From d009f4c1c931ea8d2bfa19b20505dc84bec794f3 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 21 Feb 2024 12:05:49 +0530 Subject: [PATCH 468/664] Update node.js.yml --- .github/workflows/node.js.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 1bcea7d7c7..fef9589423 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -32,18 +32,20 @@ jobs: npm ci npm run build --if-present npm install - + - name: Set up Google Cloud SDK uses: google-github-actions/setup-gcloud@v0.2.0 with: version: 'latest' - - name: Configure Docker with gcloud credentials + - name: Authenticate with Google Cloud run: | - gcloud auth configure-docker + gcloud auth activate-service-account inno-test-sa@goldengate-1.iam.gserviceaccount.com --key-file=/home/ubuntu/actions-runner/Testproject-INNO/cred.json + - name: Build Docker image run: | docker build -t gcr.io/goldengate-1/node:latest /home/ubuntu/actions-runner/Testproject-INNO + - name: Push Docker image to GCR run: | docker push gcr.io/goldengate-1/node:latest From da710b93fb73cf1aa6499b5d735fb5b9de825a42 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 21 Feb 2024 12:09:45 +0530 Subject: [PATCH 469/664] Update node.js.yml From 5a9459ee39849291704f609804dcdbd466644bef Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 21 Feb 2024 12:22:20 +0530 Subject: [PATCH 470/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index fef9589423..103cda5d75 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -40,7 +40,7 @@ jobs: - name: Authenticate with Google Cloud run: | - gcloud auth activate-service-account inno-test-sa@goldengate-1.iam.gserviceaccount.com --key-file=/home/ubuntu/actions-runner/Testproject-INNO/cred.json + gcloud auth activate-service-account test-sa@goldengate-1.iam.gserviceaccount.com --key-file=/home/ubuntu/actions-runner/Testproject-INNO/cred.json - name: Build Docker image run: | From acc147ca1fa501ad0b191d9cad8799b6df6fa9e5 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 21 Feb 2024 12:33:36 +0530 Subject: [PATCH 471/664] Update node.js.yml --- .github/workflows/node.js.yml | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 103cda5d75..bff5f8de58 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -11,7 +11,7 @@ on: jobs: build: - runs-on: self-hosted + runs-on: ubuntu-latest strategy: matrix: @@ -33,19 +33,22 @@ jobs: npm run build --if-present npm install - - name: Set up Google Cloud SDK - uses: google-github-actions/setup-gcloud@v0.2.0 + + - name: Authenticate with Google Cloud + uses: google-github-actions/auth@v0.2.0 with: - version: 'latest' + credentials_json: ${{ secrets.GCP_SA_KEY }} + project_id: ${{ secrets.GCP_PROJECT_ID }} - - name: Authenticate with Google Cloud + - name: Pull Images from GCR run: | - gcloud auth activate-service-account test-sa@goldengate-1.iam.gserviceaccount.com --key-file=/home/ubuntu/actions-runner/Testproject-INNO/cred.json + gcloud auth configure-docker + docker pull gcr.io/your-project/node:latest - - name: Build Docker image + - name: Tag Images for Artifact Registry run: | - docker build -t gcr.io/goldengate-1/node:latest /home/ubuntu/actions-runner/Testproject-INNO + docker tag gcr.io/your-project/node:latest gcr.io/${{ secrets.GCP_PROJECT_ID }}/node:latest - - name: Push Docker image to GCR + - name: Push Images to Artifact Registry run: | - docker push gcr.io/goldengate-1/node:latest + docker push gcr.io/${{ secrets.GCP_PROJECT_ID }}/node:latest From 237fc735a9e9cde0778c14cdd0cd0c20b468c9e8 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 21 Feb 2024 12:39:11 +0530 Subject: [PATCH 472/664] Update node.js.yml --- .github/workflows/node.js.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index bff5f8de58..9530a58ed1 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -34,21 +34,21 @@ jobs: npm install - - name: Authenticate with Google Cloud - uses: google-github-actions/auth@v0.2.0 + - name: Set up Google Cloud SDK + uses: google-github-actions/setup-gcloud@v0.2.0 with: - credentials_json: ${{ secrets.GCP_SA_KEY }} + version: 'latest' project_id: ${{ secrets.GCP_PROJECT_ID }} + service_account_key: ${{ secrets.GCP_SA_KEY }} - - name: Pull Images from GCR + - name: Configure Docker with gcloud credentials run: | gcloud auth configure-docker - docker pull gcr.io/your-project/node:latest - - name: Tag Images for Artifact Registry + - name: Build Docker image run: | - docker tag gcr.io/your-project/node:latest gcr.io/${{ secrets.GCP_PROJECT_ID }}/node:latest + docker build -t gcr.io/${{ secrets.GCP_PROJECT_ID }}/node:latest . - - name: Push Images to Artifact Registry + - name: Push Docker image to GCR run: | docker push gcr.io/${{ secrets.GCP_PROJECT_ID }}/node:latest From f768d85e4d3befd7b0c5982b45dd1aaa2800fd8b Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 21 Feb 2024 12:53:46 +0530 Subject: [PATCH 473/664] Update node.js.yml From 7a342d61ebf32993e4e0986d7e9aa11f3c6720c4 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 21 Feb 2024 13:03:16 +0530 Subject: [PATCH 474/664] Update node.js.yml From c71a642a59e030288c0e0e2850f4c2853abb8638 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 21 Feb 2024 13:14:51 +0530 Subject: [PATCH 475/664] Update node.js.yml --- .github/workflows/node.js.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 9530a58ed1..578f3fd7a3 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -32,23 +32,22 @@ jobs: npm ci npm run build --if-present npm install - - - name: Set up Google Cloud SDK - uses: google-github-actions/setup-gcloud@v0.2.0 + - name: Authenticate with Google Cloud + uses: google-github-actions/auth@v0.2.0 with: - version: 'latest' + credentials_json: ${{ secrets.GCP_SA_KEY }} project_id: ${{ secrets.GCP_PROJECT_ID }} - service_account_key: ${{ secrets.GCP_SA_KEY }} - - name: Configure Docker with gcloud credentials + - name: Pull Images from GCR run: | gcloud auth configure-docker + docker pull gcr.io/goldengate-1/node:latest - - name: Build Docker image + - name: Tag Images for Artifact Registry run: | - docker build -t gcr.io/${{ secrets.GCP_PROJECT_ID }}/node:latest . + docker tag gcr.io/goldengate-1/node:latest gcr.io/${{ secrets.GCP_PROJECT_ID }}/node:latest - - name: Push Docker image to GCR + - name: Push Images to Artifact Registry run: | docker push gcr.io/${{ secrets.GCP_PROJECT_ID }}/node:latest From 6a1e3078c545b6ce038d040da9054d8db6ec89dc Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 21 Feb 2024 13:16:15 +0530 Subject: [PATCH 476/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 578f3fd7a3..e15787bdff 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -34,7 +34,7 @@ jobs: npm install - name: Authenticate with Google Cloud - uses: google-github-actions/auth@v0.2.0 + uses: google-github-actions/setup-gcloud@v0.2.0 with: credentials_json: ${{ secrets.GCP_SA_KEY }} project_id: ${{ secrets.GCP_PROJECT_ID }} From 5e972b7fecd68aca1a5e3ef96aa17088a4b8e986 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 21 Feb 2024 13:21:32 +0530 Subject: [PATCH 477/664] Update node.js.yml From d564b0dd82404f9da92c92dc013874afcf789f43 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 21 Feb 2024 13:35:51 +0530 Subject: [PATCH 478/664] Update node.js.yml From 5c510c23a2f1a273382c0fb42afc174808978b60 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 21 Feb 2024 13:41:46 +0530 Subject: [PATCH 479/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index e15787bdff..62bfa09ae5 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -11,7 +11,7 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: self-hosted strategy: matrix: From c54fb32d72729051fccce9e4de07536f3d5f6133 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 21 Feb 2024 14:02:34 +0530 Subject: [PATCH 480/664] Update node.js.yml --- .github/workflows/node.js.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 62bfa09ae5..139a038fd0 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -44,10 +44,10 @@ jobs: gcloud auth configure-docker docker pull gcr.io/goldengate-1/node:latest - - name: Tag Images for Artifact Registry - run: | - docker tag gcr.io/goldengate-1/node:latest gcr.io/${{ secrets.GCP_PROJECT_ID }}/node:latest + # - name: Tag Images for Artifact Registry + # run: | + # docker tag gcr.io/goldengate-1/node:latest gcr.io/${{ secrets.GCP_PROJECT_ID }}/node:latest - name: Push Images to Artifact Registry run: | - docker push gcr.io/${{ secrets.GCP_PROJECT_ID }}/node:latest + docker push us-central1-docker.pkg.dev/goldengate-1/innotest-image/node:latest From ebf3332939cf7f14fb7461e5315f0e718760ab83 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 21 Feb 2024 14:05:36 +0530 Subject: [PATCH 481/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 139a038fd0..523f8eab82 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -50,4 +50,4 @@ jobs: - name: Push Images to Artifact Registry run: | - docker push us-central1-docker.pkg.dev/goldengate-1/innotest-image/node:latest + docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest From 58876830e3e46e370330c14dc7b7ab16819d6260 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 21 Feb 2024 14:15:51 +0530 Subject: [PATCH 482/664] Update node.js.yml --- .github/workflows/node.js.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 523f8eab82..8901ad46a7 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -44,9 +44,9 @@ jobs: gcloud auth configure-docker docker pull gcr.io/goldengate-1/node:latest - # - name: Tag Images for Artifact Registry - # run: | - # docker tag gcr.io/goldengate-1/node:latest gcr.io/${{ secrets.GCP_PROJECT_ID }}/node:latest + - name: Tag Images for Artifact Registry + run: | + docker tag node us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - name: Push Images to Artifact Registry run: | From dee95c86157fdbf9e318c3b1840a20e1bccbdb32 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 26 Mar 2024 12:58:25 +0530 Subject: [PATCH 483/664] Update node.js.yml --- .github/workflows/node.js.yml | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 8901ad46a7..f6d7fad1a8 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -32,22 +32,14 @@ jobs: npm ci npm run build --if-present npm install - + - name: Authenticate with Google Cloud uses: google-github-actions/setup-gcloud@v0.2.0 with: - credentials_json: ${{ secrets.GCP_SA_KEY }} - project_id: ${{ secrets.GCP_PROJECT_ID }} - - - name: Pull Images from GCR - run: | - gcloud auth configure-docker - docker pull gcr.io/goldengate-1/node:latest - - - name: Tag Images for Artifact Registry - run: | - docker tag node us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + credentials_json: ${{ secrets.GCP_SA_KEY }} + project_id: ${{ secrets.GCP_PROJECT_ID }} - - name: Push Images to Artifact Registry + - name: Migrate single project from GCR to Artifact Registry run: | - docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + gcloud artifacts docker migrate \ + --projects=${{ secrets.GCP_PROJECT_ID }} From 63fab2f6d614448d6548494e1890532fb5f18a86 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 26 Mar 2024 13:10:51 +0530 Subject: [PATCH 484/664] Update node.js.yml From 07939f3adf69c25f598922e409937937355ebbcd Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 26 Mar 2024 13:20:04 +0530 Subject: [PATCH 485/664] Update node.js.yml --- .github/workflows/node.js.yml | 56 +++++++++++++++++++++++++++++++++-- 1 file changed, 53 insertions(+), 3 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index f6d7fad1a8..f3ae2fee35 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -39,7 +39,57 @@ jobs: credentials_json: ${{ secrets.GCP_SA_KEY }} project_id: ${{ secrets.GCP_PROJECT_ID }} - - name: Migrate single project from GCR to Artifact Registry + name: Build and Deploy + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + runs-on: self-hosted + + strategy: + matrix: + node-version: [14.x] + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + + - name: Install dependencies and build run: | - gcloud artifacts docker migrate \ - --projects=${{ secrets.GCP_PROJECT_ID }} + npm ci + npm run build --if-present + npm install + + - name: Authenticate with Google Cloud + uses: google-github-actions/setup-gcloud@v0.2.0 + with: + credentials_json: ${{ secrets.GCP_SA_KEY }} + project_id: ${{ secrets.GCP_PROJECT_ID }} + + migrate-images: + runs-on: self-hosted + + steps: + - name: Authenticate with Google Cloud + uses: google-github-actions/setup-gcloud@v0.2.0 + with: + credentials_json: ${{ secrets.GCP_SA_KEY }} + project_id: ${{ secrets.GCP_PROJECT_ID }} + + - name: Migrate images from GCR to Artifact Registry + run: | + gcloud auth configure-docker + gcloud container images list --format='value(name)' --repository="gcr.io/${{ secrets.GCP_PROJECT_ID }}" | \ + xargs -L1 -I{} gcloud container images add-tag "gcr.io/${{ secrets.GCP_PROJECT_ID }}/{}/latest" "us-central1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/testhost-gcr/{}:latest" + From da8b442613e1cbb4b5dbb0c923e602fea8e30a28 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 26 Mar 2024 13:21:04 +0530 Subject: [PATCH 486/664] Update node.js.yml --- .github/workflows/node.js.yml | 44 +---------------------------------- 1 file changed, 1 insertion(+), 43 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index f3ae2fee35..776afd510c 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -38,49 +38,7 @@ jobs: with: credentials_json: ${{ secrets.GCP_SA_KEY }} project_id: ${{ secrets.GCP_PROJECT_ID }} - - name: Build and Deploy - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - build: - runs-on: self-hosted - - strategy: - matrix: - node-version: [14.x] - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - - name: Install dependencies and build - run: | - npm ci - npm run build --if-present - npm install - - - name: Authenticate with Google Cloud - uses: google-github-actions/setup-gcloud@v0.2.0 - with: - credentials_json: ${{ secrets.GCP_SA_KEY }} - project_id: ${{ secrets.GCP_PROJECT_ID }} - - migrate-images: - runs-on: self-hosted - - steps: + - name: Authenticate with Google Cloud uses: google-github-actions/setup-gcloud@v0.2.0 with: From 1dbb2f8231d19effcf08ee804399cd4cd1b65e5d Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 26 Mar 2024 13:31:08 +0530 Subject: [PATCH 487/664] Update node.js.yml --- .github/workflows/node.js.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 776afd510c..c0e0abc255 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -38,16 +38,19 @@ jobs: with: credentials_json: ${{ secrets.GCP_SA_KEY }} project_id: ${{ secrets.GCP_PROJECT_ID }} - + + migrate-images: + runs-on: self-hosted + + steps: - name: Authenticate with Google Cloud uses: google-github-actions/setup-gcloud@v0.2.0 with: credentials_json: ${{ secrets.GCP_SA_KEY }} project_id: ${{ secrets.GCP_PROJECT_ID }} - - name: Migrate images from GCR to Artifact Registry + - name: Tag and Push images to Artifact Registry run: | gcloud auth configure-docker gcloud container images list --format='value(name)' --repository="gcr.io/${{ secrets.GCP_PROJECT_ID }}" | \ - xargs -L1 -I{} gcloud container images add-tag "gcr.io/${{ secrets.GCP_PROJECT_ID }}/{}/latest" "us-central1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/testhost-gcr/{}:latest" - + xargs -I{} gcloud container images add-tag "gcr.io/${{ secrets.GCP_PROJECT_ID }}/{}/latest" "us-central1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/testhost-gcr/{}:latest" From 0cd301f454219ed22aa6f6a4608d7e451af18ae2 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 26 Mar 2024 14:01:26 +0530 Subject: [PATCH 488/664] Update node.js.yml --- .github/workflows/node.js.yml | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index c0e0abc255..06cb0ec062 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -1,6 +1,5 @@ # This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs - name: Build and Deploy on: @@ -39,18 +38,26 @@ jobs: credentials_json: ${{ secrets.GCP_SA_KEY }} project_id: ${{ secrets.GCP_PROJECT_ID }} - migrate-images: - runs-on: self-hosted - - steps: - - name: Authenticate with Google Cloud - uses: google-github-actions/setup-gcloud@v0.2.0 - with: - credentials_json: ${{ secrets.GCP_SA_KEY }} - project_id: ${{ secrets.GCP_PROJECT_ID }} - - - name: Tag and Push images to Artifact Registry + - name: Pull, Tag, and Push Images run: | + # Define a list of image names + images=("gcr.io/goldengate-1/node:latest" "gcr.io/goldengate-1/test-jenkins:32latest") + + # Authenticate with the destination registry gcloud auth configure-docker - gcloud container images list --format='value(name)' --repository="gcr.io/${{ secrets.GCP_PROJECT_ID }}" | \ - xargs -I{} gcloud container images add-tag "gcr.io/${{ secrets.GCP_PROJECT_ID }}/{}/latest" "us-central1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/testhost-gcr/{}:latest" + + # Loop through each image in the list + for image in "${images[@]}"; do + # Pull the image + docker pull "$image" + + # Extract the image name and tag + image_name=$(echo "$image" | cut -d':' -f1) + image_tag=$(echo "$image" | cut -d':' -f2) + + # Tag the image for the destination registry + docker tag "$image_name:$image_tag" "us-central1-docker.pkg.dev/goldengate-1/testhost-gcr/$(basename "$image_name"):$image_tag" + + # Push the image to the destination registry + docker push "us-central1-docker.pkg.dev/goldengate-1/testhost-gcr/$(basename "$image_name"):$image_tag" + done From ae6145c7eca5f2f14fcacfdf539c29ffaadaf3e0 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 26 Mar 2024 14:06:38 +0530 Subject: [PATCH 489/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 06cb0ec062..cdb893eaf3 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -41,7 +41,7 @@ jobs: - name: Pull, Tag, and Push Images run: | # Define a list of image names - images=("gcr.io/goldengate-1/node:latest" "gcr.io/goldengate-1/test-jenkins:32latest") + images=("gcr.io/goldengate-1/node:latest" "gcr.io/goldengate-1/test-jenkins:32") # Authenticate with the destination registry gcloud auth configure-docker From 708828ba0ebbdc76cf23e4ef1e044cd9f09f3ae1 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 26 Mar 2024 15:18:03 +0530 Subject: [PATCH 490/664] Update node.js.yml --- .github/workflows/node.js.yml | 87 ++++++++++++++--------------------- 1 file changed, 35 insertions(+), 52 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index cdb893eaf3..d8ba85fa91 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -1,63 +1,46 @@ # This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs -name: Build and Deploy +name: Migrate All Images to Artifact Registry on: push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] + branches: + - main # Adjust branch name as needed jobs: - build: + migrate: runs-on: self-hosted - strategy: - matrix: - node-version: [14.x] - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - - name: Install dependencies and build - run: | - npm ci - npm run build --if-present - npm install - - - name: Authenticate with Google Cloud - uses: google-github-actions/setup-gcloud@v0.2.0 - with: - credentials_json: ${{ secrets.GCP_SA_KEY }} - project_id: ${{ secrets.GCP_PROJECT_ID }} - - - name: Pull, Tag, and Push Images - run: | - # Define a list of image names - images=("gcr.io/goldengate-1/node:latest" "gcr.io/goldengate-1/test-jenkins:32") - - # Authenticate with the destination registry - gcloud auth configure-docker - - # Loop through each image in the list - for image in "${images[@]}"; do - # Pull the image - docker pull "$image" - - # Extract the image name and tag - image_name=$(echo "$image" | cut -d':' -f1) - image_tag=$(echo "$image" | cut -d':' -f2) - - # Tag the image for the destination registry - docker tag "$image_name:$image_tag" "us-central1-docker.pkg.dev/goldengate-1/testhost-gcr/$(basename "$image_name"):$image_tag" + # Step 1: Authenticate with GCR + - name: Configure Docker CLI for GCR + uses: google-github-actions/setup-gcloud@v0.2.0 + with: + docker-config: gcr + project-id: ${{ secrets.GCR_PROJECT_ID }} + service-account-key: ${{ secrets.GCR_SA_KEY }} + + # Step 2: Authenticate with Artifact Registry + - name: Configure Docker CLI for Artifact Registry + uses: google-github-actions/setup-gcloud@v0.2.0 + with: + docker-config: artifact + project-id: ${{ secrets.ARTIFACT_PROJECT_ID }} + service-account-key: ${{ secrets.ARTIFACT_SA_KEY }} + + # Step 3: List images from GCR + - name: List images from GCR + id: list_images + run: | + echo "::set-output name=images::$(gcloud container images list --format='value(name)')" + + # Step 4: Migrate each image to Artifact Registry + - name: Migrate images to Artifact Registry + run: | + images=(${{ steps.list_images.outputs.images }}) + for image in "${images[@]}"; do + docker pull "gcr.io/${{ secrets.GCR_PROJECT_ID }}/$image" + docker tag "gcr.io/${{ secrets.GCR_PROJECT_ID }}/$image" "us-central1-docker.pkg.dev/${{ secrets.ARTIFACT_PROJECT_ID }}/$image" + docker push "us-central1-docker.pkg.dev/${{ secrets.ARTIFACT_PROJECT_ID }}/$image" + done - # Push the image to the destination registry - docker push "us-central1-docker.pkg.dev/goldengate-1/testhost-gcr/$(basename "$image_name"):$image_tag" - done From 7120435b9feefffd18a7691701fb0ac015e56cfc Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 26 Mar 2024 15:25:06 +0530 Subject: [PATCH 491/664] Update node.js.yml --- .github/workflows/node.js.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index d8ba85fa91..8e8f7cb9d8 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -16,9 +16,8 @@ jobs: - name: Configure Docker CLI for GCR uses: google-github-actions/setup-gcloud@v0.2.0 with: - docker-config: gcr - project-id: ${{ secrets.GCR_PROJECT_ID }} service-account-key: ${{ secrets.GCR_SA_KEY }} + export-access-token: true # Step 2: Authenticate with Artifact Registry - name: Configure Docker CLI for Artifact Registry @@ -27,20 +26,20 @@ jobs: docker-config: artifact project-id: ${{ secrets.ARTIFACT_PROJECT_ID }} service-account-key: ${{ secrets.ARTIFACT_SA_KEY }} + export-access-token: true # Step 3: List images from GCR - name: List images from GCR id: list_images run: | - echo "::set-output name=images::$(gcloud container images list --format='value(name)')" + gcloud container images list --format='value(name)' > images.txt + cat images.txt # Step 4: Migrate each image to Artifact Registry - name: Migrate images to Artifact Registry run: | - images=(${{ steps.list_images.outputs.images }}) - for image in "${images[@]}"; do + while IFS= read -r image; do docker pull "gcr.io/${{ secrets.GCR_PROJECT_ID }}/$image" docker tag "gcr.io/${{ secrets.GCR_PROJECT_ID }}/$image" "us-central1-docker.pkg.dev/${{ secrets.ARTIFACT_PROJECT_ID }}/$image" docker push "us-central1-docker.pkg.dev/${{ secrets.ARTIFACT_PROJECT_ID }}/$image" - done - + done < images.txt From 126d536b9d62894cfb1efb226a52ab52c5be24a3 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 26 Mar 2024 15:31:09 +0530 Subject: [PATCH 492/664] Update node.js.yml --- .github/workflows/node.js.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 8e8f7cb9d8..0966f5de57 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -1,5 +1,3 @@ -# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs name: Migrate All Images to Artifact Registry on: @@ -39,7 +37,7 @@ jobs: - name: Migrate images to Artifact Registry run: | while IFS= read -r image; do - docker pull "gcr.io/${{ secrets.GCR_PROJECT_ID }}/$image" - docker tag "gcr.io/${{ secrets.GCR_PROJECT_ID }}/$image" "us-central1-docker.pkg.dev/${{ secrets.ARTIFACT_PROJECT_ID }}/$image" - docker push "us-central1-docker.pkg.dev/${{ secrets.ARTIFACT_PROJECT_ID }}/$image" + docker pull "gcr.io/${{ secrets.GCR_PROJECT_ID }}/$image" || exit 1 + docker tag "gcr.io/${{ secrets.GCR_PROJECT_ID }}/$image" "us-central1-docker.pkg.dev/${{ secrets.ARTIFACT_PROJECT_ID }}/$image" || exit 1 + docker push "us-central1-docker.pkg.dev/${{ secrets.ARTIFACT_PROJECT_ID }}/$image" || exit 1 done < images.txt From 082cf511f096d90f6a8fb43bec5303d6f90feb6f Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 26 Mar 2024 15:33:28 +0530 Subject: [PATCH 493/664] Update node.js.yml --- .github/workflows/node.js.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 0966f5de57..1f9b130684 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -37,6 +37,7 @@ jobs: - name: Migrate images to Artifact Registry run: | while IFS= read -r image; do + echo "Processing image: $image" docker pull "gcr.io/${{ secrets.GCR_PROJECT_ID }}/$image" || exit 1 docker tag "gcr.io/${{ secrets.GCR_PROJECT_ID }}/$image" "us-central1-docker.pkg.dev/${{ secrets.ARTIFACT_PROJECT_ID }}/$image" || exit 1 docker push "us-central1-docker.pkg.dev/${{ secrets.ARTIFACT_PROJECT_ID }}/$image" || exit 1 From c9f6e7f6e32cce22e714bde6e7a79723e2e13473 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 26 Mar 2024 15:35:11 +0530 Subject: [PATCH 494/664] Update node.js.yml --- .github/workflows/node.js.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 1f9b130684..777ea5daac 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -38,6 +38,7 @@ jobs: run: | while IFS= read -r image; do echo "Processing image: $image" + gcloud container images describe "gcr.io/${{ secrets.GCR_PROJECT_ID }}/$image" || exit 1 docker pull "gcr.io/${{ secrets.GCR_PROJECT_ID }}/$image" || exit 1 docker tag "gcr.io/${{ secrets.GCR_PROJECT_ID }}/$image" "us-central1-docker.pkg.dev/${{ secrets.ARTIFACT_PROJECT_ID }}/$image" || exit 1 docker push "us-central1-docker.pkg.dev/${{ secrets.ARTIFACT_PROJECT_ID }}/$image" || exit 1 From 93b991efe35df16d8f57826f1a81018b0140d81b Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 26 Mar 2024 15:43:15 +0530 Subject: [PATCH 495/664] Update node.js.yml --- .github/workflows/node.js.yml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 777ea5daac..efb8aa8822 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -26,20 +26,12 @@ jobs: service-account-key: ${{ secrets.ARTIFACT_SA_KEY }} export-access-token: true - # Step 3: List images from GCR - - name: List images from GCR - id: list_images - run: | - gcloud container images list --format='value(name)' > images.txt - cat images.txt - - # Step 4: Migrate each image to Artifact Registry + # Step 3: List images from GCR and migrate each image - name: Migrate images to Artifact Registry run: | while IFS= read -r image; do echo "Processing image: $image" - gcloud container images describe "gcr.io/${{ secrets.GCR_PROJECT_ID }}/$image" || exit 1 docker pull "gcr.io/${{ secrets.GCR_PROJECT_ID }}/$image" || exit 1 - docker tag "gcr.io/${{ secrets.GCR_PROJECT_ID }}/$image" "us-central1-docker.pkg.dev/${{ secrets.ARTIFACT_PROJECT_ID }}/$image" || exit 1 - docker push "us-central1-docker.pkg.dev/${{ secrets.ARTIFACT_PROJECT_ID }}/$image" || exit 1 + docker tag "gcr.io/${{ secrets.GCR_PROJECT_ID }}/$image" "us-central1-docker.pkg.dev/goldengate-1/testhost-gcr" || exit 1 + docker push "us-central1-docker.pkg.dev/goldengate-1/testhost-gcr" || exit 1 done < images.txt From 286abe7502625988b3fd21e745b7ef2e0b193027 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 26 Mar 2024 15:53:46 +0530 Subject: [PATCH 496/664] Update node.js.yml --- .github/workflows/node.js.yml | 40 +++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index efb8aa8822..7095aad597 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -16,22 +16,26 @@ jobs: with: service-account-key: ${{ secrets.GCR_SA_KEY }} export-access-token: true - - # Step 2: Authenticate with Artifact Registry - - name: Configure Docker CLI for Artifact Registry - uses: google-github-actions/setup-gcloud@v0.2.0 - with: - docker-config: artifact - project-id: ${{ secrets.ARTIFACT_PROJECT_ID }} - service-account-key: ${{ secrets.ARTIFACT_SA_KEY }} - export-access-token: true - - # Step 3: List images from GCR and migrate each image - - name: Migrate images to Artifact Registry + + # Step 2: Run script to pull all images from GCR + - name: Pull all images from GCR run: | - while IFS= read -r image; do - echo "Processing image: $image" - docker pull "gcr.io/${{ secrets.GCR_PROJECT_ID }}/$image" || exit 1 - docker tag "gcr.io/${{ secrets.GCR_PROJECT_ID }}/$image" "us-central1-docker.pkg.dev/goldengate-1/testhost-gcr" || exit 1 - docker push "us-central1-docker.pkg.dev/goldengate-1/testhost-gcr" || exit 1 - done < images.txt + #!/bin/bash + + # Set the GCR project ID + PROJECT_ID="goldengate-1" + + # Get a list of all images in the project + IMAGES=$(gcloud container images list --project=$PROJECT_ID --format='value(name)') + + # Iterate through each image + for IMAGE in $IMAGES; do + # Get a list of tags for the current image + TAGS=$(gcloud container images list-tags $IMAGE --project=$PROJECT_ID --format='get(tags)') + + # Iterate through each tag of the image + for TAG in $TAGS; do + # Pull the image with the current tag + docker pull $IMAGE:$TAG + done + done From a402673b0ae9b19e437c81610f3d4258ed6b4986 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 26 Mar 2024 15:56:01 +0530 Subject: [PATCH 497/664] Update node.js.yml --- .github/workflows/node.js.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 7095aad597..33e18049f3 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -23,19 +23,22 @@ jobs: #!/bin/bash # Set the GCR project ID - PROJECT_ID="goldengate-1" + PROJECT_ID="goldengate-1" # Replace "your-project-id" with your actual project ID # Get a list of all images in the project IMAGES=$(gcloud container images list --project=$PROJECT_ID --format='value(name)') # Iterate through each image for IMAGE in $IMAGES; do - # Get a list of tags for the current image - TAGS=$(gcloud container images list-tags $IMAGE --project=$PROJECT_ID --format='get(tags)') + # Pull the image with the "latest" tag + docker pull "$IMAGE:latest" + + # Get a list of tags for the current image (excluding "latest") + TAGS=$(gcloud container images list-tags $IMAGE --project=$PROJECT_ID --format='get(tags)' | grep -v latest || true) # Iterate through each tag of the image for TAG in $TAGS; do # Pull the image with the current tag - docker pull $IMAGE:$TAG + docker pull "$IMAGE:$TAG" done done From cd5f831f7aa1ed5dba270a129c3a546485dc3e62 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 26 Mar 2024 16:00:13 +0530 Subject: [PATCH 498/664] Update node.js.yml --- .github/workflows/node.js.yml | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 33e18049f3..395ac53635 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -21,18 +21,14 @@ jobs: - name: Pull all images from GCR run: | #!/bin/bash - # Set the GCR project ID PROJECT_ID="goldengate-1" # Replace "your-project-id" with your actual project ID - # Get a list of all images in the project IMAGES=$(gcloud container images list --project=$PROJECT_ID --format='value(name)') - # Iterate through each image for IMAGE in $IMAGES; do # Pull the image with the "latest" tag docker pull "$IMAGE:latest" - # Get a list of tags for the current image (excluding "latest") TAGS=$(gcloud container images list-tags $IMAGE --project=$PROJECT_ID --format='get(tags)' | grep -v latest || true) @@ -42,3 +38,22 @@ jobs: docker pull "$IMAGE:$TAG" done done + + # Step 3: Authenticate with Artifact Registry + - name: Configure Docker CLI for Artifact Registry + uses: google-github-actions/setup-gcloud@v0.2.0 + with: + docker-config: artifact + project-id: ${{ secrets.ARTIFACT_PROJECT_ID }} + service-account-key: ${{ secrets.ARTIFACT_SA_KEY }} + export-access-token: true + + # Step 4: Tag and push all pulled images to Artifact Registry + - name: Tag and push images to Artifact Registry + run: | + # Tag and push each pulled image to Artifact Registry + for IMAGE in $(docker images --format '{{.Repository}}:{{.Tag}}' | grep "gcr.io/$PROJECT_ID"); do + ARTIFACT_IMAGE=$(echo $IMAGE | sed 's#gcr.io/#us-central1-docker.pkg.dev/'"${{ secrets.ARTIFACT_PROJECT_ID }}"'/#') + docker tag $IMAGE $ARTIFACT_IMAGE + docker push $ARTIFACT_IMAGE + done From e7794cb97cafb7fd3e4ef9b333070c9ecb72b03c Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 26 Mar 2024 16:02:23 +0530 Subject: [PATCH 499/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 395ac53635..986d030236 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -52,7 +52,7 @@ jobs: - name: Tag and push images to Artifact Registry run: | # Tag and push each pulled image to Artifact Registry - for IMAGE in $(docker images --format '{{.Repository}}:{{.Tag}}' | grep "gcr.io/$PROJECT_ID"); do + for IMAGE in $(docker images --format '{{.teshost-gcr}}:{{.Tag}}' | grep "gcr.io/$PROJECT_ID"); do ARTIFACT_IMAGE=$(echo $IMAGE | sed 's#gcr.io/#us-central1-docker.pkg.dev/'"${{ secrets.ARTIFACT_PROJECT_ID }}"'/#') docker tag $IMAGE $ARTIFACT_IMAGE docker push $ARTIFACT_IMAGE From ab7dc2c5c3ee6e11634c28948a0a2d52492925a9 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 26 Mar 2024 16:07:12 +0530 Subject: [PATCH 500/664] Update node.js.yml --- .github/workflows/node.js.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 986d030236..29e8f31438 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -52,8 +52,8 @@ jobs: - name: Tag and push images to Artifact Registry run: | # Tag and push each pulled image to Artifact Registry - for IMAGE in $(docker images --format '{{.teshost-gcr}}:{{.Tag}}' | grep "gcr.io/$PROJECT_ID"); do - ARTIFACT_IMAGE=$(echo $IMAGE | sed 's#gcr.io/#us-central1-docker.pkg.dev/'"${{ secrets.ARTIFACT_PROJECT_ID }}"'/#') + for IMAGE in $(docker images --format '{{.Repository}}:{{.Tag}}' | grep "gcr.io/$PROJECT_ID"); do + ARTIFACT_IMAGE=$(echo $IMAGE | sed 's#gcr.io/#us-central1-docker.pkg.dev/'"${{ secrets.ARTIFACT_PROJECT_ID }}/$PROJECT_ID/testhost-gcr"#') docker tag $IMAGE $ARTIFACT_IMAGE docker push $ARTIFACT_IMAGE done From dbf950373e236fd0dcc8a696ce1a7fca9c01e584 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 26 Mar 2024 16:10:15 +0530 Subject: [PATCH 501/664] Update node.js.yml --- .github/workflows/node.js.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 29e8f31438..8da38a1d44 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -14,7 +14,7 @@ jobs: - name: Configure Docker CLI for GCR uses: google-github-actions/setup-gcloud@v0.2.0 with: - service-account-key: ${{ secrets.GCR_SA_KEY }} + service_account_key: ${{ secrets.GCR_SA_KEY }} export-access-token: true # Step 2: Run script to pull all images from GCR @@ -43,10 +43,11 @@ jobs: - name: Configure Docker CLI for Artifact Registry uses: google-github-actions/setup-gcloud@v0.2.0 with: - docker-config: artifact - project-id: ${{ secrets.ARTIFACT_PROJECT_ID }} - service-account-key: ${{ secrets.ARTIFACT_SA_KEY }} - export-access-token: true + version: latest + service_account_key: ${{ secrets.ARTIFACT_SA_KEY }} + project_id: ${{ secrets.ARTIFACT_PROJECT_ID }} + env: + CLOUDSDK_METRICS_ENVIRONMENT: github-actions-setup-gcloud # Step 4: Tag and push all pulled images to Artifact Registry - name: Tag and push images to Artifact Registry From 2f778cdfd653334e3a439c3d9f357d2a13b2a71a Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 26 Mar 2024 16:12:51 +0530 Subject: [PATCH 502/664] Update node.js.yml --- .github/workflows/node.js.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 8da38a1d44..bca3a5b6bf 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -53,8 +53,10 @@ jobs: - name: Tag and push images to Artifact Registry run: | # Tag and push each pulled image to Artifact Registry - for IMAGE in $(docker images --format '{{.Repository}}:{{.Tag}}' | grep "gcr.io/$PROJECT_ID"); do - ARTIFACT_IMAGE=$(echo $IMAGE | sed 's#gcr.io/#us-central1-docker.pkg.dev/'"${{ secrets.ARTIFACT_PROJECT_ID }}/$PROJECT_ID/testhost-gcr"#') - docker tag $IMAGE $ARTIFACT_IMAGE + # Tag and push each pulled image to Artifact Registry + for IMAGE in $(docker images --format '{{.Repository}}:{{.Tag}}' | grep "gcr.io/$PROJECT_ID"); do + ARTIFACT_IMAGE=$(echo $IMAGE | sed 's#gcr.io/#us-central1-docker.pkg.dev/'"${{ secrets.ARTIFACT_PROJECT_ID }}/$PROJECT_ID/testhost-gcr"#') + docker tag $IMAGE $ARTIFACT_IMAGE docker push $ARTIFACT_IMAGE - done + done + From 32d0da47f4da07cc1fec09674378ed28d7a571ae Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 26 Mar 2024 16:18:43 +0530 Subject: [PATCH 503/664] Update node.js.yml --- .github/workflows/node.js.yml | 36 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index bca3a5b6bf..6a4d125548 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -39,24 +39,22 @@ jobs: done done - # Step 3: Authenticate with Artifact Registry - - name: Configure Docker CLI for Artifact Registry - uses: google-github-actions/setup-gcloud@v0.2.0 - with: - version: latest - service_account_key: ${{ secrets.ARTIFACT_SA_KEY }} - project_id: ${{ secrets.ARTIFACT_PROJECT_ID }} - env: - CLOUDSDK_METRICS_ENVIRONMENT: github-actions-setup-gcloud - - # Step 4: Tag and push all pulled images to Artifact Registry - - name: Tag and push images to Artifact Registry + # Step 3: Push all images from Artifact Registry repository + - name: Push all images to Artifact Registry run: | - # Tag and push each pulled image to Artifact Registry - # Tag and push each pulled image to Artifact Registry - for IMAGE in $(docker images --format '{{.Repository}}:{{.Tag}}' | grep "gcr.io/$PROJECT_ID"); do - ARTIFACT_IMAGE=$(echo $IMAGE | sed 's#gcr.io/#us-central1-docker.pkg.dev/'"${{ secrets.ARTIFACT_PROJECT_ID }}/$PROJECT_ID/testhost-gcr"#') - docker tag $IMAGE $ARTIFACT_IMAGE - docker push $ARTIFACT_IMAGE - done + #!/bin/bash + + # Set the Artifact Registry repository name + REPOSITORY="testhost-gcr" + # Authenticate with Artifact Registry + gcloud auth configure-docker us-central1-docker.pkg.dev --quiet + + # Get a list of all images in the repository + IMAGES=$(gcloud container images list-tags us-central1-docker.pkg.dev/goldengate-1/$REPOSITORY --format='get(digest)') + + # Iterate through each image + for IMAGE in $IMAGES; do + # Push the image with the current digest + docker push us-central1-docker.pkg.dev/goldengate-1/$REPOSITORY@$IMAGE + done From 3be9988b36665e8c539425504c5ea7c0c1da2c26 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 26 Mar 2024 16:24:46 +0530 Subject: [PATCH 504/664] Update node.js.yml --- .github/workflows/node.js.yml | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 6a4d125548..a3df1590db 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -38,23 +38,12 @@ jobs: docker pull "$IMAGE:$TAG" done done - - # Step 3: Push all images from Artifact Registry repository - - name: Push all images to Artifact Registry + + # Step 3: Push images to Artifact Registry + - name: Push images to Artifact Registry run: | - #!/bin/bash - - # Set the Artifact Registry repository name REPOSITORY="testhost-gcr" - - # Authenticate with Artifact Registry - gcloud auth configure-docker us-central1-docker.pkg.dev --quiet - - # Get a list of all images in the repository IMAGES=$(gcloud container images list-tags us-central1-docker.pkg.dev/goldengate-1/$REPOSITORY --format='get(digest)') - - # Iterate through each image for IMAGE in $IMAGES; do - # Push the image with the current digest docker push us-central1-docker.pkg.dev/goldengate-1/$REPOSITORY@$IMAGE done From 7d500f2146da2bb923ec2754e5be3a8d8c7a29de Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 26 Mar 2024 16:27:15 +0530 Subject: [PATCH 505/664] Update node.js.yml --- .github/workflows/node.js.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index a3df1590db..a30eef940e 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -43,7 +43,7 @@ jobs: - name: Push images to Artifact Registry run: | REPOSITORY="testhost-gcr" - IMAGES=$(gcloud container images list-tags us-central1-docker.pkg.dev/goldengate-1/$REPOSITORY --format='get(digest)') + docker tag us-central1-docker.pkg.dev/goldengate-1/testhost-gcr for IMAGE in $IMAGES; do - docker push us-central1-docker.pkg.dev/goldengate-1/$REPOSITORY@$IMAGE + docker us-central1-docker.pkg.dev/goldengate-1/testhost-gcr done From b64081ba52d1bcaf3977e2bf9792b52e67ad5216 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 26 Mar 2024 16:33:20 +0530 Subject: [PATCH 506/664] Update node.js.yml --- .github/workflows/node.js.yml | 48 ++++++++++++++++++++++++++++++----- 1 file changed, 42 insertions(+), 6 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index a30eef940e..9a5e75acab 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -38,12 +38,48 @@ jobs: docker pull "$IMAGE:$TAG" done done - - # Step 3: Push images to Artifact Registry - - name: Push images to Artifact Registry + + # Step 3: Push all images to Artifact Registry + - name: Push all images to Artifact Registry run: | - REPOSITORY="testhost-gcr" - docker tag us-central1-docker.pkg.dev/goldengate-1/testhost-gcr + #!/bin/bash + + # Set the GCR project ID + GCR_PROJECT_ID="goldengate-1" # Replace "goldengate-1" with your actual GCR project ID + # Set the Artifact Registry project ID + ARTIFACT_PROJECT_ID="goldengate-1" # Replace "your-artifact-project-id" with your actual Artifact Registry project ID + # Set the Artifact Registry repository name + ARTIFACT_REPO_NAME="testhost-gcr" # Replace "your-artifact-repository" with your actual Artifact Registry repository name + + # Authenticate with Docker to Artifact Registry + gcloud auth configure-docker -q + + # Get a list of all images in the GCR project + IMAGES=$(gcloud container images list --project=$GCR_PROJECT_ID --format='value(name)') + + # Iterate through each image for IMAGE in $IMAGES; do - docker us-central1-docker.pkg.dev/goldengate-1/testhost-gcr + # Pull the image with the "latest" tag from GCR + docker pull "$IMAGE:latest" + # Tag the image with Artifact Registry details + ARTIFACT_TAG="gcr.io/$GCR_PROJECT_ID/$IMAGE:latest" + ARTIFACT_TARGET="gcr.io/$ARTIFACT_PROJECT_ID/$ARTIFACT_REPO_NAME/$IMAGE:latest" + docker tag "$ARTIFACT_TAG" "$ARTIFACT_TARGET" + # Push the image to Artifact Registry + docker push "$ARTIFACT_TARGET" + + # Get a list of tags for the current image (excluding "latest") from GCR + TAGS=$(gcloud container images list-tags $IMAGE --project=$GCR_PROJECT_ID --format='get(tags)' | grep -v latest || true) + + # Iterate through each tag of the image + for TAG in $TAGS; do + # Pull the image with the current tag from GCR + docker pull "$IMAGE:$TAG" + # Tag the image with Artifact Registry details + ARTIFACT_TAG="gcr.io/$GCR_PROJECT_ID/$IMAGE:$TAG" + ARTIFACT_TARGET="gcr.io/$ARTIFACT_PROJECT_ID/$ARTIFACT_REPO_NAME/$IMAGE:$TAG" + docker tag "$ARTIFACT_TAG" "$ARTIFACT_TARGET" + # Push the image to Artifact Registry + docker push "$ARTIFACT_TARGET" + done done From 06545f0a3fb445880402b9986fe86294588b3694 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 26 Mar 2024 16:36:45 +0530 Subject: [PATCH 507/664] Update node.js.yml --- .github/workflows/node.js.yml | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 9a5e75acab..87b0d167a9 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -59,15 +59,6 @@ jobs: # Iterate through each image for IMAGE in $IMAGES; do - # Pull the image with the "latest" tag from GCR - docker pull "$IMAGE:latest" - # Tag the image with Artifact Registry details - ARTIFACT_TAG="gcr.io/$GCR_PROJECT_ID/$IMAGE:latest" - ARTIFACT_TARGET="gcr.io/$ARTIFACT_PROJECT_ID/$ARTIFACT_REPO_NAME/$IMAGE:latest" - docker tag "$ARTIFACT_TAG" "$ARTIFACT_TARGET" - # Push the image to Artifact Registry - docker push "$ARTIFACT_TARGET" - # Get a list of tags for the current image (excluding "latest") from GCR TAGS=$(gcloud container images list-tags $IMAGE --project=$GCR_PROJECT_ID --format='get(tags)' | grep -v latest || true) @@ -76,10 +67,17 @@ jobs: # Pull the image with the current tag from GCR docker pull "$IMAGE:$TAG" # Tag the image with Artifact Registry details - ARTIFACT_TAG="gcr.io/$GCR_PROJECT_ID/$IMAGE:$TAG" ARTIFACT_TARGET="gcr.io/$ARTIFACT_PROJECT_ID/$ARTIFACT_REPO_NAME/$IMAGE:$TAG" - docker tag "$ARTIFACT_TAG" "$ARTIFACT_TARGET" + docker tag "$IMAGE:$TAG" "$ARTIFACT_TARGET" # Push the image to Artifact Registry docker push "$ARTIFACT_TARGET" done + + # Pull the image with the "latest" tag from GCR + docker pull "$IMAGE:latest" + # Tag the image with Artifact Registry details + ARTIFACT_TARGET="gcr.io/$ARTIFACT_PROJECT_ID/$ARTIFACT_REPO_NAME/$IMAGE:latest" + docker tag "$IMAGE:latest" "$ARTIFACT_TARGET" + # Push the image to Artifact Registry + docker push "$ARTIFACT_TARGET" done From 340703a336db832d5c25c856b6b70056786ebff5 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 26 Mar 2024 16:43:15 +0530 Subject: [PATCH 508/664] Update node.js.yml --- .github/workflows/node.js.yml | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 87b0d167a9..a1898c1f39 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -17,28 +17,6 @@ jobs: service_account_key: ${{ secrets.GCR_SA_KEY }} export-access-token: true - # Step 2: Run script to pull all images from GCR - - name: Pull all images from GCR - run: | - #!/bin/bash - # Set the GCR project ID - PROJECT_ID="goldengate-1" # Replace "your-project-id" with your actual project ID - # Get a list of all images in the project - IMAGES=$(gcloud container images list --project=$PROJECT_ID --format='value(name)') - # Iterate through each image - for IMAGE in $IMAGES; do - # Pull the image with the "latest" tag - docker pull "$IMAGE:latest" - # Get a list of tags for the current image (excluding "latest") - TAGS=$(gcloud container images list-tags $IMAGE --project=$PROJECT_ID --format='get(tags)' | grep -v latest || true) - - # Iterate through each tag of the image - for TAG in $TAGS; do - # Pull the image with the current tag - docker pull "$IMAGE:$TAG" - done - done - # Step 3: Push all images to Artifact Registry - name: Push all images to Artifact Registry run: | @@ -47,9 +25,9 @@ jobs: # Set the GCR project ID GCR_PROJECT_ID="goldengate-1" # Replace "goldengate-1" with your actual GCR project ID # Set the Artifact Registry project ID - ARTIFACT_PROJECT_ID="goldengate-1" # Replace "your-artifact-project-id" with your actual Artifact Registry project ID + ARTIFACT_PROJECT_ID="goldengate-1" # Replace "goldengate-1" with your actual Artifact Registry project ID # Set the Artifact Registry repository name - ARTIFACT_REPO_NAME="testhost-gcr" # Replace "your-artifact-repository" with your actual Artifact Registry repository name + ARTIFACT_REPO_NAME="testhost-gcr" # Replace "testhost-gcr" with your actual Artifact Registry repository name # Authenticate with Docker to Artifact Registry gcloud auth configure-docker -q From b4a3333672888fc3008d7459e4913739ca6cb0ad Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 26 Mar 2024 16:46:01 +0530 Subject: [PATCH 509/664] Update node.js.yml --- .github/workflows/node.js.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index a1898c1f39..3d0149acf7 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -30,10 +30,14 @@ jobs: ARTIFACT_REPO_NAME="testhost-gcr" # Replace "testhost-gcr" with your actual Artifact Registry repository name # Authenticate with Docker to Artifact Registry - gcloud auth configure-docker -q + gcloud auth configure-docker -q || { echo "Failed to authenticate Docker with Artifact Registry"; exit 1; } # Get a list of all images in the GCR project IMAGES=$(gcloud container images list --project=$GCR_PROJECT_ID --format='value(name)') + if [ -z "$IMAGES" ]; then + echo "No images found in GCR project: $GCR_PROJECT_ID" + exit 1 + fi # Iterate through each image for IMAGE in $IMAGES; do @@ -49,6 +53,10 @@ jobs: docker tag "$IMAGE:$TAG" "$ARTIFACT_TARGET" # Push the image to Artifact Registry docker push "$ARTIFACT_TARGET" + if [ $? -ne 0 ]; then + echo "Failed to push image $ARTIFACT_TARGET" + exit 1 + fi done # Pull the image with the "latest" tag from GCR @@ -58,4 +66,8 @@ jobs: docker tag "$IMAGE:latest" "$ARTIFACT_TARGET" # Push the image to Artifact Registry docker push "$ARTIFACT_TARGET" + if [ $? -ne 0 ]; then + echo "Failed to push image $ARTIFACT_TARGET" + exit 1 + fi done From 7f05f4453391445d7f2e18396f2d7f83c78269e7 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 26 Mar 2024 16:49:14 +0530 Subject: [PATCH 510/664] Update node.js.yml --- .github/workflows/node.js.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 3d0149acf7..c5fac19441 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -49,7 +49,7 @@ jobs: # Pull the image with the current tag from GCR docker pull "$IMAGE:$TAG" # Tag the image with Artifact Registry details - ARTIFACT_TARGET="gcr.io/$ARTIFACT_PROJECT_ID/$ARTIFACT_REPO_NAME/$IMAGE:$TAG" + ARTIFACT_TARGET="us-central1-docker.pkg.dev/$ARTIFACT_PROJECT_ID/$ARTIFACT_REPO_NAME/$IMAGE:$TAG" docker tag "$IMAGE:$TAG" "$ARTIFACT_TARGET" # Push the image to Artifact Registry docker push "$ARTIFACT_TARGET" @@ -62,7 +62,7 @@ jobs: # Pull the image with the "latest" tag from GCR docker pull "$IMAGE:latest" # Tag the image with Artifact Registry details - ARTIFACT_TARGET="gcr.io/$ARTIFACT_PROJECT_ID/$ARTIFACT_REPO_NAME/$IMAGE:latest" + ARTIFACT_TARGET="us-central1-docker.pkg.dev/$ARTIFACT_PROJECT_ID/$ARTIFACT_REPO_NAME/$IMAGE:latest" docker tag "$IMAGE:latest" "$ARTIFACT_TARGET" # Push the image to Artifact Registry docker push "$ARTIFACT_TARGET" From c58a5f194115fb09137f2b8cf88fac5895560e80 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 26 Mar 2024 16:53:14 +0530 Subject: [PATCH 511/664] Update node.js.yml --- .github/workflows/node.js.yml | 48 +++++++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 14 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index c5fac19441..16051ced79 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -17,8 +17,8 @@ jobs: service_account_key: ${{ secrets.GCR_SA_KEY }} export-access-token: true - # Step 3: Push all images to Artifact Registry - - name: Push all images to Artifact Registry + # Step 2: Pull and Push all images to Artifact Registry + - name: Pull and Push all images to Artifact Registry run: | #!/bin/bash @@ -41,6 +41,28 @@ jobs: # Iterate through each image for IMAGE in $IMAGES; do + # Pull the image with the "latest" tag from GCR + docker pull "$IMAGE:latest" + if [ $? -ne 0 ]; then + echo "Failed to pull image $IMAGE:latest" + exit 1 + fi + + # Tag the image with Artifact Registry details + ARTIFACT_TARGET="us-central1-docker.pkg.dev/$ARTIFACT_PROJECT_ID/$ARTIFACT_REPO_NAME/$IMAGE:latest" + docker tag "$IMAGE:latest" "$ARTIFACT_TARGET" + if [ $? -ne 0 ]; then + echo "Failed to tag image $IMAGE:latest with $ARTIFACT_TARGET" + exit 1 + fi + + # Push the image to Artifact Registry + docker push "$ARTIFACT_TARGET" + if [ $? -ne 0 ]; then + echo "Failed to push image $ARTIFACT_TARGET" + exit 1 + fi + # Get a list of tags for the current image (excluding "latest") from GCR TAGS=$(gcloud container images list-tags $IMAGE --project=$GCR_PROJECT_ID --format='get(tags)' | grep -v latest || true) @@ -48,9 +70,19 @@ jobs: for TAG in $TAGS; do # Pull the image with the current tag from GCR docker pull "$IMAGE:$TAG" + if [ $? -ne 0 ]; then + echo "Failed to pull image $IMAGE:$TAG" + exit 1 + fi + # Tag the image with Artifact Registry details ARTIFACT_TARGET="us-central1-docker.pkg.dev/$ARTIFACT_PROJECT_ID/$ARTIFACT_REPO_NAME/$IMAGE:$TAG" docker tag "$IMAGE:$TAG" "$ARTIFACT_TARGET" + if [ $? -ne 0 ]; then + echo "Failed to tag image $IMAGE:$TAG with $ARTIFACT_TARGET" + exit 1 + fi + # Push the image to Artifact Registry docker push "$ARTIFACT_TARGET" if [ $? -ne 0 ]; then @@ -58,16 +90,4 @@ jobs: exit 1 fi done - - # Pull the image with the "latest" tag from GCR - docker pull "$IMAGE:latest" - # Tag the image with Artifact Registry details - ARTIFACT_TARGET="us-central1-docker.pkg.dev/$ARTIFACT_PROJECT_ID/$ARTIFACT_REPO_NAME/$IMAGE:latest" - docker tag "$IMAGE:latest" "$ARTIFACT_TARGET" - # Push the image to Artifact Registry - docker push "$ARTIFACT_TARGET" - if [ $? -ne 0 ]; then - echo "Failed to push image $ARTIFACT_TARGET" - exit 1 - fi done From 309bc22d5804c23ddaf60a63d26d1cd172979f61 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 26 Mar 2024 16:56:17 +0530 Subject: [PATCH 512/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 16051ced79..2337c559ee 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -76,7 +76,7 @@ jobs: fi # Tag the image with Artifact Registry details - ARTIFACT_TARGET="us-central1-docker.pkg.dev/$ARTIFACT_PROJECT_ID/$ARTIFACT_REPO_NAME/$IMAGE:$TAG" + ARTIFACT_TARGET="us-central1-docker.pkg.dev/goldengate-1/testhost-gcr" docker tag "$IMAGE:$TAG" "$ARTIFACT_TARGET" if [ $? -ne 0 ]; then echo "Failed to tag image $IMAGE:$TAG with $ARTIFACT_TARGET" From acee8332392e5d8795b95f0125615bc5407b57de Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 26 Mar 2024 16:59:24 +0530 Subject: [PATCH 513/664] Update node.js.yml --- .github/workflows/node.js.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 2337c559ee..c3c6d01660 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -75,8 +75,8 @@ jobs: exit 1 fi - # Tag the image with Artifact Registry details - ARTIFACT_TARGET="us-central1-docker.pkg.dev/goldengate-1/testhost-gcr" + # Tag the image with Artifact Registry details, including the tag + ARTIFACT_TARGET="us-central1-docker.pkg.dev/$ARTIFACT_PROJECT_ID/$ARTIFACT_REPO_NAME/$IMAGE:$TAG" docker tag "$IMAGE:$TAG" "$ARTIFACT_TARGET" if [ $? -ne 0 ]; then echo "Failed to tag image $IMAGE:$TAG with $ARTIFACT_TARGET" From 7e642d47aad0c1c1c8776140451dcf8fd0bd2a38 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 26 Mar 2024 17:08:49 +0530 Subject: [PATCH 514/664] Update node.js.yml --- .github/workflows/node.js.yml | 81 +++++------------------------------ 1 file changed, 10 insertions(+), 71 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index c3c6d01660..03cc76a709 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -17,77 +17,16 @@ jobs: service_account_key: ${{ secrets.GCR_SA_KEY }} export-access-token: true - # Step 2: Pull and Push all images to Artifact Registry - - name: Pull and Push all images to Artifact Registry - run: | - #!/bin/bash - - # Set the GCR project ID - GCR_PROJECT_ID="goldengate-1" # Replace "goldengate-1" with your actual GCR project ID - # Set the Artifact Registry project ID - ARTIFACT_PROJECT_ID="goldengate-1" # Replace "goldengate-1" with your actual Artifact Registry project ID - # Set the Artifact Registry repository name - ARTIFACT_REPO_NAME="testhost-gcr" # Replace "testhost-gcr" with your actual Artifact Registry repository name - - # Authenticate with Docker to Artifact Registry - gcloud auth configure-docker -q || { echo "Failed to authenticate Docker with Artifact Registry"; exit 1; } - - # Get a list of all images in the GCR project - IMAGES=$(gcloud container images list --project=$GCR_PROJECT_ID --format='value(name)') - if [ -z "$IMAGES" ]; then - echo "No images found in GCR project: $GCR_PROJECT_ID" - exit 1 - fi - - # Iterate through each image - for IMAGE in $IMAGES; do - # Pull the image with the "latest" tag from GCR - docker pull "$IMAGE:latest" - if [ $? -ne 0 ]; then - echo "Failed to pull image $IMAGE:latest" - exit 1 - fi - - # Tag the image with Artifact Registry details - ARTIFACT_TARGET="us-central1-docker.pkg.dev/$ARTIFACT_PROJECT_ID/$ARTIFACT_REPO_NAME/$IMAGE:latest" - docker tag "$IMAGE:latest" "$ARTIFACT_TARGET" - if [ $? -ne 0 ]; then - echo "Failed to tag image $IMAGE:latest with $ARTIFACT_TARGET" - exit 1 - fi + # Step 2: Run script to pull all images from GCR + - name: Pull all images from GCR + run: ./pull_images_from_gcr.sh - # Push the image to Artifact Registry - docker push "$ARTIFACT_TARGET" - if [ $? -ne 0 ]; then - echo "Failed to push image $ARTIFACT_TARGET" - exit 1 - fi - - # Get a list of tags for the current image (excluding "latest") from GCR - TAGS=$(gcloud container images list-tags $IMAGE --project=$GCR_PROJECT_ID --format='get(tags)' | grep -v latest || true) - - # Iterate through each tag of the image - for TAG in $TAGS; do - # Pull the image with the current tag from GCR - docker pull "$IMAGE:$TAG" - if [ $? -ne 0 ]; then - echo "Failed to pull image $IMAGE:$TAG" - exit 1 - fi + # Step 3: List GCR Images + - name: List GCR Images + run: | + gcloud container images list --repository=gcr.io/goldengate-1 --format='value(NAME)' > images.txt - # Tag the image with Artifact Registry details, including the tag - ARTIFACT_TARGET="us-central1-docker.pkg.dev/$ARTIFACT_PROJECT_ID/$ARTIFACT_REPO_NAME/$IMAGE:$TAG" - docker tag "$IMAGE:$TAG" "$ARTIFACT_TARGET" - if [ $? -ne 0 ]; then - echo "Failed to tag image $IMAGE:$TAG with $ARTIFACT_TARGET" - exit 1 - fi + # Step 4: Tag and Push Images + - name: Tag and Push Images + run: ./tag_and_push_images.sh - # Push the image to Artifact Registry - docker push "$ARTIFACT_TARGET" - if [ $? -ne 0 ]; then - echo "Failed to push image $ARTIFACT_TARGET" - exit 1 - fi - done - done From 0a7bff7857ccf4702d7de67ca2816512158cc19b Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 26 Mar 2024 17:12:16 +0530 Subject: [PATCH 515/664] Update node.js.yml --- .github/workflows/node.js.yml | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 03cc76a709..33196f5915 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -19,14 +19,36 @@ jobs: # Step 2: Run script to pull all images from GCR - name: Pull all images from GCR - run: ./pull_images_from_gcr.sh + run: | + #!/bin/bash + # Set the GCR project ID + PROJECT_ID="goldengate-1" # Replace "your-project-id" with your actual project ID + # Get a list of all images in the project + IMAGES=$(gcloud container images list --project=$PROJECT_ID --format='value(name)') + # Iterate through each image + for IMAGE in $IMAGES; do + # Pull the image with the "latest" tag + docker pull "$IMAGE:latest" + # Get a list of tags for the current image (excluding "latest") + TAGS=$(gcloud container images list-tags $IMAGE --project=$PROJECT_ID --format='get(tags)' | grep -v latest || true) + + # Iterate through each tag of the image + for TAG in $TAGS; do + # Pull the image with the current tag + docker pull "$IMAGE:$TAG" + done + done # Step 3: List GCR Images - name: List GCR Images run: | - gcloud container images list --repository=gcr.io/goldengate-1 --format='value(NAME)' > images.txt + images=$(gcloud container images list --repository=gcr.io/goldengate-1 --format='value(NAME)') + echo "$images" > images.txt # Step 4: Tag and Push Images - name: Tag and Push Images - run: ./tag_and_push_images.sh - + run: | + while IFS= read -r image; do + docker tag "gcr.io/goldengate-1/$image" "us-central1-docker.pkg.dev/goldengate-1/testhost-gcr/$image" + docker push "us-central1-docker.pkg.dev/goldengate-1/testhost-gcr/$image" + done < images.txt From 0b1109d3340cbcae5cfc13f5bfd4ed112e6858b0 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 26 Mar 2024 17:14:51 +0530 Subject: [PATCH 516/664] Update node.js.yml --- .github/workflows/node.js.yml | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 33196f5915..a7891f3ac6 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -38,17 +38,3 @@ jobs: docker pull "$IMAGE:$TAG" done done - - # Step 3: List GCR Images - - name: List GCR Images - run: | - images=$(gcloud container images list --repository=gcr.io/goldengate-1 --format='value(NAME)') - echo "$images" > images.txt - - # Step 4: Tag and Push Images - - name: Tag and Push Images - run: | - while IFS= read -r image; do - docker tag "gcr.io/goldengate-1/$image" "us-central1-docker.pkg.dev/goldengate-1/testhost-gcr/$image" - docker push "us-central1-docker.pkg.dev/goldengate-1/testhost-gcr/$image" - done < images.txt From ccb287664f0a71c857c1974a66d74bea8b8b3dea Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 26 Mar 2024 17:21:18 +0530 Subject: [PATCH 517/664] Update node.js.yml --- .github/workflows/node.js.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index a7891f3ac6..52760dc535 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -38,3 +38,14 @@ jobs: docker pull "$IMAGE:$TAG" done done + - name: List GCR Images + run: | + images=$(gcloud container images list --repository=gcr.io/your-project-id --format='value(NAME)') + echo "$images" > images.txt + + - name: Tag and Push Images + run: | + while IFS= read -r image; do + docker tag "gcr.io/your-project-id/$image" "us-central1-docker.pkg.dev/goldengate-1/testhost-gcr/$image" + docker push "us-central1-docker.pkg.dev/goldengate-1/testhost-gcr/$image" + done < images.txt From 1f03ead5c7181b69fbb94db2526ad23fc798031b Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 26 Mar 2024 17:24:18 +0530 Subject: [PATCH 518/664] Update node.js.yml --- .github/workflows/node.js.yml | 42 +++++++++++++++++------------------ 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 52760dc535..8407d2bd43 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -17,35 +17,33 @@ jobs: service_account_key: ${{ secrets.GCR_SA_KEY }} export-access-token: true - # Step 2: Run script to pull all images from GCR - - name: Pull all images from GCR + # Step 2: Run the migration script + - name: Migrate images run: | #!/bin/bash + # Set the GCR project ID - PROJECT_ID="goldengate-1" # Replace "your-project-id" with your actual project ID + PROJECT_ID="goldengate-1" + # Get a list of all images in the project - IMAGES=$(gcloud container images list --project=$PROJECT_ID --format='value(name)') + IMAGES=$(gcloud container images list --project="$PROJECT_ID" --format='value(name)') + # Iterate through each image for IMAGE in $IMAGES; do # Pull the image with the "latest" tag docker pull "$IMAGE:latest" + # Get a list of tags for the current image (excluding "latest") - TAGS=$(gcloud container images list-tags $IMAGE --project=$PROJECT_ID --format='get(tags)' | grep -v latest || true) - - # Iterate through each tag of the image - for TAG in $TAGS; do - # Pull the image with the current tag - docker pull "$IMAGE:$TAG" - done - done - - name: List GCR Images - run: | - images=$(gcloud container images list --repository=gcr.io/your-project-id --format='value(NAME)') - echo "$images" > images.txt + TAGS=$(gcloud container images list-tags "$IMAGE" --project="$PROJECT_ID" --format='get(tags)' | grep -v latest || true) - - name: Tag and Push Images - run: | - while IFS= read -r image; do - docker tag "gcr.io/your-project-id/$image" "us-central1-docker.pkg.dev/goldengate-1/testhost-gcr/$image" - docker push "us-central1-docker.pkg.dev/goldengate-1/testhost-gcr/$image" - done < images.txt + # Check if there are tags other than "latest" + if [ -n "$TAGS" ]; then + # Iterate through each tag of the image + for TAG in $TAGS; do + # Pull the image with the current tag + docker pull "$IMAGE:$TAG" + done + else + echo "No tags other than 'latest' found for image $IMAGE" + fi + done From 98bb7a497f4ab1870fcf02b91a3f8583115083e9 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 26 Mar 2024 17:28:06 +0530 Subject: [PATCH 519/664] Update node.js.yml --- .github/workflows/node.js.yml | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 8407d2bd43..3e6c8b6c82 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -17,8 +17,8 @@ jobs: service_account_key: ${{ secrets.GCR_SA_KEY }} export-access-token: true - # Step 2: Run the migration script - - name: Migrate images + # Step 2: Pull all images from GCR + - name: Pull all images from GCR run: | #!/bin/bash @@ -30,20 +30,6 @@ jobs: # Iterate through each image for IMAGE in $IMAGES; do - # Pull the image with the "latest" tag - docker pull "$IMAGE:latest" - - # Get a list of tags for the current image (excluding "latest") - TAGS=$(gcloud container images list-tags "$IMAGE" --project="$PROJECT_ID" --format='get(tags)' | grep -v latest || true) - - # Check if there are tags other than "latest" - if [ -n "$TAGS" ]; then - # Iterate through each tag of the image - for TAG in $TAGS; do - # Pull the image with the current tag - docker pull "$IMAGE:$TAG" - done - else - echo "No tags other than 'latest' found for image $IMAGE" - fi + # Pull all tags of the image + docker pull "$IMAGE" done From 71f99b28dd7eda5a77c5ba88e11d9368a78105d3 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 9 May 2024 09:29:02 +0530 Subject: [PATCH 520/664] Update deployment.yaml --- deployment.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/deployment.yaml b/deployment.yaml index 13b74904be..8c29b7100f 100644 --- a/deployment.yaml +++ b/deployment.yaml @@ -11,6 +11,8 @@ spec: app: nodeapp template: metadata: + annotations: + iam.gke.io/gcp-service-account: "test-sa@goldengate-1.iam.gserviceaccount.com" # Replace PROJECT_ID with your GCP project ID labels: app: nodeapp spec: From 85d6a191f3a1c19eb2cede2f823c136501812105 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 9 May 2024 09:32:30 +0530 Subject: [PATCH 521/664] Update node.js.yml --- .github/workflows/node.js.yml | 61 +++++++++++++++++++++-------------- 1 file changed, 36 insertions(+), 25 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 3e6c8b6c82..431633bf90 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -1,35 +1,46 @@ -name: Migrate All Images to Artifact Registry +name: Node.js CI on: push: - branches: - - main # Adjust branch name as needed + branches: [ "main" ] + pull_request: + branches: [ "main" ] jobs: - migrate: - runs-on: self-hosted + deploy: - steps: - # Step 1: Authenticate with GCR - - name: Configure Docker CLI for GCR - uses: google-github-actions/setup-gcloud@v0.2.0 - with: - service_account_key: ${{ secrets.GCR_SA_KEY }} - export-access-token: true + runs-on: self-hosted - # Step 2: Pull all images from GCR - - name: Pull all images from GCR - run: | - #!/bin/bash + strategy: + matrix: + node-version: [14.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ - # Set the GCR project ID - PROJECT_ID="goldengate-1" + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run build --if-present + - run: npm install - # Get a list of all images in the project - IMAGES=$(gcloud container images list --project="$PROJECT_ID" --format='value(name)') + # Install the gcloud SDK with Workload Identity support + - name: install the gcloud cli with Workload Identity + uses: google-github-actions/setup-gcloud@v0.2.0 + with: + workload_identity: true + export_default_credentials: true - # Iterate through each image - for IMAGE in $IMAGES; do - # Pull all tags of the image - docker pull "$IMAGE" - done + # - name: build and push the docker image + # run: | + # gcloud auth configure-docker us-central1-docker.pkg.dev + # docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest . + # docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + - name: deploy to gke + run: | + gcloud container clusters get-credentials innotest-cluster --region us-central1-c + kubectl apply -f deployment.yaml + kubectl apply -f service.yaml From 29fa742e5d3e9319fe74178e9c01db0f52ba2da4 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 9 May 2024 09:34:40 +0530 Subject: [PATCH 522/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 431633bf90..cfe47debd1 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -9,7 +9,7 @@ on: jobs: deploy: - runs-on: self-hosted + runs-on: ubuntu-latest strategy: matrix: From a015f03b36a5d81002f1d45aa6dc8319c8b9eb68 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 9 May 2024 09:37:04 +0530 Subject: [PATCH 523/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index cfe47debd1..b21eef7267 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -41,6 +41,6 @@ jobs: # docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest - name: deploy to gke run: | - gcloud container clusters get-credentials innotest-cluster --region us-central1-c + gcloud container clusters get-credentials test-cluster --region asia-south1-a kubectl apply -f deployment.yaml kubectl apply -f service.yaml From d22273694642b37d618dd2a2525ffdea012970db Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 9 May 2024 09:43:54 +0530 Subject: [PATCH 524/664] Update node.js.yml --- .github/workflows/node.js.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index b21eef7267..24edf39a12 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -1,4 +1,4 @@ -name: Node.js CI +name: Node.js CI/CD with Workload Identity on: push: @@ -14,15 +14,16 @@ jobs: strategy: matrix: node-version: [14.x] - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} cache: 'npm' + - run: npm ci - run: npm run build --if-present - run: npm install @@ -34,11 +35,12 @@ jobs: workload_identity: true export_default_credentials: true - # - name: build and push the docker image - # run: | - # gcloud auth configure-docker us-central1-docker.pkg.dev - # docker build -t us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest . - # docker push us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + - name: Authenticate with Google Cloud + run: gcloud auth login + + - name: Set Google Cloud Project + run: gcloud config set project ${{ secrets.GOOGLE_PROJECT }} + - name: deploy to gke run: | gcloud container clusters get-credentials test-cluster --region asia-south1-a From 58369f67971e15752b266fe34352ef141604b5b4 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 9 May 2024 09:50:09 +0530 Subject: [PATCH 525/664] Update node.js.yml --- .github/workflows/node.js.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 24edf39a12..39356e0738 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -35,8 +35,8 @@ jobs: workload_identity: true export_default_credentials: true - - name: Authenticate with Google Cloud - run: gcloud auth login + - name: Install gke-gcloud-auth-plugin + run: gcloud components install gke-gcloud-auth-plugin - name: Set Google Cloud Project run: gcloud config set project ${{ secrets.GOOGLE_PROJECT }} From 0c341cfde02012b6c162356b5ec29a058fb69115 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 9 May 2024 09:56:01 +0530 Subject: [PATCH 526/664] Update node.js.yml --- .github/workflows/node.js.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 39356e0738..c8b2418285 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -28,19 +28,17 @@ jobs: - run: npm run build --if-present - run: npm install - # Install the gcloud SDK with Workload Identity support - - name: install the gcloud cli with Workload Identity - uses: google-github-actions/setup-gcloud@v0.2.0 + # Set up Google Cloud SDK + - name: Configure Google Cloud SDK + uses: google-github-actions/setup-gcloud@v0.3.0 with: + project_id: ${{ secrets.GOOGLE_PROJECT }} workload_identity: true export_default_credentials: true - name: Install gke-gcloud-auth-plugin run: gcloud components install gke-gcloud-auth-plugin - - name: Set Google Cloud Project - run: gcloud config set project ${{ secrets.GOOGLE_PROJECT }} - - name: deploy to gke run: | gcloud container clusters get-credentials test-cluster --region asia-south1-a From a2201e0ead314ba1e8896290cdeca47e066f5ce1 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 9 May 2024 10:01:56 +0530 Subject: [PATCH 527/664] Update node.js.yml --- .github/workflows/node.js.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index c8b2418285..08983592e3 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -30,17 +30,16 @@ jobs: # Set up Google Cloud SDK - name: Configure Google Cloud SDK - uses: google-github-actions/setup-gcloud@v0.3.0 - with: - project_id: ${{ secrets.GOOGLE_PROJECT }} - workload_identity: true - export_default_credentials: true + run: | + gcloud config set project ${{ secrets.GOOGLE_PROJECT }} + gcloud auth configure-docker + gcloud container clusters get-credentials test-cluster --region asia-south1-a - - name: Install gke-gcloud-auth-plugin - run: gcloud components install gke-gcloud-auth-plugin + - name: Set up Workload Identity + run: | + kubectl create clusterrolebinding my-cluster-admin-binding --clusterrole=cluster-admin --user=$(gcloud auth list --filter=status:ACTIVE --format="value(account)" | head -n 1) - name: deploy to gke run: | - gcloud container clusters get-credentials test-cluster --region asia-south1-a kubectl apply -f deployment.yaml kubectl apply -f service.yaml From 6dc987b8357d7bf223743f4fedab4e0436d6b14b Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 14 May 2024 12:31:10 +0530 Subject: [PATCH 528/664] Update node.js.yml --- .github/workflows/node.js.yml | 62 +++++++++++++---------------------- 1 file changed, 23 insertions(+), 39 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 08983592e3..2104f7a37d 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -1,45 +1,29 @@ -name: Node.js CI/CD with Workload Identity +name: Setup Workload Identity Federation on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] + workflow_dispatch: jobs: - deploy: - + setup: runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [14.x] - steps: - - uses: actions/checkout@v3 - - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - - run: npm ci - - run: npm run build --if-present - - run: npm install - - # Set up Google Cloud SDK - - name: Configure Google Cloud SDK - run: | - gcloud config set project ${{ secrets.GOOGLE_PROJECT }} - gcloud auth configure-docker - gcloud container clusters get-credentials test-cluster --region asia-south1-a - - - name: Set up Workload Identity - run: | - kubectl create clusterrolebinding my-cluster-admin-binding --clusterrole=cluster-admin --user=$(gcloud auth list --filter=status:ACTIVE --format="value(account)" | head -n 1) - - - name: deploy to gke - run: | - kubectl apply -f deployment.yaml - kubectl apply -f service.yaml + - name: Checkout code + uses: actions/checkout@v2 + + - name: Authenticate with Google Cloud + uses: google-github-actions/auth@v0.7 + + - name: Create namespace + run: | + kubectl create namespace test-ns + + - name: Create ServiceAccount + run: | + kubectl create serviceaccount KSA_NAME --namespace test-sa + + - name: Bind IAM policy + run: | + gcloud projects add-iam-policy-binding goldengate-1 \ + --role=roles/container.clusterViewer \ + --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/test-ns/sa/test-sa \ + --condition=None From 5aed163c363d1e1454b13dcce59bcc65dbea38a7 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 14 May 2024 12:32:51 +0530 Subject: [PATCH 529/664] Update node.js.yml From a15b85ecb5fabaace62bb5da15ce0ad79ae8065e Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 14 May 2024 12:35:01 +0530 Subject: [PATCH 530/664] Update node.js.yml --- .github/workflows/node.js.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 2104f7a37d..ea6572f147 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -1,7 +1,10 @@ name: Setup Workload Identity Federation on: - workflow_dispatch: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] jobs: setup: From 2b74976cc093e86ea9006b36cce6c25a477fcf4a Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 14 May 2024 12:46:00 +0530 Subject: [PATCH 531/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index ea6572f147..22b3d48769 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -14,7 +14,7 @@ jobs: uses: actions/checkout@v2 - name: Authenticate with Google Cloud - uses: google-github-actions/auth@v0.7 + uses: google-github-actions/setup-gcloud@v0.2.0 - name: Create namespace run: | From a79fca6c7321970d0a01d0562578754db1b2acaf Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 14 May 2024 12:55:34 +0530 Subject: [PATCH 532/664] Update node.js.yml --- .github/workflows/node.js.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 22b3d48769..d15db3505b 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -16,6 +16,9 @@ jobs: - name: Authenticate with Google Cloud uses: google-github-actions/setup-gcloud@v0.2.0 + - name: Get cluster credentials + run: gcloud container clusters get-credentials testgke-cluster --region asia-south1-a + - name: Create namespace run: | kubectl create namespace test-ns @@ -30,3 +33,4 @@ jobs: --role=roles/container.clusterViewer \ --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/test-ns/sa/test-sa \ --condition=None + From 13b5b9ca2071ac1b9577373c79df7bf7c921dbf1 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 14 May 2024 13:26:46 +0530 Subject: [PATCH 533/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index d15db3505b..496d95b60f 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -8,7 +8,7 @@ on: jobs: setup: - runs-on: ubuntu-latest + runs-on: self-hosted steps: - name: Checkout code uses: actions/checkout@v2 From bdb36ccacb2943728fce386ec9eae97a2d5439d3 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 14 May 2024 13:34:05 +0530 Subject: [PATCH 534/664] Update node.js.yml --- .github/workflows/node.js.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 496d95b60f..49391b7e99 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -21,16 +21,16 @@ jobs: - name: Create namespace run: | - kubectl create namespace test-ns + kubectl create namespace testgke-ns - name: Create ServiceAccount run: | - kubectl create serviceaccount KSA_NAME --namespace test-sa + kubectl create serviceaccount KSA_NAME --namespace testksa-sa - name: Bind IAM policy run: | gcloud projects add-iam-policy-binding goldengate-1 \ --role=roles/container.clusterViewer \ - --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/test-ns/sa/test-sa \ + --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/testgke-ns/sa/testksa-sa \ --condition=None From 51faa8d9bb45454a8968ab02f94c288182b11329 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 14 May 2024 13:36:36 +0530 Subject: [PATCH 535/664] Update node.js.yml --- .github/workflows/node.js.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 49391b7e99..65ef480f46 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -25,12 +25,12 @@ jobs: - name: Create ServiceAccount run: | - kubectl create serviceaccount KSA_NAME --namespace testksa-sa + kubectl create serviceaccount KSA_NAME --namespace testing-sa - name: Bind IAM policy run: | gcloud projects add-iam-policy-binding goldengate-1 \ --role=roles/container.clusterViewer \ - --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/testgke-ns/sa/testksa-sa \ + --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/testgke-ns/sa/testing-sa \ --condition=None From 18a0afa5cb4432593bff5a3ab13ea5ce406e8b97 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 14 May 2024 13:38:34 +0530 Subject: [PATCH 536/664] Update node.js.yml --- .github/workflows/node.js.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 65ef480f46..95479e94bb 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -21,16 +21,16 @@ jobs: - name: Create namespace run: | - kubectl create namespace testgke-ns + kubectl create namespace testing-ns - name: Create ServiceAccount run: | - kubectl create serviceaccount KSA_NAME --namespace testing-sa + kubectl create serviceaccount KSA_NAME --namespace test-sa - name: Bind IAM policy run: | gcloud projects add-iam-policy-binding goldengate-1 \ --role=roles/container.clusterViewer \ - --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/testgke-ns/sa/testing-sa \ + --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/testing-ns/sa/test-sa \ --condition=None From a49a5737111ac65e28ffbb951f014549473d210b Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 14 May 2024 13:42:41 +0530 Subject: [PATCH 537/664] Update node.js.yml --- .github/workflows/node.js.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 95479e94bb..4365afbcc7 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -21,16 +21,16 @@ jobs: - name: Create namespace run: | - kubectl create namespace testing-ns + kubectl create namespace testns - name: Create ServiceAccount run: | - kubectl create serviceaccount KSA_NAME --namespace test-sa + kubectl create serviceaccount testing-sa --namespace testns - name: Bind IAM policy run: | gcloud projects add-iam-policy-binding goldengate-1 \ --role=roles/container.clusterViewer \ - --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/testing-ns/sa/test-sa \ + --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/testns/sa/testing-sa \ --condition=None From d2665cdc500dd4fd0ea24dd4a94e4ed4bd9edb11 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 14 May 2024 13:49:16 +0530 Subject: [PATCH 538/664] Update node.js.yml --- .github/workflows/node.js.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 4365afbcc7..0599ef8edf 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -21,16 +21,16 @@ jobs: - name: Create namespace run: | - kubectl create namespace testns + kubectl create namespace test-namspace - name: Create ServiceAccount run: | - kubectl create serviceaccount testing-sa --namespace testns + kubectl create serviceaccount test-ksa --namespace testnamspace - name: Bind IAM policy run: | gcloud projects add-iam-policy-binding goldengate-1 \ --role=roles/container.clusterViewer \ - --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/testns/sa/testing-sa \ + --member=workload-identity-testing account\ --condition=None From 94507fbd2ac68135543a6be98fa38bd8b8024ba0 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 14 May 2024 13:51:27 +0530 Subject: [PATCH 539/664] Update node.js.yml --- .github/workflows/node.js.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 0599ef8edf..8ec28f1e10 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -25,12 +25,12 @@ jobs: - name: Create ServiceAccount run: | - kubectl create serviceaccount test-ksa --namespace testnamspace + kubectl create serviceaccount test-ksa --namespace test-namspace - name: Bind IAM policy run: | gcloud projects add-iam-policy-binding goldengate-1 \ --role=roles/container.clusterViewer \ - --member=workload-identity-testing account\ + --member=GHA-workload-identity-testing account\ --condition=None From 3e175b690c2dc40f549cb342558069549cf27fdc Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 14 May 2024 13:52:41 +0530 Subject: [PATCH 540/664] Update node.js.yml --- .github/workflows/node.js.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 8ec28f1e10..4e003d7e3c 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -21,11 +21,11 @@ jobs: - name: Create namespace run: | - kubectl create namespace test-namspace + kubectl create namespace testing-namspace - name: Create ServiceAccount run: | - kubectl create serviceaccount test-ksa --namespace test-namspace + kubectl create serviceaccount test-ksa --namespace testing-namspace - name: Bind IAM policy run: | From 4ba385c900a94e4c5336139c378f3d1704be2eff Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 14 May 2024 13:53:36 +0530 Subject: [PATCH 541/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 4e003d7e3c..b2e709d48b 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -31,6 +31,6 @@ jobs: run: | gcloud projects add-iam-policy-binding goldengate-1 \ --role=roles/container.clusterViewer \ - --member=GHA-workload-identity-testing account\ + --member=GHA-workload-identity-testing \ --condition=None From 41b9801d86406f914719f6851723e56edf1c3000 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 14 May 2024 13:54:47 +0530 Subject: [PATCH 542/664] Update node.js.yml --- .github/workflows/node.js.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index b2e709d48b..cbc28d85ea 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -21,11 +21,11 @@ jobs: - name: Create namespace run: | - kubectl create namespace testing-namspace + kubectl create namespace testnamespace - name: Create ServiceAccount run: | - kubectl create serviceaccount test-ksa --namespace testing-namspace + kubectl create serviceaccount testksa --namespace testnamespace - name: Bind IAM policy run: | From 0af4f6fed068c2efe84bd4499f5545dd5dc91165 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 17 May 2024 09:57:08 +0530 Subject: [PATCH 543/664] Update node.js.yml --- .github/workflows/node.js.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index cbc28d85ea..c87387ba70 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -21,16 +21,27 @@ jobs: - name: Create namespace run: | - kubectl create namespace testnamespace + kubectl create namespace testns - name: Create ServiceAccount run: | - kubectl create serviceaccount testksa --namespace testnamespace + kubectl create serviceaccount testing-sa --namespace testns - name: Bind IAM policy run: | gcloud projects add-iam-policy-binding goldengate-1 \ --role=roles/container.clusterViewer \ - --member=GHA-workload-identity-testing \ + --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/testns/sa/testing-sa \ --condition=None + - name: Build and push the docker image + run: | + gcloud auth configure-docker us-central1-docker.pkg.dev + docker build -t us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest . + docker push us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest + + - name: Deploy to GKE + run: | + gcloud container clusters get-credentials testgke-cluster --region asia-south1-c + kubectl apply -f deployment.yaml + kubectl apply -f service.yaml From 95c593008bbff28388a76ff44740ba48682a315d Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 17 May 2024 09:59:42 +0530 Subject: [PATCH 544/664] Update node.js.yml --- .github/workflows/node.js.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index c87387ba70..d9d57cc976 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -21,17 +21,17 @@ jobs: - name: Create namespace run: | - kubectl create namespace testns + kubectl create namespace test-namespace - name: Create ServiceAccount run: | - kubectl create serviceaccount testing-sa --namespace testns + kubectl create serviceaccount test-ksa --namespace test-namespace - name: Bind IAM policy run: | gcloud projects add-iam-policy-binding goldengate-1 \ --role=roles/container.clusterViewer \ - --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/testns/sa/testing-sa \ + --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/test-namespace/sa/test-ksa \ --condition=None - name: Build and push the docker image @@ -43,5 +43,6 @@ jobs: - name: Deploy to GKE run: | gcloud container clusters get-credentials testgke-cluster --region asia-south1-c + kubectl rollout restart deployment nodeapp-deployment kubectl apply -f deployment.yaml kubectl apply -f service.yaml From d1f226b847d2d2bd6f338c182bc3371e46a9619e Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 17 May 2024 10:06:28 +0530 Subject: [PATCH 545/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index d9d57cc976..9adb8b7d73 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -42,7 +42,7 @@ jobs: - name: Deploy to GKE run: | - gcloud container clusters get-credentials testgke-cluster --region asia-south1-c + gcloud container clusters get-credentials testgke-cluster --region asia-south1-a kubectl rollout restart deployment nodeapp-deployment kubectl apply -f deployment.yaml kubectl apply -f service.yaml From 649a23788c377bc3d4263a4b5ed9e3a43a3e1c18 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 17 May 2024 10:07:49 +0530 Subject: [PATCH 546/664] Update node.js.yml --- .github/workflows/node.js.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 9adb8b7d73..0144badb18 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -21,17 +21,17 @@ jobs: - name: Create namespace run: | - kubectl create namespace test-namespace + kubectl create namespace test-NS - name: Create ServiceAccount run: | - kubectl create serviceaccount test-ksa --namespace test-namespace + kubectl create serviceaccount test-KSA --namespace test-NS - name: Bind IAM policy run: | gcloud projects add-iam-policy-binding goldengate-1 \ --role=roles/container.clusterViewer \ - --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/test-namespace/sa/test-ksa \ + --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/test-NS/sa/test-KSA \ --condition=None - name: Build and push the docker image From da9a50e7e10e24741d8166eb13b7c631206437eb Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 17 May 2024 10:10:11 +0530 Subject: [PATCH 547/664] Update node.js.yml --- .github/workflows/node.js.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 0144badb18..920a4a79ae 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -21,17 +21,17 @@ jobs: - name: Create namespace run: | - kubectl create namespace test-NS + kubectl create namespace testgke-ns - name: Create ServiceAccount run: | - kubectl create serviceaccount test-KSA --namespace test-NS + kubectl create serviceaccount testgke-ksa --namespace testgke-ns - name: Bind IAM policy run: | gcloud projects add-iam-policy-binding goldengate-1 \ --role=roles/container.clusterViewer \ - --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/test-NS/sa/test-KSA \ + --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/testgke-ns/sa/testgke-ksa \ --condition=None - name: Build and push the docker image From 40c98ac63cf8b6e37d400b58f2a9bf6509bbabc5 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 17 May 2024 10:11:48 +0530 Subject: [PATCH 548/664] Update node.js.yml --- .github/workflows/node.js.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 920a4a79ae..4e56bd0c48 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -21,17 +21,17 @@ jobs: - name: Create namespace run: | - kubectl create namespace testgke-ns + kubectl create namespace test_ns - name: Create ServiceAccount run: | - kubectl create serviceaccount testgke-ksa --namespace testgke-ns + kubectl create serviceaccount test_ksa --namespace test_ns - name: Bind IAM policy run: | gcloud projects add-iam-policy-binding goldengate-1 \ --role=roles/container.clusterViewer \ - --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/testgke-ns/sa/testgke-ksa \ + --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/test_ns/sa/test_ksa \ --condition=None - name: Build and push the docker image From 43ca8dd17fcc787a32959a27ca665fd8b764b6cf Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 17 May 2024 10:14:01 +0530 Subject: [PATCH 549/664] Update node.js.yml --- .github/workflows/node.js.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 4e56bd0c48..af0a7407bc 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -21,17 +21,17 @@ jobs: - name: Create namespace run: | - kubectl create namespace test_ns + kubectl create namespace gke-ns - name: Create ServiceAccount run: | - kubectl create serviceaccount test_ksa --namespace test_ns + kubectl create serviceaccount gke_ksa --namespace gke_ns - name: Bind IAM policy run: | gcloud projects add-iam-policy-binding goldengate-1 \ --role=roles/container.clusterViewer \ - --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/test_ns/sa/test_ksa \ + --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/gke_ns/sa/gke_ksa \ --condition=None - name: Build and push the docker image From 2b43d9f09199e2537f1de1a452793be5d2628d49 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 17 May 2024 10:21:14 +0530 Subject: [PATCH 550/664] Update node.js.yml --- .github/workflows/node.js.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index af0a7407bc..b70a7579fe 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -21,17 +21,17 @@ jobs: - name: Create namespace run: | - kubectl create namespace gke-ns + kubectl create namespace ns-test - name: Create ServiceAccount run: | - kubectl create serviceaccount gke_ksa --namespace gke_ns + kubectl create serviceaccount ksa-test --namespace ns-test - name: Bind IAM policy run: | gcloud projects add-iam-policy-binding goldengate-1 \ --role=roles/container.clusterViewer \ - --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/gke_ns/sa/gke_ksa \ + --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/ns-test/sa/ksa-test \ --condition=None - name: Build and push the docker image From c41e7f74eff1a0f753a815009b664970772013f4 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 17 May 2024 10:27:55 +0530 Subject: [PATCH 551/664] Update deployment.yaml --- deployment.yaml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/deployment.yaml b/deployment.yaml index 8c29b7100f..1f42e272e9 100644 --- a/deployment.yaml +++ b/deployment.yaml @@ -5,22 +5,21 @@ metadata: labels: app: nodeapp spec: - replicas: 3 + replicas: 1 selector: matchLabels: app: nodeapp template: metadata: - annotations: - iam.gke.io/gcp-service-account: "test-sa@goldengate-1.iam.gserviceaccount.com" # Replace PROJECT_ID with your GCP project ID labels: app: nodeapp spec: containers: - name: nodeserver - image: us-central1-docker.pkg.dev/goldengate-1/test-project/node:latest + image: us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest ports: - containerPort: 3000 - imagePullPolicy: Always # Always pull the latest image + imagePullPolicy: Always strategy: type: RollingUpdate + From cc8e291ee047e0b12c292116717059dda2f60ebc Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 17 May 2024 10:29:16 +0530 Subject: [PATCH 552/664] Update node.js.yml --- .github/workflows/node.js.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index b70a7579fe..8edaae684b 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -21,17 +21,17 @@ jobs: - name: Create namespace run: | - kubectl create namespace ns-test + kubectl create namespace nsgke-test - name: Create ServiceAccount run: | - kubectl create serviceaccount ksa-test --namespace ns-test + kubectl create serviceaccount ksagke-test --namespace nsgke-test - name: Bind IAM policy run: | gcloud projects add-iam-policy-binding goldengate-1 \ --role=roles/container.clusterViewer \ - --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/ns-test/sa/ksa-test \ + --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/nsgke-test/sa/ksagke-test \ --condition=None - name: Build and push the docker image @@ -43,6 +43,5 @@ jobs: - name: Deploy to GKE run: | gcloud container clusters get-credentials testgke-cluster --region asia-south1-a - kubectl rollout restart deployment nodeapp-deployment kubectl apply -f deployment.yaml kubectl apply -f service.yaml From e546a5e47bca4d2b6a84cf2ad02f80199ca97221 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 17 May 2024 10:54:04 +0530 Subject: [PATCH 553/664] Update node.js.yml --- .github/workflows/node.js.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 8edaae684b..59a1b7d834 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -21,17 +21,17 @@ jobs: - name: Create namespace run: | - kubectl create namespace nsgke-test + kubectl create namespace test-nsgke - name: Create ServiceAccount run: | - kubectl create serviceaccount ksagke-test --namespace nsgke-test + kubectl create serviceaccount test-ksagke --namespace test-nsgke - name: Bind IAM policy run: | gcloud projects add-iam-policy-binding goldengate-1 \ --role=roles/container.clusterViewer \ - --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/nsgke-test/sa/ksagke-test \ + --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/test-nsgke/sa/test-ksagke \ --condition=None - name: Build and push the docker image @@ -43,5 +43,6 @@ jobs: - name: Deploy to GKE run: | gcloud container clusters get-credentials testgke-cluster --region asia-south1-a + kubectl rollout restart deployment nodeapp-deployment kubectl apply -f deployment.yaml kubectl apply -f service.yaml From 743a252cf91ada3b4759e3f666bd7c17477b9b6a Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 17 May 2024 11:23:07 +0530 Subject: [PATCH 554/664] Create testing with SA key --- .github/workflows/testing with SA key | 54 +++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/testing with SA key diff --git a/.github/workflows/testing with SA key b/.github/workflows/testing with SA key new file mode 100644 index 0000000000..9fc33328bc --- /dev/null +++ b/.github/workflows/testing with SA key @@ -0,0 +1,54 @@ +name: Node.js CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + deploy: + + runs-on: self-hosted + + strategy: + matrix: + node-version: [14.x] + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run build --if-present + - run: npm install + + - name: Set gcloud account + run: gcloud config set account testgcp-sa@goldengate-1.iam.gserviceaccount.com + # Replace with the email address associated with the service account. + + - name: Install the gcloud cli + uses: google-github-actions/setup-gcloud@v0.2.0 + with: + project_id: ${{ secrets.GOOGLE_PROJECT }} + service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} + export_default_credentials: true + + - name: build and push the docker image + env: + GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} + run: | + gcloud auth configure-docker us-central1-docker.pkg.dev + docker build -t us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest . + docker push us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest + - name: deploy to gke + env: + GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} + run: | + gcloud container clusters get-credentials testgke-cluster --region asia-south1-a + kubectl rollout restart deployment nodeapp-deployment + kubectl apply -f deployment.yaml + kubectl apply -f service.yaml From 905ef6c2ac4c68745e2eb8c3b774e38370c97dec Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 17 May 2024 11:28:47 +0530 Subject: [PATCH 555/664] Update node.js.yml --- .github/workflows/node.js.yml | 78 +++++++++++++++++++---------------- 1 file changed, 42 insertions(+), 36 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 59a1b7d834..9fc33328bc 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -1,4 +1,4 @@ -name: Setup Workload Identity Federation +name: Node.js CI on: push: @@ -7,42 +7,48 @@ on: branches: [ "main" ] jobs: - setup: + deploy: + runs-on: self-hosted + + strategy: + matrix: + node-version: [14.x] + steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Authenticate with Google Cloud - uses: google-github-actions/setup-gcloud@v0.2.0 - - - name: Get cluster credentials - run: gcloud container clusters get-credentials testgke-cluster --region asia-south1-a - - - name: Create namespace - run: | - kubectl create namespace test-nsgke - - - name: Create ServiceAccount - run: | - kubectl create serviceaccount test-ksagke --namespace test-nsgke - - - name: Bind IAM policy - run: | - gcloud projects add-iam-policy-binding goldengate-1 \ - --role=roles/container.clusterViewer \ - --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/test-nsgke/sa/test-ksagke \ - --condition=None + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run build --if-present + - run: npm install + + - name: Set gcloud account + run: gcloud config set account testgcp-sa@goldengate-1.iam.gserviceaccount.com + # Replace with the email address associated with the service account. - - name: Build and push the docker image - run: | - gcloud auth configure-docker us-central1-docker.pkg.dev - docker build -t us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest . - docker push us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest + - name: Install the gcloud cli + uses: google-github-actions/setup-gcloud@v0.2.0 + with: + project_id: ${{ secrets.GOOGLE_PROJECT }} + service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} + export_default_credentials: true - - name: Deploy to GKE - run: | - gcloud container clusters get-credentials testgke-cluster --region asia-south1-a - kubectl rollout restart deployment nodeapp-deployment - kubectl apply -f deployment.yaml - kubectl apply -f service.yaml + - name: build and push the docker image + env: + GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} + run: | + gcloud auth configure-docker us-central1-docker.pkg.dev + docker build -t us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest . + docker push us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest + - name: deploy to gke + env: + GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} + run: | + gcloud container clusters get-credentials testgke-cluster --region asia-south1-a + kubectl rollout restart deployment nodeapp-deployment + kubectl apply -f deployment.yaml + kubectl apply -f service.yaml From 0d823daee386a0ad2f7fec692bf1c46b5b9a336f Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 17 May 2024 11:31:59 +0530 Subject: [PATCH 556/664] Rename node.js.yml to testing with SA keys --- .github/workflows/{node.js.yml => testing with SA keys} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{node.js.yml => testing with SA keys} (100%) diff --git a/.github/workflows/node.js.yml b/.github/workflows/testing with SA keys similarity index 100% rename from .github/workflows/node.js.yml rename to .github/workflows/testing with SA keys From 18b9db80671f85535e3b593831a08c276ad801a3 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 17 May 2024 11:34:09 +0530 Subject: [PATCH 557/664] Update testing with SA keys From 2801cefeccfa2889820496cfa8757fde7edfd898 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 17 May 2024 11:34:57 +0530 Subject: [PATCH 558/664] Delete .github/workflows/testing with SA key --- .github/workflows/testing with SA key | 54 --------------------------- 1 file changed, 54 deletions(-) delete mode 100644 .github/workflows/testing with SA key diff --git a/.github/workflows/testing with SA key b/.github/workflows/testing with SA key deleted file mode 100644 index 9fc33328bc..0000000000 --- a/.github/workflows/testing with SA key +++ /dev/null @@ -1,54 +0,0 @@ -name: Node.js CI - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - deploy: - - runs-on: self-hosted - - strategy: - matrix: - node-version: [14.x] - - steps: - - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - run: npm ci - - run: npm run build --if-present - - run: npm install - - - name: Set gcloud account - run: gcloud config set account testgcp-sa@goldengate-1.iam.gserviceaccount.com - # Replace with the email address associated with the service account. - - - name: Install the gcloud cli - uses: google-github-actions/setup-gcloud@v0.2.0 - with: - project_id: ${{ secrets.GOOGLE_PROJECT }} - service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} - export_default_credentials: true - - - name: build and push the docker image - env: - GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} - run: | - gcloud auth configure-docker us-central1-docker.pkg.dev - docker build -t us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest . - docker push us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest - - name: deploy to gke - env: - GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} - run: | - gcloud container clusters get-credentials testgke-cluster --region asia-south1-a - kubectl rollout restart deployment nodeapp-deployment - kubectl apply -f deployment.yaml - kubectl apply -f service.yaml From 7756dab5cf53a3a3e00c2eea564d1b1494696d83 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 17 May 2024 11:39:44 +0530 Subject: [PATCH 559/664] Create testing with workload identity --- .../workflows/testing with workload identity | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/testing with workload identity diff --git a/.github/workflows/testing with workload identity b/.github/workflows/testing with workload identity new file mode 100644 index 0000000000..96133761a2 --- /dev/null +++ b/.github/workflows/testing with workload identity @@ -0,0 +1,45 @@ +name: Setup Workload Identity Federation + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + setup: + runs-on: self-hosted + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Authenticate with Google Cloud + uses: google-github-actions/setup-gcloud@v0.2.0 + + - name: Get cluster credentials + run: gcloud container clusters get-credentials testgke-cluster --region asia-south1-a + + - name: Create namespace + run: | + kubectl create namespace test-ns-gke + + - name: Create ServiceAccount + run: | + kubectl create serviceaccount test-ns-gke --namespace test-ns-gke + + - name: Bind IAM policy + run: | + gcloud projects add-iam-policy-binding goldengate-1 \ + --role=roles/container.clusterViewer \ + --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/test-ns-gke/sa/test-ksa-gke \ + --condition=None + - name: Build and push the docker image + run: | + gcloud auth configure-docker us-central1-docker.pkg.dev + docker build -t us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest . + docker push us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest + - name: Deploy to GKE + run: | + gcloud container clusters get-credentials testgke-cluster --region asia-south1-a + kubectl apply -f deployment.yaml + kubectl apply -f service.yaml From f2f41fd62b1afeec8323f1862c449a14d07a8fd7 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 17 May 2024 11:40:57 +0530 Subject: [PATCH 560/664] Update testing with workload identity From 13d837e9e74a30e3966be3ae40c216e56d6e6a54 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 17 May 2024 11:50:07 +0530 Subject: [PATCH 561/664] Create node.js.yml --- .github/workflows/node.js.yml | 63 +++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/workflows/node.js.yml diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 0000000000..c355ec5f1f --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,63 @@ +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs + +name: Setup Workload Identity Federation + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: self-hosted + + strategy: + matrix: + node-version: [14.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run build --if-present + - run: npm test + + + - name: Authenticate with Google Cloud + uses: google-github-actions/setup-gcloud@v0.2.0 + + - name: Get cluster credentials + run: gcloud container clusters get-credentials testgke-cluster --region asia-south1-a + + - name: Create namespace + run: | + kubectl create namespace test-ns-gke + + - name: Create ServiceAccount + run: | + kubectl create serviceaccount test-ns-gke --namespace test-ns-gke + + - name: Bind IAM policy + run: | + gcloud projects add-iam-policy-binding goldengate-1 \ + --role=roles/container.clusterViewer \ + --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/test-ns-gke/sa/test-ksa-gke \ + --condition=None + - name: Build and push the docker image + run: | + gcloud auth configure-docker us-central1-docker.pkg.dev + docker build -t us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest . + docker push us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest + - name: Deploy to GKE + run: | + gcloud container clusters get-credentials testgke-cluster --region asia-south1-a + kubectl apply -f deployment.yaml + kubectl apply -f service.yaml From d174c00cb50431225798072e956273feba0e42dc Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 17 May 2024 11:50:24 +0530 Subject: [PATCH 562/664] Delete .github/workflows/node.js.yml --- .github/workflows/node.js.yml | 63 ----------------------------------- 1 file changed, 63 deletions(-) delete mode 100644 .github/workflows/node.js.yml diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml deleted file mode 100644 index c355ec5f1f..0000000000 --- a/.github/workflows/node.js.yml +++ /dev/null @@ -1,63 +0,0 @@ -# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs - -name: Setup Workload Identity Federation - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - build: - - runs-on: self-hosted - - strategy: - matrix: - node-version: [14.x] - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ - - steps: - - uses: actions/checkout@v4 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - run: npm ci - - run: npm run build --if-present - - run: npm test - - - - name: Authenticate with Google Cloud - uses: google-github-actions/setup-gcloud@v0.2.0 - - - name: Get cluster credentials - run: gcloud container clusters get-credentials testgke-cluster --region asia-south1-a - - - name: Create namespace - run: | - kubectl create namespace test-ns-gke - - - name: Create ServiceAccount - run: | - kubectl create serviceaccount test-ns-gke --namespace test-ns-gke - - - name: Bind IAM policy - run: | - gcloud projects add-iam-policy-binding goldengate-1 \ - --role=roles/container.clusterViewer \ - --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/test-ns-gke/sa/test-ksa-gke \ - --condition=None - - name: Build and push the docker image - run: | - gcloud auth configure-docker us-central1-docker.pkg.dev - docker build -t us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest . - docker push us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest - - name: Deploy to GKE - run: | - gcloud container clusters get-credentials testgke-cluster --region asia-south1-a - kubectl apply -f deployment.yaml - kubectl apply -f service.yaml From bff2a2eca8e606de47769acc52b87e30556472cc Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Fri, 17 May 2024 12:08:02 +0530 Subject: [PATCH 563/664] Update testing with workload identity --- .github/workflows/testing with workload identity | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/testing with workload identity b/.github/workflows/testing with workload identity index 96133761a2..4d95db722d 100644 --- a/.github/workflows/testing with workload identity +++ b/.github/workflows/testing with workload identity @@ -41,5 +41,6 @@ jobs: - name: Deploy to GKE run: | gcloud container clusters get-credentials testgke-cluster --region asia-south1-a + kubectl rollout restart deployment nodeapp-deployment kubectl apply -f deployment.yaml kubectl apply -f service.yaml From 88d436ad24d56d819d5ed832ba7bec48cb322e38 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 27 May 2024 09:42:55 +0530 Subject: [PATCH 564/664] Create nodejs.yaml --- .github/workflows/nodejs.yaml | 54 +++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/nodejs.yaml diff --git a/.github/workflows/nodejs.yaml b/.github/workflows/nodejs.yaml new file mode 100644 index 0000000000..9fc33328bc --- /dev/null +++ b/.github/workflows/nodejs.yaml @@ -0,0 +1,54 @@ +name: Node.js CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + deploy: + + runs-on: self-hosted + + strategy: + matrix: + node-version: [14.x] + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run build --if-present + - run: npm install + + - name: Set gcloud account + run: gcloud config set account testgcp-sa@goldengate-1.iam.gserviceaccount.com + # Replace with the email address associated with the service account. + + - name: Install the gcloud cli + uses: google-github-actions/setup-gcloud@v0.2.0 + with: + project_id: ${{ secrets.GOOGLE_PROJECT }} + service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} + export_default_credentials: true + + - name: build and push the docker image + env: + GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} + run: | + gcloud auth configure-docker us-central1-docker.pkg.dev + docker build -t us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest . + docker push us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest + - name: deploy to gke + env: + GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} + run: | + gcloud container clusters get-credentials testgke-cluster --region asia-south1-a + kubectl rollout restart deployment nodeapp-deployment + kubectl apply -f deployment.yaml + kubectl apply -f service.yaml From 1e1248099b4599444037d62c5c8f1f7911c8fe0a Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 27 May 2024 09:44:34 +0530 Subject: [PATCH 565/664] Create testing with sa key --- .github/workflows/testing with sa key | 54 +++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/testing with sa key diff --git a/.github/workflows/testing with sa key b/.github/workflows/testing with sa key new file mode 100644 index 0000000000..9fc33328bc --- /dev/null +++ b/.github/workflows/testing with sa key @@ -0,0 +1,54 @@ +name: Node.js CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + deploy: + + runs-on: self-hosted + + strategy: + matrix: + node-version: [14.x] + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run build --if-present + - run: npm install + + - name: Set gcloud account + run: gcloud config set account testgcp-sa@goldengate-1.iam.gserviceaccount.com + # Replace with the email address associated with the service account. + + - name: Install the gcloud cli + uses: google-github-actions/setup-gcloud@v0.2.0 + with: + project_id: ${{ secrets.GOOGLE_PROJECT }} + service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} + export_default_credentials: true + + - name: build and push the docker image + env: + GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} + run: | + gcloud auth configure-docker us-central1-docker.pkg.dev + docker build -t us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest . + docker push us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest + - name: deploy to gke + env: + GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} + run: | + gcloud container clusters get-credentials testgke-cluster --region asia-south1-a + kubectl rollout restart deployment nodeapp-deployment + kubectl apply -f deployment.yaml + kubectl apply -f service.yaml From 40be31f424364952572aa7179d038be0c500b611 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 27 May 2024 09:49:35 +0530 Subject: [PATCH 566/664] Create testing with WI --- .github/workflows/testing with WI | 46 +++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/testing with WI diff --git a/.github/workflows/testing with WI b/.github/workflows/testing with WI new file mode 100644 index 0000000000..4d95db722d --- /dev/null +++ b/.github/workflows/testing with WI @@ -0,0 +1,46 @@ +name: Setup Workload Identity Federation + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + setup: + runs-on: self-hosted + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Authenticate with Google Cloud + uses: google-github-actions/setup-gcloud@v0.2.0 + + - name: Get cluster credentials + run: gcloud container clusters get-credentials testgke-cluster --region asia-south1-a + + - name: Create namespace + run: | + kubectl create namespace test-ns-gke + + - name: Create ServiceAccount + run: | + kubectl create serviceaccount test-ns-gke --namespace test-ns-gke + + - name: Bind IAM policy + run: | + gcloud projects add-iam-policy-binding goldengate-1 \ + --role=roles/container.clusterViewer \ + --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/test-ns-gke/sa/test-ksa-gke \ + --condition=None + - name: Build and push the docker image + run: | + gcloud auth configure-docker us-central1-docker.pkg.dev + docker build -t us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest . + docker push us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest + - name: Deploy to GKE + run: | + gcloud container clusters get-credentials testgke-cluster --region asia-south1-a + kubectl rollout restart deployment nodeapp-deployment + kubectl apply -f deployment.yaml + kubectl apply -f service.yaml From b3f913fd3a3b23deaec216fe64049040dd4cf003 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 27 May 2024 09:51:31 +0530 Subject: [PATCH 567/664] Create testing with Workload Identity --- .../workflows/testing with Workload Identity | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/testing with Workload Identity diff --git a/.github/workflows/testing with Workload Identity b/.github/workflows/testing with Workload Identity new file mode 100644 index 0000000000..4d95db722d --- /dev/null +++ b/.github/workflows/testing with Workload Identity @@ -0,0 +1,46 @@ +name: Setup Workload Identity Federation + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + setup: + runs-on: self-hosted + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Authenticate with Google Cloud + uses: google-github-actions/setup-gcloud@v0.2.0 + + - name: Get cluster credentials + run: gcloud container clusters get-credentials testgke-cluster --region asia-south1-a + + - name: Create namespace + run: | + kubectl create namespace test-ns-gke + + - name: Create ServiceAccount + run: | + kubectl create serviceaccount test-ns-gke --namespace test-ns-gke + + - name: Bind IAM policy + run: | + gcloud projects add-iam-policy-binding goldengate-1 \ + --role=roles/container.clusterViewer \ + --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/test-ns-gke/sa/test-ksa-gke \ + --condition=None + - name: Build and push the docker image + run: | + gcloud auth configure-docker us-central1-docker.pkg.dev + docker build -t us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest . + docker push us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest + - name: Deploy to GKE + run: | + gcloud container clusters get-credentials testgke-cluster --region asia-south1-a + kubectl rollout restart deployment nodeapp-deployment + kubectl apply -f deployment.yaml + kubectl apply -f service.yaml From c4574dedda8e24c8b9e37d3e5221aeaf99b65b08 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 27 May 2024 09:53:22 +0530 Subject: [PATCH 568/664] Update nodejs.yaml --- .github/workflows/nodejs.yaml | 80 ++++++++++++++++------------------- 1 file changed, 36 insertions(+), 44 deletions(-) diff --git a/.github/workflows/nodejs.yaml b/.github/workflows/nodejs.yaml index 9fc33328bc..4d95db722d 100644 --- a/.github/workflows/nodejs.yaml +++ b/.github/workflows/nodejs.yaml @@ -1,4 +1,4 @@ -name: Node.js CI +name: Setup Workload Identity Federation on: push: @@ -7,48 +7,40 @@ on: branches: [ "main" ] jobs: - deploy: - + setup: runs-on: self-hosted - - strategy: - matrix: - node-version: [14.x] - steps: - - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - run: npm ci - - run: npm run build --if-present - - run: npm install - - - name: Set gcloud account - run: gcloud config set account testgcp-sa@goldengate-1.iam.gserviceaccount.com - # Replace with the email address associated with the service account. - - - name: Install the gcloud cli - uses: google-github-actions/setup-gcloud@v0.2.0 - with: - project_id: ${{ secrets.GOOGLE_PROJECT }} - service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} - export_default_credentials: true - - - name: build and push the docker image - env: - GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} - run: | - gcloud auth configure-docker us-central1-docker.pkg.dev - docker build -t us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest . - docker push us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest - - name: deploy to gke - env: - GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} - run: | - gcloud container clusters get-credentials testgke-cluster --region asia-south1-a - kubectl rollout restart deployment nodeapp-deployment - kubectl apply -f deployment.yaml - kubectl apply -f service.yaml + - name: Checkout code + uses: actions/checkout@v2 + + - name: Authenticate with Google Cloud + uses: google-github-actions/setup-gcloud@v0.2.0 + + - name: Get cluster credentials + run: gcloud container clusters get-credentials testgke-cluster --region asia-south1-a + + - name: Create namespace + run: | + kubectl create namespace test-ns-gke + + - name: Create ServiceAccount + run: | + kubectl create serviceaccount test-ns-gke --namespace test-ns-gke + + - name: Bind IAM policy + run: | + gcloud projects add-iam-policy-binding goldengate-1 \ + --role=roles/container.clusterViewer \ + --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/test-ns-gke/sa/test-ksa-gke \ + --condition=None + - name: Build and push the docker image + run: | + gcloud auth configure-docker us-central1-docker.pkg.dev + docker build -t us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest . + docker push us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest + - name: Deploy to GKE + run: | + gcloud container clusters get-credentials testgke-cluster --region asia-south1-a + kubectl rollout restart deployment nodeapp-deployment + kubectl apply -f deployment.yaml + kubectl apply -f service.yaml From 8fd06e7965a2407e6663a9560e86e79620adde40 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 27 May 2024 09:56:15 +0530 Subject: [PATCH 569/664] Update nodejs.yaml From 7fe34515ccb5191ac6a70d312f0e2efc50507f2c Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 27 May 2024 09:58:06 +0530 Subject: [PATCH 570/664] Update nodejs.yaml --- .github/workflows/nodejs.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nodejs.yaml b/.github/workflows/nodejs.yaml index 4d95db722d..d29a4cc273 100644 --- a/.github/workflows/nodejs.yaml +++ b/.github/workflows/nodejs.yaml @@ -21,17 +21,17 @@ jobs: - name: Create namespace run: | - kubectl create namespace test-ns-gke + kubectl create namespace ns-gke - name: Create ServiceAccount run: | - kubectl create serviceaccount test-ns-gke --namespace test-ns-gke + kubectl create serviceaccount ksa-gke --namespace ns-gke - name: Bind IAM policy run: | gcloud projects add-iam-policy-binding goldengate-1 \ --role=roles/container.clusterViewer \ - --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/test-ns-gke/sa/test-ksa-gke \ + --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/ns-gke/sa/ksa-gke \ --condition=None - name: Build and push the docker image run: | From cb58f8dba3f2af61769882f4174fc56c55e64573 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 27 May 2024 10:06:32 +0530 Subject: [PATCH 571/664] Update nodejs.yaml --- .github/workflows/nodejs.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nodejs.yaml b/.github/workflows/nodejs.yaml index d29a4cc273..6a98bd21ce 100644 --- a/.github/workflows/nodejs.yaml +++ b/.github/workflows/nodejs.yaml @@ -21,17 +21,17 @@ jobs: - name: Create namespace run: | - kubectl create namespace ns-gke + kubectl create namespace ns-test - name: Create ServiceAccount run: | - kubectl create serviceaccount ksa-gke --namespace ns-gke + kubectl create serviceaccount ksa-test --namespace ns-test - name: Bind IAM policy run: | gcloud projects add-iam-policy-binding goldengate-1 \ --role=roles/container.clusterViewer \ - --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/ns-gke/sa/ksa-gke \ + --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns//ns-test/ksa-test \ --condition=None - name: Build and push the docker image run: | From fd238bd2c002ff65b0a4e9baa7979041834acc9e Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 27 May 2024 10:07:39 +0530 Subject: [PATCH 572/664] Update nodejs.yaml --- .github/workflows/nodejs.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nodejs.yaml b/.github/workflows/nodejs.yaml index 6a98bd21ce..25a73ab371 100644 --- a/.github/workflows/nodejs.yaml +++ b/.github/workflows/nodejs.yaml @@ -21,17 +21,17 @@ jobs: - name: Create namespace run: | - kubectl create namespace ns-test + kubectl create namespace nstest - name: Create ServiceAccount run: | - kubectl create serviceaccount ksa-test --namespace ns-test + kubectl create serviceaccount ksatest --namespace nstest - name: Bind IAM policy run: | gcloud projects add-iam-policy-binding goldengate-1 \ --role=roles/container.clusterViewer \ - --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns//ns-test/ksa-test \ + --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns//nstest/ksatest \ --condition=None - name: Build and push the docker image run: | From 07feb1d7226789c2886181b863873a9773b41c3d Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 27 May 2024 10:13:07 +0530 Subject: [PATCH 573/664] testing with Workload identity --- .github/workflows/nodejs.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/nodejs.yaml b/.github/workflows/nodejs.yaml index 25a73ab371..969fb09c17 100644 --- a/.github/workflows/nodejs.yaml +++ b/.github/workflows/nodejs.yaml @@ -21,12 +21,12 @@ jobs: - name: Create namespace run: | - kubectl create namespace nstest - + kubectl get namespace nstest + - name: Create ServiceAccount run: | - kubectl create serviceaccount ksatest --namespace nstest - + kubectl get serviceaccount ksatest --namespace nstest + - name: Bind IAM policy run: | gcloud projects add-iam-policy-binding goldengate-1 \ From 4670c47fd352d982963458986ab0c92c85c2096e Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 27 May 2024 10:15:44 +0530 Subject: [PATCH 574/664] Update and rename nodejs.yaml to testing with wi --- .github/workflows/{nodejs.yaml => testing with wi} | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename .github/workflows/{nodejs.yaml => testing with wi} (90%) diff --git a/.github/workflows/nodejs.yaml b/.github/workflows/testing with wi similarity index 90% rename from .github/workflows/nodejs.yaml rename to .github/workflows/testing with wi index 969fb09c17..d7a70a0fd3 100644 --- a/.github/workflows/nodejs.yaml +++ b/.github/workflows/testing with wi @@ -21,17 +21,17 @@ jobs: - name: Create namespace run: | - kubectl get namespace nstest + kubectl get namespace test-ns - name: Create ServiceAccount run: | - kubectl get serviceaccount ksatest --namespace nstest + kubectl get serviceaccount test-ksa --namespace test-ns - name: Bind IAM policy run: | gcloud projects add-iam-policy-binding goldengate-1 \ --role=roles/container.clusterViewer \ - --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns//nstest/ksatest \ + --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns//test-ns/test-ksa \ --condition=None - name: Build and push the docker image run: | From 8ef4ec61732d01017ea3b844b9b0d2405448b98f Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 27 May 2024 10:16:41 +0530 Subject: [PATCH 575/664] Delete .github/workflows/testing with wi --- .github/workflows/testing with wi | 46 ------------------------------- 1 file changed, 46 deletions(-) delete mode 100644 .github/workflows/testing with wi diff --git a/.github/workflows/testing with wi b/.github/workflows/testing with wi deleted file mode 100644 index d7a70a0fd3..0000000000 --- a/.github/workflows/testing with wi +++ /dev/null @@ -1,46 +0,0 @@ -name: Setup Workload Identity Federation - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - setup: - runs-on: self-hosted - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Authenticate with Google Cloud - uses: google-github-actions/setup-gcloud@v0.2.0 - - - name: Get cluster credentials - run: gcloud container clusters get-credentials testgke-cluster --region asia-south1-a - - - name: Create namespace - run: | - kubectl get namespace test-ns - - - name: Create ServiceAccount - run: | - kubectl get serviceaccount test-ksa --namespace test-ns - - - name: Bind IAM policy - run: | - gcloud projects add-iam-policy-binding goldengate-1 \ - --role=roles/container.clusterViewer \ - --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns//test-ns/test-ksa \ - --condition=None - - name: Build and push the docker image - run: | - gcloud auth configure-docker us-central1-docker.pkg.dev - docker build -t us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest . - docker push us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest - - name: Deploy to GKE - run: | - gcloud container clusters get-credentials testgke-cluster --region asia-south1-a - kubectl rollout restart deployment nodeapp-deployment - kubectl apply -f deployment.yaml - kubectl apply -f service.yaml From 71375387e5fc226b1656c8d40624eaf3e44443fa Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 27 May 2024 10:16:54 +0530 Subject: [PATCH 576/664] Delete .github/workflows/testing with WI --- .github/workflows/testing with WI | 46 ------------------------------- 1 file changed, 46 deletions(-) delete mode 100644 .github/workflows/testing with WI diff --git a/.github/workflows/testing with WI b/.github/workflows/testing with WI deleted file mode 100644 index 4d95db722d..0000000000 --- a/.github/workflows/testing with WI +++ /dev/null @@ -1,46 +0,0 @@ -name: Setup Workload Identity Federation - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - setup: - runs-on: self-hosted - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Authenticate with Google Cloud - uses: google-github-actions/setup-gcloud@v0.2.0 - - - name: Get cluster credentials - run: gcloud container clusters get-credentials testgke-cluster --region asia-south1-a - - - name: Create namespace - run: | - kubectl create namespace test-ns-gke - - - name: Create ServiceAccount - run: | - kubectl create serviceaccount test-ns-gke --namespace test-ns-gke - - - name: Bind IAM policy - run: | - gcloud projects add-iam-policy-binding goldengate-1 \ - --role=roles/container.clusterViewer \ - --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/test-ns-gke/sa/test-ksa-gke \ - --condition=None - - name: Build and push the docker image - run: | - gcloud auth configure-docker us-central1-docker.pkg.dev - docker build -t us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest . - docker push us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest - - name: Deploy to GKE - run: | - gcloud container clusters get-credentials testgke-cluster --region asia-south1-a - kubectl rollout restart deployment nodeapp-deployment - kubectl apply -f deployment.yaml - kubectl apply -f service.yaml From f273ba4987ea3b48286fd29fb06fd5f171719da5 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 27 May 2024 10:18:56 +0530 Subject: [PATCH 577/664] Delete .github/workflows/testing with Workload Identity --- .../workflows/testing with Workload Identity | 46 ------------------- 1 file changed, 46 deletions(-) delete mode 100644 .github/workflows/testing with Workload Identity diff --git a/.github/workflows/testing with Workload Identity b/.github/workflows/testing with Workload Identity deleted file mode 100644 index 4d95db722d..0000000000 --- a/.github/workflows/testing with Workload Identity +++ /dev/null @@ -1,46 +0,0 @@ -name: Setup Workload Identity Federation - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - setup: - runs-on: self-hosted - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Authenticate with Google Cloud - uses: google-github-actions/setup-gcloud@v0.2.0 - - - name: Get cluster credentials - run: gcloud container clusters get-credentials testgke-cluster --region asia-south1-a - - - name: Create namespace - run: | - kubectl create namespace test-ns-gke - - - name: Create ServiceAccount - run: | - kubectl create serviceaccount test-ns-gke --namespace test-ns-gke - - - name: Bind IAM policy - run: | - gcloud projects add-iam-policy-binding goldengate-1 \ - --role=roles/container.clusterViewer \ - --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/test-ns-gke/sa/test-ksa-gke \ - --condition=None - - name: Build and push the docker image - run: | - gcloud auth configure-docker us-central1-docker.pkg.dev - docker build -t us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest . - docker push us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest - - name: Deploy to GKE - run: | - gcloud container clusters get-credentials testgke-cluster --region asia-south1-a - kubectl rollout restart deployment nodeapp-deployment - kubectl apply -f deployment.yaml - kubectl apply -f service.yaml From b6544103114b85403c28b4703f582742e16a2d56 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 27 May 2024 10:20:54 +0530 Subject: [PATCH 578/664] Create Testing with Workload Identity --- .../workflows/Testing with Workload Identity | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/Testing with Workload Identity diff --git a/.github/workflows/Testing with Workload Identity b/.github/workflows/Testing with Workload Identity new file mode 100644 index 0000000000..ab7c213530 --- /dev/null +++ b/.github/workflows/Testing with Workload Identity @@ -0,0 +1,46 @@ +name: Setup Workload Identity Federation + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + setup: + runs-on: self-hosted + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Authenticate with Google Cloud + uses: google-github-actions/setup-gcloud@v0.2.0 + + - name: Get cluster credentials + run: gcloud container clusters get-credentials testgke-cluster --region asia-south1-a + + - name: Create namespace + run: | + kubectl get namespace test-ns + + - name: Create ServiceAccount + run: | + kubectl get serviceaccount test-ksa --namespace test-ns + + - name: Bind IAM policy + run: | + gcloud projects add-iam-policy-binding goldengate-1 \ + --role=roles/container.clusterViewer \ + --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/test-ns/sa/test-ksa \ + --condition=None + - name: Build and push the docker image + run: | + gcloud auth configure-docker us-central1-docker.pkg.dev + docker build -t us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest . + docker push us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest + - name: Deploy to GKE + run: | + gcloud container clusters get-credentials testgke-cluster --region asia-south1-a + kubectl rollout restart deployment nodeapp-deployment + kubectl apply -f deployment.yaml + kubectl apply -f service.yaml From 7b618c29be4ec902d5b71ae2637be7eaabeeb522 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 27 May 2024 10:22:31 +0530 Subject: [PATCH 579/664] Create node.js.yml --- .github/workflows/node.js.yml | 46 +++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/node.js.yml diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 0000000000..ab7c213530 --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,46 @@ +name: Setup Workload Identity Federation + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + setup: + runs-on: self-hosted + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Authenticate with Google Cloud + uses: google-github-actions/setup-gcloud@v0.2.0 + + - name: Get cluster credentials + run: gcloud container clusters get-credentials testgke-cluster --region asia-south1-a + + - name: Create namespace + run: | + kubectl get namespace test-ns + + - name: Create ServiceAccount + run: | + kubectl get serviceaccount test-ksa --namespace test-ns + + - name: Bind IAM policy + run: | + gcloud projects add-iam-policy-binding goldengate-1 \ + --role=roles/container.clusterViewer \ + --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/test-ns/sa/test-ksa \ + --condition=None + - name: Build and push the docker image + run: | + gcloud auth configure-docker us-central1-docker.pkg.dev + docker build -t us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest . + docker push us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest + - name: Deploy to GKE + run: | + gcloud container clusters get-credentials testgke-cluster --region asia-south1-a + kubectl rollout restart deployment nodeapp-deployment + kubectl apply -f deployment.yaml + kubectl apply -f service.yaml From 775b607c37b9baccc8f66d394ffa6f4580d06352 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 27 May 2024 10:23:29 +0530 Subject: [PATCH 580/664] Update node.js.yml --- .github/workflows/node.js.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index ab7c213530..3be0cd7496 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -25,13 +25,13 @@ jobs: - name: Create ServiceAccount run: | - kubectl get serviceaccount test-ksa --namespace test-ns + kubectl get serviceaccount testksa --namespace test-ns - name: Bind IAM policy run: | gcloud projects add-iam-policy-binding goldengate-1 \ --role=roles/container.clusterViewer \ - --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/test-ns/sa/test-ksa \ + --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/test-ns/sa/testksa \ --condition=None - name: Build and push the docker image run: | From 5f1024f191db7a0d420947524cdf28e07e0ec3b9 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 27 May 2024 10:24:13 +0530 Subject: [PATCH 581/664] Update node.js.yml --- .github/workflows/node.js.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 3be0cd7496..9f97cda9f2 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -25,13 +25,13 @@ jobs: - name: Create ServiceAccount run: | - kubectl get serviceaccount testksa --namespace test-ns + kubectl get serviceaccount ksatest --namespace test-ns - name: Bind IAM policy run: | gcloud projects add-iam-policy-binding goldengate-1 \ --role=roles/container.clusterViewer \ - --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/test-ns/sa/testksa \ + --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/test-ns/sa/ksatest \ --condition=None - name: Build and push the docker image run: | From 979382ba4e08e2c569dd8ebe464ae0190116ae6e Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 27 May 2024 10:26:15 +0530 Subject: [PATCH 582/664] Update node.js.yml --- .github/workflows/node.js.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 9f97cda9f2..bc80959ace 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -21,12 +21,12 @@ jobs: - name: Create namespace run: | - kubectl get namespace test-ns - + kubectl get namespace nstest || kubectl create namespace nstest + - name: Create ServiceAccount run: | - kubectl get serviceaccount ksatest --namespace test-ns - + kubectl get serviceaccount ksatest --namespace nstest || kubectl create serviceaccount ksatest --namespace nstest + - name: Bind IAM policy run: | gcloud projects add-iam-policy-binding goldengate-1 \ From 2b67ddbe895a17c9f50c7183c2c1ecd013ea38fa Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 27 May 2024 10:28:08 +0530 Subject: [PATCH 583/664] Update node.js.yml --- .github/workflows/node.js.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index bc80959ace..01eb8b73cf 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -21,17 +21,17 @@ jobs: - name: Create namespace run: | - kubectl get namespace nstest || kubectl create namespace nstest + kubectl get namespace test-ns || kubectl create namespace test-ns - name: Create ServiceAccount run: | - kubectl get serviceaccount ksatest --namespace nstest || kubectl create serviceaccount ksatest --namespace nstest + kubectl get serviceaccount test-ksa --namespace test-ns || kubectl create serviceaccount test-ksa --namespace test-ns - name: Bind IAM policy run: | gcloud projects add-iam-policy-binding goldengate-1 \ --role=roles/container.clusterViewer \ - --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/test-ns/sa/ksatest \ + --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/test-ns/sa/test-ksa \ --condition=None - name: Build and push the docker image run: | From c8fdadc47ed04c36244e5b040419927098ed9a69 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 27 May 2024 10:29:29 +0530 Subject: [PATCH 584/664] Rename node.js.yml to testing with Workload Identity --- .github/workflows/{node.js.yml => testing with Workload Identity} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{node.js.yml => testing with Workload Identity} (100%) diff --git a/.github/workflows/node.js.yml b/.github/workflows/testing with Workload Identity similarity index 100% rename from .github/workflows/node.js.yml rename to .github/workflows/testing with Workload Identity From 03df70f357fc9791a775672a583f3ce69ec33ee1 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 27 May 2024 10:31:51 +0530 Subject: [PATCH 585/664] Create Testing with sa key --- .github/workflows/Testing with sa key | 55 +++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/Testing with sa key diff --git a/.github/workflows/Testing with sa key b/.github/workflows/Testing with sa key new file mode 100644 index 0000000000..c84809ea9e --- /dev/null +++ b/.github/workflows/Testing with sa key @@ -0,0 +1,55 @@ +name: Node.js CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + deploy: + + runs-on: self-hosted + + strategy: + matrix: + node-version: [14.x] + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run build --if-present + - run: npm install + + - name: Set gcloud account + run: gcloud config set account testgcp-sa@goldengate-1.iam.gserviceaccount.com + # Replace with the email address associated with the service account. + + - name: Install the gcloud cli + uses: google-github-actions/setup-gcloud@v0.2.0 + with: + project_id: ${{ secrets.GOOGLE_PROJECT }} + service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} + export_default_credentials: true + + - name: build and push the docker image + env: + GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} + run: | + gcloud auth configure-docker us-central1-docker.pkg.dev + docker build -t us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest . + docker push us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest + - name: deploy to gke + env: + GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} + run: | + gcloud container clusters get-credentials testgke-cluster --region asia-south1-a + kubectl rollout restart deployment nodeapp-deployment + kubectl apply -f deployment.yaml + kubectl apply -f service.yaml + From 4c7f77ea8726e4aeea6f4621994b59e67577fa4f Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 27 May 2024 10:34:38 +0530 Subject: [PATCH 586/664] Delete .github/workflows/Testing with Workload Identity --- .../workflows/Testing with Workload Identity | 46 ------------------- 1 file changed, 46 deletions(-) delete mode 100644 .github/workflows/Testing with Workload Identity diff --git a/.github/workflows/Testing with Workload Identity b/.github/workflows/Testing with Workload Identity deleted file mode 100644 index ab7c213530..0000000000 --- a/.github/workflows/Testing with Workload Identity +++ /dev/null @@ -1,46 +0,0 @@ -name: Setup Workload Identity Federation - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - setup: - runs-on: self-hosted - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Authenticate with Google Cloud - uses: google-github-actions/setup-gcloud@v0.2.0 - - - name: Get cluster credentials - run: gcloud container clusters get-credentials testgke-cluster --region asia-south1-a - - - name: Create namespace - run: | - kubectl get namespace test-ns - - - name: Create ServiceAccount - run: | - kubectl get serviceaccount test-ksa --namespace test-ns - - - name: Bind IAM policy - run: | - gcloud projects add-iam-policy-binding goldengate-1 \ - --role=roles/container.clusterViewer \ - --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/test-ns/sa/test-ksa \ - --condition=None - - name: Build and push the docker image - run: | - gcloud auth configure-docker us-central1-docker.pkg.dev - docker build -t us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest . - docker push us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest - - name: Deploy to GKE - run: | - gcloud container clusters get-credentials testgke-cluster --region asia-south1-a - kubectl rollout restart deployment nodeapp-deployment - kubectl apply -f deployment.yaml - kubectl apply -f service.yaml From 79d83b8c51304053d779c55ebd5b2b91f9a8e36a Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 27 May 2024 10:34:51 +0530 Subject: [PATCH 587/664] Delete .github/workflows/Testing with sa key --- .github/workflows/Testing with sa key | 55 --------------------------- 1 file changed, 55 deletions(-) delete mode 100644 .github/workflows/Testing with sa key diff --git a/.github/workflows/Testing with sa key b/.github/workflows/Testing with sa key deleted file mode 100644 index c84809ea9e..0000000000 --- a/.github/workflows/Testing with sa key +++ /dev/null @@ -1,55 +0,0 @@ -name: Node.js CI - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - deploy: - - runs-on: self-hosted - - strategy: - matrix: - node-version: [14.x] - - steps: - - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - run: npm ci - - run: npm run build --if-present - - run: npm install - - - name: Set gcloud account - run: gcloud config set account testgcp-sa@goldengate-1.iam.gserviceaccount.com - # Replace with the email address associated with the service account. - - - name: Install the gcloud cli - uses: google-github-actions/setup-gcloud@v0.2.0 - with: - project_id: ${{ secrets.GOOGLE_PROJECT }} - service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} - export_default_credentials: true - - - name: build and push the docker image - env: - GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} - run: | - gcloud auth configure-docker us-central1-docker.pkg.dev - docker build -t us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest . - docker push us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest - - name: deploy to gke - env: - GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} - run: | - gcloud container clusters get-credentials testgke-cluster --region asia-south1-a - kubectl rollout restart deployment nodeapp-deployment - kubectl apply -f deployment.yaml - kubectl apply -f service.yaml - From d1e9c4f1dbe8e530acf44b6f6acb722e68b06436 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 27 May 2024 10:35:03 +0530 Subject: [PATCH 588/664] Delete .github/workflows/testing with SA keys --- .github/workflows/testing with SA keys | 54 -------------------------- 1 file changed, 54 deletions(-) delete mode 100644 .github/workflows/testing with SA keys diff --git a/.github/workflows/testing with SA keys b/.github/workflows/testing with SA keys deleted file mode 100644 index 9fc33328bc..0000000000 --- a/.github/workflows/testing with SA keys +++ /dev/null @@ -1,54 +0,0 @@ -name: Node.js CI - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - deploy: - - runs-on: self-hosted - - strategy: - matrix: - node-version: [14.x] - - steps: - - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - run: npm ci - - run: npm run build --if-present - - run: npm install - - - name: Set gcloud account - run: gcloud config set account testgcp-sa@goldengate-1.iam.gserviceaccount.com - # Replace with the email address associated with the service account. - - - name: Install the gcloud cli - uses: google-github-actions/setup-gcloud@v0.2.0 - with: - project_id: ${{ secrets.GOOGLE_PROJECT }} - service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} - export_default_credentials: true - - - name: build and push the docker image - env: - GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} - run: | - gcloud auth configure-docker us-central1-docker.pkg.dev - docker build -t us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest . - docker push us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest - - name: deploy to gke - env: - GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} - run: | - gcloud container clusters get-credentials testgke-cluster --region asia-south1-a - kubectl rollout restart deployment nodeapp-deployment - kubectl apply -f deployment.yaml - kubectl apply -f service.yaml From acd6839bd5d754f2fec72a429b507062c85fb30b Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 27 May 2024 10:35:36 +0530 Subject: [PATCH 589/664] Delete .github/workflows/testing with Workload Identity --- .../workflows/testing with Workload Identity | 46 ------------------- 1 file changed, 46 deletions(-) delete mode 100644 .github/workflows/testing with Workload Identity diff --git a/.github/workflows/testing with Workload Identity b/.github/workflows/testing with Workload Identity deleted file mode 100644 index 01eb8b73cf..0000000000 --- a/.github/workflows/testing with Workload Identity +++ /dev/null @@ -1,46 +0,0 @@ -name: Setup Workload Identity Federation - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - setup: - runs-on: self-hosted - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Authenticate with Google Cloud - uses: google-github-actions/setup-gcloud@v0.2.0 - - - name: Get cluster credentials - run: gcloud container clusters get-credentials testgke-cluster --region asia-south1-a - - - name: Create namespace - run: | - kubectl get namespace test-ns || kubectl create namespace test-ns - - - name: Create ServiceAccount - run: | - kubectl get serviceaccount test-ksa --namespace test-ns || kubectl create serviceaccount test-ksa --namespace test-ns - - - name: Bind IAM policy - run: | - gcloud projects add-iam-policy-binding goldengate-1 \ - --role=roles/container.clusterViewer \ - --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/test-ns/sa/test-ksa \ - --condition=None - - name: Build and push the docker image - run: | - gcloud auth configure-docker us-central1-docker.pkg.dev - docker build -t us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest . - docker push us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest - - name: Deploy to GKE - run: | - gcloud container clusters get-credentials testgke-cluster --region asia-south1-a - kubectl rollout restart deployment nodeapp-deployment - kubectl apply -f deployment.yaml - kubectl apply -f service.yaml From 9cbbda127728f97004849041a39543ce56f8573a Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 27 May 2024 10:35:50 +0530 Subject: [PATCH 590/664] Delete .github/workflows/testing with sa key --- .github/workflows/testing with sa key | 54 --------------------------- 1 file changed, 54 deletions(-) delete mode 100644 .github/workflows/testing with sa key diff --git a/.github/workflows/testing with sa key b/.github/workflows/testing with sa key deleted file mode 100644 index 9fc33328bc..0000000000 --- a/.github/workflows/testing with sa key +++ /dev/null @@ -1,54 +0,0 @@ -name: Node.js CI - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - deploy: - - runs-on: self-hosted - - strategy: - matrix: - node-version: [14.x] - - steps: - - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - run: npm ci - - run: npm run build --if-present - - run: npm install - - - name: Set gcloud account - run: gcloud config set account testgcp-sa@goldengate-1.iam.gserviceaccount.com - # Replace with the email address associated with the service account. - - - name: Install the gcloud cli - uses: google-github-actions/setup-gcloud@v0.2.0 - with: - project_id: ${{ secrets.GOOGLE_PROJECT }} - service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} - export_default_credentials: true - - - name: build and push the docker image - env: - GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} - run: | - gcloud auth configure-docker us-central1-docker.pkg.dev - docker build -t us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest . - docker push us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest - - name: deploy to gke - env: - GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} - run: | - gcloud container clusters get-credentials testgke-cluster --region asia-south1-a - kubectl rollout restart deployment nodeapp-deployment - kubectl apply -f deployment.yaml - kubectl apply -f service.yaml From 5ff9cbc56246b5357d483d8c6f16d93ebaa3931e Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 27 May 2024 10:36:02 +0530 Subject: [PATCH 591/664] Delete .github/workflows/testing with workload identity --- .../workflows/testing with workload identity | 46 ------------------- 1 file changed, 46 deletions(-) delete mode 100644 .github/workflows/testing with workload identity diff --git a/.github/workflows/testing with workload identity b/.github/workflows/testing with workload identity deleted file mode 100644 index 4d95db722d..0000000000 --- a/.github/workflows/testing with workload identity +++ /dev/null @@ -1,46 +0,0 @@ -name: Setup Workload Identity Federation - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - setup: - runs-on: self-hosted - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Authenticate with Google Cloud - uses: google-github-actions/setup-gcloud@v0.2.0 - - - name: Get cluster credentials - run: gcloud container clusters get-credentials testgke-cluster --region asia-south1-a - - - name: Create namespace - run: | - kubectl create namespace test-ns-gke - - - name: Create ServiceAccount - run: | - kubectl create serviceaccount test-ns-gke --namespace test-ns-gke - - - name: Bind IAM policy - run: | - gcloud projects add-iam-policy-binding goldengate-1 \ - --role=roles/container.clusterViewer \ - --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/test-ns-gke/sa/test-ksa-gke \ - --condition=None - - name: Build and push the docker image - run: | - gcloud auth configure-docker us-central1-docker.pkg.dev - docker build -t us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest . - docker push us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest - - name: Deploy to GKE - run: | - gcloud container clusters get-credentials testgke-cluster --region asia-south1-a - kubectl rollout restart deployment nodeapp-deployment - kubectl apply -f deployment.yaml - kubectl apply -f service.yaml From 06923ee2e11c460881bbb3852dd46b424828ab9c Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 27 May 2024 10:37:23 +0530 Subject: [PATCH 592/664] Create testing with Workload identity --- .../workflows/testing with Workload identity | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/testing with Workload identity diff --git a/.github/workflows/testing with Workload identity b/.github/workflows/testing with Workload identity new file mode 100644 index 0000000000..3eb17194f5 --- /dev/null +++ b/.github/workflows/testing with Workload identity @@ -0,0 +1,44 @@ +name: Setup Workload Identity Federation + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + setup: + runs-on: self-hosted + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Authenticate with Google Cloud + uses: google-github-actions/setup-gcloud@v0.2.0 + + - name: Get cluster credentials + run: gcloud container clusters get-credentials testgke-cluster --region asia-south1-a + + - name: Create namespace + run: | + kubectl get namespace test-ns || kubectl create namespace test-ns + - name: Create ServiceAccount + run: | + kubectl get serviceaccount test-ksa --namespace test-ns || kubectl create serviceaccount test-ksa --namespace test-ns + - name: Bind IAM policy + run: | + gcloud projects add-iam-policy-binding goldengate-1 \ + --role=roles/container.clusterViewer \ + --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/test-ns/sa/test-ksa \ + --condition=None + - name: Build and push the docker image + run: | + gcloud auth configure-docker us-central1-docker.pkg.dev + docker build -t us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest . + docker push us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest + - name: Deploy to GKE + run: | + gcloud container clusters get-credentials testgke-cluster --region asia-south1-a + kubectl rollout restart deployment nodeapp-deployment + kubectl apply -f deployment.yaml + kubectl apply -f service.yaml From cf55278ce05b7ba1fb5a67e4b3bd1d5bcc25e197 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 27 May 2024 10:37:54 +0530 Subject: [PATCH 593/664] Update testing with Workload identity From a3b7266d846c51a46ad9b62424aa2b52221f9a9c Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 27 May 2024 10:38:25 +0530 Subject: [PATCH 594/664] Delete .github/workflows/testing with Workload identity --- .../workflows/testing with Workload identity | 44 ------------------- 1 file changed, 44 deletions(-) delete mode 100644 .github/workflows/testing with Workload identity diff --git a/.github/workflows/testing with Workload identity b/.github/workflows/testing with Workload identity deleted file mode 100644 index 3eb17194f5..0000000000 --- a/.github/workflows/testing with Workload identity +++ /dev/null @@ -1,44 +0,0 @@ -name: Setup Workload Identity Federation - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - setup: - runs-on: self-hosted - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Authenticate with Google Cloud - uses: google-github-actions/setup-gcloud@v0.2.0 - - - name: Get cluster credentials - run: gcloud container clusters get-credentials testgke-cluster --region asia-south1-a - - - name: Create namespace - run: | - kubectl get namespace test-ns || kubectl create namespace test-ns - - name: Create ServiceAccount - run: | - kubectl get serviceaccount test-ksa --namespace test-ns || kubectl create serviceaccount test-ksa --namespace test-ns - - name: Bind IAM policy - run: | - gcloud projects add-iam-policy-binding goldengate-1 \ - --role=roles/container.clusterViewer \ - --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/test-ns/sa/test-ksa \ - --condition=None - - name: Build and push the docker image - run: | - gcloud auth configure-docker us-central1-docker.pkg.dev - docker build -t us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest . - docker push us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest - - name: Deploy to GKE - run: | - gcloud container clusters get-credentials testgke-cluster --region asia-south1-a - kubectl rollout restart deployment nodeapp-deployment - kubectl apply -f deployment.yaml - kubectl apply -f service.yaml From 2a226c1bcbfad64414ff4ab46cc3601e558cd798 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 27 May 2024 10:38:59 +0530 Subject: [PATCH 595/664] Create node.js.yml --- .github/workflows/node.js.yml | 44 +++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/node.js.yml diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 0000000000..3eb17194f5 --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,44 @@ +name: Setup Workload Identity Federation + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + setup: + runs-on: self-hosted + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Authenticate with Google Cloud + uses: google-github-actions/setup-gcloud@v0.2.0 + + - name: Get cluster credentials + run: gcloud container clusters get-credentials testgke-cluster --region asia-south1-a + + - name: Create namespace + run: | + kubectl get namespace test-ns || kubectl create namespace test-ns + - name: Create ServiceAccount + run: | + kubectl get serviceaccount test-ksa --namespace test-ns || kubectl create serviceaccount test-ksa --namespace test-ns + - name: Bind IAM policy + run: | + gcloud projects add-iam-policy-binding goldengate-1 \ + --role=roles/container.clusterViewer \ + --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/test-ns/sa/test-ksa \ + --condition=None + - name: Build and push the docker image + run: | + gcloud auth configure-docker us-central1-docker.pkg.dev + docker build -t us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest . + docker push us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest + - name: Deploy to GKE + run: | + gcloud container clusters get-credentials testgke-cluster --region asia-south1-a + kubectl rollout restart deployment nodeapp-deployment + kubectl apply -f deployment.yaml + kubectl apply -f service.yaml From d585862394ed4b7f67c3a1f220d09d02fe4dbb8e Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 27 May 2024 10:41:45 +0530 Subject: [PATCH 596/664] Create nodejs.yml --- .github/workflows/nodejs.yml | 54 ++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/nodejs.yml diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml new file mode 100644 index 0000000000..9fc33328bc --- /dev/null +++ b/.github/workflows/nodejs.yml @@ -0,0 +1,54 @@ +name: Node.js CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + deploy: + + runs-on: self-hosted + + strategy: + matrix: + node-version: [14.x] + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run build --if-present + - run: npm install + + - name: Set gcloud account + run: gcloud config set account testgcp-sa@goldengate-1.iam.gserviceaccount.com + # Replace with the email address associated with the service account. + + - name: Install the gcloud cli + uses: google-github-actions/setup-gcloud@v0.2.0 + with: + project_id: ${{ secrets.GOOGLE_PROJECT }} + service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} + export_default_credentials: true + + - name: build and push the docker image + env: + GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} + run: | + gcloud auth configure-docker us-central1-docker.pkg.dev + docker build -t us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest . + docker push us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest + - name: deploy to gke + env: + GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} + run: | + gcloud container clusters get-credentials testgke-cluster --region asia-south1-a + kubectl rollout restart deployment nodeapp-deployment + kubectl apply -f deployment.yaml + kubectl apply -f service.yaml From eb7065ef1fac4d058f32edfe8057d8ecc0a11a5b Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 27 May 2024 10:43:08 +0530 Subject: [PATCH 597/664] Update nodejs.yml From be904c9c01e54a9fc9c993fb6629a1894132fafa Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 27 May 2024 10:45:03 +0530 Subject: [PATCH 598/664] Update node.js.yml From da1ddb2e2de01eeb4f64758d7d4df665f14e6ece Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 27 May 2024 10:47:25 +0530 Subject: [PATCH 599/664] Update node.js.yml --- .github/workflows/node.js.yml | 78 ++++++++++++++++++++--------------- 1 file changed, 44 insertions(+), 34 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 3eb17194f5..9fc33328bc 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -1,4 +1,4 @@ -name: Setup Workload Identity Federation +name: Node.js CI on: push: @@ -7,38 +7,48 @@ on: branches: [ "main" ] jobs: - setup: + deploy: + runs-on: self-hosted + + strategy: + matrix: + node-version: [14.x] + steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Authenticate with Google Cloud - uses: google-github-actions/setup-gcloud@v0.2.0 - - - name: Get cluster credentials - run: gcloud container clusters get-credentials testgke-cluster --region asia-south1-a - - - name: Create namespace - run: | - kubectl get namespace test-ns || kubectl create namespace test-ns - - name: Create ServiceAccount - run: | - kubectl get serviceaccount test-ksa --namespace test-ns || kubectl create serviceaccount test-ksa --namespace test-ns - - name: Bind IAM policy - run: | - gcloud projects add-iam-policy-binding goldengate-1 \ - --role=roles/container.clusterViewer \ - --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/test-ns/sa/test-ksa \ - --condition=None - - name: Build and push the docker image - run: | - gcloud auth configure-docker us-central1-docker.pkg.dev - docker build -t us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest . - docker push us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest - - name: Deploy to GKE - run: | - gcloud container clusters get-credentials testgke-cluster --region asia-south1-a - kubectl rollout restart deployment nodeapp-deployment - kubectl apply -f deployment.yaml - kubectl apply -f service.yaml + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run build --if-present + - run: npm install + + - name: Set gcloud account + run: gcloud config set account testgcp-sa@goldengate-1.iam.gserviceaccount.com + # Replace with the email address associated with the service account. + + - name: Install the gcloud cli + uses: google-github-actions/setup-gcloud@v0.2.0 + with: + project_id: ${{ secrets.GOOGLE_PROJECT }} + service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} + export_default_credentials: true + + - name: build and push the docker image + env: + GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} + run: | + gcloud auth configure-docker us-central1-docker.pkg.dev + docker build -t us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest . + docker push us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest + - name: deploy to gke + env: + GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} + run: | + gcloud container clusters get-credentials testgke-cluster --region asia-south1-a + kubectl rollout restart deployment nodeapp-deployment + kubectl apply -f deployment.yaml + kubectl apply -f service.yaml From 6fdee0338a0aea141c5a2b5874f8161e9f84b77e Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 27 May 2024 10:48:38 +0530 Subject: [PATCH 600/664] Delete .github/workflows/nodejs.yml --- .github/workflows/nodejs.yml | 54 ------------------------------------ 1 file changed, 54 deletions(-) delete mode 100644 .github/workflows/nodejs.yml diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml deleted file mode 100644 index 9fc33328bc..0000000000 --- a/.github/workflows/nodejs.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: Node.js CI - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - deploy: - - runs-on: self-hosted - - strategy: - matrix: - node-version: [14.x] - - steps: - - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - run: npm ci - - run: npm run build --if-present - - run: npm install - - - name: Set gcloud account - run: gcloud config set account testgcp-sa@goldengate-1.iam.gserviceaccount.com - # Replace with the email address associated with the service account. - - - name: Install the gcloud cli - uses: google-github-actions/setup-gcloud@v0.2.0 - with: - project_id: ${{ secrets.GOOGLE_PROJECT }} - service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} - export_default_credentials: true - - - name: build and push the docker image - env: - GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} - run: | - gcloud auth configure-docker us-central1-docker.pkg.dev - docker build -t us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest . - docker push us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest - - name: deploy to gke - env: - GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} - run: | - gcloud container clusters get-credentials testgke-cluster --region asia-south1-a - kubectl rollout restart deployment nodeapp-deployment - kubectl apply -f deployment.yaml - kubectl apply -f service.yaml From 85d883db97bb256b7e305c2238af8718b047162f Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 27 May 2024 10:49:27 +0530 Subject: [PATCH 601/664] Update node.js.yml From b5bc645f58b1bace5a9e0ffa853c560f74dcfc2c Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 27 May 2024 10:51:09 +0530 Subject: [PATCH 602/664] Update node.js.yml --- .github/workflows/node.js.yml | 78 +++++++++++++++-------------------- 1 file changed, 34 insertions(+), 44 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 9fc33328bc..3eb17194f5 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -1,4 +1,4 @@ -name: Node.js CI +name: Setup Workload Identity Federation on: push: @@ -7,48 +7,38 @@ on: branches: [ "main" ] jobs: - deploy: - + setup: runs-on: self-hosted - - strategy: - matrix: - node-version: [14.x] - steps: - - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - run: npm ci - - run: npm run build --if-present - - run: npm install - - - name: Set gcloud account - run: gcloud config set account testgcp-sa@goldengate-1.iam.gserviceaccount.com - # Replace with the email address associated with the service account. - - - name: Install the gcloud cli - uses: google-github-actions/setup-gcloud@v0.2.0 - with: - project_id: ${{ secrets.GOOGLE_PROJECT }} - service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} - export_default_credentials: true - - - name: build and push the docker image - env: - GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} - run: | - gcloud auth configure-docker us-central1-docker.pkg.dev - docker build -t us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest . - docker push us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest - - name: deploy to gke - env: - GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} - run: | - gcloud container clusters get-credentials testgke-cluster --region asia-south1-a - kubectl rollout restart deployment nodeapp-deployment - kubectl apply -f deployment.yaml - kubectl apply -f service.yaml + - name: Checkout code + uses: actions/checkout@v2 + + - name: Authenticate with Google Cloud + uses: google-github-actions/setup-gcloud@v0.2.0 + + - name: Get cluster credentials + run: gcloud container clusters get-credentials testgke-cluster --region asia-south1-a + + - name: Create namespace + run: | + kubectl get namespace test-ns || kubectl create namespace test-ns + - name: Create ServiceAccount + run: | + kubectl get serviceaccount test-ksa --namespace test-ns || kubectl create serviceaccount test-ksa --namespace test-ns + - name: Bind IAM policy + run: | + gcloud projects add-iam-policy-binding goldengate-1 \ + --role=roles/container.clusterViewer \ + --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/test-ns/sa/test-ksa \ + --condition=None + - name: Build and push the docker image + run: | + gcloud auth configure-docker us-central1-docker.pkg.dev + docker build -t us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest . + docker push us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest + - name: Deploy to GKE + run: | + gcloud container clusters get-credentials testgke-cluster --region asia-south1-a + kubectl rollout restart deployment nodeapp-deployment + kubectl apply -f deployment.yaml + kubectl apply -f service.yaml From 3fb839d28bfc6bf45f1e3999fc4b00c382381505 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 27 May 2024 11:39:25 +0530 Subject: [PATCH 603/664] Update node.js.yml --- .github/workflows/node.js.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 3eb17194f5..e96b17c8f8 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -29,6 +29,7 @@ jobs: run: | gcloud projects add-iam-policy-binding goldengate-1 \ --role=roles/container.clusterViewer \ + --role=roles/artifactregistry.admin \ --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/test-ns/sa/test-ksa \ --condition=None - name: Build and push the docker image From 49cdb50a20a73452ee67037ae373b0423c2aa769 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 28 May 2024 10:11:51 +0530 Subject: [PATCH 604/664] Update node.js.yml --- .github/workflows/node.js.yml | 83 ++++++++++++++++++++--------------- 1 file changed, 48 insertions(+), 35 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index e96b17c8f8..f46dea5c75 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -1,4 +1,4 @@ -name: Setup Workload Identity Federation +name: Node.js CI on: push: @@ -7,39 +7,52 @@ on: branches: [ "main" ] jobs: - setup: + deploy: runs-on: self-hosted + + strategy: + matrix: + node-version: [16.x] + steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Authenticate with Google Cloud - uses: google-github-actions/setup-gcloud@v0.2.0 - - - name: Get cluster credentials - run: gcloud container clusters get-credentials testgke-cluster --region asia-south1-a - - - name: Create namespace - run: | - kubectl get namespace test-ns || kubectl create namespace test-ns - - name: Create ServiceAccount - run: | - kubectl get serviceaccount test-ksa --namespace test-ns || kubectl create serviceaccount test-ksa --namespace test-ns - - name: Bind IAM policy - run: | - gcloud projects add-iam-policy-binding goldengate-1 \ - --role=roles/container.clusterViewer \ - --role=roles/artifactregistry.admin \ - --member=principal://iam.googleapis.com/projects/105619775743/locations/global/workloadIdentityPools/goldengate-1.svc.id.goog/subject/ns/test-ns/sa/test-ksa \ - --condition=None - - name: Build and push the docker image - run: | - gcloud auth configure-docker us-central1-docker.pkg.dev - docker build -t us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest . - docker push us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest - - name: Deploy to GKE - run: | - gcloud container clusters get-credentials testgke-cluster --region asia-south1-a - kubectl rollout restart deployment nodeapp-deployment - kubectl apply -f deployment.yaml - kubectl apply -f service.yaml + - uses: actions/checkout@v3 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + + - run: npm ci + + - run: npm run build --if-present + + - run: npm install + + - name: Set gcloud account + run: gcloud config set account testgcp-sa@goldengate-1.iam.gserviceaccount.com + # Replace with the email address associated with the service account. + + - name: Install the gcloud cli + uses: google-github-actions/setup-gcloud@v0.2.0 + with: + project_id: ${{ secrets.GOOGLE_PROJECT }} + service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} + export_default_credentials: true + + - name: Build and push the Docker image + env: + GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} + run: | + gcloud auth configure-docker us-central1-docker.pkg.dev + docker build -t us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest . + docker push us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest + + - name: Deploy to GKE + env: + GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} + run: | + gcloud container clusters get-credentials testgke-cluster --region asia-south1-a + kubectl rollout restart deployment nodeapp-deployment + kubectl apply -f deployment.yaml + kubectl apply -f service.yaml From b97ab11e63ae0a382cc4af19f05092390f6e3d3a Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 28 May 2024 10:19:18 +0530 Subject: [PATCH 605/664] Update node.js.yml --- .github/workflows/node.js.yml | 100 +++++++++++++++++----------------- 1 file changed, 49 insertions(+), 51 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index f46dea5c75..179dec2eba 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -1,58 +1,56 @@ -name: Node.js CI +name: 🔨 build on: - push: - branches: [ "main" ] pull_request: - branches: [ "main" ] + branches: + - main jobs: - deploy: + build: runs-on: self-hosted - - strategy: - matrix: - node-version: [16.x] - + defaults: + run: + shell: bash steps: - - uses: actions/checkout@v3 - - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - - run: npm ci - - - run: npm run build --if-present - - - run: npm install - - - name: Set gcloud account - run: gcloud config set account testgcp-sa@goldengate-1.iam.gserviceaccount.com - # Replace with the email address associated with the service account. - - - name: Install the gcloud cli - uses: google-github-actions/setup-gcloud@v0.2.0 - with: - project_id: ${{ secrets.GOOGLE_PROJECT }} - service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} - export_default_credentials: true - - - name: Build and push the Docker image - env: - GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} - run: | - gcloud auth configure-docker us-central1-docker.pkg.dev - docker build -t us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest . - docker push us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest - - - name: Deploy to GKE - env: - GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} - run: | - gcloud container clusters get-credentials testgke-cluster --region asia-south1-a - kubectl rollout restart deployment nodeapp-deployment - kubectl apply -f deployment.yaml - kubectl apply -f service.yaml + - name: 💻 Checkout current pull-request revision code + uses: actions/checkout@v3 + + - name: 📦 Install Node.js and npm + uses: actions/setup-node@v3 + with: + node-version: '14.x' + cache: 'npm' + + - name: 🔨 Install package dependencies + run: npm ci + + - name: 🚀 Run project build command + run: npm run build + + - name: Set gcloud account + run: gcloud config set account testgcp-sa@goldengate-1.iam.gserviceaccount.com + # Replace with the email address associated with the service account. + + - name: Install the gcloud cli + uses: google-github-actions/setup-gcloud@v0.2.0 + with: + project_id: ${{ secrets.GOOGLE_PROJECT }} + service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} + export_default_credentials: true + + - name: Build and push the Docker image + env: + GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} + run: | + gcloud auth configure-docker us-central1-docker.pkg.dev + docker build -t us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest . + docker push us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest + + - name: Deploy to GKE + env: + GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} + run: | + gcloud container clusters get-credentials testgke-cluster --region asia-south1-a + kubectl rollout restart deployment nodeapp-deployment + kubectl apply -f deployment.yaml + kubectl apply -f service.yaml From cd134d671f44bfaa257d25c3f641417b896afe5c Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 28 May 2024 10:19:59 +0530 Subject: [PATCH 606/664] Update node.js.yml From d622adf409c546a3e87607c09398dbc31330ff82 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 28 May 2024 10:21:39 +0530 Subject: [PATCH 607/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 179dec2eba..68eab4b380 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -18,7 +18,7 @@ jobs: - name: 📦 Install Node.js and npm uses: actions/setup-node@v3 with: - node-version: '14.x' + node-version: '20.x' cache: 'npm' - name: 🔨 Install package dependencies From dfc3eee4a309118616af62f814777faefcae79c7 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 28 May 2024 10:22:57 +0530 Subject: [PATCH 608/664] Update node.js.yml --- .github/workflows/node.js.yml | 99 ++++++++++++++++++----------------- 1 file changed, 50 insertions(+), 49 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 68eab4b380..943798ce46 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -1,56 +1,57 @@ -name: 🔨 build +name: Node.js CI on: + push: + branches: [ "main" ] pull_request: - branches: - - main + branches: [ "main" ] jobs: - build: + deploy: runs-on: self-hosted - defaults: - run: - shell: bash + + strategy: + matrix: + node-version: [20.x] + steps: - - name: 💻 Checkout current pull-request revision code - uses: actions/checkout@v3 - - - name: 📦 Install Node.js and npm - uses: actions/setup-node@v3 - with: - node-version: '20.x' - cache: 'npm' - - - name: 🔨 Install package dependencies - run: npm ci - - - name: 🚀 Run project build command - run: npm run build - - - name: Set gcloud account - run: gcloud config set account testgcp-sa@goldengate-1.iam.gserviceaccount.com - # Replace with the email address associated with the service account. - - - name: Install the gcloud cli - uses: google-github-actions/setup-gcloud@v0.2.0 - with: - project_id: ${{ secrets.GOOGLE_PROJECT }} - service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} - export_default_credentials: true - - - name: Build and push the Docker image - env: - GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} - run: | - gcloud auth configure-docker us-central1-docker.pkg.dev - docker build -t us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest . - docker push us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest - - - name: Deploy to GKE - env: - GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} - run: | - gcloud container clusters get-credentials testgke-cluster --region asia-south1-a - kubectl rollout restart deployment nodeapp-deployment - kubectl apply -f deployment.yaml - kubectl apply -f service.yaml + - uses: actions/checkout@v3 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + + - run: npm ci + + - run: npm run build --if-present + + - run: npm install + + - name: Set gcloud account + run: gcloud config set account testgcp-sa@goldengate-1.iam.gserviceaccount.com + # Replace with the email address associated with the service account. + + - name: Install the gcloud cli + uses: google-github-actions/setup-gcloud@v0.2.0 + with: + project_id: ${{ secrets.GOOGLE_PROJECT }} + service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} + export_default_credentials: true + + - name: Build and push the Docker image + env: + GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} + run: | + gcloud auth configure-docker us-central1-docker.pkg.dev + docker build -t us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest . + docker push us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest + - name: Deploy to GKE + env: + GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} + run: | + gcloud container clusters get-credentials testgke-cluster --region asia-south1-a + kubectl rollout restart deployment nodeapp-deployment + kubectl apply -f deployment.yaml + kubectl apply -f service.yaml From 7dd7b47ed1909be20b0a7e8b2b9814e70e07af69 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 28 May 2024 10:29:05 +0530 Subject: [PATCH 609/664] Update dockerfile --- dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dockerfile b/dockerfile index bbb5d90735..4d6e673832 100644 --- a/dockerfile +++ b/dockerfile @@ -1,4 +1,4 @@ -FROM node:latest +FROM node:20-alpine WORKDIR /usr/src/app @@ -9,4 +9,6 @@ RUN npm install COPY . . EXPOSE 4000 + CMD [ "node", "index.js" ] + From 21321d950368eac908633892b6fc3417c4cedf2b Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 28 May 2024 10:34:11 +0530 Subject: [PATCH 610/664] Update node.js.yml --- .github/workflows/node.js.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 943798ce46..a3e5501d38 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -34,7 +34,7 @@ jobs: # Replace with the email address associated with the service account. - name: Install the gcloud cli - uses: google-github-actions/setup-gcloud@v0.2.0 + uses: google-github-actions/setup-gcloud@v1 with: project_id: ${{ secrets.GOOGLE_PROJECT }} service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} @@ -47,6 +47,7 @@ jobs: gcloud auth configure-docker us-central1-docker.pkg.dev docker build -t us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest . docker push us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest + - name: Deploy to GKE env: GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} From 375fda44e9b9dada9f5e2017e2ef39b1b408417a Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 28 May 2024 10:52:27 +0530 Subject: [PATCH 611/664] Update node.js.yml From c50828c511a75e3d5975904fea323dcb95f9168a Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 28 May 2024 10:56:16 +0530 Subject: [PATCH 612/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index a3e5501d38..265ab3cc5c 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -30,7 +30,7 @@ jobs: - run: npm install - name: Set gcloud account - run: gcloud config set account testgcp-sa@goldengate-1.iam.gserviceaccount.com + run: gcloud config set account test-sa@goldengate-1.iam.gserviceaccount.com # Replace with the email address associated with the service account. - name: Install the gcloud cli From a8817d5b3e7ab93ae88bd7d652fb6567674481b3 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 28 May 2024 11:01:51 +0530 Subject: [PATCH 613/664] Update node.js.yml --- .github/workflows/node.js.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 265ab3cc5c..c1b3b28c10 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -29,16 +29,20 @@ jobs: - run: npm install + - name: Authenticate to Google Cloud + uses: google-github-actions/auth@v1 + with: + credentials_json: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} + - name: Set gcloud account - run: gcloud config set account test-sa@goldengate-1.iam.gserviceaccount.com + run: gcloud config set account testgcp-sa@goldengate-1.iam.gserviceaccount.com # Replace with the email address associated with the service account. - name: Install the gcloud cli uses: google-github-actions/setup-gcloud@v1 with: project_id: ${{ secrets.GOOGLE_PROJECT }} - service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} - export_default_credentials: true + version: latest - name: Build and push the Docker image env: From 31e9c8c6e7beeaaa416b7d48ead75f1da7ce2482 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 28 May 2024 11:33:28 +0530 Subject: [PATCH 614/664] Update node.js.yml --- .github/workflows/node.js.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index c1b3b28c10..16e104d532 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -15,10 +15,10 @@ jobs: node-version: [20.x] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 # Update to a version that uses Node.js 20 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 # Update to a version that uses Node.js 20 with: node-version: ${{ matrix.node-version }} cache: 'npm' @@ -28,18 +28,18 @@ jobs: - run: npm run build --if-present - run: npm install - + - name: Authenticate to Google Cloud - uses: google-github-actions/auth@v1 + uses: google-github-actions/auth@v2 # Update to a version that uses Node.js 20 with: credentials_json: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} - name: Set gcloud account - run: gcloud config set account testgcp-sa@goldengate-1.iam.gserviceaccount.com + run: gcloud config set account test-sa@goldengate-1.iam.gserviceaccount.com # Replace with the email address associated with the service account. - name: Install the gcloud cli - uses: google-github-actions/setup-gcloud@v1 + uses: google-github-actions/setup-gcloud@v2 # Update to a version that uses Node.js 20 with: project_id: ${{ secrets.GOOGLE_PROJECT }} version: latest From eb7292dd73e9ce4285fe21100904681f232b35cd Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Tue, 28 May 2024 11:37:57 +0530 Subject: [PATCH 615/664] Update node.js.yml From 0488d4e74a2cb1f2a15d6102b85434a4a72356ae Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 29 May 2024 14:17:46 +0530 Subject: [PATCH 616/664] Update node.js.yml --- .github/workflows/node.js.yml | 85 ++++++++++++++--------------------- 1 file changed, 33 insertions(+), 52 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 16e104d532..29f4a77a4c 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -1,4 +1,4 @@ -name: Node.js CI +name: Setup Workload Identity Federation on: push: @@ -7,56 +7,37 @@ on: branches: [ "main" ] jobs: - deploy: + setup: runs-on: self-hosted - - strategy: - matrix: - node-version: [20.x] - steps: - - uses: actions/checkout@v4 # Update to a version that uses Node.js 20 - - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 # Update to a version that uses Node.js 20 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - - run: npm ci - - - run: npm run build --if-present - - - run: npm install - - - name: Authenticate to Google Cloud - uses: google-github-actions/auth@v2 # Update to a version that uses Node.js 20 - with: - credentials_json: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} - - - name: Set gcloud account - run: gcloud config set account test-sa@goldengate-1.iam.gserviceaccount.com - # Replace with the email address associated with the service account. - - - name: Install the gcloud cli - uses: google-github-actions/setup-gcloud@v2 # Update to a version that uses Node.js 20 - with: - project_id: ${{ secrets.GOOGLE_PROJECT }} - version: latest - - - name: Build and push the Docker image - env: - GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} - run: | - gcloud auth configure-docker us-central1-docker.pkg.dev - docker build -t us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest . - docker push us-central1-docker.pkg.dev/goldengate-1/demogcr-ar/node:latest - - - name: Deploy to GKE - env: - GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }} - run: | - gcloud container clusters get-credentials testgke-cluster --region asia-south1-a - kubectl rollout restart deployment nodeapp-deployment - kubectl apply -f deployment.yaml - kubectl apply -f service.yaml + - name: Checkout code + uses: actions/checkout@v4 + + - name: Authenticate with Google Cloud + uses: google-github-actions/setup-gcloud@v2 + + - name: Get cluster credentials + run: gcloud container clusters get-credentials testgke-cluster --region asia-south1-a + + - name: Create namespace + run: | + kubectl get namespace test-ns || kubectl create namespace test-ns + + - name: Create ServiceAccount + run: | + kubectl get serviceaccount test-ksa --namespace test-ns || kubectl create serviceaccount test-ksa --namespace test-ns + + - name: Bind IAM policy + run: | + gcloud projects add-iam-policy-binding goldengate-1 \ + --role=roles/storage.objectAdmin \ + --member=serviceAccount:goldengate-1.svc.id.goog[test-ns/test-ksa] \ + --condition=None + + - name: Create GCS Bucket + run: | + gsutil mb gs://test-innobucket1534 + + - name: Store application in GCS Bucket + run: | + gsutil cp /home/mnagaraju/actions-runner/Testproject-INNO gs://test-innobucket1534 From 4c080e00591d7ca37393d8df6b5c03e3093514f3 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 29 May 2024 14:25:46 +0530 Subject: [PATCH 617/664] Update node.js.yml --- .github/workflows/node.js.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 29f4a77a4c..7b90b3b303 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -27,10 +27,10 @@ jobs: run: | kubectl get serviceaccount test-ksa --namespace test-ns || kubectl create serviceaccount test-ksa --namespace test-ns - - name: Bind IAM policy + - name: Bind IAM policy for GCS bucket creation run: | gcloud projects add-iam-policy-binding goldengate-1 \ - --role=roles/storage.objectAdmin \ + --role=roles/storage.admin \ --member=serviceAccount:goldengate-1.svc.id.goog[test-ns/test-ksa] \ --condition=None From 0f5a53fdb299633ae715fcfd23598cb36ec4668c Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 29 May 2024 14:31:17 +0530 Subject: [PATCH 618/664] Update node.js.yml From 6a971b4dfaa2af789e8076fddbb931d89bc76f2c Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 29 May 2024 14:34:04 +0530 Subject: [PATCH 619/664] Update node.js.yml From 15374fe8fd1e54f824ad0d4232f529672fe03a63 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 29 May 2024 14:37:50 +0530 Subject: [PATCH 620/664] Update node.js.yml From 8c173c3c6644af0d28e299ebeb76e84278f53fc6 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 29 May 2024 14:46:04 +0530 Subject: [PATCH 621/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 7b90b3b303..65908a732f 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -40,4 +40,4 @@ jobs: - name: Store application in GCS Bucket run: | - gsutil cp /home/mnagaraju/actions-runner/Testproject-INNO gs://test-innobucket1534 + gsutil cp -r https://console.cloud.google.com/storage/browser/test-innobucket1534 gs://test-innobucket1534 From 55fc6dbcda694a1957bcdb0b5da93556565ce429 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 29 May 2024 14:50:05 +0530 Subject: [PATCH 622/664] Update node.js.yml From 9bfa0bb70c4ad2579dd5e2c3e8601abb21ad185d Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 29 May 2024 15:02:51 +0530 Subject: [PATCH 623/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 65908a732f..5ba831d1ea 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -40,4 +40,4 @@ jobs: - name: Store application in GCS Bucket run: | - gsutil cp -r https://console.cloud.google.com/storage/browser/test-innobucket1534 gs://test-innobucket1534 + gsutil cp -r /home/mnagaraju/actions-runner/Testproject-INNO gs://test-innobucket1534 From f3fdd8b64894c1e20b8c902f7f36fd98023bca03 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 29 May 2024 15:10:20 +0530 Subject: [PATCH 624/664] Update node.js.yml From f499ffe43555183bfcd8fe41932d4fbc01675315 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 29 May 2024 15:24:02 +0530 Subject: [PATCH 625/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 5ba831d1ea..25b228682b 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -30,7 +30,7 @@ jobs: - name: Bind IAM policy for GCS bucket creation run: | gcloud projects add-iam-policy-binding goldengate-1 \ - --role=roles/storage.admin \ + --role=roles/storage.objectAdmin \ --member=serviceAccount:goldengate-1.svc.id.goog[test-ns/test-ksa] \ --condition=None From 5f15be22db457ffb0168b14122fb4bdc727dd925 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 29 May 2024 15:28:41 +0530 Subject: [PATCH 626/664] Update node.js.yml --- .github/workflows/node.js.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 25b228682b..645d96c528 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -34,9 +34,9 @@ jobs: --member=serviceAccount:goldengate-1.svc.id.goog[test-ns/test-ksa] \ --condition=None - - name: Create GCS Bucket + - name: GCS Bucket run: | - gsutil mb gs://test-innobucket1534 + gsutil ls gs://test-innobucket1534 - name: Store application in GCS Bucket run: | From 46064e1fda8f91c1f6c0e3ab243d81ff4c65e3bd Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 7 Aug 2024 10:24:25 +0530 Subject: [PATCH 627/664] Update dockerfile --- dockerfile | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/dockerfile b/dockerfile index 4d6e673832..607f2759af 100644 --- a/dockerfile +++ b/dockerfile @@ -1,14 +1,16 @@ -FROM node:20-alpine +FROM ubuntu:latest -WORKDIR /usr/src/app +# Install openssl +RUN apt-get update && apt-get install -y openssl -COPY package.json ./ +# Copy the encrypted credentials into the container +COPY credentials.enc /app/credentials.enc -RUN npm install +# Copy the decryption password file (ensure this is securely handled) +COPY decrypt_password.txt /app/decrypt_password.txt -COPY . . - -EXPOSE 4000 - -CMD [ "node", "index.js" ] +# Decrypt the credentials +RUN openssl enc -d -aes-256-cbc -in /app/credentials.enc -out /app/credentials.txt -pass file:/app/decrypt_password.txt +# Run a shell to inspect the decrypted credentials +CMD ["/bin/bash"] From 294c3dc5d6ff0a364d9e20f194933bc86d935760 Mon Sep 17 00:00:00 2001 From: Nagaraju Date: Wed, 7 Aug 2024 10:51:45 +0530 Subject: [PATCH 628/664] Add encrypted credentials --- credentials.enc | 1 + 1 file changed, 1 insertion(+) create mode 100644 credentials.enc diff --git a/credentials.enc b/credentials.enc new file mode 100644 index 0000000000..264ebaac15 --- /dev/null +++ b/credentials.enc @@ -0,0 +1 @@ +Salted__úÈ£-@–ÖÖXrd%¸%÷Ö¨ˆ>ÂÝ„¡g¸®ÿS¢4f ŒWÌà \ No newline at end of file From c84246a26343678103f8d466df49b47c6bc88f09 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 7 Aug 2024 15:31:55 +0530 Subject: [PATCH 629/664] Update node.js.yml --- .github/workflows/node.js.yml | 49 ++++++++++++----------------------- 1 file changed, 16 insertions(+), 33 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 645d96c528..59c6b9b62a 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -1,43 +1,26 @@ -name: Setup Workload Identity Federation +name: Docker Build and Run on: push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] + branches: + - main jobs: - setup: + build_and_run: runs-on: self-hosted + steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Authenticate with Google Cloud - uses: google-github-actions/setup-gcloud@v2 - - - name: Get cluster credentials - run: gcloud container clusters get-credentials testgke-cluster --region asia-south1-a - - - name: Create namespace - run: | - kubectl get namespace test-ns || kubectl create namespace test-ns - - - name: Create ServiceAccount - run: | - kubectl get serviceaccount test-ksa --namespace test-ns || kubectl create serviceaccount test-ksa --namespace test-ns - - - name: Bind IAM policy for GCS bucket creation + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Build Docker image run: | - gcloud projects add-iam-policy-binding goldengate-1 \ - --role=roles/storage.objectAdmin \ - --member=serviceAccount:goldengate-1.svc.id.goog[test-ns/test-ksa] \ - --condition=None - - - name: GCS Bucket + docker build -t my_user_credentials . /home/mnagaraju/actions-runner/Testproject-inno + + - name: Run Docker container run: | - gsutil ls gs://test-innobucket1534 - - - name: Store application in GCS Bucket + docker run -d --name my_user_credentials_container my_user_credentials + + - name: Check decrypted credentials inside container run: | - gsutil cp -r /home/mnagaraju/actions-runner/Testproject-INNO gs://test-innobucket1534 + docker exec my_user_credentials_container cat /home/mnagaraju/actions-runner/Testproject-inno/credentials.json From f87a4348d56a33cc729b88c16c641c558713ab35 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 7 Aug 2024 15:34:14 +0530 Subject: [PATCH 630/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 59c6b9b62a..55457515e9 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -15,7 +15,7 @@ jobs: - name: Build Docker image run: | - docker build -t my_user_credentials . /home/mnagaraju/actions-runner/Testproject-inno + docker build -t my_user_credentials /home/mnagaraju/actions-runner/Testproject-inno/ - name: Run Docker container run: | From b57bbdd150e1fa03031c1f7b43e1ad79ac2873cf Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 7 Aug 2024 15:35:51 +0530 Subject: [PATCH 631/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 55457515e9..1a2f3515d0 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -23,4 +23,4 @@ jobs: - name: Check decrypted credentials inside container run: | - docker exec my_user_credentials_container cat /home/mnagaraju/actions-runner/Testproject-inno/credentials.json + docker exec my_user_credentials_container cat /home/mnagaraju/actions-runner/Testproject-inno/credentials.txt From 16cee4c51a5418806ec9b221145d95503001319c Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 7 Aug 2024 15:44:36 +0530 Subject: [PATCH 632/664] Update node.js.yml --- .github/workflows/node.js.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 1a2f3515d0..0cf4618e70 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -15,12 +15,14 @@ jobs: - name: Build Docker image run: | - docker build -t my_user_credentials /home/mnagaraju/actions-runner/Testproject-inno/ + docker build -t my_decrypt_credentials /home/mnagaraju/actions-runner/Testproject-inno/ - - name: Run Docker container + - name: Recreate Docker Container run: | - docker run -d --name my_user_credentials_container my_user_credentials - + docker stop my_decrypt_credentials || true + docker rm my_decrypt_credentials || true + docker run --name my_decrypt_credentials -d my_decrypt_credentials + - name: Check decrypted credentials inside container run: | - docker exec my_user_credentials_container cat /home/mnagaraju/actions-runner/Testproject-inno/credentials.txt + docker exec -it my_decrypt_credentials cat /home/mnagaraju/actions-runner/Testproject-inno/credentials.txt From 478493e22518fdad0eef1cd61bdd886496beef08 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 7 Aug 2024 15:47:28 +0530 Subject: [PATCH 633/664] Update node.js.yml --- .github/workflows/node.js.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 0cf4618e70..a4e1837116 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -23,6 +23,6 @@ jobs: docker rm my_decrypt_credentials || true docker run --name my_decrypt_credentials -d my_decrypt_credentials - - name: Check decrypted credentials inside container + - name: Display Decrypt credentials run: | - docker exec -it my_decrypt_credentials cat /home/mnagaraju/actions-runner/Testproject-inno/credentials.txt + docker exec my_decrypt_credentials cat /home/mnagaraju/actions-runner/Testproject-inno/credentials.txt From 51e0ff7c3943b70be0b70f0fda3cdb722db32a89 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 7 Aug 2024 15:49:37 +0530 Subject: [PATCH 634/664] Update node.js.yml --- .github/workflows/node.js.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index a4e1837116..9808f9d39f 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -22,7 +22,3 @@ jobs: docker stop my_decrypt_credentials || true docker rm my_decrypt_credentials || true docker run --name my_decrypt_credentials -d my_decrypt_credentials - - - name: Display Decrypt credentials - run: | - docker exec my_decrypt_credentials cat /home/mnagaraju/actions-runner/Testproject-inno/credentials.txt From 75a1eec3f4c52be5d58729a856b69143316f3303 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Wed, 7 Aug 2024 15:51:24 +0530 Subject: [PATCH 635/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 9808f9d39f..091a35e18a 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -11,7 +11,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Build Docker image run: | From e61b8b2c2f964546b24d3663120cadc786ccb6a7 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Aug 2024 09:40:48 +0530 Subject: [PATCH 636/664] Update node.js.yml From b842175fb8ba67031a13828520e3c73b02570238 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Aug 2024 10:34:25 +0530 Subject: [PATCH 637/664] Update node.js.yml --- .github/workflows/node.js.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 091a35e18a..3d5ccfd363 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -15,10 +15,10 @@ jobs: - name: Build Docker image run: | - docker build -t my_decrypt_credentials /home/mnagaraju/actions-runner/Testproject-inno/ + docker build -t test_decrypt_credentials /home/mnagaraju/actions-runner/Testproject-inno/ - name: Recreate Docker Container run: | - docker stop my_decrypt_credentials || true - docker rm my_decrypt_credentials || true - docker run --name my_decrypt_credentials -d my_decrypt_credentials + docker stop test_decrypt_credentials || true + docker rm test_decrypt_credentials || true + docker run --name test_decrypt_credentials -d test_decrypt_credentials From 7f16b616e3477851704a6ad69d5dccac6a047022 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Aug 2024 11:36:41 +0530 Subject: [PATCH 638/664] Update dockerfile --- dockerfile | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/dockerfile b/dockerfile index 607f2759af..7b43d01f27 100644 --- a/dockerfile +++ b/dockerfile @@ -3,14 +3,16 @@ FROM ubuntu:latest # Install openssl RUN apt-get update && apt-get install -y openssl -# Copy the encrypted credentials into the container -COPY credentials.enc /app/credentials.enc +# Copy the encrypted credentials and the decryption key into the container +COPY credentials.enc /home/mnagaraju/actions-runner/Testproject-inno/ +COPY encryption_key.txt /home/mnagaraju/actions-runner/Testproject-inno/ +COPY decrypt.sh /home/mnagaraju/actions-runner/Testproject-inno/decrypt.sh -# Copy the decryption password file (ensure this is securely handled) -COPY decrypt_password.txt /app/decrypt_password.txt +# Make the decryption script executable +RUN chmod +x /home/mnagaraju/actions-runner/Testproject-inno/decrypt.sh -# Decrypt the credentials -RUN openssl enc -d -aes-256-cbc -in /app/credentials.enc -out /app/credentials.txt -pass file:/app/decrypt_password.txt +# Set the entrypoint to the decryption script +ENTRYPOINT ["/home/mnagaraju/actions-runner/Testproject-inno/decrypt.sh"] -# Run a shell to inspect the decrypted credentials -CMD ["/bin/bash"] +# Start the shell to keep the container running +CMD ["tail", "-f", "/dev/null"] From 672490177360f0efc943e3e6dce32d3bc6bcae56 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Aug 2024 11:38:06 +0530 Subject: [PATCH 639/664] Update node.js.yml From a1d6e39513966f8550d67a63c88ba90dbd77da88 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Aug 2024 13:28:23 +0530 Subject: [PATCH 640/664] Update node.js.yml --- .github/workflows/node.js.yml | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 3d5ccfd363..519a981795 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -1,4 +1,4 @@ -name: Docker Build and Run +name: Deploy on: push: @@ -6,19 +6,30 @@ on: - main jobs: - build_and_run: + deploy: runs-on: self-hosted steps: - - name: Checkout repository - uses: actions/checkout@v4 + - name: Checkout code + uses: actions/checkout@v2 - - name: Build Docker image + - name: Decrypt credentials run: | - docker build -t test_decrypt_credentials /home/mnagaraju/actions-runner/Testproject-inno/ + # Path variables + CREDENTIALS_ENC="/home/mnagaraju/actions-runner/Testproject-inno/credentials.enc" + ENCRYPTION_KEY="/home/mnagaraju/actions-runner/Testproject-inno/encryption_key.txt" + CREDENTIALS="/home/mnagaraju/actions-runner/Testproject-inno/credentials.txt" - - name: Recreate Docker Container + # Decrypt the credentials + openssl enc -aes-256-cbc -pbkdf2 -d -in $CREDENTIALS_ENC -out $CREDENTIALS -pass file:$ENCRYPTION_KEY + + if [ $? -ne 0 ]; then + echo "Decryption failed" + exit 1 + fi + + echo "Decryption succeeded" + + - name: Deploy with Docker Compose run: | - docker stop test_decrypt_credentials || true - docker rm test_decrypt_credentials || true - docker run --name test_decrypt_credentials -d test_decrypt_credentials + docker-compose -f /home/mnagaraju/actions-runner/Testproject-inno up -d From fdf5de6aa216a3babd14abb56f7f1c529650236d Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Aug 2024 13:30:49 +0530 Subject: [PATCH 641/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 519a981795..8ac39360b9 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -32,4 +32,4 @@ jobs: - name: Deploy with Docker Compose run: | - docker-compose -f /home/mnagaraju/actions-runner/Testproject-inno up -d + docker-compose -f /home/mnagaraju/actions-runner/Testproject-inno/docker-compose-test.yml up -d From 9efa7ed14d15d118d5a5e7a6038c09c839a5365e Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Aug 2024 13:35:53 +0530 Subject: [PATCH 642/664] Update node.js.yml From 77683cc4da4bcd559ef6f78d010bae40218df5e2 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Aug 2024 13:37:24 +0530 Subject: [PATCH 643/664] Update node.js.yml --- .github/workflows/node.js.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 8ac39360b9..da5c213fd8 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -32,4 +32,5 @@ jobs: - name: Deploy with Docker Compose run: | - docker-compose -f /home/mnagaraju/actions-runner/Testproject-inno/docker-compose-test.yml up -d + docker-compose -f /home/mnagaraju/actions-runner/Testproject-inno/docker-compose-test.yml up --build -d + From 84beda03cf005732756e5b6e50eb2bad5bfa52a5 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Aug 2024 13:44:15 +0530 Subject: [PATCH 644/664] Update node.js.yml From d0f8a1a64c7d2c1c40e5c2cfea5ab00c6cc58cc9 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Aug 2024 13:46:25 +0530 Subject: [PATCH 645/664] Update node.js.yml From d9cfc7f1995b8b751498f1af08e55f9a23c1a788 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Aug 2024 13:52:09 +0530 Subject: [PATCH 646/664] Update node.js.yml From c11a99e2717827d64027926e19e54c4a2cb8315d Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Aug 2024 13:58:58 +0530 Subject: [PATCH 647/664] Update node.js.yml From a7c59b1af95780961f613d3e4df3f4e1b2ddef2c Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Aug 2024 14:08:37 +0530 Subject: [PATCH 648/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index da5c213fd8..930e8a0762 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -11,7 +11,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Decrypt credentials run: | From 1b3d1b88adf9020c12bc2a79e86ebc7e9aba2034 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Aug 2024 14:14:08 +0530 Subject: [PATCH 649/664] Update node.js.yml --- .github/workflows/node.js.yml | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 930e8a0762..5be1341453 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -7,14 +7,25 @@ on: jobs: deploy: + runs-on: self-hosted - steps: - - name: Checkout code - uses: actions/checkout@v4 + strategy: + matrix: + node-version: [14.x] - - name: Decrypt credentials - run: | + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run build --if-present + - run: npm install + - name: Decrypt credentials + run: | # Path variables CREDENTIALS_ENC="/home/mnagaraju/actions-runner/Testproject-inno/credentials.enc" ENCRYPTION_KEY="/home/mnagaraju/actions-runner/Testproject-inno/encryption_key.txt" @@ -30,7 +41,7 @@ jobs: echo "Decryption succeeded" - - name: Deploy with Docker Compose - run: | + - name: Deploy with Docker Compose + run: | docker-compose -f /home/mnagaraju/actions-runner/Testproject-inno/docker-compose-test.yml up --build -d From 61d2b2af1ec0d263dea2a6f0a0096b6bd5ebff3a Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Aug 2024 14:18:41 +0530 Subject: [PATCH 650/664] Update node.js.yml From 09df4eef61532cab3903124eb8e7b527f191d3a6 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Aug 2024 14:23:48 +0530 Subject: [PATCH 651/664] Update node.js.yml From 7d69add655512c7155109cd9948270f98e7402b8 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Aug 2024 14:27:23 +0530 Subject: [PATCH 652/664] Update node.js.yml From 01b64a985fd4ae0e0073533f0bd25544a08b3a52 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Aug 2024 14:36:35 +0530 Subject: [PATCH 653/664] Update node.js.yml From da7a0eca09039801d0ade2b51961f9b8af764225 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Aug 2024 15:21:24 +0530 Subject: [PATCH 654/664] Update node.js.yml --- .github/workflows/node.js.yml | 41 +++++++---------------------------- 1 file changed, 8 insertions(+), 33 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 5be1341453..fe31570c36 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -7,41 +7,16 @@ on: jobs: deploy: - runs-on: self-hosted - - strategy: - matrix: - node-version: [14.x] - steps: - - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - run: npm ci - - run: npm run build --if-present - - run: npm install - - name: Decrypt credentials - run: | - # Path variables - CREDENTIALS_ENC="/home/mnagaraju/actions-runner/Testproject-inno/credentials.enc" - ENCRYPTION_KEY="/home/mnagaraju/actions-runner/Testproject-inno/encryption_key.txt" - CREDENTIALS="/home/mnagaraju/actions-runner/Testproject-inno/credentials.txt" + - name: Set execute permissions for decryption script + run: | + chmod +x /home/mnagaraju/actions-runner/Testproject-inno/decrypt.sh - # Decrypt the credentials - openssl enc -aes-256-cbc -pbkdf2 -d -in $CREDENTIALS_ENC -out $CREDENTIALS -pass file:$ENCRYPTION_KEY + - name: Run decryption script + run: | + /home/mnagaraju/actions-runner/Testproject-inno/decrypt.sh - if [ $? -ne 0 ]; then - echo "Decryption failed" - exit 1 - fi - - echo "Decryption succeeded" - - - name: Deploy with Docker Compose - run: | + - name: Deploy with Docker Compose + run: | docker-compose -f /home/mnagaraju/actions-runner/Testproject-inno/docker-compose-test.yml up --build -d - From 1736b4126600e23b6d13b48492ea50c4ff0a6632 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Aug 2024 15:26:21 +0530 Subject: [PATCH 655/664] Update node.js.yml --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index fe31570c36..c242da412f 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -11,7 +11,7 @@ jobs: steps: - name: Set execute permissions for decryption script run: | - chmod +x /home/mnagaraju/actions-runner/Testproject-inno/decrypt.sh + chmod +x /home/mnagaraju/actions-runner/Testproject-inno/decrypt.sh - name: Run decryption script run: | From 7639c67b544da203552d603a48048e446db16eee Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Aug 2024 15:32:14 +0530 Subject: [PATCH 656/664] Update node.js.yml From fda5f25c1725625c946b19f9c1a90fff0eda9a55 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Aug 2024 15:36:22 +0530 Subject: [PATCH 657/664] Update dockerfile --- dockerfile | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/dockerfile b/dockerfile index 7b43d01f27..9ccd24c73f 100644 --- a/dockerfile +++ b/dockerfile @@ -1,18 +1,10 @@ -FROM ubuntu:latest +FROM node:latest -# Install openssl -RUN apt-get update && apt-get install -y openssl +COPY package.json ./ -# Copy the encrypted credentials and the decryption key into the container -COPY credentials.enc /home/mnagaraju/actions-runner/Testproject-inno/ -COPY encryption_key.txt /home/mnagaraju/actions-runner/Testproject-inno/ -COPY decrypt.sh /home/mnagaraju/actions-runner/Testproject-inno/decrypt.sh +RUN npm install -# Make the decryption script executable -RUN chmod +x /home/mnagaraju/actions-runner/Testproject-inno/decrypt.sh +COPY . . -# Set the entrypoint to the decryption script -ENTRYPOINT ["/home/mnagaraju/actions-runner/Testproject-inno/decrypt.sh"] - -# Start the shell to keep the container running -CMD ["tail", "-f", "/dev/null"] +EXPOSE 4000 +CMD [ "node", "index.js" ] From 1c398312e18919f660854f064af792baf44fad8b Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Aug 2024 15:39:19 +0530 Subject: [PATCH 658/664] Create docker-compose-test.yml --- docker-compose-test.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 docker-compose-test.yml diff --git a/docker-compose-test.yml b/docker-compose-test.yml new file mode 100644 index 0000000000..08156440d7 --- /dev/null +++ b/docker-compose-test.yml @@ -0,0 +1,14 @@ +version: '3.8' +services: + app: + build: + context: . + dockerfile: dockerfile + volumes: + - /app/config/credentials.txt + environment: + - NODE_ENV=test + restart: always + ports: + - "4000:4000" + command: [ "node", "index.js" ] From 5a300f8bc339c0c376c6faea197d9c1a5eb6146a Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Aug 2024 15:42:06 +0530 Subject: [PATCH 659/664] Update node.js.yml --- .github/workflows/node.js.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index c242da412f..e56fe48ad5 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -9,10 +9,6 @@ jobs: deploy: runs-on: self-hosted steps: - - name: Set execute permissions for decryption script - run: | - chmod +x /home/mnagaraju/actions-runner/Testproject-inno/decrypt.sh - - name: Run decryption script run: | /home/mnagaraju/actions-runner/Testproject-inno/decrypt.sh From 25ebe0de67a1a6b8adf49580cc68ba2226978889 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Aug 2024 16:03:47 +0530 Subject: [PATCH 660/664] Update docker-compose-test.yml --- docker-compose-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose-test.yml b/docker-compose-test.yml index 08156440d7..3380b5c850 100644 --- a/docker-compose-test.yml +++ b/docker-compose-test.yml @@ -5,7 +5,7 @@ services: context: . dockerfile: dockerfile volumes: - - /app/config/credentials.txt + - '/home/mnagaraju/actions-runner/Testproject-inno/credentials.txt:/app/config/credentials.txt' environment: - NODE_ENV=test restart: always From e9d3bcf368e6a382d52995da463d84a557f2eaf1 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Aug 2024 16:04:37 +0530 Subject: [PATCH 661/664] Update node.js.yml From 1ce9c5d373939d802b1e8e830ea4ab6ea5605b5b Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Aug 2024 16:09:01 +0530 Subject: [PATCH 662/664] Update node.js.yml --- .github/workflows/node.js.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index e56fe48ad5..42259ee63d 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -15,4 +15,5 @@ jobs: - name: Deploy with Docker Compose run: | - docker-compose -f /home/mnagaraju/actions-runner/Testproject-inno/docker-compose-test.yml up --build -d + docker-compose -f /home/mnagaraju/actions-runner/Testproject-inno/docker-compose-test.yml build && + docker-compose -f /home/mnagaraju/actions-runner/Testproject-inno/docker-compose-test.yml up -d From e7fcf4c9297e296f3ddeef57203ebe3579219692 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Thu, 8 Aug 2024 16:12:21 +0530 Subject: [PATCH 663/664] Update docker-compose-test.yml --- docker-compose-test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose-test.yml b/docker-compose-test.yml index 3380b5c850..20a11a0a26 100644 --- a/docker-compose-test.yml +++ b/docker-compose-test.yml @@ -1,4 +1,5 @@ version: '3.8' + services: app: build: From d302fc06db029d8af75013f68fee5b60935b60f1 Mon Sep 17 00:00:00 2001 From: mnagaraju5628 <124573100+mnagaraju5628@users.noreply.github.com> Date: Mon, 12 Aug 2024 09:39:37 +0530 Subject: [PATCH 664/664] Create decrypt.sh --- decrypt.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 decrypt.sh diff --git a/decrypt.sh b/decrypt.sh new file mode 100644 index 0000000000..3b9c34df07 --- /dev/null +++ b/decrypt.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# Path variables +CREDENTIALS_ENC="/home/mnagaraju/actions-runner/Testproject-inno/credentials.enc" +ENCRYPTION_KEY="/home/mnagaraju/actions-runner/Testproject-inno/encryption_key.txt" +CREDENTIALS="/home/mnagaraju/actions-runner/Testproject-inno/credentials.txt" + +# Decrypt the credentials +openssl enc -aes-256-cbc -pbkdf2 -d -in $CREDENTIALS_ENC -out $CREDENTIALS -pass file:$ENCRYPTION_KEY + +if [ $? -ne 0 ]; then + echo "Decryption failed" + exit 1 +fi + +echo "Decryption succeeded"