Skip to content
This repository has been archived by the owner on Feb 24, 2023. It is now read-only.

Commit

Permalink
Update CI-CD.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ITM007 authored Nov 10, 2021
1 parent 40f057e commit 8267254
Showing 1 changed file with 48 additions and 48 deletions.
96 changes: 48 additions & 48 deletions .github/workflows/CI-CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,62 +3,62 @@
name: CI/CD

# Controls when the workflow will run
on: workflow_dispatch
# push:
# branches:
# - main
# - dev
# pull_request:
# branches:
# - main
on:
push:
branches:
- main
- dev
pull_request:
branches:
- main

jobs:
# backend-unit-tests:
# uses: rropen/reusable-workflows/.github/workflows/pytest.yml@main
# with:
# backend_directory: src/backend
backend-unit-tests:
uses: rropen/reusable-workflows/.github/workflows/pytest.yml@main
with:
backend_directory: src/backend

# frontend-unit-tests:
# uses: rropen/reusable-workflows/.github/workflows/cypress_component_tests.yml@main
# with:
# frontend_directory: src/frontend
frontend-unit-tests:
uses: rropen/reusable-workflows/.github/workflows/cypress_component_tests.yml@main
with:
frontend_directory: src/frontend

# docker-build:
# uses: rropen/reusable-workflows/.github/workflows/docker_build.yml@main
# with:
# dockerfile_directory: src/backend
# image: ghcr.io/rropen/mec_backend:latest
# registry: ghcr.io
# secrets:
# cr_username: ${{ secrets.GH_CR_USERNAME }}
# cr_PAT: ${{ secrets.CONTAINER_PAT }}
docker-build:
uses: rropen/reusable-workflows/.github/workflows/docker_build.yml@main
with:
dockerfile_directory: src/backend
image: ghcr.io/rropen/mec_backend:latest
registry: ghcr.io
secrets:
cr_username: ${{ secrets.GH_CR_USERNAME }}
cr_PAT: ${{ secrets.CONTAINER_PAT }}

# integration-tests:
# needs: [docker-build, backend-unit-tests, frontend-unit-tests]
# uses: rropen/reusable-workflows/.github/workflows/cypress_E2E.yml@main
# with:
# backend_directory: src/backend
# frontend_directory: src/frontend
# backend_url: http://localhost:8181
# image: ghcr.io/rropen/mec_backend:latest
# secrets:
# vue_cobalt_token: ${{ secrets.VUE_COBALT_PAT }}
# cr_username: ${{ secrets.GH_CR_USERNAME }}
# cr_PAT: ${{ secrets.CONTAINER_PAT }}
integration-tests:
needs: [docker-build, backend-unit-tests, frontend-unit-tests]
uses: rropen/reusable-workflows/.github/workflows/cypress_E2E.yml@main
with:
backend_directory: src/backend
frontend_directory: src/frontend
backend_url: http://localhost:8181
image: ghcr.io/rropen/mec_backend:latest
secrets:
vue_cobalt_token: ${{ secrets.VUE_COBALT_PAT }}
cr_username: ${{ secrets.GH_CR_USERNAME }}
cr_PAT: ${{ secrets.CONTAINER_PAT }}

snyk-vulnerability-scanning:
# needs: integration-tests
needs: integration-tests
uses: rropen/reusable-workflows/.github/workflows/snyk_vulnerability_scanning.yml@main
secrets:
snyk_token: ${{secrets.SNYK_TOKEN}}

# snyk-docker-vulnerability-scanning:
# needs: integration-tests
# uses: rropen/reusable-workflows/.github/workflows/snyk_docker_vulnerability_scanning.yml@main
# with:
# image: ghcr.io/rropen/mec_backend:latest
# dockerfile_directory: src/backend
# secrets:
# snyk_token: ${{secrets.SNYK_TOKEN}}
# cr_username: ${{ secrets.GH_CR_USERNAME }}
# cr_PAT: ${{ secrets.CONTAINER_PAT }}
snyk-docker-vulnerability-scanning:
needs: integration-tests
uses: rropen/reusable-workflows/.github/workflows/snyk_docker_vulnerability_scanning.yml@main
with:
image: ghcr.io/rropen/mec_backend:latest
dockerfile_directory: src/backend
secrets:
snyk_token: ${{secrets.SNYK_TOKEN}}
cr_username: ${{ secrets.GH_CR_USERNAME }}
cr_PAT: ${{ secrets.CONTAINER_PAT }}

0 comments on commit 8267254

Please sign in to comment.