From d51ec18863e95535298b3089b0d5f8a564fbe972 Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Wed, 19 Aug 2026 15:52:35 +0300 Subject: [PATCH 01/79] env added --- .github/workflows/solar-system.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index d56aa02f7..895ddd1eb 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -6,7 +6,11 @@ on: branches: - main - 'feature/*' - +env: + MONGO_URI: ‘mongodb+srv://supercluster.d83jj.mongodb.net/superData' + MONGO_USERNAME: superuser + MONGO_PASSWORD: ${{secrets.MONGO_PASSWORD}} + jobs: unit-testing: name: Unit Testing From 4e4b5d320561b2c0253d5b4ba01833258fd72b83 Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Wed, 19 Aug 2026 15:56:38 +0300 Subject: [PATCH 02/79] updated vars --- .github/workflows/solar-system.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index 895ddd1eb..1d2415c82 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -7,7 +7,7 @@ on: - main - 'feature/*' env: - MONGO_URI: ‘mongodb+srv://supercluster.d83jj.mongodb.net/superData' + MONGO_URI: mongodb+srv://supercluster.d83jj.mongodb.net/superData MONGO_USERNAME: superuser MONGO_PASSWORD: ${{secrets.MONGO_PASSWORD}} From d331bf6b85fe217fd70f7bb4cdb823381857a242 Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Wed, 19 Aug 2026 16:00:12 +0300 Subject: [PATCH 03/79] added always() for archive test result step --- .github/workflows/solar-system.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index 1d2415c82..b42d17eba 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -31,6 +31,7 @@ jobs: run: npm test - name: Archive Test Result + if: always() uses: actions/upload-artifact@v4 with: name: Mocha-Test-Result From 189b48f7ad53d01ec5b2235ef33e4e5eb06ab0df Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Wed, 19 Aug 2026 16:09:36 +0300 Subject: [PATCH 04/79] added code-coverage job --- .github/workflows/solar-system.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index b42d17eba..7fb6e0193 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -36,3 +36,29 @@ jobs: with: name: Mocha-Test-Result path: test-results.xml + + code-coverage: + name: code-coverage + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Setup NodeJS Version + uses: actions/setup-node@v4 + with: + node-version: 18 + + - name: Install Dependencies + run: nmp install + + - name: Run Code coverage + continue-on-error: true + run: npm run code-coverage + + - name: Archive Test Result + uses: actions/upload-artifact@v4 + with: + name: Code-Coverage-Result + path: coverage + retention-days: 5 From 03cc12508cdd9b3f32af26f617e9adefd094b8fb Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Wed, 19 Aug 2026 16:11:02 +0300 Subject: [PATCH 05/79] fix --- .github/workflows/solar-system.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index 7fb6e0193..e16e56910 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -50,7 +50,7 @@ jobs: node-version: 18 - name: Install Dependencies - run: nmp install + run: npm install - name: Run Code coverage continue-on-error: true From 78802984fd78423b50cf5b947519a5ba81b065ff Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Wed, 19 Aug 2026 16:12:51 +0300 Subject: [PATCH 06/79] fix2 --- .github/workflows/solar-system.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index e16e56910..77beb262f 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -54,7 +54,7 @@ jobs: - name: Run Code coverage continue-on-error: true - run: npm run code-coverage + run: npm run coverage - name: Archive Test Result uses: actions/upload-artifact@v4 From 019c9a7a557d6ed0428bcba0ec672611f09f846e Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Thu, 20 Aug 2026 13:29:04 +0300 Subject: [PATCH 07/79] added docker login --- .github/workflows/solar-system.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index 77beb262f..c43f1794b 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -62,3 +62,17 @@ jobs: name: Code-Coverage-Result path: coverage retention-days: 5 + + docker: + needs: [unit-testing, code-coverage] + name: containerization + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Docker Login + uses: docker/login-action@v4.6.0 + with: + username: ${{ vars.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} From 9c7f554f9770b74d6fdb01471c6454fb96d917b5 Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Thu, 20 Aug 2026 13:41:59 +0300 Subject: [PATCH 08/79] added matrix --- .github/workflows/solar-system.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index c43f1794b..980a6232d 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -14,15 +14,19 @@ env: jobs: unit-testing: name: Unit Testing - runs-on: ubuntu-latest + strategy: + matrix: + nodejs_version: [18, 20] + operation_system: [ubuntu-latest] + runs-on: ${{ matrix.operation_system }} steps: - name: Checkout Repository uses: actions/checkout@v4 - - name: Setup NodeJS Version + - name: Setup NodeJS Version - ${{ matrix.nodejs_version }} uses: actions/setup-node@v4 with: - node-version: 20 + node-version: ${{ matrix.nodejs_version }} - name: Install Dependencies run: npm install From 8c4dc80c25e0fbc762d0921bff05a8cc2b96e2c2 Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Thu, 20 Aug 2026 14:05:14 +0300 Subject: [PATCH 09/79] added docker image testing --- .github/workflows/solar-system.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index 980a6232d..870862499 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -80,3 +80,27 @@ jobs: with: username: ${{ vars.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_PASSWORD }} + + - name: Docker build for testing + uses: docker/build-push-action@v7.3.0 + with: + context: . #Dockerfile location + push: false + tags: ${{ vars.DOCKERHUB_USERNAME }}/solar-system:${{ github.sha }} + + - name: Docker Image Testing + run: | + docker images + docker run --name solar-system-app -d \ + -p 3000:3000 \ + -e MONGO_URI=$MONGO_URI \ + -e MONGO_USERNAME=$MONGO_USERNAME \ + -e MONGO_PASSWORD=$MONGO_PASSWORD \ + ${{ vars.DOCKERHUB_USERNAME }}/solar-system:${{ github.sha }} + + export IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' solar-system-app) + echo $IP + + echo Testing Image URL using wget + wget -q -O - 127.0.0.1:3000/live | grep live + From 954fe74e36106e6e5240c7f03caf617da20b1084 Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Thu, 20 Aug 2026 14:28:33 +0300 Subject: [PATCH 10/79] added step to publish docker image --- .github/workflows/solar-system.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index 870862499..4af5996cf 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -104,3 +104,9 @@ jobs: echo Testing Image URL using wget wget -q -O - 127.0.0.1:3000/live | grep live + - name: Docker Push + uses: docker/build-push-action@v7.3.0 + with: + context: . #Dockerfile location + push: true + tags: ${{ vars.DOCKERHUB_USERNAME }}/solar-system:${{ github.sha }} \ No newline at end of file From 2b82c5a7bd33eb39e88bd92ecb982fc78d006a20 Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Thu, 20 Aug 2026 14:48:25 +0300 Subject: [PATCH 11/79] added GHRC login page --- .github/workflows/solar-system.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index 4af5996cf..cc73868af 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -75,12 +75,20 @@ jobs: - name: Checkout Repository uses: actions/checkout@v4 - - name: Docker Login + - name: DockeHub Login uses: docker/login-action@v4.6.0 with: username: ${{ vars.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_PASSWORD }} + + - name: GHCR Login + uses: docker/login-action@v4.6.0 + with: + registry: ghcr.io + username: ${{ github.Repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Docker build for testing uses: docker/build-push-action@v7.3.0 with: @@ -104,9 +112,11 @@ jobs: echo Testing Image URL using wget wget -q -O - 127.0.0.1:3000/live | grep live - - name: Docker Push + - name: Container Registry Push uses: docker/build-push-action@v7.3.0 with: context: . #Dockerfile location push: true - tags: ${{ vars.DOCKERHUB_USERNAME }}/solar-system:${{ github.sha }} \ No newline at end of file + tags: | + ${{ vars.DOCKERHUB_USERNAME }}/solar-system:${{ github.sha }} + ghcr.io/${{ github.Repository_owner }}/solar-system:${{ github.sha }} \ No newline at end of file From 29a5cabf9ab0620225a198b4696ca233e207fc4c Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Thu, 20 Aug 2026 14:54:11 +0300 Subject: [PATCH 12/79] added permissions --- .github/workflows/solar-system.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index cc73868af..c2bd6aef0 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -68,6 +68,8 @@ jobs: retention-days: 5 docker: + permissions: + packages: write needs: [unit-testing, code-coverage] name: containerization runs-on: ubuntu-latest From 9d0dea4171fd98dfc0f47a14b250167125fc937f Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Sun, 23 Aug 2026 11:47:02 +0300 Subject: [PATCH 13/79] added mongo-db service to the unit testing step --- .github/workflows/solar-system.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index c2bd6aef0..d90648389 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -14,6 +14,16 @@ env: jobs: unit-testing: name: Unit Testing + services: + mongodb: + image: siddharth67/mongo-db:no-password + ports: + - 27017:27017 + + env: + MONGO_URI: mongodb://localhost:27071/superData + MONGO_USERNAME: no-prod-user + MONGO_PASSWORD: no-prod-password strategy: matrix: nodejs_version: [18, 20] From acf0267098a8d596ef4572ff054e65a3de8d42d0 Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Sun, 23 Aug 2026 11:48:22 +0300 Subject: [PATCH 14/79] fix --- .github/workflows/solar-system.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index d90648389..982020a54 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -20,10 +20,10 @@ jobs: ports: - 27017:27017 - env: - MONGO_URI: mongodb://localhost:27071/superData - MONGO_USERNAME: no-prod-user - MONGO_PASSWORD: no-prod-password + env: + MONGO_URI: mongodb://localhost:27071/superData + MONGO_USERNAME: no-prod-user + MONGO_PASSWORD: no-prod-password strategy: matrix: nodejs_version: [18, 20] From 131d06b98fe4fd1646d0ca474bd4e7dcf283abfe Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Sun, 23 Aug 2026 11:51:19 +0300 Subject: [PATCH 15/79] fix3 --- .github/workflows/solar-system.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index 982020a54..d443ab024 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -16,7 +16,7 @@ jobs: name: Unit Testing services: mongodb: - image: siddharth67/mongo-db:no-password + image: siddharth67/mongo-db:no-prod ports: - 27017:27017 From 27b0c9a758c60b6cb395eae54673ef063da799ed Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Sun, 23 Aug 2026 11:52:51 +0300 Subject: [PATCH 16/79] fix4 --- .github/workflows/solar-system.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index d443ab024..15dae7e41 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -16,7 +16,7 @@ jobs: name: Unit Testing services: mongodb: - image: siddharth67/mongo-db:no-prod + image: siddharth67/mongo-db:non-prod ports: - 27017:27017 From 7fab56f5949897dda780048be811ef9477da80be Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Sun, 23 Aug 2026 11:55:27 +0300 Subject: [PATCH 17/79] fix5 --- .github/workflows/solar-system.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index 15dae7e41..8d37a0247 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -21,7 +21,7 @@ jobs: - 27017:27017 env: - MONGO_URI: mongodb://localhost:27071/superData + MONGO_URI: mongodb://localhost:27017/superData MONGO_USERNAME: no-prod-user MONGO_PASSWORD: no-prod-password strategy: From 4f32115db2309205d21f4629bf89e9ea37e341b9 Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Sun, 23 Aug 2026 12:19:06 +0300 Subject: [PATCH 18/79] added job and service containers --- .github/workflows/solar-system.yml | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index 8d37a0247..767eef884 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -22,8 +22,8 @@ jobs: env: MONGO_URI: mongodb://localhost:27017/superData - MONGO_USERNAME: no-prod-user - MONGO_PASSWORD: no-prod-password + MONGO_USERNAME: non-prod-user + MONGO_PASSWORD: non-prod-password strategy: matrix: nodejs_version: [18, 20] @@ -53,15 +53,26 @@ jobs: code-coverage: name: code-coverage + container: + image: node:18 + services: + mongodb: + image: siddharth67/mongo-db:non-prod + options: + --name mongo + env: + MONGO_URI: mongodb://mongo:27017/superData + MONGO_USERNAME: non-prod-user + MONGO_PASSWORD: non-prod-password runs-on: ubuntu-latest steps: - name: Checkout Repository uses: actions/checkout@v4 - - name: Setup NodeJS Version - uses: actions/setup-node@v4 - with: - node-version: 18 + # - name: Setup NodeJS Version + # uses: actions/setup-node@v4 + # with: + # node-version: 18 - name: Install Dependencies run: npm install From 3c9efeccd89b67456d36cd4d0f7445e764f2213c Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Sun, 23 Aug 2026 12:38:44 +0300 Subject: [PATCH 19/79] added cache npm for the unit-testing step --- .github/workflows/solar-system.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index 767eef884..1c29976fd 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -37,6 +37,11 @@ jobs: uses: actions/setup-node@v4 with: node-version: ${{ matrix.nodejs_version }} + + - name: Cache NPM dependencies + uses: actions/cache@v6.1.0 + key: '${{ runner.os }}-node-modules-${{ hashFiles(''package-lock.json'') }}' + path: ~/.npm - name: Install Dependencies run: npm install From 141bff9438be34c60988599dd288b8d4f8e8fc8e Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Sun, 23 Aug 2026 12:42:27 +0300 Subject: [PATCH 20/79] fix ( added with) --- .github/workflows/solar-system.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index 1c29976fd..f33c7d655 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -40,6 +40,7 @@ jobs: - name: Cache NPM dependencies uses: actions/cache@v6.1.0 + with: key: '${{ runner.os }}-node-modules-${{ hashFiles(''package-lock.json'') }}' path: ~/.npm From 8c3f5a983607743496dcaee54785c666f235016d Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Sun, 23 Aug 2026 12:50:47 +0300 Subject: [PATCH 21/79] added container node:20 to the unit testing --- .github/workflows/solar-system.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index f33c7d655..926cb5790 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -14,6 +14,8 @@ env: jobs: unit-testing: name: Unit Testing + container: + image: node:20 services: mongodb: image: siddharth67/mongo-db:non-prod @@ -33,10 +35,10 @@ jobs: - name: Checkout Repository uses: actions/checkout@v4 - - name: Setup NodeJS Version - ${{ matrix.nodejs_version }} - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.nodejs_version }} + # - name: Setup NodeJS Version - ${{ matrix.nodejs_version }} + # uses: actions/setup-node@v4 + # with: + # node-version: ${{ matrix.nodejs_version }} - name: Cache NPM dependencies uses: actions/cache@v6.1.0 From 24e49e193d34a5649fe1f9387b2649aceb8fd47c Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Sun, 23 Aug 2026 12:54:13 +0300 Subject: [PATCH 22/79] fix --- .github/workflows/solar-system.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index 926cb5790..282a2f7e3 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -19,11 +19,12 @@ jobs: services: mongodb: image: siddharth67/mongo-db:non-prod - ports: - - 27017:27017 - + options: + --name mongo + # ports: + # - 27017:27017 env: - MONGO_URI: mongodb://localhost:27017/superData + MONGO_URI: mongodb://mongo:27017/superData MONGO_USERNAME: non-prod-user MONGO_PASSWORD: non-prod-password strategy: From dcd6d5c99514ed1b44ed01eefd969ebd0f7f1de9 Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Sun, 23 Aug 2026 13:50:58 +0300 Subject: [PATCH 23/79] installing kubectl CLI --- .github/workflows/solar-system.yml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index 282a2f7e3..50a3f2382 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -98,6 +98,8 @@ jobs: retention-days: 5 docker: + + permissions: packages: write needs: [unit-testing, code-coverage] @@ -151,4 +153,24 @@ jobs: push: true tags: | ${{ vars.DOCKERHUB_USERNAME }}/solar-system:${{ github.sha }} - ghcr.io/${{ github.Repository_owner }}/solar-system:${{ github.sha }} \ No newline at end of file + ghcr.io/${{ github.Repository_owner }}/solar-system:${{ github.sha }} + + dev-deploy: + name: dev-deploy + needs: [docker] + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Install Kubectl CLI + uses: Azure/setup-kubectl@v5.1.0 + with: + version: '1.26.0' + + - name: Fetch Kubernetes Cluster Details + run: | + kubectl version --short + echo ---------------------------- + kubectl get nodes + From c40af1e46cec13b95524d3c5ccd9eed779e8703d Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Sun, 23 Aug 2026 14:14:25 +0300 Subject: [PATCH 24/79] added kubeconfig --- .github/workflows/solar-system.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index 50a3f2382..38c3a4dad 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -168,6 +168,14 @@ jobs: with: version: '1.26.0' + # - name: Set Kubeconfig file + # uses: Azure/k8s-set-context@v5.0.1 + # with: + # method: kubeconfig + # kubeconfig: ${{ secrets.KUBECONFIG }} + + + - name: Fetch Kubernetes Cluster Details run: | kubectl version --short From 2f09670e8d295c509230e98b27cfd7c71af7bd24 Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Mon, 24 Aug 2026 13:43:10 +0300 Subject: [PATCH 25/79] Replacing Tokens --- .github/workflows/solar-system.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index 38c3a4dad..0faf5a3ed 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -182,3 +182,25 @@ jobs: echo ---------------------------- kubectl get nodes + + - name: Save Nginx Ingress Controller IP as a GITHUB environment variable + run: | + echo "INGRESS_IP=$(kubectl -n ingress-nginx get services ingress-nginx-controller -o jsonpath="{.status.loadbalancer.ingress[0]}")" >> $GITHUB_ENV + + - name: Replace Tokens in manifest Files + uses: cschleiden/replace-tokens@v1.4 + with: + tokenPrefix: '_{_' + tokenSuffix: '_}_' + files: '["kubernetes/development/*.yaml"]' + env: + NAMESPACE: ${{ vars.NAMESPACE }} + REPLICAS: ${{ vars.REPLICAS }} + IMAGE: ${{ vars.DOCKERHUB_USERNAME }}/solar-system:${{ github.sha }} + # INGESS_IP: ${{ env.INGESS_IP }} + + # - name: Check Files + # run: | + # cat kubernetes/development/*.yaml + + \ No newline at end of file From 33de42fc0e86982b068271fc179e8e1fcfa06893 Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Mon, 24 Aug 2026 13:48:11 +0300 Subject: [PATCH 26/79] ignored all the steps --- .github/workflows/solar-system.yml | 38 +++++++++++++++--------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index 0faf5a3ed..e31423f07 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -176,28 +176,28 @@ jobs: - - name: Fetch Kubernetes Cluster Details - run: | - kubectl version --short - echo ---------------------------- - kubectl get nodes + # - name: Fetch Kubernetes Cluster Details + # run: | + # kubectl version --short + # echo ---------------------------- + # kubectl get nodes - - name: Save Nginx Ingress Controller IP as a GITHUB environment variable - run: | - echo "INGRESS_IP=$(kubectl -n ingress-nginx get services ingress-nginx-controller -o jsonpath="{.status.loadbalancer.ingress[0]}")" >> $GITHUB_ENV + # - name: Save Nginx Ingress Controller IP as a GITHUB environment variable + # run: | + # echo "INGRESS_IP=$(kubectl -n ingress-nginx get services ingress-nginx-controller -o jsonpath="{.status.loadbalancer.ingress[0]}")" >> $GITHUB_ENV - - name: Replace Tokens in manifest Files - uses: cschleiden/replace-tokens@v1.4 - with: - tokenPrefix: '_{_' - tokenSuffix: '_}_' - files: '["kubernetes/development/*.yaml"]' - env: - NAMESPACE: ${{ vars.NAMESPACE }} - REPLICAS: ${{ vars.REPLICAS }} - IMAGE: ${{ vars.DOCKERHUB_USERNAME }}/solar-system:${{ github.sha }} - # INGESS_IP: ${{ env.INGESS_IP }} + # - name: Replace Tokens in manifest Files + # uses: cschleiden/replace-tokens@v1.4 + # with: + # tokenPrefix: '_{_' + # tokenSuffix: '_}_' + # files: '["kubernetes/development/*.yaml"]' + # env: + # NAMESPACE: ${{ vars.NAMESPACE }} + # REPLICAS: ${{ vars.REPLICAS }} + # IMAGE: ${{ vars.DOCKERHUB_USERNAME }}/solar-system:${{ github.sha }} + # # INGESS_IP: ${{ env.INGESS_IP }} # - name: Check Files # run: | From 63b2ce3e31b1e08f238a6f35818527ff458d16bb Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Mon, 24 Aug 2026 14:27:59 +0300 Subject: [PATCH 27/79] added secret and deploying --- .github/workflows/solar-system.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index e31423f07..33270817a 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -174,15 +174,12 @@ jobs: # method: kubeconfig # kubeconfig: ${{ secrets.KUBECONFIG }} - - # - name: Fetch Kubernetes Cluster Details # run: | # kubectl version --short # echo ---------------------------- # kubectl get nodes - # - name: Save Nginx Ingress Controller IP as a GITHUB environment variable # run: | # echo "INGRESS_IP=$(kubectl -n ingress-nginx get services ingress-nginx-controller -o jsonpath="{.status.loadbalancer.ingress[0]}")" >> $GITHUB_ENV @@ -203,4 +200,17 @@ jobs: # run: | # cat kubernetes/development/*.yaml + # - name: Deploy To Dev Env + # run: | + # kubectl apply -f kubernetes/development + + # - name: Create MongoDB Secret + # run: | + # kubectl -n ${{ vars.NAMESPACE }} create secret generic mongo-db-creds \ + # --from-literal=MONGO_URI=${{ env.MONGO_URI }} \ + # --from-literal=MONGO_USERNAME=${{ vars.MONGO_USERNAME }} \ + # --from-literal=MONGO_PASSWORD=${{ secrets.MONGO_PASSWORD }} \ + # --save-config \ + # --dry-run=client \ + # -o yaml | kubectl apply -f - \ No newline at end of file From f9d0a807cf738e1060914cd5affa25c13d34715c Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Mon, 24 Aug 2026 14:29:24 +0300 Subject: [PATCH 28/79] fix step order --- .github/workflows/solar-system.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index 33270817a..3c99a4126 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -200,11 +200,7 @@ jobs: # run: | # cat kubernetes/development/*.yaml - # - name: Deploy To Dev Env - # run: | - # kubectl apply -f kubernetes/development - - # - name: Create MongoDB Secret + # - name: Create MongoDB Secret # run: | # kubectl -n ${{ vars.NAMESPACE }} create secret generic mongo-db-creds \ # --from-literal=MONGO_URI=${{ env.MONGO_URI }} \ @@ -213,4 +209,9 @@ jobs: # --save-config \ # --dry-run=client \ # -o yaml | kubectl apply -f - - \ No newline at end of file + + # - name: Deploy To Dev Env + # run: | + # kubectl apply -f kubernetes/development + + \ No newline at end of file From e3852afb2241ec56a2f82639f82bd7c40c341a89 Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Wed, 26 Aug 2026 15:30:18 +0300 Subject: [PATCH 29/79] setting output for testing --- .github/workflows/solar-system.yml | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index 3c99a4126..71c20255b 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -98,8 +98,6 @@ jobs: retention-days: 5 docker: - - permissions: packages: write needs: [unit-testing, code-coverage] @@ -157,7 +155,9 @@ jobs: dev-deploy: name: dev-deploy - needs: [docker] + needs: docker + # outputs: + # APP_INGRESS_URL: ${{ steps.set-ingress-host-address.outputs.APP_INGRESS_HOST }} runs-on: ubuntu-latest steps: - name: Checkout Repository @@ -200,7 +200,7 @@ jobs: # run: | # cat kubernetes/development/*.yaml - # - name: Create MongoDB Secret + # - name: Create MongoDB Secret # run: | # kubectl -n ${{ vars.NAMESPACE }} create secret generic mongo-db-creds \ # --from-literal=MONGO_URI=${{ env.MONGO_URI }} \ @@ -213,5 +213,21 @@ jobs: # - name: Deploy To Dev Env # run: | # kubectl apply -f kubernetes/development + + # - name: Set App Ingress Host URL + # id: set-ingress-host-address + # run: | + # echo "APP_INGRESS_HOST=$(kubectl -n ${{ vars.NAMESPACE }} get ingress -o jsonpath "{.items[0].spec.tls[0]}")" >> GITHUB_OUTPUT - \ No newline at end of file + # integration-testing: + # name: Dev integration-testing + # needs: dev-deploy + # runs-on: ubuntu-latest + # steps: + # - name: Test URL Output using Curl and JQ + # env: + URL: ${{ needs.dev-deploy.outputs.APP_INGRESS_URL }} + # run: | + # echo URL: ${{ env.APP_INGRESS_HOST }} + # echo "---------------------------------" + # curl https://${{ env.OUTPUT }}/live -s -k | jq -r .status | grep -i live \ No newline at end of file From 96a323d444b3f8ec22e7777f574aa96e62296d48 Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Wed, 26 Aug 2026 15:35:42 +0300 Subject: [PATCH 30/79] fix --- .github/workflows/solar-system.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index 71c20255b..1275dc276 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -172,7 +172,7 @@ jobs: # uses: Azure/k8s-set-context@v5.0.1 # with: # method: kubeconfig - # kubeconfig: ${{ secrets.KUBECONFIG }} + # kubeconfig: ${{ secrets.KUBECONFIG }} # - name: Fetch Kubernetes Cluster Details # run: | From a94e327d5ce1388772d9db191168c9a0d89ff5d5 Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Wed, 26 Aug 2026 15:38:21 +0300 Subject: [PATCH 31/79] fix --- .github/workflows/solar-system.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index 1275dc276..5cf484330 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -166,7 +166,7 @@ jobs: - name: Install Kubectl CLI uses: Azure/setup-kubectl@v5.1.0 with: - version: '1.26.0' + version: '1.26.0' # - name: Set Kubeconfig file # uses: Azure/k8s-set-context@v5.0.1 From 498f6c8282e1d305914ef966a0904df641e2eb10 Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Wed, 26 Aug 2026 15:39:20 +0300 Subject: [PATCH 32/79] fix --- .github/workflows/solar-system.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index 5cf484330..1275dc276 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -166,7 +166,7 @@ jobs: - name: Install Kubectl CLI uses: Azure/setup-kubectl@v5.1.0 with: - version: '1.26.0' + version: '1.26.0' # - name: Set Kubeconfig file # uses: Azure/k8s-set-context@v5.0.1 From 2313f35eed99cdc46e081c92e98e8193043edc07 Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Wed, 26 Aug 2026 15:42:17 +0300 Subject: [PATCH 33/79] fix --- .github/workflows/solar-system.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index 1275dc276..bd6cabe3d 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -226,7 +226,7 @@ jobs: # steps: # - name: Test URL Output using Curl and JQ # env: - URL: ${{ needs.dev-deploy.outputs.APP_INGRESS_URL }} + # URL: ${{ needs.dev-deploy.outputs.APP_INGRESS_URL }} # run: | # echo URL: ${{ env.APP_INGRESS_HOST }} # echo "---------------------------------" From 2feebfb2f0df3a0ed0ef63ffe70f8743f2132138 Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Thu, 27 Aug 2026 10:02:48 +0300 Subject: [PATCH 34/79] Added environment ot the job --- .github/workflows/solar-system.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index bd6cabe3d..f0151f457 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -156,6 +156,9 @@ jobs: dev-deploy: name: dev-deploy needs: docker + environment: + name: development + # url: https://${{ steps.set-ingress-host-address.outputs.APP_INGRESS_HOST }} # outputs: # APP_INGRESS_URL: ${{ steps.set-ingress-host-address.outputs.APP_INGRESS_HOST }} runs-on: ubuntu-latest From 1bdc0d424527b459ab9dee9b4916d58dbccb66c5 Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Thu, 27 Aug 2026 10:25:06 +0300 Subject: [PATCH 35/79] Added Prod jobs --- .github/workflows/solar-system.yml | 87 +++++++++++++++++++++++++++++- 1 file changed, 85 insertions(+), 2 deletions(-) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index f0151f457..ae35b3d8a 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -222,7 +222,7 @@ jobs: # run: | # echo "APP_INGRESS_HOST=$(kubectl -n ${{ vars.NAMESPACE }} get ingress -o jsonpath "{.items[0].spec.tls[0]}")" >> GITHUB_OUTPUT - # integration-testing: + # dev-integration-testing: # name: Dev integration-testing # needs: dev-deploy # runs-on: ubuntu-latest @@ -233,4 +233,87 @@ jobs: # run: | # echo URL: ${{ env.APP_INGRESS_HOST }} # echo "---------------------------------" - # curl https://${{ env.OUTPUT }}/live -s -k | jq -r .status | grep -i live \ No newline at end of file + # curl https://${{ env.OUTPUT }}/live -s -k | jq -r .status | grep -i live + + +prod-deploy: + name: prod-deploy + needs: dev-integration-testing + environment: + name: production + # url: https://${{ steps.set-ingress-host-address.outputs.APP_INGRESS_HOST }} + # outputs: + # APP_INGRESS_URL: ${{ steps.set-ingress-host-address.outputs.APP_INGRESS_HOST }} + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Install Kubectl CLI + uses: Azure/setup-kubectl@v5.1.0 + with: + version: '1.26.0' + + # - name: Set Kubeconfig file + # uses: Azure/k8s-set-context@v5.0.1 + # with: + # method: kubeconfig + # kubeconfig: ${{ secrets.KUBECONFIG }} + + # - name: Fetch Kubernetes Cluster Details + # run: | + # kubectl version --short + # echo ---------------------------- + # kubectl get nodes + + # - name: Save Nginx Ingress Controller IP as a GITHUB environment variable + # run: | + # echo "INGRESS_IP=$(kubectl -n ingress-nginx get services ingress-nginx-controller -o jsonpath="{.status.loadbalancer.ingress[0]}")" >> $GITHUB_ENV + + # - name: Replace Tokens in manifest Files + # uses: cschleiden/replace-tokens@v1.4 + # with: + # tokenPrefix: '_{_' + # tokenSuffix: '_}_' + # files: '["kubernetes/production/*.yaml"]' + # env: + # NAMESPACE: ${{ vars.NAMESPACE }} + # REPLICAS: ${{ vars.REPLICAS }} + # IMAGE: ${{ vars.DOCKERHUB_USERNAME }}/solar-system:${{ github.sha }} + # # INGESS_IP: ${{ env.INGESS_IP }} + + # - name: Check Files + # run: | + # cat kubernetes/production/*.yaml + + # - name: Create MongoDB Secret + # run: | + # kubectl -n ${{ vars.NAMESPACE }} create secret generic mongo-db-creds \ + # --from-literal=MONGO_URI=${{ env.MONGO_URI }} \ + # --from-literal=MONGO_USERNAME=${{ vars.MONGO_USERNAME }} \ + # --from-literal=MONGO_PASSWORD=${{ secrets.MONGO_PASSWORD }} \ + # --save-config \ + # --dry-run=client \ + # -o yaml | kubectl apply -f - + + # - name: Deploy To Prod Env + # run: | + # kubectl apply -f kubernetes/production + + # - name: Set App Ingress Host URL + # id: set-ingress-host-address + # run: | + # echo "APP_INGRESS_HOST=$(kubectl -n ${{ vars.NAMESPACE }} get ingress -o jsonpath "{.items[0].spec.tls[0]}")" >> GITHUB_OUTPUT + + # prod-integration-testing: + # name: Prod integration-testing + # needs: prod-deploy + # runs-on: ubuntu-latest + # steps: + # - name: Test URL Output using Curl and JQ + # env: + # URL: ${{ needs.prod-deploy.outputs.APP_INGRESS_URL }} + # run: | + # echo URL: ${{ env.APP_INGRESS_HOST }} + # echo "---------------------------------" + # curl https://${{ env.OUTPUT }}/live -s -k | jq -r .status | grep -i live \ No newline at end of file From efa02022995a137ff4986b5346d0d6fe194e342d Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Thu, 27 Aug 2026 10:26:08 +0300 Subject: [PATCH 36/79] added prod steps V1 --- .github/workflows/solar-system.yml | 162 ++++++++++++++--------------- 1 file changed, 81 insertions(+), 81 deletions(-) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index ae35b3d8a..e4d54c200 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -236,84 +236,84 @@ jobs: # curl https://${{ env.OUTPUT }}/live -s -k | jq -r .status | grep -i live -prod-deploy: - name: prod-deploy - needs: dev-integration-testing - environment: - name: production - # url: https://${{ steps.set-ingress-host-address.outputs.APP_INGRESS_HOST }} - # outputs: - # APP_INGRESS_URL: ${{ steps.set-ingress-host-address.outputs.APP_INGRESS_HOST }} - runs-on: ubuntu-latest - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - - name: Install Kubectl CLI - uses: Azure/setup-kubectl@v5.1.0 - with: - version: '1.26.0' - - # - name: Set Kubeconfig file - # uses: Azure/k8s-set-context@v5.0.1 - # with: - # method: kubeconfig - # kubeconfig: ${{ secrets.KUBECONFIG }} - - # - name: Fetch Kubernetes Cluster Details - # run: | - # kubectl version --short - # echo ---------------------------- - # kubectl get nodes - - # - name: Save Nginx Ingress Controller IP as a GITHUB environment variable - # run: | - # echo "INGRESS_IP=$(kubectl -n ingress-nginx get services ingress-nginx-controller -o jsonpath="{.status.loadbalancer.ingress[0]}")" >> $GITHUB_ENV - - # - name: Replace Tokens in manifest Files - # uses: cschleiden/replace-tokens@v1.4 - # with: - # tokenPrefix: '_{_' - # tokenSuffix: '_}_' - # files: '["kubernetes/production/*.yaml"]' - # env: - # NAMESPACE: ${{ vars.NAMESPACE }} - # REPLICAS: ${{ vars.REPLICAS }} - # IMAGE: ${{ vars.DOCKERHUB_USERNAME }}/solar-system:${{ github.sha }} - # # INGESS_IP: ${{ env.INGESS_IP }} - - # - name: Check Files - # run: | - # cat kubernetes/production/*.yaml - - # - name: Create MongoDB Secret - # run: | - # kubectl -n ${{ vars.NAMESPACE }} create secret generic mongo-db-creds \ - # --from-literal=MONGO_URI=${{ env.MONGO_URI }} \ - # --from-literal=MONGO_USERNAME=${{ vars.MONGO_USERNAME }} \ - # --from-literal=MONGO_PASSWORD=${{ secrets.MONGO_PASSWORD }} \ - # --save-config \ - # --dry-run=client \ - # -o yaml | kubectl apply -f - - - # - name: Deploy To Prod Env - # run: | - # kubectl apply -f kubernetes/production - - # - name: Set App Ingress Host URL - # id: set-ingress-host-address - # run: | - # echo "APP_INGRESS_HOST=$(kubectl -n ${{ vars.NAMESPACE }} get ingress -o jsonpath "{.items[0].spec.tls[0]}")" >> GITHUB_OUTPUT - - # prod-integration-testing: - # name: Prod integration-testing - # needs: prod-deploy - # runs-on: ubuntu-latest - # steps: - # - name: Test URL Output using Curl and JQ - # env: - # URL: ${{ needs.prod-deploy.outputs.APP_INGRESS_URL }} - # run: | - # echo URL: ${{ env.APP_INGRESS_HOST }} - # echo "---------------------------------" - # curl https://${{ env.OUTPUT }}/live -s -k | jq -r .status | grep -i live \ No newline at end of file + prod-deploy: + name: prod-deploy + needs: dev-integration-testing + environment: + name: production + # url: https://${{ steps.set-ingress-host-address.outputs.APP_INGRESS_HOST }} + # outputs: + # APP_INGRESS_URL: ${{ steps.set-ingress-host-address.outputs.APP_INGRESS_HOST }} + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Install Kubectl CLI + uses: Azure/setup-kubectl@v5.1.0 + with: + version: '1.26.0' + + # - name: Set Kubeconfig file + # uses: Azure/k8s-set-context@v5.0.1 + # with: + # method: kubeconfig + # kubeconfig: ${{ secrets.KUBECONFIG }} + + # - name: Fetch Kubernetes Cluster Details + # run: | + # kubectl version --short + # echo ---------------------------- + # kubectl get nodes + + # - name: Save Nginx Ingress Controller IP as a GITHUB environment variable + # run: | + # echo "INGRESS_IP=$(kubectl -n ingress-nginx get services ingress-nginx-controller -o jsonpath="{.status.loadbalancer.ingress[0]}")" >> $GITHUB_ENV + + # - name: Replace Tokens in manifest Files + # uses: cschleiden/replace-tokens@v1.4 + # with: + # tokenPrefix: '_{_' + # tokenSuffix: '_}_' + # files: '["kubernetes/production/*.yaml"]' + # env: + # NAMESPACE: ${{ vars.NAMESPACE }} + # REPLICAS: ${{ vars.REPLICAS }} + # IMAGE: ${{ vars.DOCKERHUB_USERNAME }}/solar-system:${{ github.sha }} + # # INGESS_IP: ${{ env.INGESS_IP }} + + # - name: Check Files + # run: | + # cat kubernetes/production/*.yaml + + # - name: Create MongoDB Secret + # run: | + # kubectl -n ${{ vars.NAMESPACE }} create secret generic mongo-db-creds \ + # --from-literal=MONGO_URI=${{ env.MONGO_URI }} \ + # --from-literal=MONGO_USERNAME=${{ vars.MONGO_USERNAME }} \ + # --from-literal=MONGO_PASSWORD=${{ secrets.MONGO_PASSWORD }} \ + # --save-config \ + # --dry-run=client \ + # -o yaml | kubectl apply -f - + + # - name: Deploy To Prod Env + # run: | + # kubectl apply -f kubernetes/production + + # - name: Set App Ingress Host URL + # id: set-ingress-host-address + # run: | + # echo "APP_INGRESS_HOST=$(kubectl -n ${{ vars.NAMESPACE }} get ingress -o jsonpath "{.items[0].spec.tls[0]}")" >> GITHUB_OUTPUT + + # prod-integration-testing: + # name: Prod integration-testing + # needs: prod-deploy + # runs-on: ubuntu-latest + # steps: + # - name: Test URL Output using Curl and JQ + # env: + # URL: ${{ needs.prod-deploy.outputs.APP_INGRESS_URL }} + # run: | + # echo URL: ${{ env.APP_INGRESS_HOST }} + # echo "---------------------------------" + # curl https://${{ env.OUTPUT }}/live -s -k | jq -r .status | grep -i live \ No newline at end of file From 79b32cf9c456404e5e3c2dbc2732489f95196963 Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Thu, 27 Aug 2026 10:26:44 +0300 Subject: [PATCH 37/79] fix --- .github/workflows/solar-system.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index e4d54c200..6bb6b81d3 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -238,7 +238,7 @@ jobs: prod-deploy: name: prod-deploy - needs: dev-integration-testing + # needs: dev-integration-testing environment: name: production # url: https://${{ steps.set-ingress-host-address.outputs.APP_INGRESS_HOST }} From 6353fb418932b0ad374208fcfca2e953e32290ca Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Thu, 27 Aug 2026 11:26:23 +0300 Subject: [PATCH 38/79] added if expression --- .github/workflows/solar-system.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index 6bb6b81d3..a926ab77d 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -154,6 +154,7 @@ jobs: ghcr.io/${{ github.Repository_owner }}/solar-system:${{ github.sha }} dev-deploy: + if: contains(github.ref, 'feature/') name: dev-deploy needs: docker environment: @@ -223,6 +224,7 @@ jobs: # echo "APP_INGRESS_HOST=$(kubectl -n ${{ vars.NAMESPACE }} get ingress -o jsonpath "{.items[0].spec.tls[0]}")" >> GITHUB_OUTPUT # dev-integration-testing: + # if: contains(github.ref, 'feature/') # name: Dev integration-testing # needs: dev-deploy # runs-on: ubuntu-latest @@ -237,8 +239,9 @@ jobs: prod-deploy: + if: github.ref == 'refs/heads/main' name: prod-deploy - # needs: dev-integration-testing + needs: docker environment: name: production # url: https://${{ steps.set-ingress-host-address.outputs.APP_INGRESS_HOST }} @@ -306,6 +309,7 @@ jobs: # echo "APP_INGRESS_HOST=$(kubectl -n ${{ vars.NAMESPACE }} get ingress -o jsonpath "{.items[0].spec.tls[0]}")" >> GITHUB_OUTPUT # prod-integration-testing: + # if: github.ref == 'refs/heads/main' # name: Prod integration-testing # needs: prod-deploy # runs-on: ubuntu-latest From 72dabec09bcf46ca31308bcf11a6319754c1123b Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Thu, 27 Aug 2026 11:40:14 +0300 Subject: [PATCH 39/79] sync --- .github/workflows/solar-system.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index a926ab77d..287e9a10a 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -160,7 +160,7 @@ jobs: environment: name: development # url: https://${{ steps.set-ingress-host-address.outputs.APP_INGRESS_HOST }} - # outputs: + # outputs: # APP_INGRESS_URL: ${{ steps.set-ingress-host-address.outputs.APP_INGRESS_HOST }} runs-on: ubuntu-latest steps: From a14d3412175bcd9165a3f9305657a4eb9c3c072d Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Thu, 27 Aug 2026 11:41:26 +0300 Subject: [PATCH 40/79] added fix --- .github/workflows/solar-system.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index 287e9a10a..1735e9282 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -164,7 +164,7 @@ jobs: # APP_INGRESS_URL: ${{ steps.set-ingress-host-address.outputs.APP_INGRESS_HOST }} runs-on: ubuntu-latest steps: - - name: Checkout Repository + - name: Checkout Repositoryy uses: actions/checkout@v4 - name: Install Kubectl CLI From aa600d2f2cd26224e53369a14de7ba67ae436e3c Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Thu, 27 Aug 2026 12:39:38 +0300 Subject: [PATCH 41/79] fix --- .github/workflows/solar-system.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index 1735e9282..03cc74f26 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -126,7 +126,7 @@ jobs: with: context: . #Dockerfile location push: false - tags: ${{ vars.DOCKERHUB_USERNAME }}/solar-system:${{ github.sha }} + tags: elior19940/solar-system:${{ github.sha }} - name: Docker Image Testing run: | From b36aa699824aa07903fcda3a54e42ed9c2c4570f Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Thu, 27 Aug 2026 12:45:03 +0300 Subject: [PATCH 42/79] fix --- .github/workflows/solar-system.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index 03cc74f26..9bef984dd 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -8,7 +8,7 @@ on: - 'feature/*' env: MONGO_URI: mongodb+srv://supercluster.d83jj.mongodb.net/superData - MONGO_USERNAME: superuser + MONGO_USERNAME: superuser MONGO_PASSWORD: ${{secrets.MONGO_PASSWORD}} jobs: From 3ef64d0cbdd269eba3a140efd1d7c407d28f94a5 Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Thu, 27 Aug 2026 12:48:08 +0300 Subject: [PATCH 43/79] test --- .github/workflows/solar-system.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index 9bef984dd..a16993094 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -1,6 +1,6 @@ name: Solar System Workflow -on: +on: workflow_dispatch: push: branches: From f8369311baea019e6a40761e410abce920e2b4ea Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Thu, 27 Aug 2026 12:53:37 +0300 Subject: [PATCH 44/79] added --- .github/workflows/solar-system.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index a16993094..6257fee1d 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -126,7 +126,7 @@ jobs: with: context: . #Dockerfile location push: false - tags: elior19940/solar-system:${{ github.sha }} + tags: elior.sofer123/solar-system:${{ github.sha }} - name: Docker Image Testing run: | From 0d49f9d8951c918317a3a2fb50f7af791674de88 Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Thu, 27 Aug 2026 15:05:06 +0300 Subject: [PATCH 45/79] fix --- .github/workflows/solar-system.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index 6257fee1d..1eeab6794 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -126,7 +126,7 @@ jobs: with: context: . #Dockerfile location push: false - tags: elior.sofer123/solar-system:${{ github.sha }} + tags: eliorsofer123/solar-system:${{ github.sha }} - name: Docker Image Testing run: | @@ -136,7 +136,7 @@ jobs: -e MONGO_URI=$MONGO_URI \ -e MONGO_USERNAME=$MONGO_USERNAME \ -e MONGO_PASSWORD=$MONGO_PASSWORD \ - ${{ vars.DOCKERHUB_USERNAME }}/solar-system:${{ github.sha }} + eliorsofer123/solar-system:${{ github.sha }} export IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' solar-system-app) echo $IP From 7450e35080169529edb1d93d674fa0602209904b Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Thu, 27 Aug 2026 15:08:24 +0300 Subject: [PATCH 46/79] fix --- .github/workflows/solar-system.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index 1eeab6794..ac2a30fd3 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -98,7 +98,7 @@ jobs: retention-days: 5 docker: - permissions: + permissions: packages: write needs: [unit-testing, code-coverage] name: containerization From 7d4c58ccbb34dbb28d0c73acf8ff22338c951cbb Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Thu, 27 Aug 2026 15:11:57 +0300 Subject: [PATCH 47/79] fix --- .github/workflows/solar-system.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index ac2a30fd3..618e61476 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -11,7 +11,7 @@ env: MONGO_USERNAME: superuser MONGO_PASSWORD: ${{secrets.MONGO_PASSWORD}} -jobs: +jobs: unit-testing: name: Unit Testing container: From 8cb0b45952eb970b70b725521f9163e6e62dec10 Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Thu, 27 Aug 2026 15:17:02 +0300 Subject: [PATCH 48/79] added install clusterr phase --- .github/workflows/solar-system.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index 618e61476..ed004d97c 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -172,6 +172,22 @@ jobs: with: version: '1.26.0' + - name: Install Cluster + uses: helm/kind-action@v1.14.0 + - run: | + sleep 60 + kubectl -n kube-system get pod + set +e + REPO_OWNER_LC="${GITHUB_REPOSITORY_OWNER,,}" + kubectl run solar --image ghcr.io/${REPO_OWNER_LC}/solar-system:${{ github.sha }} \ + --env MONGO_URI=${{ env.MONGO_URI}} \ + --env MONGO_USERNAME=${{ env.MONGO_USERNAME}} \ + --env MONGO_PASSWORD=${{ env.MONGO_PASSWORD}} + set -e + echo "kubectl returned $?" + kubectl -n default get pod + sleep 10 + # - name: Set Kubeconfig file # uses: Azure/k8s-set-context@v5.0.1 # with: From 710c39cf2cb5ab43c34347947e17f7ac9a11b580 Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Sun, 30 Aug 2026 11:56:08 +0300 Subject: [PATCH 49/79] added new reusable workflow --- .github/workflows/reuse-deployment.yml | 90 ++++++++++++++++++++++++++ .github/workflows/solar-system.yml | 84 +----------------------- 2 files changed, 92 insertions(+), 82 deletions(-) create mode 100644 .github/workflows/reuse-deployment.yml diff --git a/.github/workflows/reuse-deployment.yml b/.github/workflows/reuse-deployment.yml new file mode 100644 index 000000000..8971affdb --- /dev/null +++ b/.github/workflows/reuse-deployment.yml @@ -0,0 +1,90 @@ +name: Deployment- Reusable Workflow + +on: + workflow_call: + +jobs: + reuse-deploy: + environment: + name: development + # url: https://${{ steps.set-ingress-host-address.outputs.APP_INGRESS_HOST }} + # outputs: + # APP_INGRESS_URL: ${{ steps.set-ingress-host-address.outputs.APP_INGRESS_HOST }} + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Install Kubectl CLI + uses: Azure/setup-kubectl@v5.1.0 + with: + version: '1.26.0' + + - name: Install Cluster + uses: helm/kind-action@v1.14.0 + + - name: Test Pod Deployment + run: | + sleep 5 + kubectl -n kube-system get pod + set +e + REPO_OWNER_LC="${GITHUB_REPOSITORY_OWNER,,}" + kubectl run solar --image ghcr.io/${REPO_OWNER_LC}/solar-system:${{ github.sha }} \ + --env MONGO_URI=${{ env.MONGO_URI}} \ + --env MONGO_USERNAME=${{ env.MONGO_USERNAME}} \ + --env MONGO_PASSWORD=${{ env.MONGO_PASSWORD}} + set -e + echo "kubectl returned $?" + kubectl -n default get pod + sleep 10 + + # - name: Set Kubeconfig file + # uses: Azure/k8s-set-context@v5.0.1 + # with: + # method: kubeconfig + # kubeconfig: ${{ secrets.KUBECONFIG }} + + # - name: Fetch Kubernetes Cluster Details + # run: | + # kubectl version --short + # echo ---------------------------- + # kubectl get nodes + + # - name: Save Nginx Ingress Controller IP as a GITHUB environment variable + # run: | + # echo "INGRESS_IP=$(kubectl -n ingress-nginx get services ingress-nginx-controller -o jsonpath="{.status.loadbalancer.ingress[0]}")" >> $GITHUB_ENV + + # - name: Replace Tokens in manifest Files + # uses: cschleiden/replace-tokens@v1.4 + # with: + # tokenPrefix: '_{_' + # tokenSuffix: '_}_' + # files: '["kubernetes/development/*.yaml"]' + # env: + # NAMESPACE: ${{ vars.NAMESPACE }} + # REPLICAS: ${{ vars.REPLICAS }} + # IMAGE: ${{ vars.DOCKERHUB_USERNAME }}/solar-system:${{ github.sha }} + # # INGESS_IP: ${{ env.INGESS_IP }} + + # - name: Check Files + # run: | + # cat kubernetes/development/*.yaml + + # - name: Create MongoDB Secret + # run: | + # kubectl -n ${{ vars.NAMESPACE }} create secret generic mongo-db-creds \ + # --from-literal=MONGO_URI=${{ env.MONGO_URI }} \ + # --from-literal=MONGO_USERNAME=${{ vars.MONGO_USERNAME }} \ + # --from-literal=MONGO_PASSWORD=${{ secrets.MONGO_PASSWORD }} \ + # --save-config \ + # --dry-run=client \ + # -o yaml | kubectl apply -f - + + # - name: Deploy To Dev Env + # run: | + # kubectl apply -f kubernetes/development + + # - name: Set App Ingress Host URL + # id: set-ingress-host-address + # run: | + # echo "APP_INGRESS_HOST=$(kubectl -n ${{ vars.NAMESPACE }} get ingress -o jsonpath "{.items[0].spec.tls[0]}")" >> $GITHUB_OUTPUT \ No newline at end of file diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index ed004d97c..3b6dc2c84 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -157,88 +157,8 @@ jobs: if: contains(github.ref, 'feature/') name: dev-deploy needs: docker - environment: - name: development - # url: https://${{ steps.set-ingress-host-address.outputs.APP_INGRESS_HOST }} - # outputs: - # APP_INGRESS_URL: ${{ steps.set-ingress-host-address.outputs.APP_INGRESS_HOST }} - runs-on: ubuntu-latest - steps: - - name: Checkout Repositoryy - uses: actions/checkout@v4 - - - name: Install Kubectl CLI - uses: Azure/setup-kubectl@v5.1.0 - with: - version: '1.26.0' - - - name: Install Cluster - uses: helm/kind-action@v1.14.0 - - run: | - sleep 60 - kubectl -n kube-system get pod - set +e - REPO_OWNER_LC="${GITHUB_REPOSITORY_OWNER,,}" - kubectl run solar --image ghcr.io/${REPO_OWNER_LC}/solar-system:${{ github.sha }} \ - --env MONGO_URI=${{ env.MONGO_URI}} \ - --env MONGO_USERNAME=${{ env.MONGO_USERNAME}} \ - --env MONGO_PASSWORD=${{ env.MONGO_PASSWORD}} - set -e - echo "kubectl returned $?" - kubectl -n default get pod - sleep 10 - - # - name: Set Kubeconfig file - # uses: Azure/k8s-set-context@v5.0.1 - # with: - # method: kubeconfig - # kubeconfig: ${{ secrets.KUBECONFIG }} - - # - name: Fetch Kubernetes Cluster Details - # run: | - # kubectl version --short - # echo ---------------------------- - # kubectl get nodes - - # - name: Save Nginx Ingress Controller IP as a GITHUB environment variable - # run: | - # echo "INGRESS_IP=$(kubectl -n ingress-nginx get services ingress-nginx-controller -o jsonpath="{.status.loadbalancer.ingress[0]}")" >> $GITHUB_ENV - - # - name: Replace Tokens in manifest Files - # uses: cschleiden/replace-tokens@v1.4 - # with: - # tokenPrefix: '_{_' - # tokenSuffix: '_}_' - # files: '["kubernetes/development/*.yaml"]' - # env: - # NAMESPACE: ${{ vars.NAMESPACE }} - # REPLICAS: ${{ vars.REPLICAS }} - # IMAGE: ${{ vars.DOCKERHUB_USERNAME }}/solar-system:${{ github.sha }} - # # INGESS_IP: ${{ env.INGESS_IP }} - - # - name: Check Files - # run: | - # cat kubernetes/development/*.yaml - - # - name: Create MongoDB Secret - # run: | - # kubectl -n ${{ vars.NAMESPACE }} create secret generic mongo-db-creds \ - # --from-literal=MONGO_URI=${{ env.MONGO_URI }} \ - # --from-literal=MONGO_USERNAME=${{ vars.MONGO_USERNAME }} \ - # --from-literal=MONGO_PASSWORD=${{ secrets.MONGO_PASSWORD }} \ - # --save-config \ - # --dry-run=client \ - # -o yaml | kubectl apply -f - - - # - name: Deploy To Dev Env - # run: | - # kubectl apply -f kubernetes/development - - # - name: Set App Ingress Host URL - # id: set-ingress-host-address - # run: | - # echo "APP_INGRESS_HOST=$(kubectl -n ${{ vars.NAMESPACE }} get ingress -o jsonpath "{.items[0].spec.tls[0]}")" >> GITHUB_OUTPUT - + uses: .github/workflows/reuse-deployment.yml + # dev-integration-testing: # if: contains(github.ref, 'feature/') # name: Dev integration-testing From 9542b87a09a3d841caa180f7c73d60987b766dfe Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Sun, 30 Aug 2026 11:58:41 +0300 Subject: [PATCH 50/79] added reusable workflow --- .github/workflows/solar-system.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index 3b6dc2c84..64b5c1482 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -157,7 +157,7 @@ jobs: if: contains(github.ref, 'feature/') name: dev-deploy needs: docker - uses: .github/workflows/reuse-deployment.yml + uses: .github/workflows/reuse-deployment.yml@feature/workflow # dev-integration-testing: # if: contains(github.ref, 'feature/') From 1563eb1b292f610ace037cd34c414d32b94cb576 Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Sun, 30 Aug 2026 12:00:31 +0300 Subject: [PATCH 51/79] fix --- .github/workflows/solar-system.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index 64b5c1482..5ecf055d6 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -157,7 +157,7 @@ jobs: if: contains(github.ref, 'feature/') name: dev-deploy needs: docker - uses: .github/workflows/reuse-deployment.yml@feature/workflow + uses: ./.github/workflows/reuse-deployment.yml # dev-integration-testing: # if: contains(github.ref, 'feature/') From 181ad1f42ce51e2e858d55fcf8f504cdd779cb76 Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Sun, 30 Aug 2026 12:35:03 +0300 Subject: [PATCH 52/79] passing secrets from caller to called workflows --- .github/workflows/reuse-deployment.yml | 10 ++++++++-- .github/workflows/solar-system.yml | 3 +++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reuse-deployment.yml b/.github/workflows/reuse-deployment.yml index 8971affdb..7a14f79fc 100644 --- a/.github/workflows/reuse-deployment.yml +++ b/.github/workflows/reuse-deployment.yml @@ -2,6 +2,12 @@ name: Deployment- Reusable Workflow on: workflow_call: + secrets: + k8s-kubeconfig: + required: true + mongodb-password: + required: true + jobs: reuse-deploy: @@ -42,7 +48,7 @@ jobs: # uses: Azure/k8s-set-context@v5.0.1 # with: # method: kubeconfig - # kubeconfig: ${{ secrets.KUBECONFIG }} + # kubeconfig: ${{ secrets.k8s-kubeconfig }} # - name: Fetch Kubernetes Cluster Details # run: | @@ -75,7 +81,7 @@ jobs: # kubectl -n ${{ vars.NAMESPACE }} create secret generic mongo-db-creds \ # --from-literal=MONGO_URI=${{ env.MONGO_URI }} \ # --from-literal=MONGO_USERNAME=${{ vars.MONGO_USERNAME }} \ - # --from-literal=MONGO_PASSWORD=${{ secrets.MONGO_PASSWORD }} \ + # --from-literal=MONGO_PASSWORD=${{ secrets.mongodb-password }} \ # --save-config \ # --dry-run=client \ # -o yaml | kubectl apply -f - diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index 5ecf055d6..7970a0cff 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -158,6 +158,9 @@ jobs: name: dev-deploy needs: docker uses: ./.github/workflows/reuse-deployment.yml + secrets: + # k8s-kubeconfig: ${{ secrets.KUBECONFIG }} + mongodb-password: ${{ secrets.MONGO_PASSWORD }} # dev-integration-testing: # if: contains(github.ref, 'feature/') From ada9abd1d78298c05ff50471e309d649bff38f3a Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Sun, 30 Aug 2026 12:35:59 +0300 Subject: [PATCH 53/79] fix --- .github/workflows/reuse-deployment.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reuse-deployment.yml b/.github/workflows/reuse-deployment.yml index 7a14f79fc..791d13a11 100644 --- a/.github/workflows/reuse-deployment.yml +++ b/.github/workflows/reuse-deployment.yml @@ -3,8 +3,8 @@ name: Deployment- Reusable Workflow on: workflow_call: secrets: - k8s-kubeconfig: - required: true + # k8s-kubeconfig: + # required: true mongodb-password: required: true From 81512aa8c8ecbcb055e26b3f21ad60102b35c7a0 Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Sun, 30 Aug 2026 13:15:15 +0300 Subject: [PATCH 54/79] added inputs to reusable workflow --- .github/workflows/reuse-deployment.yml | 31 +++++++++++++++++++++----- .github/workflows/solar-system.yml | 4 ++++ 2 files changed, 29 insertions(+), 6 deletions(-) diff --git a/.github/workflows/reuse-deployment.yml b/.github/workflows/reuse-deployment.yml index 791d13a11..ca5f7d514 100644 --- a/.github/workflows/reuse-deployment.yml +++ b/.github/workflows/reuse-deployment.yml @@ -2,6 +2,25 @@ name: Deployment- Reusable Workflow on: workflow_call: + inputs: + mongodb-uri: + required: true + type: string + kubectl-version: + description: Provide the required Kubectl version + default: v1.26.0 + required: false + type: string + k8s-manifest-dir: + description: Directory containing Kubernetes manifests files + default: kubernetes/ + required: true + type: string + environment: + description: Provide the Deployment Environment + default: developtment + required: true + type: string secrets: # k8s-kubeconfig: # required: true @@ -12,7 +31,7 @@ on: jobs: reuse-deploy: environment: - name: development + name: ${{ inputs.environment }} # url: https://${{ steps.set-ingress-host-address.outputs.APP_INGRESS_HOST }} # outputs: # APP_INGRESS_URL: ${{ steps.set-ingress-host-address.outputs.APP_INGRESS_HOST }} @@ -24,7 +43,7 @@ jobs: - name: Install Kubectl CLI uses: Azure/setup-kubectl@v5.1.0 with: - version: '1.26.0' + version: '${{ inputs.kubectl-version }}' - name: Install Cluster uses: helm/kind-action@v1.14.0 @@ -65,7 +84,7 @@ jobs: # with: # tokenPrefix: '_{_' # tokenSuffix: '_}_' - # files: '["kubernetes/development/*.yaml"]' + # files: '["${{ inputs.k8s-manifest-dir }}*.yaml"]' # env: # NAMESPACE: ${{ vars.NAMESPACE }} # REPLICAS: ${{ vars.REPLICAS }} @@ -74,12 +93,12 @@ jobs: # - name: Check Files # run: | - # cat kubernetes/development/*.yaml + # cat ${{ inputs.k8s-manifest-dir }}*.yaml # - name: Create MongoDB Secret # run: | # kubectl -n ${{ vars.NAMESPACE }} create secret generic mongo-db-creds \ - # --from-literal=MONGO_URI=${{ env.MONGO_URI }} \ + # --from-literal=MONGO_URI=${{ inputs.mongodb-uri }} \ # --from-literal=MONGO_USERNAME=${{ vars.MONGO_USERNAME }} \ # --from-literal=MONGO_PASSWORD=${{ secrets.mongodb-password }} \ # --save-config \ @@ -88,7 +107,7 @@ jobs: # - name: Deploy To Dev Env # run: | - # kubectl apply -f kubernetes/development + # kubectl apply -f ${{ inputs.k8s-manifest-dir }} # - name: Set App Ingress Host URL # id: set-ingress-host-address diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index 7970a0cff..951786955 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -161,6 +161,10 @@ jobs: secrets: # k8s-kubeconfig: ${{ secrets.KUBECONFIG }} mongodb-password: ${{ secrets.MONGO_PASSWORD }} + with: + mongodb-uri: ${{ vars.MONGO_URI }} + environment: development + k8s-manifest-dir: kubernetes/development/ # dev-integration-testing: # if: contains(github.ref, 'feature/') From 3304231f689c462653696905a904dc3f2903b206 Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Sun, 30 Aug 2026 14:04:38 +0300 Subject: [PATCH 55/79] added outputs to reusable workflow --- .github/workflows/reuse-deployment.yml | 5 +++-- .github/workflows/solar-system.yml | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/reuse-deployment.yml b/.github/workflows/reuse-deployment.yml index ca5f7d514..74ed1d418 100644 --- a/.github/workflows/reuse-deployment.yml +++ b/.github/workflows/reuse-deployment.yml @@ -21,13 +21,14 @@ on: default: developtment required: true type: string + outputs: + name: application-url: + value: ${{ jobs.reuse-deploy.outputs.APP_INGRESS_URL }} secrets: # k8s-kubeconfig: # required: true mongodb-password: required: true - - jobs: reuse-deploy: environment: diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index 951786955..3d2b07cd6 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -174,7 +174,7 @@ jobs: # steps: # - name: Test URL Output using Curl and JQ # env: - # URL: ${{ needs.dev-deploy.outputs.APP_INGRESS_URL }} + # URL: ${{ needs.dev-deploy.outputs.application-url }} # run: | # echo URL: ${{ env.APP_INGRESS_HOST }} # echo "---------------------------------" From 7747e4f3691bd0120b91a92a8cf677ee2b25d30f Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Sun, 30 Aug 2026 14:05:47 +0300 Subject: [PATCH 56/79] fix --- .github/workflows/reuse-deployment.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reuse-deployment.yml b/.github/workflows/reuse-deployment.yml index 74ed1d418..db8ac1d75 100644 --- a/.github/workflows/reuse-deployment.yml +++ b/.github/workflows/reuse-deployment.yml @@ -22,8 +22,8 @@ on: required: true type: string outputs: - name: application-url: - value: ${{ jobs.reuse-deploy.outputs.APP_INGRESS_URL }} + name: application-url: + value: ${{ jobs.reuse-deploy.outputs.APP_INGRESS_URL }} secrets: # k8s-kubeconfig: # required: true From e1d8423369ce0cecd0c77e83923403863fbd0095 Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Sun, 30 Aug 2026 14:07:56 +0300 Subject: [PATCH 57/79] fix --- .github/workflows/reuse-deployment.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/reuse-deployment.yml b/.github/workflows/reuse-deployment.yml index db8ac1d75..b4454fc54 100644 --- a/.github/workflows/reuse-deployment.yml +++ b/.github/workflows/reuse-deployment.yml @@ -23,12 +23,12 @@ on: type: string outputs: name: application-url: - value: ${{ jobs.reuse-deploy.outputs.APP_INGRESS_URL }} + value: "${{ jobs.reuse-deploy.outputs.APP_INGRESS_URL }}"" secrets: # k8s-kubeconfig: # required: true - mongodb-password: - required: true + mongodb-password: + required: true jobs: reuse-deploy: environment: From becad8974d8b000dc64e541a14ecb19b1dfb7adc Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Sun, 30 Aug 2026 14:09:09 +0300 Subject: [PATCH 58/79] fix --- .github/workflows/reuse-deployment.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reuse-deployment.yml b/.github/workflows/reuse-deployment.yml index b4454fc54..ec36f3feb 100644 --- a/.github/workflows/reuse-deployment.yml +++ b/.github/workflows/reuse-deployment.yml @@ -22,8 +22,8 @@ on: required: true type: string outputs: - name: application-url: - value: "${{ jobs.reuse-deploy.outputs.APP_INGRESS_URL }}"" + application-url: + value: "${{ jobs.reuse-deploy.outputs.APP_INGRESS_URL }}" secrets: # k8s-kubeconfig: # required: true From 2df207103d9016acc3a8db98336313e262236164 Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Sun, 30 Aug 2026 14:49:42 +0300 Subject: [PATCH 59/79] lab workflow --- .github/workflows/reusable-workflow.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/reusable-workflow.yml diff --git a/.github/workflows/reusable-workflow.yml b/.github/workflows/reusable-workflow.yml new file mode 100644 index 000000000..329751317 --- /dev/null +++ b/.github/workflows/reusable-workflow.yml @@ -0,0 +1,16 @@ +name: Testing - Reusable Workflow +on: + workflow_call: + inputs: + ingress-url: + description: Provide the Ingress URL + required: true + type: string +jobs: + integration-test: + runs-on: ubuntu-latest + steps: + - env: + URL: '${{ inputs.ingress-url }}' + run: | + curl https://$URL/live -s -k | jq -r .status | grep -i live \ No newline at end of file From 8f187bc6a79846a7893db85c41ddc11b2cbc89cf Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Sun, 30 Aug 2026 15:09:41 +0300 Subject: [PATCH 60/79] preparing jobs for reporting --- .github/workflows/solar-system.yml | 31 ++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index 3d2b07cd6..5d212de3b 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -55,7 +55,7 @@ jobs: - name: Archive Test Result if: always() - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7.0.1 with: name: Mocha-Test-Result path: test-results.xml @@ -91,12 +91,39 @@ jobs: run: npm run coverage - name: Archive Test Result - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7.0.1 with: name: Code-Coverage-Result path: coverage retention-days: 5 + reports-s3: + needs: [code-coverage, unit-testing] + name: AWS S3 - Upload Reports + runs-on: ubuntu-latest + continue-on-error: true + steps: + - name: Download Mocha Test Artifact + uses: actions/download-artifact@v8.0.1 + with: + name: Mocha-Test-Result + + - name: Download Code Coverage Artifact + uses: actions/download-artifact@v8.0.1 + with: + name: Code-Coverage-Result + + - name: Merge Test Files + run: | + ls -ltr + mkdir reports-${{ github.sha }} + mv cobertura-coverage.xml reports-${{ github.sha }}/ + mv test-results.xml reports-${{ github.sha }}/ + ls -ltr reports-${{ github.sha }}/ + + - name: Upload to AWS S3 + runs: echo "Uploading......." + docker: permissions: packages: write From 013f80ae15863c75e0b80277ba9965366adf05d6 Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Sun, 30 Aug 2026 15:10:25 +0300 Subject: [PATCH 61/79] fix --- .github/workflows/solar-system.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index 5d212de3b..ac80c4cd1 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -11,7 +11,7 @@ env: MONGO_USERNAME: superuser MONGO_PASSWORD: ${{secrets.MONGO_PASSWORD}} -jobs: +jobs: unit-testing: name: Unit Testing container: From 72ce1b4fef8731645c2b72e5f18f123bc278d96a Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Sun, 30 Aug 2026 15:13:24 +0300 Subject: [PATCH 62/79] fix --- .github/workflows/solar-system.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index ac80c4cd1..bc49e9a93 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -108,10 +108,10 @@ jobs: with: name: Mocha-Test-Result - - name: Download Code Coverage Artifact - uses: actions/download-artifact@v8.0.1 - with: - name: Code-Coverage-Result + - name: Download Code Coverage Artifact + uses: actions/download-artifact@v8.0.1 + with: + name: Code-Coverage-Result - name: Merge Test Files run: | From c2e2dd97eb038d352993606914071913eb464929 Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Sun, 30 Aug 2026 15:14:29 +0300 Subject: [PATCH 63/79] fix --- .github/workflows/solar-system.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index bc49e9a93..b16fedec7 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -113,16 +113,16 @@ jobs: with: name: Code-Coverage-Result - - name: Merge Test Files - run: | - ls -ltr - mkdir reports-${{ github.sha }} - mv cobertura-coverage.xml reports-${{ github.sha }}/ - mv test-results.xml reports-${{ github.sha }}/ - ls -ltr reports-${{ github.sha }}/ - - - name: Upload to AWS S3 - runs: echo "Uploading......." + - name: Merge Test Files + run: | + ls -ltr + mkdir reports-${{ github.sha }} + mv cobertura-coverage.xml reports-${{ github.sha }}/ + mv test-results.xml reports-${{ github.sha }}/ + ls -ltr reports-${{ github.sha }}/ + + - name: Upload to AWS S3 + run: echo "Uploading......." docker: permissions: From ec1ca269187c83a9f59db6ba73171fb5475aac2e Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Sun, 30 Aug 2026 15:16:04 +0300 Subject: [PATCH 64/79] fix --- .github/workflows/solar-system.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index b16fedec7..4a644abae 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -98,7 +98,9 @@ jobs: retention-days: 5 reports-s3: - needs: [code-coverage, unit-testing] + needs: + - code-coverage + - unit-testing name: AWS S3 - Upload Reports runs-on: ubuntu-latest continue-on-error: true From 7ae87308b24bda60b9327e7c4255d413933db262 Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Sun, 30 Aug 2026 15:20:22 +0300 Subject: [PATCH 65/79] fix --- .github/workflows/solar-system.yml | 468 ++++++++++++++--------------- 1 file changed, 233 insertions(+), 235 deletions(-) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index 4a644abae..7d76096c0 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -12,92 +12,92 @@ env: MONGO_PASSWORD: ${{secrets.MONGO_PASSWORD}} jobs: - unit-testing: - name: Unit Testing - container: - image: node:20 - services: - mongodb: - image: siddharth67/mongo-db:non-prod - options: - --name mongo - # ports: - # - 27017:27017 - env: - MONGO_URI: mongodb://mongo:27017/superData - MONGO_USERNAME: non-prod-user - MONGO_PASSWORD: non-prod-password - strategy: - matrix: - nodejs_version: [18, 20] - operation_system: [ubuntu-latest] - runs-on: ${{ matrix.operation_system }} - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - # - name: Setup NodeJS Version - ${{ matrix.nodejs_version }} - # uses: actions/setup-node@v4 - # with: - # node-version: ${{ matrix.nodejs_version }} - - - name: Cache NPM dependencies - uses: actions/cache@v6.1.0 - with: - key: '${{ runner.os }}-node-modules-${{ hashFiles(''package-lock.json'') }}' - path: ~/.npm + unit-testing: + name: Unit Testing + container: + image: node:20 + services: + mongodb: + image: siddharth67/mongo-db:non-prod + options: + --name mongo + # ports: + # - 27017:27017 + env: + MONGO_URI: mongodb://mongo:27017/superData + MONGO_USERNAME: non-prod-user + MONGO_PASSWORD: non-prod-password + strategy: + matrix: + nodejs_version: [18, 20] + operation_system: [ubuntu-latest] + runs-on: ${{ matrix.operation_system }} + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + # - name: Setup NodeJS Version - ${{ matrix.nodejs_version }} + # uses: actions/setup-node@v4 + # with: + # node-version: ${{ matrix.nodejs_version }} + + - name: Cache NPM dependencies + uses: actions/cache@v6.1.0 + with: + key: '${{ runner.os }}-node-modules-${{ hashFiles(''package-lock.json'') }}' + path: ~/.npm - - name: Install Dependencies - run: npm install + - name: Install Dependencies + run: npm install - - name: Unit Testing - run: npm test + - name: Unit Testing + run: npm test - - name: Archive Test Result - if: always() - uses: actions/upload-artifact@v7.0.1 - with: - name: Mocha-Test-Result - path: test-results.xml - - code-coverage: - name: code-coverage - container: - image: node:18 - services: - mongodb: - image: siddharth67/mongo-db:non-prod - options: - --name mongo - env: - MONGO_URI: mongodb://mongo:27017/superData - MONGO_USERNAME: non-prod-user - MONGO_PASSWORD: non-prod-password - runs-on: ubuntu-latest - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - # - name: Setup NodeJS Version - # uses: actions/setup-node@v4 - # with: - # node-version: 18 - - - name: Install Dependencies - run: npm install - - - name: Run Code coverage - continue-on-error: true - run: npm run coverage - - - name: Archive Test Result - uses: actions/upload-artifact@v7.0.1 - with: - name: Code-Coverage-Result - path: coverage - retention-days: 5 - - reports-s3: + - name: Archive Test Result + if: always() + uses: actions/upload-artifact@v7.0.1 + with: + name: Mocha-Test-Result + path: test-results.xml + + code-coverage: + name: code-coverage + container: + image: node:18 + services: + mongodb: + image: siddharth67/mongo-db:non-prod + options: + --name mongo + env: + MONGO_URI: mongodb://mongo:27017/superData + MONGO_USERNAME: non-prod-user + MONGO_PASSWORD: non-prod-password + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + # - name: Setup NodeJS Version + # uses: actions/setup-node@v4 + # with: + # node-version: 18 + + - name: Install Dependencies + run: npm install + + - name: Run Code coverage + continue-on-error: true + run: npm run coverage + + - name: Archive Test Result + uses: actions/upload-artifact@v7.0.1 + with: + name: Code-Coverage-Result + path: coverage + retention-days: 5 + + reports-s3: needs: - code-coverage - unit-testing @@ -126,75 +126,74 @@ jobs: - name: Upload to AWS S3 run: echo "Uploading......." - docker: - permissions: - packages: write - needs: [unit-testing, code-coverage] - name: containerization - runs-on: ubuntu-latest - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - - name: DockeHub Login - uses: docker/login-action@v4.6.0 - with: - username: ${{ vars.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_PASSWORD }} - - - - name: GHCR Login - uses: docker/login-action@v4.6.0 - with: - registry: ghcr.io - username: ${{ github.Repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Docker build for testing - uses: docker/build-push-action@v7.3.0 - with: - context: . #Dockerfile location - push: false - tags: eliorsofer123/solar-system:${{ github.sha }} - - - name: Docker Image Testing - run: | - docker images - docker run --name solar-system-app -d \ - -p 3000:3000 \ - -e MONGO_URI=$MONGO_URI \ - -e MONGO_USERNAME=$MONGO_USERNAME \ - -e MONGO_PASSWORD=$MONGO_PASSWORD \ - eliorsofer123/solar-system:${{ github.sha }} - - export IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' solar-system-app) - echo $IP - - echo Testing Image URL using wget - wget -q -O - 127.0.0.1:3000/live | grep live - - - name: Container Registry Push - uses: docker/build-push-action@v7.3.0 - with: - context: . #Dockerfile location - push: true - tags: | - ${{ vars.DOCKERHUB_USERNAME }}/solar-system:${{ github.sha }} - ghcr.io/${{ github.Repository_owner }}/solar-system:${{ github.sha }} - - dev-deploy: - if: contains(github.ref, 'feature/') - name: dev-deploy - needs: docker - uses: ./.github/workflows/reuse-deployment.yml - secrets: - # k8s-kubeconfig: ${{ secrets.KUBECONFIG }} - mongodb-password: ${{ secrets.MONGO_PASSWORD }} - with: - mongodb-uri: ${{ vars.MONGO_URI }} - environment: development - k8s-manifest-dir: kubernetes/development/ - + docker: + permissions: + packages: write + needs: [unit-testing, code-coverage] + name: containerization + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: DockeHub Login + uses: docker/login-action@v4.6.0 + with: + username: ${{ vars.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} + + - name: GHCR Login + uses: docker/login-action@v4.6.0 + with: + registry: ghcr.io + username: ${{ github.Repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Docker build for testing + uses: docker/build-push-action@v7.3.0 + with: + context: . #Dockerfile location + push: false + tags: eliorsofer123/solar-system:${{ github.sha }} + + - name: Docker Image Testing + run: | + docker images + docker run --name solar-system-app -d \ + -p 3000:3000 \ + -e MONGO_URI=$MONGO_URI \ + -e MONGO_USERNAME=$MONGO_USERNAME \ + -e MONGO_PASSWORD=$MONGO_PASSWORD \ + eliorsofer123/solar-system:${{ github.sha }} + + export IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' solar-system-app) + echo $IP + + echo Testing Image URL using wget + wget -q -O - 127.0.0.1:3000/live | grep live + + - name: Container Registry Push + uses: docker/build-push-action@v7.3.0 + with: + context: . #Dockerfile location + push: true + tags: | + ${{ vars.DOCKERHUB_USERNAME }}/solar-system:${{ github.sha }} + ghcr.io/${{ github.Repository_owner }}/solar-system:${{ github.sha }} + + dev-deploy: + if: contains(github.ref, 'feature/') + name: dev-deploy + needs: docker + uses: ./.github/workflows/reuse-deployment.yml + secrets: + # k8s-kubeconfig: ${{ secrets.KUBECONFIG }} + mongodb-password: ${{ secrets.MONGO_PASSWORD }} + with: + mongodb-uri: ${{ vars.MONGO_URI }} + environment: development + k8s-manifest-dir: kubernetes/development/ + # dev-integration-testing: # if: contains(github.ref, 'feature/') # name: Dev integration-testing @@ -209,87 +208,86 @@ jobs: # echo "---------------------------------" # curl https://${{ env.OUTPUT }}/live -s -k | jq -r .status | grep -i live + prod-deploy: + if: github.ref == 'refs/heads/main' + name: prod-deploy + needs: docker + environment: + name: production + # url: https://${{ steps.set-ingress-host-address.outputs.APP_INGRESS_HOST }} + # outputs: + # APP_INGRESS_URL: ${{ steps.set-ingress-host-address.outputs.APP_INGRESS_HOST }} + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 - prod-deploy: - if: github.ref == 'refs/heads/main' - name: prod-deploy - needs: docker - environment: - name: production - # url: https://${{ steps.set-ingress-host-address.outputs.APP_INGRESS_HOST }} - # outputs: - # APP_INGRESS_URL: ${{ steps.set-ingress-host-address.outputs.APP_INGRESS_HOST }} - runs-on: ubuntu-latest - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - - name: Install Kubectl CLI - uses: Azure/setup-kubectl@v5.1.0 - with: - version: '1.26.0' - - # - name: Set Kubeconfig file - # uses: Azure/k8s-set-context@v5.0.1 - # with: - # method: kubeconfig - # kubeconfig: ${{ secrets.KUBECONFIG }} - - # - name: Fetch Kubernetes Cluster Details - # run: | - # kubectl version --short - # echo ---------------------------- - # kubectl get nodes - - # - name: Save Nginx Ingress Controller IP as a GITHUB environment variable - # run: | - # echo "INGRESS_IP=$(kubectl -n ingress-nginx get services ingress-nginx-controller -o jsonpath="{.status.loadbalancer.ingress[0]}")" >> $GITHUB_ENV - - # - name: Replace Tokens in manifest Files - # uses: cschleiden/replace-tokens@v1.4 - # with: - # tokenPrefix: '_{_' - # tokenSuffix: '_}_' - # files: '["kubernetes/production/*.yaml"]' - # env: - # NAMESPACE: ${{ vars.NAMESPACE }} - # REPLICAS: ${{ vars.REPLICAS }} - # IMAGE: ${{ vars.DOCKERHUB_USERNAME }}/solar-system:${{ github.sha }} - # # INGESS_IP: ${{ env.INGESS_IP }} - - # - name: Check Files - # run: | - # cat kubernetes/production/*.yaml - - # - name: Create MongoDB Secret - # run: | - # kubectl -n ${{ vars.NAMESPACE }} create secret generic mongo-db-creds \ - # --from-literal=MONGO_URI=${{ env.MONGO_URI }} \ - # --from-literal=MONGO_USERNAME=${{ vars.MONGO_USERNAME }} \ - # --from-literal=MONGO_PASSWORD=${{ secrets.MONGO_PASSWORD }} \ - # --save-config \ - # --dry-run=client \ - # -o yaml | kubectl apply -f - - - # - name: Deploy To Prod Env - # run: | - # kubectl apply -f kubernetes/production - - # - name: Set App Ingress Host URL - # id: set-ingress-host-address - # run: | - # echo "APP_INGRESS_HOST=$(kubectl -n ${{ vars.NAMESPACE }} get ingress -o jsonpath "{.items[0].spec.tls[0]}")" >> GITHUB_OUTPUT - - # prod-integration-testing: - # if: github.ref == 'refs/heads/main' - # name: Prod integration-testing - # needs: prod-deploy - # runs-on: ubuntu-latest - # steps: - # - name: Test URL Output using Curl and JQ - # env: - # URL: ${{ needs.prod-deploy.outputs.APP_INGRESS_URL }} - # run: | - # echo URL: ${{ env.APP_INGRESS_HOST }} - # echo "---------------------------------" - # curl https://${{ env.OUTPUT }}/live -s -k | jq -r .status | grep -i live \ No newline at end of file + - name: Install Kubectl CLI + uses: Azure/setup-kubectl@v5.1.0 + with: + version: '1.26.0' + + # - name: Set Kubeconfig file + # uses: Azure/k8s-set-context@v5.0.1 + # with: + # method: kubeconfig + # kubeconfig: ${{ secrets.KUBECONFIG }} + + # - name: Fetch Kubernetes Cluster Details + # run: | + # kubectl version --short + # echo ---------------------------- + # kubectl get nodes + + # - name: Save Nginx Ingress Controller IP as a GITHUB environment variable + # run: | + # echo "INGRESS_IP=$(kubectl -n ingress-nginx get services ingress-nginx-controller -o jsonpath="{.status.loadbalancer.ingress[0]}")" >> $GITHUB_ENV + + # - name: Replace Tokens in manifest Files + # uses: cschleiden/replace-tokens@v1.4 + # with: + # tokenPrefix: '_{_' + # tokenSuffix: '_}_' + # files: '["kubernetes/production/*.yaml"]' + # env: + # NAMESPACE: ${{ vars.NAMESPACE }} + # REPLICAS: ${{ vars.REPLICAS }} + # IMAGE: ${{ vars.DOCKERHUB_USERNAME }}/solar-system:${{ github.sha }} + # # INGESS_IP: ${{ env.INGESS_IP }} + + # - name: Check Files + # run: | + # cat kubernetes/production/*.yaml + + # - name: Create MongoDB Secret + # run: | + # kubectl -n ${{ vars.NAMESPACE }} create secret generic mongo-db-creds \ + # --from-literal=MONGO_URI=${{ env.MONGO_URI }} \ + # --from-literal=MONGO_USERNAME=${{ vars.MONGO_USERNAME }} \ + # --from-literal=MONGO_PASSWORD=${{ secrets.MONGO_PASSWORD }} \ + # --save-config \ + # --dry-run=client \ + # -o yaml | kubectl apply -f - + + # - name: Deploy To Prod Env + # run: | + # kubectl apply -f kubernetes/production + + # - name: Set App Ingress Host URL + # id: set-ingress-host-address + # run: | + # echo "APP_INGRESS_HOST=$(kubectl -n ${{ vars.NAMESPACE }} get ingress -o jsonpath "{.items[0].spec.tls[0]}")" >> GITHUB_OUTPUT + + # prod-integration-testing: + # if: github.ref == 'refs/heads/main' + # name: Prod integration-testing + # needs: prod-deploy + # runs-on: ubuntu-latest + # steps: + # - name: Test URL Output using Curl and JQ + # env: + # URL: ${{ needs.prod-deploy.outputs.APP_INGRESS_URL }} + # run: | + # echo URL: ${{ env.APP_INGRESS_HOST }} + # echo "---------------------------------" + # curl https://${{ env.OUTPUT }}/live -s -k | jq -r .status | grep -i live From efd7ad39594b8a7dc1c2a692340356211536179f Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Mon, 31 Aug 2026 13:09:00 +0300 Subject: [PATCH 66/79] added composite action --- .github/custom-actions/npm-action/action.yml | 18 ++++++++++++++++++ .github/workflows/solar-system.yml | 12 ++++-------- 2 files changed, 22 insertions(+), 8 deletions(-) create mode 100644 .github/custom-actions/npm-action/action.yml diff --git a/.github/custom-actions/npm-action/action.yml b/.github/custom-actions/npm-action/action.yml new file mode 100644 index 000000000..1756a62bf --- /dev/null +++ b/.github/custom-actions/npm-action/action.yml @@ -0,0 +1,18 @@ +name: 'NPM Custom Action' +description: 'Installing and Caching NPM Packages +inputs: + path-of-folder: #id of input + description: 'the path to cache' + required: true +runs: + using: "composite" + steps: + - name: Cache NPM dependencies + uses: actions/cache@v6.1.0 + with: + path: ${{ inputs.path-of-folder }} + key: '${{ runner.os }}-node-modules-${{ hashFiles(''package-lock.json'') }}' + + - name: Install Dependencies + run: npm install + shell: bash \ No newline at end of file diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index 7d76096c0..8355257f2 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -41,14 +41,10 @@ jobs: # with: # node-version: ${{ matrix.nodejs_version }} - - name: Cache NPM dependencies - uses: actions/cache@v6.1.0 - with: - key: '${{ runner.os }}-node-modules-${{ hashFiles(''package-lock.json'') }}' - path: ~/.npm - - - name: Install Dependencies - run: npm install + - name: Composite Action - Cache install NPM Packages + uses: ./.github/custom-actions/npm-action + with: + path-of-folder: ~/.npm - name: Unit Testing run: npm test From c06b751e5ac04d6cb97df6314a02d676a866f3bf Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Mon, 31 Aug 2026 13:13:44 +0300 Subject: [PATCH 67/79] fix --- .github/custom-actions/npm-action/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/custom-actions/npm-action/action.yml b/.github/custom-actions/npm-action/action.yml index 1756a62bf..419e4b90a 100644 --- a/.github/custom-actions/npm-action/action.yml +++ b/.github/custom-actions/npm-action/action.yml @@ -2,8 +2,8 @@ name: 'NPM Custom Action' description: 'Installing and Caching NPM Packages inputs: path-of-folder: #id of input - description: 'the path to cache' - required: true + description: 'the path to cache' + required: true runs: using: "composite" steps: From c16b6f3afba918f9ac1bead94bdec44734d9bebe Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Mon, 31 Aug 2026 13:15:31 +0300 Subject: [PATCH 68/79] fix --- .github/custom-actions/npm-action/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/custom-actions/npm-action/action.yml b/.github/custom-actions/npm-action/action.yml index 419e4b90a..9198ef7d4 100644 --- a/.github/custom-actions/npm-action/action.yml +++ b/.github/custom-actions/npm-action/action.yml @@ -1,5 +1,5 @@ name: 'NPM Custom Action' -description: 'Installing and Caching NPM Packages +description: 'Installing and Caching NPM Packages' inputs: path-of-folder: #id of input description: 'the path to cache' From adff30364b83dea4d109aeab7dd53ba93c14a7d4 Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Mon, 31 Aug 2026 13:19:35 +0300 Subject: [PATCH 69/79] fix --- .github/workflows/solar-system.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/solar-system.yml b/.github/workflows/solar-system.yml index 8355257f2..5e9bbafd2 100644 --- a/.github/workflows/solar-system.yml +++ b/.github/workflows/solar-system.yml @@ -41,10 +41,10 @@ jobs: # with: # node-version: ${{ matrix.nodejs_version }} - - name: Composite Action - Cache install NPM Packages - uses: ./.github/custom-actions/npm-action - with: - path-of-folder: ~/.npm + - name: Composite Action - Cache install NPM Packages + uses: ./.github/custom-actions/npm-action + with: + path-of-folder: ~/.npm - name: Unit Testing run: npm test From d1a189e2c350d4dd0fdc7520e7f96b2418ff6624 Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Wed, 2 Sep 2026 09:59:42 +0300 Subject: [PATCH 70/79] created script-injcetion-test workflow --- .github/workflows/script-injection-test.yml | 22 +++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/script-injection-test.yml diff --git a/.github/workflows/script-injection-test.yml b/.github/workflows/script-injection-test.yml new file mode 100644 index 000000000..82dd56c16 --- /dev/null +++ b/.github/workflows/script-injection-test.yml @@ -0,0 +1,22 @@ +name: Label Issues (Script Injection) +on: + issues: + types: + - opened +jobs: + assign-label: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4.1.1 + + - name: Add a Label + env: + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + run: | + issue_title="${{ github.event.issue.title }}" + if [[ "$issue_title" == *"bug"* ]]; then + echo "Issue is about a bug!" + echo "Assigning Label - BUG .... .... .... ...." + else + echo "Not a bug" + fi \ No newline at end of file From 24e5b701f81ba80dc50dd7be8f392066f3706c64 Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Wed, 2 Sep 2026 10:01:46 +0300 Subject: [PATCH 71/79] [skip ci] --- .github/workflows/script-injection-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/script-injection-test.yml b/.github/workflows/script-injection-test.yml index 82dd56c16..ed759e695 100644 --- a/.github/workflows/script-injection-test.yml +++ b/.github/workflows/script-injection-test.yml @@ -16,7 +16,7 @@ jobs: issue_title="${{ github.event.issue.title }}" if [[ "$issue_title" == *"bug"* ]]; then echo "Issue is about a bug!" - echo "Assigning Label - BUG .... .... .... ...." + echo "Assigning Label - BUG .... .... .... ...." else echo "Not a bug" fi \ No newline at end of file From 4cdccaae0655f24b637fff544fc075ecf6708871 Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Wed, 2 Sep 2026 10:30:26 +0300 Subject: [PATCH 72/79] test --- .github/workflows/script-injection-test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/script-injection-test.yml b/.github/workflows/script-injection-test.yml index ed759e695..030cf03d1 100644 --- a/.github/workflows/script-injection-test.yml +++ b/.github/workflows/script-injection-test.yml @@ -3,6 +3,7 @@ on: issues: types: - opened + push: jobs: assign-label: runs-on: ubuntu-latest From 824c62ef2f3a1a449cd088da2f23e2dc84cbf5fe Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Wed, 2 Sep 2026 10:31:19 +0300 Subject: [PATCH 73/79] update --- .github/workflows/script-injection-test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/script-injection-test.yml b/.github/workflows/script-injection-test.yml index 030cf03d1..ed759e695 100644 --- a/.github/workflows/script-injection-test.yml +++ b/.github/workflows/script-injection-test.yml @@ -3,7 +3,6 @@ on: issues: types: - opened - push: jobs: assign-label: runs-on: ubuntu-latest From 323374fd22cd39dd50def81e1864d0cf0b02ac1f Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Wed, 2 Sep 2026 10:39:53 +0300 Subject: [PATCH 74/79] updated second trigger --- .github/workflows/script-injection-test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/script-injection-test.yml b/.github/workflows/script-injection-test.yml index ed759e695..a747a3115 100644 --- a/.github/workflows/script-injection-test.yml +++ b/.github/workflows/script-injection-test.yml @@ -1,5 +1,6 @@ name: Label Issues (Script Injection) on: + workflow_dispatch: issues: types: - opened From 5a6382389896843b850467e544f42c89f280d0b6 Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Wed, 2 Sep 2026 10:44:42 +0300 Subject: [PATCH 75/79] test --- .github/workflows/script-injection-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/script-injection-test.yml b/.github/workflows/script-injection-test.yml index a747a3115..c5d1e3952 100644 --- a/.github/workflows/script-injection-test.yml +++ b/.github/workflows/script-injection-test.yml @@ -1,6 +1,6 @@ name: Label Issues (Script Injection) on: - workflow_dispatch: + # workflow_dispatch: issues: types: - opened From e4fb7d0d1104c4cd197563dcaed6b584219c9132 Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Wed, 2 Sep 2026 10:47:48 +0300 Subject: [PATCH 76/79] update new trigger method --- .github/workflows/script-injection-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/script-injection-test.yml b/.github/workflows/script-injection-test.yml index c5d1e3952..a747a3115 100644 --- a/.github/workflows/script-injection-test.yml +++ b/.github/workflows/script-injection-test.yml @@ -1,6 +1,6 @@ name: Label Issues (Script Injection) on: - # workflow_dispatch: + workflow_dispatch: issues: types: - opened From 3f46a010fb1a371b7f2e85e9c654e66ecfd0a958 Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Wed, 2 Sep 2026 12:38:31 +0300 Subject: [PATCH 77/79] modified workflow [skip ci] --- .github/workflows/script-injection-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/script-injection-test.yml b/.github/workflows/script-injection-test.yml index a747a3115..d5b880544 100644 --- a/.github/workflows/script-injection-test.yml +++ b/.github/workflows/script-injection-test.yml @@ -13,8 +13,8 @@ jobs: - name: Add a Label env: AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + issue_title: "${{ github.event.issue.title }}" run: | - issue_title="${{ github.event.issue.title }}" if [[ "$issue_title" == *"bug"* ]]; then echo "Issue is about a bug!" echo "Assigning Label - BUG .... .... .... ...." From 7780dab2e1bf512ad3863a853c1db4b183efdb36 Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Wed, 2 Sep 2026 12:41:45 +0300 Subject: [PATCH 78/79] updated aws env --- .github/workflows/script-injection-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/script-injection-test.yml b/.github/workflows/script-injection-test.yml index d5b880544..c4dc255e2 100644 --- a/.github/workflows/script-injection-test.yml +++ b/.github/workflows/script-injection-test.yml @@ -12,7 +12,7 @@ jobs: - name: Add a Label env: - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_SECRET_ACCESS_KEY: 'im a secret' issue_title: "${{ github.event.issue.title }}" run: | if [[ "$issue_title" == *"bug"* ]]; then From a7c563ff0ee86914fd00157231c57eb71b66709e Mon Sep 17 00:00:00 2001 From: elior19940 <74433841+elior19940@users.noreply.github.com> Date: Wed, 2 Sep 2026 12:44:32 +0300 Subject: [PATCH 79/79] fix --- .github/workflows/script-injection-test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/script-injection-test.yml b/.github/workflows/script-injection-test.yml index c4dc255e2..da86f149a 100644 --- a/.github/workflows/script-injection-test.yml +++ b/.github/workflows/script-injection-test.yml @@ -13,8 +13,9 @@ jobs: - name: Add a Label env: AWS_SECRET_ACCESS_KEY: 'im a secret' - issue_title: "${{ github.event.issue.title }}" + run: | + issue_title == "${{ github.event.issue.title }}" if [[ "$issue_title" == *"bug"* ]]; then echo "Issue is about a bug!" echo "Assigning Label - BUG .... .... .... ...."