From 36ed0b81e598064c51836beb03dcde9a8fa84684 Mon Sep 17 00:00:00 2001 From: Aditya Jaiswal <32607172+jaiswaladi246@users.noreply.github.com> Date: Mon, 29 Jul 2024 01:19:58 +0530 Subject: [PATCH 01/13] Create maven.yml --- .github/workflows/maven.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/maven.yml diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml new file mode 100644 index 0000000..beb1ea3 --- /dev/null +++ b/.github/workflows/maven.yml @@ -0,0 +1,27 @@ + + +name: CICD + +on: + push: + branches: [ "Dev" ] + pull_request: + branches: [ "Dev" ] + +jobs: + build: + + runs-on: self-hosted + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + cache: maven + - name: Build with Maven + run: mvn -B package --file pom.xml + + From b9b0b47e89cd8072aa37d49ccdd57d621ad75589 Mon Sep 17 00:00:00 2001 From: Aditya Jaiswal <32607172+jaiswaladi246@users.noreply.github.com> Date: Mon, 29 Jul 2024 01:20:44 +0530 Subject: [PATCH 02/13] Delete .github/workflows directory --- .github/workflows/maven.yml | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 .github/workflows/maven.yml diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml deleted file mode 100644 index beb1ea3..0000000 --- a/.github/workflows/maven.yml +++ /dev/null @@ -1,27 +0,0 @@ - - -name: CICD - -on: - push: - branches: [ "Dev" ] - pull_request: - branches: [ "Dev" ] - -jobs: - build: - - runs-on: self-hosted - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v3 - with: - java-version: '17' - distribution: 'temurin' - cache: maven - - name: Build with Maven - run: mvn -B package --file pom.xml - - From 3e25b35f162aecfad357f00fd951c513af97ecdc Mon Sep 17 00:00:00 2001 From: Aditya Jaiswal <32607172+jaiswaladi246@users.noreply.github.com> Date: Mon, 29 Jul 2024 01:21:20 +0530 Subject: [PATCH 03/13] Create maven.yml --- .github/workflows/maven.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/maven.yml diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml new file mode 100644 index 0000000..ecbe052 --- /dev/null +++ b/.github/workflows/maven.yml @@ -0,0 +1,27 @@ + + +name: CICD + +on: + push: + branches: [ "Dev" ] + pull_request: + branches: [ "Dev" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + cache: maven + - name: Build with Maven + run: mvn -B package --file pom.xml + + From 564fb1c909f6edcab6f4c35204cd6e463c5512f3 Mon Sep 17 00:00:00 2001 From: Aditya Jaiswal <32607172+jaiswaladi246@users.noreply.github.com> Date: Mon, 29 Jul 2024 01:24:44 +0530 Subject: [PATCH 04/13] Delete .github/workflows directory --- .github/workflows/maven.yml | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 .github/workflows/maven.yml diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml deleted file mode 100644 index ecbe052..0000000 --- a/.github/workflows/maven.yml +++ /dev/null @@ -1,27 +0,0 @@ - - -name: CICD - -on: - push: - branches: [ "Dev" ] - pull_request: - branches: [ "Dev" ] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v3 - with: - java-version: '17' - distribution: 'temurin' - cache: maven - - name: Build with Maven - run: mvn -B package --file pom.xml - - From 4e0ae81a44d88bcc7e45a5727654dae81d29f694 Mon Sep 17 00:00:00 2001 From: Aditya Jaiswal <32607172+jaiswaladi246@users.noreply.github.com> Date: Mon, 29 Jul 2024 01:56:03 +0530 Subject: [PATCH 05/13] Update deployment-service.yml --- deployment-service.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment-service.yml b/deployment-service.yml index a5ff7fd..b0b3bd1 100644 --- a/deployment-service.yml +++ b/deployment-service.yml @@ -14,7 +14,7 @@ spec: spec: containers: - name: taskmaster - image: adijaiswal/taskmaster:latest # Image that will be used to containers in the cluster + image: adijaiswal/prodtaskmaster:latest # Image that will be used to containers in the cluster imagePullPolicy: Always ports: - containerPort: 8080 # The port that the container is running on in the cluster From 9d04005d80e595e42e169fb83376cb43e5990980 Mon Sep 17 00:00:00 2001 From: Aditya Jaiswal <32607172+jaiswaladi246@users.noreply.github.com> Date: Mon, 29 Jul 2024 01:56:25 +0530 Subject: [PATCH 06/13] Create maven.yml --- .github/workflows/maven.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/maven.yml diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml new file mode 100644 index 0000000..12ba889 --- /dev/null +++ b/.github/workflows/maven.yml @@ -0,0 +1,36 @@ + + +name: CDPROD + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: self-hosted + + steps: + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Push Docker Image + run: | + docker pull adijaiswal/devtaskmaster:latest + docker tag adijaiswal/devtaskmaster:latest adijaiswal/prodtaskmaster:latest + docker push adijaiswal/prodtaskmaster:latest + - name: Kubectl Action + uses: tale/kubectl-action@v1 + with: + base64-kube-config: ${{ secrets.KUBE_CONFIG_PROD }} + - run: | + kubectl apply -f deployment-service.yml + + + From 6696d9e78543dff9aad25bc8669f06e037708b43 Mon Sep 17 00:00:00 2001 From: ravindra124567 <129646723+ravindra124567@users.noreply.github.com> Date: Wed, 28 Aug 2024 20:31:23 +0530 Subject: [PATCH 07/13] Update maven.yml --- .github/workflows/maven.yml | 50 ++++++++++++++++++++++++++++--------- 1 file changed, 38 insertions(+), 12 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 12ba889..97972a6 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -1,12 +1,10 @@ - - -name: CDPROD +name: CICD on: push: - branches: [ "main" ] + branches: [ "dev" ] pull_request: - branches: [ "main" ] + branches: [ "dev" ] jobs: build: @@ -14,6 +12,38 @@ jobs: runs-on: self-hosted steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + cache: maven + - name: Build with Maven + run: mvn package --file pom.xml + + - name: Trivy FS scan + run: trivy fs --format table -o fs.html . + + - name: SonarQube Scan + uses: sonarsource/sonarqube-scan-action@master + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build Docker Image + run: | + docker build -t sashikumar24/devtaskmaster:latest . + + - name: Trivy Image scan + run: trivy image --format table -o image.html sashikumar24/devtaskmaster:latest + - name: Login to Docker Hub uses: docker/login-action@v3 with: @@ -22,15 +52,11 @@ jobs: - name: Push Docker Image run: | - docker pull adijaiswal/devtaskmaster:latest - docker tag adijaiswal/devtaskmaster:latest adijaiswal/prodtaskmaster:latest - docker push adijaiswal/prodtaskmaster:latest + docker push sashikumar24/devtaskmaster:latest + - name: Kubectl Action uses: tale/kubectl-action@v1 with: - base64-kube-config: ${{ secrets.KUBE_CONFIG_PROD }} + base64-kube-config: ${{ secrets.KUBE_CONFIG }} - run: | kubectl apply -f deployment-service.yml - - - From a09080ec44b5e9b992797a532c106ef9e8b43776 Mon Sep 17 00:00:00 2001 From: ravindra124567 <129646723+ravindra124567@users.noreply.github.com> Date: Wed, 28 Aug 2024 20:32:30 +0530 Subject: [PATCH 08/13] Update deployment-service.yml --- deployment-service.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment-service.yml b/deployment-service.yml index b0b3bd1..9304c2e 100644 --- a/deployment-service.yml +++ b/deployment-service.yml @@ -14,7 +14,7 @@ spec: spec: containers: - name: taskmaster - image: adijaiswal/prodtaskmaster:latest # Image that will be used to containers in the cluster + image: sashikumar24/prodtaskmaster:latest # Image that will be used to containers in the cluster imagePullPolicy: Always ports: - containerPort: 8080 # The port that the container is running on in the cluster From f2c37b8b7a7e9e4be85301cbbe31cf208769ad9f Mon Sep 17 00:00:00 2001 From: ravindra124567 <129646723+ravindra124567@users.noreply.github.com> Date: Wed, 28 Aug 2024 20:37:22 +0530 Subject: [PATCH 09/13] Delete .github/workflows/maven.yml --- .github/workflows/maven.yml | 62 ------------------------------------- 1 file changed, 62 deletions(-) delete mode 100644 .github/workflows/maven.yml diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml deleted file mode 100644 index 97972a6..0000000 --- a/.github/workflows/maven.yml +++ /dev/null @@ -1,62 +0,0 @@ -name: CICD - -on: - push: - branches: [ "dev" ] - pull_request: - branches: [ "dev" ] - -jobs: - build: - - runs-on: self-hosted - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v3 - with: - java-version: '17' - distribution: 'temurin' - cache: maven - - name: Build with Maven - run: mvn package --file pom.xml - - - name: Trivy FS scan - run: trivy fs --format table -o fs.html . - - - name: SonarQube Scan - uses: sonarsource/sonarqube-scan-action@master - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Build Docker Image - run: | - docker build -t sashikumar24/devtaskmaster:latest . - - - name: Trivy Image scan - run: trivy image --format table -o image.html sashikumar24/devtaskmaster:latest - - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Push Docker Image - run: | - docker push sashikumar24/devtaskmaster:latest - - - name: Kubectl Action - uses: tale/kubectl-action@v1 - with: - base64-kube-config: ${{ secrets.KUBE_CONFIG }} - - run: | - kubectl apply -f deployment-service.yml From 09c7cf31e0d61972b9bf2635693b6a4ecece6991 Mon Sep 17 00:00:00 2001 From: ravindra124567 <129646723+ravindra124567@users.noreply.github.com> Date: Wed, 28 Aug 2024 20:39:15 +0530 Subject: [PATCH 10/13] Create java.yml --- .github/workflow/java.yml | 62 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 .github/workflow/java.yml diff --git a/.github/workflow/java.yml b/.github/workflow/java.yml new file mode 100644 index 0000000..97972a6 --- /dev/null +++ b/.github/workflow/java.yml @@ -0,0 +1,62 @@ +name: CICD + +on: + push: + branches: [ "dev" ] + pull_request: + branches: [ "dev" ] + +jobs: + build: + + runs-on: self-hosted + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + cache: maven + - name: Build with Maven + run: mvn package --file pom.xml + + - name: Trivy FS scan + run: trivy fs --format table -o fs.html . + + - name: SonarQube Scan + uses: sonarsource/sonarqube-scan-action@master + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build Docker Image + run: | + docker build -t sashikumar24/devtaskmaster:latest . + + - name: Trivy Image scan + run: trivy image --format table -o image.html sashikumar24/devtaskmaster:latest + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Push Docker Image + run: | + docker push sashikumar24/devtaskmaster:latest + + - name: Kubectl Action + uses: tale/kubectl-action@v1 + with: + base64-kube-config: ${{ secrets.KUBE_CONFIG }} + - run: | + kubectl apply -f deployment-service.yml From a78fd80cfe1d2c4b4ebbaa3bd2a369f5084a8a0c Mon Sep 17 00:00:00 2001 From: ravindra124567 <129646723+ravindra124567@users.noreply.github.com> Date: Wed, 28 Aug 2024 20:56:31 +0530 Subject: [PATCH 11/13] Delete .github/workflows directory --- .github/workflows/maven.yml | 66 ------------------------------------- 1 file changed, 66 deletions(-) delete mode 100644 .github/workflows/maven.yml diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml deleted file mode 100644 index 82c77cb..0000000 --- a/.github/workflows/maven.yml +++ /dev/null @@ -1,66 +0,0 @@ - -name: CICD - -on: - push: - branches: [ "Dev" ] - pull_request: - branches: [ "Dev" ] - -jobs: - build: - - runs-on: self-hosted - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v3 - with: - java-version: '17' - distribution: 'temurin' - cache: maven - - name: Build with Maven - run: mvn package --file pom.xml - - - name: Trivy FS scan - run: trivy fs --format table -o fs.html . - - - name: SonarQube Scan - uses: sonarsource/sonarqube-scan-action@master - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Build Docker Image - run: | - docker build -t adijaiswal/devtaskmaster:latest . - - - name: Trivy Image scan - run: trivy image --format table -o image.html adijaiswal/devtaskmaster:latest - - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Push Docker Image - run: | - docker push adijaiswal/devtaskmaster:latest - - - name: Kubectl Action - uses: tale/kubectl-action@v1 - with: - base64-kube-config: ${{ secrets.KUBE_CONFIG }} - - run: | - kubectl apply -f deployment-service.yml - - - From 12fbd76b0737f4e08b517a0b15f414a3cb5afc90 Mon Sep 17 00:00:00 2001 From: ravindra124567 <129646723+ravindra124567@users.noreply.github.com> Date: Wed, 28 Aug 2024 20:56:46 +0530 Subject: [PATCH 12/13] Delete .github directory --- .github/workflow/java.yml | 62 --------------------------------------- 1 file changed, 62 deletions(-) delete mode 100644 .github/workflow/java.yml diff --git a/.github/workflow/java.yml b/.github/workflow/java.yml deleted file mode 100644 index 97972a6..0000000 --- a/.github/workflow/java.yml +++ /dev/null @@ -1,62 +0,0 @@ -name: CICD - -on: - push: - branches: [ "dev" ] - pull_request: - branches: [ "dev" ] - -jobs: - build: - - runs-on: self-hosted - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v3 - with: - java-version: '17' - distribution: 'temurin' - cache: maven - - name: Build with Maven - run: mvn package --file pom.xml - - - name: Trivy FS scan - run: trivy fs --format table -o fs.html . - - - name: SonarQube Scan - uses: sonarsource/sonarqube-scan-action@master - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Build Docker Image - run: | - docker build -t sashikumar24/devtaskmaster:latest . - - - name: Trivy Image scan - run: trivy image --format table -o image.html sashikumar24/devtaskmaster:latest - - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Push Docker Image - run: | - docker push sashikumar24/devtaskmaster:latest - - - name: Kubectl Action - uses: tale/kubectl-action@v1 - with: - base64-kube-config: ${{ secrets.KUBE_CONFIG }} - - run: | - kubectl apply -f deployment-service.yml From 682ea658227ec6912528c2e70fd409dfde46372f Mon Sep 17 00:00:00 2001 From: ravindra124567 <129646723+ravindra124567@users.noreply.github.com> Date: Wed, 28 Aug 2024 20:59:59 +0530 Subject: [PATCH 13/13] Create ravi.yml --- .github/workflow/ravi.yml | 62 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 .github/workflow/ravi.yml diff --git a/.github/workflow/ravi.yml b/.github/workflow/ravi.yml new file mode 100644 index 0000000..153a203 --- /dev/null +++ b/.github/workflow/ravi.yml @@ -0,0 +1,62 @@ +name: CICD + +on: + push: + branches: [ "Dev" ] + pull_request: + branches: [ "Dev" ] + +jobs: + build: + + runs-on: self-hosted + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + cache: maven + - name: Build with Maven + run: mvn package --file pom.xml + + - name: Trivy FS scan + run: trivy fs --format table -o fs.html . + + - name: SonarQube Scan + uses: sonarsource/sonarqube-scan-action@master + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build Docker Image + run: | + docker build -t sashikumar24/devtaskmaster:latest . + + - name: Trivy Image scan + run: trivy image --format table -o image.html sashikumar24/devtaskmaster:latest + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Push Docker Image + run: | + docker push sashikumar24/devtaskmaster:latest + + - name: Kubectl Action + uses: tale/kubectl-action@v1 + with: + base64-kube-config: ${{ secrets.KUBE_CONFIG }} + - run: | + kubectl apply -f deployment-service.yml