From 39a27cf164b3a1c0e803d5f2e302371de00eb98a Mon Sep 17 00:00:00 2001 From: RrahulSurre <86652324+Newbie4030@users.noreply.github.com> Date: Wed, 12 Jun 2024 20:58:20 +0530 Subject: [PATCH 1/6] Create main.yml --- .github/workflows/main.yml | 54 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 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..218581c --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,54 @@ +# This is a basic workflow to help you get started with Actions + +name: CI for PR + +# Controls when the workflow will run +on: + # Triggers the workflow on push or pull request events but only for the "main" branch + pull_request: + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build_and_unit_test: + # The type of runner that the job will run on + runs-on: R4-FNT-A-1-3-9 + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v3 + + - name: Upload unit test report to artifacts + uses: actions/upload-artifact@v2 + with: + name: test-reports + path: ci/SmokeTests/reports/html/report.html + + # Build docker image + - name: Build Docker image + run: | + docker build -t prayan-maas-micro-service-local . + + # Run docker image + #- name: Run Docker image + # run: | + # docker rm -f frontend-local + # docker run -d -p 3000:3000 --name prayan-maas-micro-service-local + # curl localhost:3000 + + #Image Scan Using Trivy + - name: Scan Docker image for vulnerabilities + run: | + trivy image --no-progress prayan-maas-micro-service-local:latest + # Save the Trivy scan report to a file + trivy image --no-progress --format json prayan-maas-micro-service-local:latest > trivy_report.json + + - name: Upload Trivy scan report to artifacts + uses: actions/upload-artifact@v2 + with: + name: trivy-reports + path: trivy_report.json From b20679d2d3cbcf6d96c190d2628161a48b6691e7 Mon Sep 17 00:00:00 2001 From: RrahulSurre <86652324+Newbie4030@users.noreply.github.com> Date: Wed, 12 Jun 2024 21:19:26 +0530 Subject: [PATCH 2/6] Update main.yml --- .github/workflows/main.yml | 34 ++++++++++------------------------ 1 file changed, 10 insertions(+), 24 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 218581c..2893429 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,46 +6,32 @@ name: CI for PR on: # Triggers the workflow on push or pull request events but only for the "main" branch pull_request: - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - + # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: # This workflow contains a single job called "build" - build_and_unit_test: + build: # The type of runner that the job will run on - runs-on: R4-FNT-A-1-3-9 + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["pypy3.9", "pypy3.10", "3.9", "3.10", "3.11", "3.12"] # Steps represent a sequence of tasks that will be executed as part of the job steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3 - - - name: Upload unit test report to artifacts - uses: actions/upload-artifact@v2 - with: - name: test-reports - path: ci/SmokeTests/reports/html/report.html - + - uses: actions/checkout@v4 + # Build docker image - name: Build Docker image run: | - docker build -t prayan-maas-micro-service-local . - - # Run docker image - #- name: Run Docker image - # run: | - # docker rm -f frontend-local - # docker run -d -p 3000:3000 --name prayan-maas-micro-service-local - # curl localhost:3000 + docker build -t rahul_Test . #Image Scan Using Trivy - name: Scan Docker image for vulnerabilities run: | trivy image --no-progress prayan-maas-micro-service-local:latest # Save the Trivy scan report to a file - trivy image --no-progress --format json prayan-maas-micro-service-local:latest > trivy_report.json + trivy image --no-progress --format json rahul_Test:latest > trivy_report.json - name: Upload Trivy scan report to artifacts uses: actions/upload-artifact@v2 From 66e7ed78d2e8eb9e4824e407aeab2b7376a638d1 Mon Sep 17 00:00:00 2001 From: RrahulSurre <86652324+Newbie4030@users.noreply.github.com> Date: Wed, 12 Jun 2024 21:22:52 +0530 Subject: [PATCH 3/6] Create ci-pr.yml --- .github/workflows/ci-pr.yml | 40 +++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/ci-pr.yml diff --git a/.github/workflows/ci-pr.yml b/.github/workflows/ci-pr.yml new file mode 100644 index 0000000..2893429 --- /dev/null +++ b/.github/workflows/ci-pr.yml @@ -0,0 +1,40 @@ +# This is a basic workflow to help you get started with Actions + +name: CI for PR + +# Controls when the workflow will run +on: + # Triggers the workflow on push or pull request events but only for the "main" branch + pull_request: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["pypy3.9", "pypy3.10", "3.9", "3.10", "3.11", "3.12"] + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + - uses: actions/checkout@v4 + + # Build docker image + - name: Build Docker image + run: | + docker build -t rahul_Test . + + #Image Scan Using Trivy + - name: Scan Docker image for vulnerabilities + run: | + trivy image --no-progress prayan-maas-micro-service-local:latest + # Save the Trivy scan report to a file + trivy image --no-progress --format json rahul_Test:latest > trivy_report.json + + - name: Upload Trivy scan report to artifacts + uses: actions/upload-artifact@v2 + with: + name: trivy-reports + path: trivy_report.json From 0a46cdd2d0fee78161f92b812cf3a95b3d6ef922 Mon Sep 17 00:00:00 2001 From: RrahulSurre <86652324+Newbie4030@users.noreply.github.com> Date: Wed, 12 Jun 2024 21:23:34 +0530 Subject: [PATCH 4/6] Update LICENSE --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 8dada3e..57bd8df 100644 --- a/LICENSE +++ b/LICENSE @@ -149,7 +149,7 @@ PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - + 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly From 53528b64308929e54001072229c52e00a9f27e24 Mon Sep 17 00:00:00 2001 From: RrahulSurre <86652324+Newbie4030@users.noreply.github.com> Date: Wed, 12 Jun 2024 21:24:20 +0530 Subject: [PATCH 5/6] Update LICENSE --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 57bd8df..f97cdec 100644 --- a/LICENSE +++ b/LICENSE @@ -23,7 +23,7 @@ "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - "Source" form shall mean the preferred form for making modifications, + "Source" form shall mean the preferred form for making modifications,fgh including but not limited to software source code, documentation source, and configuration files. From e66c3fd54a69e223beeb29348d8f023209005dae Mon Sep 17 00:00:00 2001 From: RrahulSurre <86652324+Newbie4030@users.noreply.github.com> Date: Wed, 12 Jun 2024 21:28:18 +0530 Subject: [PATCH 6/6] Update LICENSE --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index f97cdec..8ea6ddf 100644 --- a/LICENSE +++ b/LICENSE @@ -13,7 +13,7 @@ the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common + other entities that control, are controlled by, or are under commonbvnvb control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or