From 5a46ec51d90f6dca37b783b1cd72bd7c869beb1d Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Wed, 21 Jul 2021 11:45:42 +0530 Subject: [PATCH 01/54] Create main.yml --- .github/workflows/main.yml | 84 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 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 0000000..d709dbb --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,84 @@ +# This workflow will build a Java project with Maven +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven + +name: Java CI with Maven + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + buildjobs: + name: build + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 11 + uses: actions/setup-java@v2 + with: + java-version: '11' + distribution: 'adopt' + - name: Build with Maven + run: mvn -B package --file pom.xml + testjobs: + name: test + needs: buildjobs + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 11 + uses: actions/setup-java@v2 + with: + java-version: '11' + distribution: 'adopt' + - name: Test with Maven + run: mvn -B test --file pom.xml + + deployjobs: + name: deploy + needs: deployjobs + runs-on: ubuntu-latest + steps: + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v1 + 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: Login to Amazon ECR + id: login-ecr + uses: aws-actions/amazon-ecr-login@v1 + - name: Build, tag, and push image to Amazon ECR + env: + ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} + ECR_REPOSITORY: java + IMAGE_TAG: samplejava.latest + run: | + docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . + docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG + + + + + + - uses: actions/checkout@v2 + - name: Set up JDK 11 + uses: actions/setup-java@v2 + with: + java-version: '11' + distribution: 'adopt' + - name: Test with Maven + run: mvn -B test --file pom.xml + + deployjobs: + name: Deploy + needs: testjobs + runs-on: ubuntu-latest + steps: + + + needs: testjobs + From 6b6c21f11a5a79bc41b9d771d15c1fc8d42f2ac4 Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Wed, 21 Jul 2021 11:46:11 +0530 Subject: [PATCH 02/54] 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 d709dbb..3f9aa12 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,9 +5,9 @@ name: Java CI with Maven on: push: - branches: [ main ] + branches: [ master ] pull_request: - branches: [ main ] + branches: [ master ] jobs: buildjobs: From 4612d9bf6846f062963b6fb60870e60b9f606ff6 Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Wed, 21 Jul 2021 11:47:34 +0530 Subject: [PATCH 03/54] Update main.yml --- .github/workflows/main.yml | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3f9aa12..21b2c15 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -39,7 +39,7 @@ jobs: deployjobs: name: deploy - needs: deployjobs + needs: testjobs runs-on: ubuntu-latest steps: - name: Configure AWS credentials @@ -59,26 +59,3 @@ jobs: run: | docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG - - - - - - - uses: actions/checkout@v2 - - name: Set up JDK 11 - uses: actions/setup-java@v2 - with: - java-version: '11' - distribution: 'adopt' - - name: Test with Maven - run: mvn -B test --file pom.xml - - deployjobs: - name: Deploy - needs: testjobs - runs-on: ubuntu-latest - steps: - - - needs: testjobs - From 00bf83815719ec06002751c9176cf1435dd2e1e4 Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Wed, 21 Jul 2021 14:02:51 +0530 Subject: [PATCH 04/54] Update main.yml --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 21b2c15..48567e7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -52,10 +52,12 @@ jobs: id: login-ecr uses: aws-actions/amazon-ecr-login@v1 - name: Build, tag, and push image to Amazon ECR + uses: actions/checkout@v2 env: ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} ECR_REPOSITORY: java IMAGE_TAG: samplejava.latest + - name: Build and push run: | docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG From c4442e69f7a5694269434ec192dd01afc8ce922c Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Wed, 21 Jul 2021 15:00:36 +0530 Subject: [PATCH 05/54] 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 48567e7..191cf65 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -59,5 +59,5 @@ jobs: IMAGE_TAG: samplejava.latest - name: Build and push run: | - docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . + docker build --pull -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG From 1cb11bf0bd2c53186cf34792cab570d03cf565f4 Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Wed, 21 Jul 2021 15:11:07 +0530 Subject: [PATCH 06/54] 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 191cf65..6c699ee 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -54,10 +54,10 @@ jobs: - name: Build, tag, and push image to Amazon ECR uses: actions/checkout@v2 env: - ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} + ECR_REGISTRY: ${{ secrets.ECR_REGISTRY }} ECR_REPOSITORY: java IMAGE_TAG: samplejava.latest - name: Build and push run: | - docker build --pull -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . + docker build --pull -t $ECR_REGISTRY:$ECR_REPOSITORY:$IMAGE_TAG . docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG From b0be25bed2dd22abfa33295ef7b61d2cd8fecb81 Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Wed, 21 Jul 2021 15:13:17 +0530 Subject: [PATCH 07/54] 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 6c699ee..1840543 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -59,5 +59,5 @@ jobs: IMAGE_TAG: samplejava.latest - name: Build and push run: | - docker build --pull -t $ECR_REGISTRY:$ECR_REPOSITORY:$IMAGE_TAG . + docker build --pull -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG From 94fd695e584ad402e6dd0b14e8fb6c01e26ff927 Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Wed, 21 Jul 2021 15:47:39 +0530 Subject: [PATCH 08/54] 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 1840543..3b22164 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -56,8 +56,8 @@ jobs: env: ECR_REGISTRY: ${{ secrets.ECR_REGISTRY }} ECR_REPOSITORY: java - IMAGE_TAG: samplejava.latest + IMAGE_TAG: ${{ github.sha }} - name: Build and push run: | - docker build --pull -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . + docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG From 13fc880c06235fdfc1870c1eb05b69aa976588e0 Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Wed, 21 Jul 2021 15:53:57 +0530 Subject: [PATCH 09/54] 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 3b22164..cc669e6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -59,5 +59,5 @@ jobs: IMAGE_TAG: ${{ github.sha }} - name: Build and push run: | - docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . + docker build --tag $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG From c6814227b1d1ae96373effe711c414b66bebe347 Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Wed, 21 Jul 2021 15:59:54 +0530 Subject: [PATCH 10/54] Update main.yml --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cc669e6..a80af2a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -53,11 +53,11 @@ jobs: uses: aws-actions/amazon-ecr-login@v1 - name: Build, tag, and push image to Amazon ECR uses: actions/checkout@v2 + - name: Build and push env: ECR_REGISTRY: ${{ secrets.ECR_REGISTRY }} ECR_REPOSITORY: java - IMAGE_TAG: ${{ github.sha }} - - name: Build and push + IMAGE_TAG: samplejava.latest run: | - docker build --tag $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . + docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG From e2638f77d82ffcdb8083107a755e6968628eaeea Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Thu, 22 Jul 2021 11:17:22 +0530 Subject: [PATCH 11/54] Create codeql-analysis.yml --- .github/workflows/codeql-analysis.yml | 71 +++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 .github/workflows/codeql-analysis.yml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 0000000..79ca91d --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,71 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: [ master ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ master ] + schedule: + - cron: '37 14 * * 2' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'java' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] + # Learn more: + # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v1 + + # â„šī¸ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl + + # âœī¸ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 From 00937747b3cfcecc100017ad295d77b4fbfbf478 Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Thu, 22 Jul 2021 12:52:09 +0530 Subject: [PATCH 12/54] Delete codeql-analysis.yml --- .github/workflows/codeql-analysis.yml | 71 --------------------------- 1 file changed, 71 deletions(-) delete mode 100644 .github/workflows/codeql-analysis.yml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index 79ca91d..0000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,71 +0,0 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -# -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. -# -name: "CodeQL" - -on: - push: - branches: [ master ] - pull_request: - # The branches below must be a subset of the branches above - branches: [ master ] - schedule: - - cron: '37 14 * * 2' - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: [ 'java' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] - # Learn more: - # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed - - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v1 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v1 - - # â„šī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl - - # âœī¸ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language - - #- run: | - # make bootstrap - # make release - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 From 537833b3f849dc4dad5a320dc93d5e39f211d1cc Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Thu, 22 Jul 2021 12:53:07 +0530 Subject: [PATCH 13/54] Update main.yml --- .github/workflows/main.yml | 48 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a80af2a..41e1bbf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -61,3 +61,51 @@ jobs: run: | docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG + codeqljobs: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'java' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] + # Learn more: + # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v1 + + # â„šī¸ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl + + # âœī¸ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 From 50c371d6c932b0f961f97c756859d4c8b36c5f6f Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Thu, 22 Jul 2021 15:09:44 +0530 Subject: [PATCH 14/54] Update main.yml --- .github/workflows/main.yml | 38 ++++++++++++++------------------------ 1 file changed, 14 insertions(+), 24 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 41e1bbf..b6b9a85 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -37,30 +37,6 @@ jobs: - name: Test with Maven run: mvn -B test --file pom.xml - deployjobs: - name: deploy - needs: testjobs - runs-on: ubuntu-latest - steps: - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v1 - 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: Login to Amazon ECR - id: login-ecr - uses: aws-actions/amazon-ecr-login@v1 - - name: Build, tag, and push image to Amazon ECR - uses: actions/checkout@v2 - - name: Build and push - env: - ECR_REGISTRY: ${{ secrets.ECR_REGISTRY }} - ECR_REPOSITORY: java - IMAGE_TAG: samplejava.latest - run: | - docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . - docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG codeqljobs: name: Analyze runs-on: ubuntu-latest @@ -109,3 +85,17 @@ jobs: - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v1 + uploadresultsjobs: + runs-on: ubuntu-latest + permissions: + security-events: write + steps: + # This step checks out a copy of your repository. + - name: Checkout repository + uses: actions/checkout@v2 + - name: Upload SARIF file + uses: github/codeql-action/upload-sarif@v1 + with: + # Path to SARIF file relative to the root of the repository + sarif_file: results.sarif + From 8f3048e1a3e552926bf4b2df273f7254f0226b83 Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Thu, 22 Jul 2021 15:11:20 +0530 Subject: [PATCH 15/54] Update main.yml --- .github/workflows/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b6b9a85..aee7068 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -39,6 +39,7 @@ jobs: codeqljobs: name: Analyze + needs: testjobs runs-on: ubuntu-latest permissions: actions: read @@ -86,6 +87,8 @@ jobs: - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v1 uploadresultsjobs: + name: sarif results + needs: codeqljobs runs-on: ubuntu-latest permissions: security-events: write From a4cfa5f0a27637d07529edb6f16870a555adbe95 Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Thu, 22 Jul 2021 15:14:57 +0530 Subject: [PATCH 16/54] Create results.sarif --- results.sarif | 1 + 1 file changed, 1 insertion(+) create mode 100644 results.sarif diff --git a/results.sarif b/results.sarif new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/results.sarif @@ -0,0 +1 @@ + From 1001e4a1260fd75003a9bedac7de83c2f5b54fb1 Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Wed, 28 Jul 2021 15:57:47 +0530 Subject: [PATCH 17/54] Update main.yml --- .github/workflows/main.yml | 72 ++++++-------------------------------- 1 file changed, 10 insertions(+), 62 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index aee7068..5977237 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -36,69 +36,17 @@ jobs: distribution: 'adopt' - name: Test with Maven run: mvn -B test --file pom.xml - - codeqljobs: - name: Analyze - needs: testjobs + notifyjobs: + name: notify + needs: buildjobs runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: [ 'java' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] - # Learn more: - # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + - name: Send a message to Microsoft Teams + uses: aliencube/microsoft-teams-actions@v0.8.0 with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v1 - - # â„šī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl - - # âœī¸ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language - - #- run: | - # make bootstrap - # make release - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 - uploadresultsjobs: - name: sarif results - needs: codeqljobs - runs-on: ubuntu-latest - permissions: - security-events: write - steps: - # This step checks out a copy of your repository. - - name: Checkout repository - uses: actions/checkout@v2 - - name: Upload SARIF file - uses: github/codeql-action/upload-sarif@v1 - with: - # Path to SARIF file relative to the root of the repository - sarif_file: results.sarif + webhook_uri: ${{ secrets.MS_TEAMS_WEBHOOK_URI }} + title: CI pipeline + text: successfully done the build and test job + + From 847e572fd6d8cedd51334f5dac99647c5607309f Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Wed, 28 Jul 2021 16:00:04 +0530 Subject: [PATCH 18/54] 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 5977237..3a4dc9b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -38,7 +38,7 @@ jobs: run: mvn -B test --file pom.xml notifyjobs: name: notify - needs: buildjobs + needs: testjobs runs-on: ubuntu-latest steps: - name: Send a message to Microsoft Teams From 198d462c7fa8c9c1db8aa2edc61aabb0bb1d0f1a Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Wed, 28 Jul 2021 17:54:39 +0530 Subject: [PATCH 19/54] Update main.yml --- .github/workflows/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3a4dc9b..6f4c800 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -43,10 +43,13 @@ jobs: steps: - name: Send a message to Microsoft Teams uses: aliencube/microsoft-teams-actions@v0.8.0 + if: always() with: webhook_uri: ${{ secrets.MS_TEAMS_WEBHOOK_URI }} title: CI pipeline text: successfully done the build and test job + status: ${{ job.status == 'success' && needs.testsjob.result == 'success' }} + theme_color: 17a2b8 From 78dcb0e1cf176e4268273a6cda52d05a5ad4b3f2 Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Wed, 28 Jul 2021 18:00:35 +0530 Subject: [PATCH 20/54] Update main.yml --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6f4c800..ce4fc10 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -47,9 +47,9 @@ jobs: with: webhook_uri: ${{ secrets.MS_TEAMS_WEBHOOK_URI }} title: CI pipeline - text: successfully done the build and test job - status: ${{ job.status == 'success' && needs.testsjob.result == 'success' }} - theme_color: 17a2b8 + text: Build and test is successfull + notification-summary: ${{ job.status == 'success' && needs.testsjob.result == 'success' }} + theme_color: 28a745 From 2c551aab3359f44be73accb45a9c7b73c7ce80c6 Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Wed, 28 Jul 2021 18:03:15 +0530 Subject: [PATCH 21/54] 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 ce4fc10..724101e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -48,7 +48,7 @@ jobs: webhook_uri: ${{ secrets.MS_TEAMS_WEBHOOK_URI }} title: CI pipeline text: Build and test is successfull - notification-summary: ${{ job.status == 'success' && needs.testsjob.result == 'success' }} + summary: ${{ job.status == 'success' && needs.testsjob.result == 'success' }} theme_color: 28a745 From 3e7bbefae2fe5d31c808145c31e8688ab3d7c9b8 Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Thu, 29 Jul 2021 10:24:10 +0530 Subject: [PATCH 22/54] Update main.yml --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 724101e..d368991 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -50,6 +50,8 @@ jobs: text: Build and test is successfull summary: ${{ job.status == 'success' && needs.testsjob.result == 'success' }} theme_color: 28a745 + sections: '[{ "activityImage": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png", "activityTitle": "GitHub Action invoked", "activitySubtitle": "Event triggered by ${{ github.event.head_commit.author.name }}", "activityText": "Commit message: [${{ github.event.head_commit.message}}](${{ github.event.head_commit.url }})" }]' + actions: '[{ "@type": "OpenUri", "name": "View Commit", "targets": [{ "os": "default", "uri": "${{ github.event.head_commit.url }}" }] }]' From 46bdb84859c49542f45fbbbb3ebfba1183e7f6d1 Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Thu, 29 Jul 2021 10:33:24 +0530 Subject: [PATCH 23/54] 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 d368991..3897bef 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -52,6 +52,6 @@ jobs: theme_color: 28a745 sections: '[{ "activityImage": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png", "activityTitle": "GitHub Action invoked", "activitySubtitle": "Event triggered by ${{ github.event.head_commit.author.name }}", "activityText": "Commit message: [${{ github.event.head_commit.message}}](${{ github.event.head_commit.url }})" }]' actions: '[{ "@type": "OpenUri", "name": "View Commit", "targets": [{ "os": "default", "uri": "${{ github.event.head_commit.url }}" }] }]' - + view-status-action-text: ${{ job.status == 'success' && needs.testsjob.result == 'success' }} From 03ddf344bbf3a75b8e8c9c1580a299659a7da9b0 Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Thu, 29 Jul 2021 10:51:37 +0530 Subject: [PATCH 24/54] Update main.yml --- .github/workflows/main.yml | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3897bef..c85bd4d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -37,21 +37,19 @@ jobs: - name: Test with Maven run: mvn -B test --file pom.xml notifyjobs: - name: notify + name: Tear Down needs: testjobs runs-on: ubuntu-latest + if: always() steps: - - name: Send a message to Microsoft Teams - uses: aliencube/microsoft-teams-actions@v0.8.0 - if: always() - with: - webhook_uri: ${{ secrets.MS_TEAMS_WEBHOOK_URI }} - title: CI pipeline - text: Build and test is successfull - summary: ${{ job.status == 'success' && needs.testsjob.result == 'success' }} - theme_color: 28a745 - sections: '[{ "activityImage": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png", "activityTitle": "GitHub Action invoked", "activitySubtitle": "Event triggered by ${{ github.event.head_commit.author.name }}", "activityText": "Commit message: [${{ github.event.head_commit.message}}](${{ github.event.head_commit.url }})" }]' - actions: '[{ "@type": "OpenUri", "name": "View Commit", "targets": [{ "os": "default", "uri": "${{ github.event.head_commit.url }}" }] }]' - view-status-action-text: ${{ job.status == 'success' && needs.testsjob.result == 'success' }} + - name: Tear Down + run: exit 0 + + - name: Notify via microsoft teams + uses: aliencube/microsoft-teams-actions@v0.8.0 + if: always() + with: + webhook_uri: ${{ secrets.MS_TEAMS_WEBHOOK_URI }} + status: ${{ job.status == 'success' && needs.testsjob.result == 'success' }} From 3dd89e277adc165e8e5d0aedd81b7df50f1f6f34 Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Thu, 29 Jul 2021 10:57:33 +0530 Subject: [PATCH 25/54] 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 c85bd4d..db157df 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -50,6 +50,6 @@ jobs: if: always() with: webhook_uri: ${{ secrets.MS_TEAMS_WEBHOOK_URI }} - status: ${{ job.status == 'success' && needs.testsjob.result == 'success' }} + status: ${{ success() && needs.testsjob.result == 'success' }} From b3cb8c00060d00408a824bda33ad2264e12e91d5 Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Thu, 29 Jul 2021 10:58:57 +0530 Subject: [PATCH 26/54] 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 db157df..e6b9344 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -47,9 +47,9 @@ jobs: - name: Notify via microsoft teams uses: aliencube/microsoft-teams-actions@v0.8.0 - if: always() + if: failure() with: webhook_uri: ${{ secrets.MS_TEAMS_WEBHOOK_URI }} - status: ${{ success() && needs.testsjob.result == 'success' }} + status: ${{ job.status == 'success' && needs.testsjob.result == 'success' }} From 1aa08a51913900bb44d9b45532b6e69413688df4 Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Thu, 29 Jul 2021 11:03:18 +0530 Subject: [PATCH 27/54] 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 e6b9344..b7f1f9c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -43,11 +43,11 @@ jobs: if: always() steps: - name: Tear Down - run: exit 0 + run: exit 1 - name: Notify via microsoft teams uses: aliencube/microsoft-teams-actions@v0.8.0 - if: failure() + if: always() with: webhook_uri: ${{ secrets.MS_TEAMS_WEBHOOK_URI }} status: ${{ job.status == 'success' && needs.testsjob.result == 'success' }} From 978a047503c2b358b1e22d647fd368e0aa7c2f0f Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Thu, 29 Jul 2021 11:14:08 +0530 Subject: [PATCH 28/54] Update main.yml --- .github/workflows/main.yml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b7f1f9c..6f58537 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -37,19 +37,20 @@ jobs: - name: Test with Maven run: mvn -B test --file pom.xml notifyjobs: - name: Tear Down needs: testjobs runs-on: ubuntu-latest - if: always() steps: - - name: Tear Down - run: exit 1 - - - name: Notify via microsoft teams - uses: aliencube/microsoft-teams-actions@v0.8.0 - if: always() - with: - webhook_uri: ${{ secrets.MS_TEAMS_WEBHOOK_URI }} - status: ${{ job.status == 'success' && needs.testsjob.result == 'success' }} + - name: Send a message to Microsoft Teams + uses: aliencube/microsoft-teams-actions@v0.8.0 + if: always() + with: + webhook_uri: ${{ secrets.MS_TEAMS_WEBHOOK_URI }} + title: CI pipeline + text: Build and test is successfull + theme_color: 28a745 + #sections: '[{ "activityImage": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png", "activityTitle": "GitHub Action invoked", "activitySubtitle": "Event triggered by ${{ github.event.head_commit.author.name }}", "activityText": "Commit message: [${{ github.event.head_commit.message}}](${{ github.event.head_commit.url }})" }]' + sections: '[{"activityImage": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png", "activityTitle": "Approve the workflow", "activitySubtitle": "Event triggered by ${{ github.event.head_commit.author.name }}", "activityText": "Commit message: [${{ github.event.head_commit.message}}](${{ github.event.head_commit.url }})" }]' + actions: '[{ "@type": "OpenUri", "name": "View Status", "targets": [{ "os": "default", "uri": "${{ github.event.head_commit.url }}" }] }]' + view-status-action-text: ${{ job.status == 'success' && needs.testsjob.result == 'success' }} From 47f9cf87ee69fedeb29924ee21e6adde127ab4af Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Thu, 29 Jul 2021 11:31:17 +0530 Subject: [PATCH 29/54] Update main.yml --- .github/workflows/main.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6f58537..e195e92 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -49,8 +49,9 @@ jobs: text: Build and test is successfull theme_color: 28a745 #sections: '[{ "activityImage": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png", "activityTitle": "GitHub Action invoked", "activitySubtitle": "Event triggered by ${{ github.event.head_commit.author.name }}", "activityText": "Commit message: [${{ github.event.head_commit.message}}](${{ github.event.head_commit.url }})" }]' - sections: '[{"activityImage": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png", "activityTitle": "Approve the workflow", "activitySubtitle": "Event triggered by ${{ github.event.head_commit.author.name }}", "activityText": "Commit message: [${{ github.event.head_commit.message}}](${{ github.event.head_commit.url }})" }]' - actions: '[{ "@type": "OpenUri", "name": "View Status", "targets": [{ "os": "default", "uri": "${{ github.event.head_commit.url }}" }] }]' + sections: '[{"activityImage": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png", "activityTitle": "Approve or Decline the workflow", "activitySubtitle": "Event triggered by ${{ github.event.head_commit.author.name }}"]' + #actions: '[{ "@type": "OpenUri", "name": "View Status", "targets": [{ "os": "default", "uri": "${{ github.event.head_commit.url }}" }] }]' + actions: '[{ "@type": "OpenUri", "name": "Approve", "name": "Decline" "targets": [{ "os": "default", "uri": "${{ github.event.head_commit.url }}" }] }]' view-status-action-text: ${{ job.status == 'success' && needs.testsjob.result == 'success' }} From 9c2385882a1b74d27ebced6378d8b134ddaa0650 Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Thu, 29 Jul 2021 11:36:39 +0530 Subject: [PATCH 30/54] 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 e195e92..e7718ee 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -51,7 +51,7 @@ jobs: #sections: '[{ "activityImage": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png", "activityTitle": "GitHub Action invoked", "activitySubtitle": "Event triggered by ${{ github.event.head_commit.author.name }}", "activityText": "Commit message: [${{ github.event.head_commit.message}}](${{ github.event.head_commit.url }})" }]' sections: '[{"activityImage": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png", "activityTitle": "Approve or Decline the workflow", "activitySubtitle": "Event triggered by ${{ github.event.head_commit.author.name }}"]' #actions: '[{ "@type": "OpenUri", "name": "View Status", "targets": [{ "os": "default", "uri": "${{ github.event.head_commit.url }}" }] }]' - actions: '[{ "@type": "OpenUri", "name": "Approve", "name": "Decline" "targets": [{ "os": "default", "uri": "${{ github.event.head_commit.url }}" }] }]' + actions: '[{ "@type": "OpenUri", "name": "Approve", "name": "Decline" "targets": [{ "os": "default" }] }]' view-status-action-text: ${{ job.status == 'success' && needs.testsjob.result == 'success' }} From 317489d4115d1ba3240619b8de327e49d59e8fb1 Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Thu, 29 Jul 2021 11:42:46 +0530 Subject: [PATCH 31/54] 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 e7718ee..9fd8887 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -49,9 +49,9 @@ jobs: text: Build and test is successfull theme_color: 28a745 #sections: '[{ "activityImage": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png", "activityTitle": "GitHub Action invoked", "activitySubtitle": "Event triggered by ${{ github.event.head_commit.author.name }}", "activityText": "Commit message: [${{ github.event.head_commit.message}}](${{ github.event.head_commit.url }})" }]' - sections: '[{"activityImage": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png", "activityTitle": "Approve or Decline the workflow", "activitySubtitle": "Event triggered by ${{ github.event.head_commit.author.name }}"]' + sections: '[{"activityImage": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png", "activityTitle": "Approve or Decline the workflow", "activitySubtitle": "Event triggered by ${{ github.event.head_commit.author.name }}", "activityText": "Commit message: [${{ github.event.head_commit.message}}](${{ github.event.head_commit.url }})" }]' #actions: '[{ "@type": "OpenUri", "name": "View Status", "targets": [{ "os": "default", "uri": "${{ github.event.head_commit.url }}" }] }]' - actions: '[{ "@type": "OpenUri", "name": "Approve", "name": "Decline" "targets": [{ "os": "default" }] }]' + actions: '[{ "@type": "OpenUri", "name": "Approve", "name": "Decline" "targets": [{ "os": "default", , "uri": "${{ github.event.head_commit.url }}" }] }]' view-status-action-text: ${{ job.status == 'success' && needs.testsjob.result == 'success' }} From 9d43e67602b576182ebadbdb5a0dd19cdd036c1a Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Thu, 29 Jul 2021 11:46:12 +0530 Subject: [PATCH 32/54] 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 9fd8887..8626f77 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -51,7 +51,7 @@ jobs: #sections: '[{ "activityImage": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png", "activityTitle": "GitHub Action invoked", "activitySubtitle": "Event triggered by ${{ github.event.head_commit.author.name }}", "activityText": "Commit message: [${{ github.event.head_commit.message}}](${{ github.event.head_commit.url }})" }]' sections: '[{"activityImage": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png", "activityTitle": "Approve or Decline the workflow", "activitySubtitle": "Event triggered by ${{ github.event.head_commit.author.name }}", "activityText": "Commit message: [${{ github.event.head_commit.message}}](${{ github.event.head_commit.url }})" }]' #actions: '[{ "@type": "OpenUri", "name": "View Status", "targets": [{ "os": "default", "uri": "${{ github.event.head_commit.url }}" }] }]' - actions: '[{ "@type": "OpenUri", "name": "Approve", "name": "Decline" "targets": [{ "os": "default", , "uri": "${{ github.event.head_commit.url }}" }] }]' + #actions: '[{ "@type": "OpenUri", "name": "Approve", "name": "Decline" "targets": [{ "os": "default", , "uri": "${{ github.event.head_commit.url }}" }] }]' view-status-action-text: ${{ job.status == 'success' && needs.testsjob.result == 'success' }} From 008675bf0e86f9d6ad4e6fd87f330dac1b2f25a7 Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Thu, 29 Jul 2021 11:49:33 +0530 Subject: [PATCH 33/54] 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 8626f77..e71a5b4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -49,7 +49,7 @@ jobs: text: Build and test is successfull theme_color: 28a745 #sections: '[{ "activityImage": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png", "activityTitle": "GitHub Action invoked", "activitySubtitle": "Event triggered by ${{ github.event.head_commit.author.name }}", "activityText": "Commit message: [${{ github.event.head_commit.message}}](${{ github.event.head_commit.url }})" }]' - sections: '[{"activityImage": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png", "activityTitle": "Approve or Decline the workflow", "activitySubtitle": "Event triggered by ${{ github.event.head_commit.author.name }}", "activityText": "Commit message: [${{ github.event.head_commit.message}}](${{ github.event.head_commit.url }})" }]' + sections: '[{"activityImage": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png", "activityTitle": "Approve or Decline the workflow", "activitySubtitle": "Event triggered by ${{ github.event.head_commit.author.name }}"}]' #actions: '[{ "@type": "OpenUri", "name": "View Status", "targets": [{ "os": "default", "uri": "${{ github.event.head_commit.url }}" }] }]' #actions: '[{ "@type": "OpenUri", "name": "Approve", "name": "Decline" "targets": [{ "os": "default", , "uri": "${{ github.event.head_commit.url }}" }] }]' view-status-action-text: ${{ job.status == 'success' && needs.testsjob.result == 'success' }} From 9b188324b6badfe5a31810881bb96b789c959be8 Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Thu, 29 Jul 2021 12:50:59 +0530 Subject: [PATCH 34/54] 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 e71a5b4..5ff8de3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -51,7 +51,7 @@ jobs: #sections: '[{ "activityImage": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png", "activityTitle": "GitHub Action invoked", "activitySubtitle": "Event triggered by ${{ github.event.head_commit.author.name }}", "activityText": "Commit message: [${{ github.event.head_commit.message}}](${{ github.event.head_commit.url }})" }]' sections: '[{"activityImage": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png", "activityTitle": "Approve or Decline the workflow", "activitySubtitle": "Event triggered by ${{ github.event.head_commit.author.name }}"}]' #actions: '[{ "@type": "OpenUri", "name": "View Status", "targets": [{ "os": "default", "uri": "${{ github.event.head_commit.url }}" }] }]' - #actions: '[{ "@type": "OpenUri", "name": "Approve", "name": "Decline" "targets": [{ "os": "default", , "uri": "${{ github.event.head_commit.url }}" }] }]' + actions: '[{ "@type": "OpenUri", "name": "Approve", "name": "Decline" "targets": [{ "os": "default", , "uri": "${{ github.event.approve_button.url }}" }] }]' view-status-action-text: ${{ job.status == 'success' && needs.testsjob.result == 'success' }} From 153e53b6a1d959602f4c9d3c19f69ab89de02265 Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Thu, 29 Jul 2021 14:31:46 +0530 Subject: [PATCH 35/54] Update main.yml --- .github/workflows/main.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5ff8de3..e0b4fe2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -48,10 +48,9 @@ jobs: title: CI pipeline text: Build and test is successfull theme_color: 28a745 - #sections: '[{ "activityImage": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png", "activityTitle": "GitHub Action invoked", "activitySubtitle": "Event triggered by ${{ github.event.head_commit.author.name }}", "activityText": "Commit message: [${{ github.event.head_commit.message}}](${{ github.event.head_commit.url }})" }]' - sections: '[{"activityImage": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png", "activityTitle": "Approve or Decline the workflow", "activitySubtitle": "Event triggered by ${{ github.event.head_commit.author.name }}"}]' - #actions: '[{ "@type": "OpenUri", "name": "View Status", "targets": [{ "os": "default", "uri": "${{ github.event.head_commit.url }}" }] }]' - actions: '[{ "@type": "OpenUri", "name": "Approve", "name": "Decline" "targets": [{ "os": "default", , "uri": "${{ github.event.approve_button.url }}" }] }]' - view-status-action-text: ${{ job.status == 'success' && needs.testsjob.result == 'success' }} + sections: '[{ "activityImage": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png", "activityTitle": "GitHub Action invoked", "activitySubtitle": "Event triggered by ${{ github.event.head_commit.author.name }}", "activityText": "Commit message: [${{ github.event.head_commit.message}}](${{ github.event.head_commit.url }})" }]' + #sections: '[{"activityImage": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png", "activityTitle": "Approve or Decline the workflow", "activitySubtitle": "Event triggered by ${{ github.event.head_commit.author.name }}"}]' + actions: '[{ "@type": "OpenUri", "name": "View Status", "targets": [{ "os": "default", "uri": "${{ github.event.head_commit.url }}" }] }]' + #actions: '[{ "@type": "OpenUri", "name": "Approve", "name": "Decline" "targets": [{ "os": "default", , "uri": "${{ github.event.approve_button.url }}" }] }]' From 82928de914203143507a3fac68b7d018880f468f Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Fri, 30 Jul 2021 11:46:10 +0530 Subject: [PATCH 36/54] Update main.yml --- .github/workflows/main.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e0b4fe2..f43bbd8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -52,5 +52,13 @@ jobs: #sections: '[{"activityImage": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png", "activityTitle": "Approve or Decline the workflow", "activitySubtitle": "Event triggered by ${{ github.event.head_commit.author.name }}"}]' actions: '[{ "@type": "OpenUri", "name": "View Status", "targets": [{ "os": "default", "uri": "${{ github.event.head_commit.url }}" }] }]' #actions: '[{ "@type": "OpenUri", "name": "Approve", "name": "Decline" "targets": [{ "os": "default", , "uri": "${{ github.event.approve_button.url }}" }] }]' + stagingjob: + needs: buildjobs + runs-on: ubuntu-latest + name: Deploy to staging + environment: + name: staging + url: ${{ steps.deploy_staging.outputs.webapp-url }} + From 2286403b0c20deb7024ec567f3308f77d68cba94 Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Fri, 30 Jul 2021 11:50:18 +0530 Subject: [PATCH 37/54] Update main.yml --- .github/workflows/main.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f43bbd8..c1135c4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -55,10 +55,11 @@ jobs: stagingjob: needs: buildjobs runs-on: ubuntu-latest - name: Deploy to staging - environment: - name: staging - url: ${{ steps.deploy_staging.outputs.webapp-url }} + steps: + - name: Deploy to staging + env: + name: staging + url: ${{ steps.deploy_staging.outputs.webapp-url }} From c282b8b38cb040a7d09f4fff1d6cb332b2d228e1 Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Fri, 30 Jul 2021 12:48:27 +0530 Subject: [PATCH 38/54] Update main.yml --- .github/workflows/main.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c1135c4..fa9c61b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,6 +23,10 @@ jobs: distribution: 'adopt' - name: Build with Maven run: mvn -B package --file pom.xml + - uses: actions/upload-artifact@v2 + with: + name: my-artifact + path: path/to/artifact/ testjobs: name: test needs: buildjobs @@ -52,14 +56,15 @@ jobs: #sections: '[{"activityImage": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png", "activityTitle": "Approve or Decline the workflow", "activitySubtitle": "Event triggered by ${{ github.event.head_commit.author.name }}"}]' actions: '[{ "@type": "OpenUri", "name": "View Status", "targets": [{ "os": "default", "uri": "${{ github.event.head_commit.url }}" }] }]' #actions: '[{ "@type": "OpenUri", "name": "Approve", "name": "Decline" "targets": [{ "os": "default", , "uri": "${{ github.event.approve_button.url }}" }] }]' - stagingjob: - needs: buildjobs + DeployStaging: + name: Deploy to Staging + needs: testjobs runs-on: ubuntu-latest + environment: + name: staging + url: ${{ steps.deploy_staging.outputs.webapp-url }} steps: - - name: Deploy to staging - env: - name: staging - url: ${{ steps.deploy_staging.outputs.webapp-url }} - + - name: Deploy + run: echo I am deploying From 4ca89c86848bafe5d8acdf0aa42314a31731797c Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Fri, 30 Jul 2021 13:33:57 +0530 Subject: [PATCH 39/54] Update main.yml --- .github/workflows/main.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fa9c61b..acefaa1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,7 +10,7 @@ on: branches: [ master ] jobs: - buildjobs: + build: name: build runs-on: ubuntu-latest @@ -27,10 +27,12 @@ jobs: with: name: my-artifact path: path/to/artifact/ - testjobs: + QA: name: test - needs: buildjobs + needs: build runs-on: ubuntu-latest + environment: + name: QA steps: - uses: actions/checkout@v2 - name: Set up JDK 11 @@ -41,7 +43,7 @@ jobs: - name: Test with Maven run: mvn -B test --file pom.xml notifyjobs: - needs: testjobs + needs: QA runs-on: ubuntu-latest steps: - name: Send a message to Microsoft Teams @@ -58,11 +60,10 @@ jobs: #actions: '[{ "@type": "OpenUri", "name": "Approve", "name": "Decline" "targets": [{ "os": "default", , "uri": "${{ github.event.approve_button.url }}" }] }]' DeployStaging: name: Deploy to Staging - needs: testjobs + needs: QA runs-on: ubuntu-latest environment: name: staging - url: ${{ steps.deploy_staging.outputs.webapp-url }} steps: - name: Deploy run: echo I am deploying From 9d81bebc627657d55334c7c330a27474187dc48d Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Fri, 30 Jul 2021 14:04:56 +0530 Subject: [PATCH 40/54] Update main.yml --- .github/workflows/main.yml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index acefaa1..ec5dc21 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,6 +27,18 @@ jobs: with: name: my-artifact path: path/to/artifact/ + notification: + needs: build + runs-on: ubuntu-latest + steps: + - name: Send a message to Microsoft Teams + uses: aliencube/microsoft-teams-actions@v0.8.0 + if: always() + with: + webhook_uri: ${{ secrets.MS_TEAMS_WEBHOOK_URI }} + title: CI pipeline + text: Build is successfull waiting for the approval to run test + theme_color: 28a745 QA: name: test needs: build @@ -42,7 +54,7 @@ jobs: distribution: 'adopt' - name: Test with Maven run: mvn -B test --file pom.xml - notifyjobs: + notify: needs: QA runs-on: ubuntu-latest steps: @@ -52,11 +64,11 @@ jobs: with: webhook_uri: ${{ secrets.MS_TEAMS_WEBHOOK_URI }} title: CI pipeline - text: Build and test is successfull + text: Test is successful waiting for the approval to deploy theme_color: 28a745 - sections: '[{ "activityImage": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png", "activityTitle": "GitHub Action invoked", "activitySubtitle": "Event triggered by ${{ github.event.head_commit.author.name }}", "activityText": "Commit message: [${{ github.event.head_commit.message}}](${{ github.event.head_commit.url }})" }]' + #sections: '[{ "activityImage": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png", "activityTitle": "GitHub Action invoked", "activitySubtitle": "Event triggered by ${{ github.event.head_commit.author.name }}", "activityText": "Commit message: [${{ github.event.head_commit.message}}](${{ github.event.head_commit.url }})" }]' #sections: '[{"activityImage": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png", "activityTitle": "Approve or Decline the workflow", "activitySubtitle": "Event triggered by ${{ github.event.head_commit.author.name }}"}]' - actions: '[{ "@type": "OpenUri", "name": "View Status", "targets": [{ "os": "default", "uri": "${{ github.event.head_commit.url }}" }] }]' + #actions: '[{ "@type": "OpenUri", "name": "View Status", "targets": [{ "os": "default", "uri": "${{ github.event.head_commit.url }}" }] }]' #actions: '[{ "@type": "OpenUri", "name": "Approve", "name": "Decline" "targets": [{ "os": "default", , "uri": "${{ github.event.approve_button.url }}" }] }]' DeployStaging: name: Deploy to Staging From 44442a9fc3b63eaa479668ddd3cf0326a5f2bc75 Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Fri, 30 Jul 2021 15:07:25 +0530 Subject: [PATCH 41/54] Update main.yml --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ec5dc21..d1239e0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -79,5 +79,6 @@ jobs: steps: - name: Deploy run: echo I am deploying + #done From caa727eb38b6e1e2fefab5436e8fb0c02e45eb28 Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Fri, 30 Jul 2021 15:14:24 +0530 Subject: [PATCH 42/54] 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 d1239e0..5593256 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -79,6 +79,6 @@ jobs: steps: - name: Deploy run: echo I am deploying - #done + From e6b44475dcccd7725acf5d995406fc81b547099d Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Fri, 30 Jul 2021 15:29:12 +0530 Subject: [PATCH 43/54] Update main.yml --- .github/workflows/main.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5593256..eca14fc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,10 +23,7 @@ jobs: distribution: 'adopt' - name: Build with Maven run: mvn -B package --file pom.xml - - uses: actions/upload-artifact@v2 - with: - name: my-artifact - path: path/to/artifact/ + notification: needs: build runs-on: ubuntu-latest From 61264781e031e3e535c13930675327bea0106d6b Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Mon, 2 Aug 2021 11:55:51 +0530 Subject: [PATCH 44/54] Update main.yml --- .github/workflows/main.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index eca14fc..877b3b9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -74,8 +74,10 @@ jobs: environment: name: staging steps: - - name: Deploy - run: echo I am deploying + - name: Login to Docker Hub + run: docker login docker.io --username "hasinireddy24" --password "Hasinireddy@24" + - name: Build the Docker Image + run: docker build . --file Dockerfile --tag hasinireddy24/samplenodejs From 381f363b634d391027edcdbae9af1c7383100933 Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Mon, 2 Aug 2021 11:59:57 +0530 Subject: [PATCH 45/54] 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 877b3b9..ac26c37 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -75,7 +75,7 @@ jobs: name: staging steps: - name: Login to Docker Hub - run: docker login docker.io --username "hasinireddy24" --password "Hasinireddy@24" + run: docker login docker.io "${{ secrets.Docker_Username }}" --password "${{ secrets.Docker_Password }}" - name: Build the Docker Image run: docker build . --file Dockerfile --tag hasinireddy24/samplenodejs From aa4014583d5c4a5c20b39eeb04925ebf533e6b9a Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Mon, 2 Aug 2021 12:04:33 +0530 Subject: [PATCH 46/54] 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 ac26c37..1b54e11 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -75,7 +75,7 @@ jobs: name: staging steps: - name: Login to Docker Hub - run: docker login docker.io "${{ secrets.Docker_Username }}" --password "${{ secrets.Docker_Password }}" + run: docker login docker.io --username "${{ secrets.Docker_Username }}" --password "${{ secrets.Docker_Password }}" - name: Build the Docker Image run: docker build . --file Dockerfile --tag hasinireddy24/samplenodejs From 053bdda458def83e437ebc1b16caf2ccd5a833b5 Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Mon, 2 Aug 2021 12:09:17 +0530 Subject: [PATCH 47/54] Update main.yml --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1b54e11..133e561 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -74,6 +74,7 @@ jobs: environment: name: staging steps: + - uses: actions/checkout@v2 - name: Login to Docker Hub run: docker login docker.io --username "${{ secrets.Docker_Username }}" --password "${{ secrets.Docker_Password }}" - name: Build the Docker Image From 327370ca62e93f60101ba45eb750f056c816ae6e Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Mon, 2 Aug 2021 12:26:46 +0530 Subject: [PATCH 48/54] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 32977bc..8b24ee5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # Multi-stage build setup (https://docs.docker.com/develop/develop-images/multistage-build/) # Stage 1 (to create a "build" image, ~140MB) -FROM openjdk:8-jdk-alpine3.7 AS builder +FROM openjdk:11 RUN java -version COPY . /usr/src/myapp/ From bd12fd5971a19aaea8420965b31bb7da3d403d2e Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Mon, 2 Aug 2021 12:36:02 +0530 Subject: [PATCH 49/54] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 8b24ee5..6c2bee8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ RUN java -version COPY . /usr/src/myapp/ WORKDIR /usr/src/myapp/ -RUN apk --no-cache add maven && mvn --version +RUN apt-get --no-cache add maven && mvn --version RUN mvn package # Stage 2 (to create a downsized "container executable", ~87MB) From 8a1506be7115b2877968dd00da0ef4be1efeb3f3 Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Mon, 2 Aug 2021 12:40:16 +0530 Subject: [PATCH 50/54] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6c2bee8..6a0b5de 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ RUN java -version COPY . /usr/src/myapp/ WORKDIR /usr/src/myapp/ -RUN apt-get --no-cache add maven && mvn --version +RUN mvn --version RUN mvn package # Stage 2 (to create a downsized "container executable", ~87MB) From 40568b3f321b8f9b3cdbce0b1ebfd85f92841b1b Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Mon, 2 Aug 2021 12:52:22 +0530 Subject: [PATCH 51/54] Update Dockerfile --- Dockerfile | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6a0b5de..9f1cadb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,20 @@ # Multi-stage build setup (https://docs.docker.com/develop/develop-images/multistage-build/) # Stage 1 (to create a "build" image, ~140MB) -FROM openjdk:11 -RUN java -version +FROM adoptopenjdk/openjdk11:latest +ARG MAVEN_VERSION="3.8.1" +ARG USER_HOME_DIR="/root" +ARG SHA="b98a1905eb554d07427b2e5509ff09bd53e2f1dd7a0afa38384968b113abef02" +ARG BASE_URL="https://apache.osuosl.org/maven/maven-3/${MAVEN_VERSION}/binaries" -COPY . /usr/src/myapp/ -WORKDIR /usr/src/myapp/ -RUN mvn --version -RUN mvn package +RUN mkdir -p /usr/share/maven \ + && curl -Lso /tmp/maven.tar.gz ${BASE_URL}/apache-maven-${MAVEN_VERSION}-bin.tar.gz \ + && echo "${SHA} /tmp/maven.tar.gz" | sha256sum -c - \ + && tar -xzC /usr/share/maven --strip-components=1 -f /tmp/maven.tar.gz \ + && rm -v /tmp/maven.tar.gz \ + && ln -s /usr/share/maven/bin/mvn /usr/bin/mvn -# Stage 2 (to create a downsized "container executable", ~87MB) -FROM openjdk:8-jre-alpine3.7 -WORKDIR /root/ -COPY --from=builder /usr/src/myapp/target/app.jar . +ENV MAVEN_HOME /usr/share/maven +ENV MAVEN_CONFIG "${USER_HOME_DIR}/.m2" -EXPOSE 8123 -ENTRYPOINT ["java", "-jar", "./app.jar"] +CMD ["/usr/bin/mvn"] From ff6686eded040f78077f203810b0fa0969d8a240 Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Mon, 2 Aug 2021 12:56:08 +0530 Subject: [PATCH 52/54] Update main.yml --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 133e561..7a0d266 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -79,6 +79,8 @@ jobs: run: docker login docker.io --username "${{ secrets.Docker_Username }}" --password "${{ secrets.Docker_Password }}" - name: Build the Docker Image run: docker build . --file Dockerfile --tag hasinireddy24/samplenodejs + - name: Push the Docker Image + run: docker push hasinireddy24/samplenodejs:latest From a14b5a580625eac851c00daef3417bed31395980 Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Mon, 2 Aug 2021 13:37:04 +0530 Subject: [PATCH 53/54] Update main.yml --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7a0d266..d103ec4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,6 +4,7 @@ name: Java CI with Maven on: + workflow_dispatch: push: branches: [ master ] pull_request: From 3e117eea1c4eb6cef6905382a76c3ef7ad1e4a9c Mon Sep 17 00:00:00 2001 From: Hasinibitla2404 <70942187+Hasinibitla2404@users.noreply.github.com> Date: Tue, 3 Aug 2021 11:42:40 +0530 Subject: [PATCH 54/54] Update main.yml --- .github/workflows/main.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d103ec4..fb1a4e6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,7 +4,6 @@ name: Java CI with Maven on: - workflow_dispatch: push: branches: [ master ] pull_request: @@ -64,10 +63,6 @@ jobs: title: CI pipeline text: Test is successful waiting for the approval to deploy theme_color: 28a745 - #sections: '[{ "activityImage": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png", "activityTitle": "GitHub Action invoked", "activitySubtitle": "Event triggered by ${{ github.event.head_commit.author.name }}", "activityText": "Commit message: [${{ github.event.head_commit.message}}](${{ github.event.head_commit.url }})" }]' - #sections: '[{"activityImage": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png", "activityTitle": "Approve or Decline the workflow", "activitySubtitle": "Event triggered by ${{ github.event.head_commit.author.name }}"}]' - #actions: '[{ "@type": "OpenUri", "name": "View Status", "targets": [{ "os": "default", "uri": "${{ github.event.head_commit.url }}" }] }]' - #actions: '[{ "@type": "OpenUri", "name": "Approve", "name": "Decline" "targets": [{ "os": "default", , "uri": "${{ github.event.approve_button.url }}" }] }]' DeployStaging: name: Deploy to Staging needs: QA