Skip to content

Commit

Permalink
Commenting out deploy step
Browse files Browse the repository at this point in the history
  • Loading branch information
dallascrichmond committed Oct 9, 2024
1 parent 604a79b commit 9e4fd85
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 72 deletions.
86 changes: 43 additions & 43 deletions .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,48 +14,48 @@ concurrency:
cancel-in-progress: true

jobs:
tests:
name: Tests
if: ${{ ! github.event.pull_request.draft }}
runs-on: ubuntu-22.04
timeout-minutes: 5
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
strategy:
matrix:
dir: [backend, frontend]
include:
- dir: backend
token: SONAR_TOKEN_BACKEND
- dir: frontend
token: SONAR_TOKEN_FRONTEND
steps:
- uses: bcgov-nr/[email protected]
with:
commands: |
npm ci
npm run test:cov
dir: ${{ matrix.dir }}
node_version: "22"
sonar_args: >
-Dsonar.exclusions=**/coverage/**,**/node_modules/**,**/*spec.ts
-Dsonar.organization=bcgov-sonarcloud
-Dsonar.projectKey=quickstart-openshift_${{ matrix.dir }}
-Dsonar.sources=src
-Dsonar.tests.inclusions=**/*spec.ts
-Dsonar.javascript.lcov.reportPaths=./coverage/lcov.info
sonar_token: ${{ secrets[matrix.token] }}
triggers: ('${{ matrix.dir }}/')
# tests:
# name: Tests
# if: ${{ ! github.event.pull_request.draft }}
# runs-on: ubuntu-22.04
# timeout-minutes: 5
# services:
# postgres:
# image: postgres
# env:
# POSTGRES_PASSWORD: postgres
# options: >-
# --health-cmd pg_isready
# --health-interval 10s
# --health-timeout 5s
# --health-retries 5
# ports:
# - 5432:5432
# strategy:
# matrix:
# dir: [backend, frontend]
# include:
# - dir: backend
# token: SONAR_TOKEN_BACKEND
# - dir: frontend
# token: SONAR_TOKEN_FRONTEND
# steps:
# - uses: bcgov-nr/[email protected]
# with:
# commands: |
# npm ci
# npm run test:cov
# dir: ${{ matrix.dir }}
# node_version: "22"
# sonar_args: >
# -Dsonar.exclusions=**/coverage/**,**/node_modules/**,**/*spec.ts
# -Dsonar.organization=bcgov-sonarcloud
# -Dsonar.projectKey=quickstart-openshift_${{ matrix.dir }}
# -Dsonar.sources=src
# -Dsonar.tests.inclusions=**/*spec.ts
# -Dsonar.javascript.lcov.reportPaths=./coverage/lcov.info
# sonar_token: ${{ secrets[matrix.token] }}
# triggers: ('${{ matrix.dir }}/')

# https://github.com/marketplace/actions/aqua-security-trivy
trivy:
Expand All @@ -82,7 +82,7 @@ jobs:

results:
name: Analysis Results
needs: [tests, trivy]
# needs: [tests, trivy]
if: always()
runs-on: ubuntu-22.04
steps:
Expand Down
58 changes: 29 additions & 29 deletions .github/workflows/pr-open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
# https://github.com/bcgov-nr/action-builder-ghcr
builds:
name: Builds
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
strategy:
matrix:
package: [backend, frontend, migrations]
package: [backend, frontend]
timeout-minutes: 10
steps:
- uses: bcgov-nr/[email protected]
Expand All @@ -27,32 +27,32 @@ jobs:
triggers: ('${{ matrix.package }}/')

# https://github.com/bcgov/quickstart-openshift-helpers
deploys:
name: Deploys
needs: [builds]
uses: bcgov/quickstart-openshift-helpers/.github/workflows/[email protected]
secrets:
oc_namespace: ${{ secrets.OC_NAMESPACE }}
oc_token: ${{ secrets.OC_TOKEN }}
with:
triggers: ('backend/' 'frontend/' 'migrations/')
params:
--set global.secrets.persist=false
# deploys:
# name: Deploys
# needs: [builds]
# uses: bcgov/quickstart-openshift-helpers/.github/workflows/[email protected]
# secrets:
# oc_namespace: ${{ secrets.OC_NAMESPACE }}
# oc_token: ${{ secrets.OC_TOKEN }}
# with:
# triggers: ('backend/' 'frontend/' 'migrations/')
# params:
# --set global.secrets.persist=false

tests:
name: Tests
if: needs.deploys.outputs.triggered == 'true'
needs: [deploys]
uses: ./.github/workflows/.tests.yml
with:
target: ${{ github.event.number }}
# tests:
# name: Tests
# if: needs.deploys.outputs.triggered == 'true'
# needs: [deploys]
# uses: ./.github/workflows/.tests.yml
# with:
# target: ${{ github.event.number }}

results:
name: PR Results
needs: [builds, deploys, tests]
if: always()
runs-on: ubuntu-22.04
steps:
- if: contains(needs.*.result, 'failure')
run: echo "At least one job has failed." && exit 1
- run: echo "Success!"
# results:
# name: PR Results
# needs: [builds, deploys, tests]
# if: always()
# runs-on: ubuntu-22.04
# steps:
# - if: contains(needs.*.result, 'failure')
# run: echo "At least one job has failed." && exit 1
# - run: echo "Success!"

0 comments on commit 9e4fd85

Please sign in to comment.