From 44c6e1cee15deaa2066ee2a906ec66ab87badf9e Mon Sep 17 00:00:00 2001 From: Shasivadhan <99238768+Shasivadhan@users.noreply.github.com> Date: Mon, 4 Aug 2025 13:32:53 +0530 Subject: [PATCH 01/21] Create main.yml --- .github/workflows/main.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..6c5c2637 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,24 @@ +name: Work Flow Demo + +on: push + +jobs: + build: + runs-on: ubuntu:latest + steps: + - name: Print Build + run: echo "build" + + test: + runs-on: windows-latest + steps: + - name: Print Test - mozilla + run: echo "test mozilla" + - name: Print test - Safari + run: echo "test safari" + + deploy: + runs-on: ubuntu-latest + steps: + - name: Print Deploy + run: echo "deploy" From 027937e6468e17d7e49254350a2bcafbef74fd0e Mon Sep 17 00:00:00 2001 From: Shasivadhan <99238768+Shasivadhan@users.noreply.github.com> Date: Mon, 4 Aug 2025 13:43:20 +0530 Subject: [PATCH 02/21] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6c5c2637..03e3e312 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,7 +12,7 @@ jobs: test: runs-on: windows-latest steps: - - name: Print Test - mozilla + - name: Print Test - mozillaa run: echo "test mozilla" - name: Print test - Safari run: echo "test safari" From 9986b629b81a813caa3d6045882036eb0e0fb9c4 Mon Sep 17 00:00:00 2001 From: Shasivadhan <99238768+Shasivadhan@users.noreply.github.com> Date: Mon, 4 Aug 2025 13:50:22 +0530 Subject: [PATCH 03/21] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 03e3e312..b151a02b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,7 +13,7 @@ jobs: runs-on: windows-latest steps: - name: Print Test - mozillaa - run: echo "test mozilla" + run: echo "test mozillaa" - name: Print test - Safari run: echo "test safari" From 1dd03152dd900f51d0d08182ef5476c1c7b19c8c Mon Sep 17 00:00:00 2001 From: Shasivadhan <99238768+Shasivadhan@users.noreply.github.com> Date: Mon, 4 Aug 2025 13:52:50 +0530 Subject: [PATCH 04/21] Update cicd.yml --- .github/workflows/cicd.yml | 152 ------------------------------------- 1 file changed, 152 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 0cea9618..8b137891 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -1,153 +1 @@ -name: CICD Pipeline -on: - push: - branches: [ "main" ] - -jobs: - compile: - runs-on: self-hosted - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'temurin' - cache: maven - - name: Build with Maven - run: mvn compile - - security-check: - runs-on: self-hosted - needs: compile - - steps: - - uses: actions/checkout@v4 - - name: Trivy Installation - run: | - sudo apt-get install -y wget apt-transport-https gnupg lsb-release - wget -qO - https://aquasecurity.github.io/trivy-repo/deb/public.key | sudo apt-key add - - echo deb https://aquasecurity.github.io/trivy-repo/deb $(lsb_release -sc) main | sudo tee -a /etc/apt/sources.list.d/trivy.list - sudo apt-get update -y - sudo apt-get install -y trivy - - - name: Trivy FS Scan - run: trivy fs --format table -o fs-report.json . - - - name: Gitleaks Installation - run: sudo apt install gitleaks -y - - name: Gitleaks Code Scan - run: gitleaks detect source . -r gitleaks-report.json -f json - - test: - runs-on: self-hosted - needs: security-check - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'temurin' - cache: maven - - name: Unit Test Cases - run: mvn test - - build_project_and_sonar_scan: - runs-on: self-hosted - needs: test - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'temurin' - cache: maven - - name: Build Project - run: mvn package - - name: Upload JAR artifact - uses: actions/upload-artifact@v4 - with: - name: app-jar - path: target/*.jar - - - uses: actions/checkout@v4 - with: - # Disabling shallow clones is recommended for improving the relevancy of reporting - fetch-depth: 0 - - name: SonarQube Scan - uses: SonarSource/sonarqube-scan-action@v5.0.0 # Ex: v4.1.0, See the latest version at https://github.com/marketplace/actions/official-sonarqube-scan - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - SONAR_HOST_URL: ${{ vars.SONAR_HOST_URL }} - - - name: SonarQube Quality Gate check - id: sonarqube-quality-gate-check - uses: sonarsource/sonarqube-quality-gate-action@master - with: - pollingTimeoutSec: 600 - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - SONAR_HOST_URL: ${{ vars.SONAR_HOST_URL }} - - buils_docker_image_and_push: - runs-on: self-hosted - needs: build_project_and_sonar_scan - steps: - - uses: actions/checkout@v4 - - name: Download JAR artifact - uses: actions/download-artifact@v4 - with: - name: app-jar - path: app # this will download JAR to ./app folder - - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ vars.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Build and Push Docker image - uses: docker/build-push-action@v6 - with: - context: . - push: true - tags: adijaiswal/bankapp:latest - file: ./Dockerfile - - deploy_to_kubernetes: - runs-on: self-hosted - needs: buils_docker_image_and_push - steps: - - name: Checkout Code - uses: actions/checkout@v4 - - name: Install AWS CLI - run: | - curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" - unzip awscliv2.zip - sudo ./aws/install - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v2 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ap-south-1 - - name: Set up kubectl - uses: azure/setup-kubectl@v3 - with: - version: latest - - name: Configure kubeconfig - run: | - mkdir -p $HOME/.kube - echo "${{ secrets.EKS_KUBECONFIG }}" > $HOME/.kube/config - - name: Deploy to EKS - run: | - kubectl apply -f ds.yml - - From b0d7e7c9099232bab2d0f519042090b3d80d9094 Mon Sep 17 00:00:00 2001 From: Shasivadhan <99238768+Shasivadhan@users.noreply.github.com> Date: Mon, 4 Aug 2025 13:54:56 +0530 Subject: [PATCH 05/21] Update main.yml --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b151a02b..c70401bb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,8 +12,8 @@ jobs: test: runs-on: windows-latest steps: - - name: Print Test - mozillaa - run: echo "test mozillaa" + - name: Print Test - mozillaaa + run: echo "test mozillaaa" - name: Print test - Safari run: echo "test safari" From 23e4a28a4ca72fa2580cb3cb870c5d11dfe23ef6 Mon Sep 17 00:00:00 2001 From: Shasivadhan <99238768+Shasivadhan@users.noreply.github.com> Date: Mon, 4 Aug 2025 13:58:48 +0530 Subject: [PATCH 06/21] Update main.yml --- .github/workflows/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c70401bb..fbc51323 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,7 +4,7 @@ on: push jobs: build: - runs-on: ubuntu:latest + runs-on: ubuntu-latest steps: - name: Print Build run: echo "build" @@ -16,9 +16,9 @@ jobs: run: echo "test mozillaaa" - name: Print test - Safari run: echo "test safari" - + deploy: runs-on: ubuntu-latest steps: - - name: Print Deploy - run: echo "deploy" + - name: Print Deploy + run: echo "deploy" From 172ea35cbf478d9ab2437a3b10d887b5c23c839f Mon Sep 17 00:00:00 2001 From: Shasivadhan <99238768+Shasivadhan@users.noreply.github.com> Date: Mon, 4 Aug 2025 14:17:07 +0530 Subject: [PATCH 07/21] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fbc51323..326df710 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,6 +1,6 @@ name: Work Flow Demo -on: push +on: [push, issues] jobs: build: From 2e869a9df2a576ff056aa9637dfdf19f6b5de711 Mon Sep 17 00:00:00 2001 From: Shasivadhan <99238768+Shasivadhan@users.noreply.github.com> Date: Mon, 4 Aug 2025 14:26:10 +0530 Subject: [PATCH 08/21] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 326df710..10beaa1d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,6 +1,6 @@ name: Work Flow Demo -on: [push, issues] +on: [push, issues, pull_request] jobs: build: From 50ef6b22e69168ad76d1bdccca449da068e7cb2a Mon Sep 17 00:00:00 2001 From: Shasivadhan <99238768+Shasivadhan@users.noreply.github.com> Date: Mon, 4 Aug 2025 14:36:08 +0530 Subject: [PATCH 09/21] Create fileworkflow --- fileworkflow | 1 + 1 file changed, 1 insertion(+) create mode 100644 fileworkflow diff --git a/fileworkflow b/fileworkflow new file mode 100644 index 00000000..8a8e127f --- /dev/null +++ b/fileworkflow @@ -0,0 +1 @@ +this is a workflow file From 2e6aa0e8be196c7c83b0bfeff500cd0226c2f980 Mon Sep 17 00:00:00 2001 From: Shasivadhan <99238768+Shasivadhan@users.noreply.github.com> Date: Mon, 4 Aug 2025 14:37:02 +0530 Subject: [PATCH 10/21] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 10beaa1d..a87c3b05 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Print Build - run: echo "build" + run: echo "build started by Shasivadhan" test: runs-on: windows-latest From 76f49f6b7414d9c846d7e0d2c76cded41499948f Mon Sep 17 00:00:00 2001 From: Shasivadhan <99238768+Shasivadhan@users.noreply.github.com> Date: Mon, 4 Aug 2025 15:14:19 +0530 Subject: [PATCH 11/21] Update main.yml --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a87c3b05..2182c472 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,6 +1,7 @@ name: Work Flow Demo -on: [push, issues, pull_request] +on: + workflow_dispatch jobs: build: From c7e4a9772533b61f17e04b4b0faf5a1d4c98f156 Mon Sep 17 00:00:00 2001 From: Shasivadhan <99238768+Shasivadhan@users.noreply.github.com> Date: Mon, 4 Aug 2025 16:04:37 +0530 Subject: [PATCH 12/21] Update main.yml --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2182c472..df385638 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,7 +1,8 @@ name: Work Flow Demo on: - workflow_dispatch + pull_request: + types: opened jobs: build: From 3d1561e33aaaf4703e0629c82bdd1716fe0ceb0e Mon Sep 17 00:00:00 2001 From: Shasivadhan <99238768+Shasivadhan@users.noreply.github.com> Date: Mon, 4 Aug 2025 16:08:12 +0530 Subject: [PATCH 13/21] Update fileworkflow --- fileworkflow | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fileworkflow b/fileworkflow index 8a8e127f..087d3de4 100644 --- a/fileworkflow +++ b/fileworkflow @@ -1 +1 @@ -this is a workflow file +sthis is a workflow file From d0f23b4ba7a98ffadb3a13c0f07ffd4db5d4b605 Mon Sep 17 00:00:00 2001 From: Shasivadhan <99238768+Shasivadhan@users.noreply.github.com> Date: Mon, 4 Aug 2025 16:35:44 +0530 Subject: [PATCH 14/21] Update main.yml --- .github/workflows/main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index df385638..94c3a0fc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,7 +1,9 @@ name: Work Flow Demo on: - pull_request: + push: + branches: + - main types: opened jobs: From 0466dab0774c60d40630a852e97e68e40ce641c0 Mon Sep 17 00:00:00 2001 From: Shasivadhan <99238768+Shasivadhan@users.noreply.github.com> Date: Mon, 4 Aug 2025 16:38:23 +0530 Subject: [PATCH 15/21] Update main.yml --- .github/workflows/main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 94c3a0fc..b6cb91b0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,7 +4,6 @@ on: push: branches: - main - types: opened jobs: build: From 53ebff6909bd8de78e60036bce7e7f412a66a13d Mon Sep 17 00:00:00 2001 From: Shasivadhan <99238768+Shasivadhan@users.noreply.github.com> Date: Mon, 4 Aug 2025 19:58:47 +0530 Subject: [PATCH 16/21] Update main.yml --- .github/workflows/main.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b6cb91b0..10beaa1d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,16 +1,13 @@ name: Work Flow Demo -on: - push: - branches: - - main +on: [push, issues, pull_request] jobs: build: runs-on: ubuntu-latest steps: - name: Print Build - run: echo "build started by Shasivadhan" + run: echo "build" test: runs-on: windows-latest From c889b0e6fd0ae53722764df331e6453a9a5029df Mon Sep 17 00:00:00 2001 From: Shasivadhan <99238768+Shasivadhan@users.noreply.github.com> Date: Mon, 4 Aug 2025 20:03:11 +0530 Subject: [PATCH 17/21] Update fileworkflow --- fileworkflow | 1 + 1 file changed, 1 insertion(+) diff --git a/fileworkflow b/fileworkflow index 087d3de4..d4313027 100644 --- a/fileworkflow +++ b/fileworkflow @@ -1 +1,2 @@ sthis is a workflow file +sthis is a workflow file From 67a12b31aabda6587c2225306686ffac48bc183e Mon Sep 17 00:00:00 2001 From: Shasivadhan <99238768+Shasivadhan@users.noreply.github.com> Date: Mon, 4 Aug 2025 20:05:05 +0530 Subject: [PATCH 18/21] Update fileworkflow --- fileworkflow | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fileworkflow b/fileworkflow index 087d3de4..c8038023 100644 --- a/fileworkflow +++ b/fileworkflow @@ -1 +1,5 @@ sthis is a workflow file +sthis is a workflow file +sthis is a workflow file +sthis is a workflow file +sthis is a workflow file From 3928cd3f035bba22edae915e2ab89402d0ac4123 Mon Sep 17 00:00:00 2001 From: Shasivadhan <99238768+Shasivadhan@users.noreply.github.com> Date: Mon, 4 Aug 2025 20:07:48 +0530 Subject: [PATCH 19/21] Delete .github/workflows/cicd.yml --- .github/workflows/cicd.yml | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .github/workflows/cicd.yml diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml deleted file mode 100644 index 8b137891..00000000 --- a/.github/workflows/cicd.yml +++ /dev/null @@ -1 +0,0 @@ - From 070d7afdea20820ecbc8905abc8f1ac3e40063fb Mon Sep 17 00:00:00 2001 From: Shasivadhan <99238768+Shasivadhan@users.noreply.github.com> Date: Mon, 4 Aug 2025 20:10:33 +0530 Subject: [PATCH 20/21] Create test --- test | 1 + 1 file changed, 1 insertion(+) create mode 100644 test diff --git a/test b/test new file mode 100644 index 00000000..ad62b129 --- /dev/null +++ b/test @@ -0,0 +1 @@ +test push............ From e04254cda95f48465ebee78e2ae66c05bfe57290 Mon Sep 17 00:00:00 2001 From: Shasivadhan <99238768+Shasivadhan@users.noreply.github.com> Date: Mon, 4 Aug 2025 20:12:11 +0530 Subject: [PATCH 21/21] Delete fileworkflow --- fileworkflow | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 fileworkflow diff --git a/fileworkflow b/fileworkflow deleted file mode 100644 index d4313027..00000000 --- a/fileworkflow +++ /dev/null @@ -1,2 +0,0 @@ -sthis is a workflow file -sthis is a workflow file