chore(ci): actions moved to bcgov org #4317
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PR | |
on: | |
pull_request: | |
branches: | |
- release/** | |
types: | |
- opened | |
- reopened | |
- synchronize | |
- ready_for_review | |
concurrency: | |
# Cancel in progress for PR open and close | |
group: ${{ github.event.number }} | |
cancel-in-progress: true | |
jobs: | |
# https://github.com/bcgov/action-builder-ghcr | |
builds: | |
name: Builds | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
package: [backend, frontend, migrations, webeoc] | |
timeout-minutes: 10 | |
steps: | |
- uses: bcgov/[email protected] | |
with: | |
package: ${{ matrix.package }} | |
tag: ${{ github.event.number }} | |
tag_fallback: latest | |
triggers: ('${{ matrix.package }}/') | |
# https://github.com/bcgov/quickstart-openshift | |
crunchy: | |
name: Deploy Crunchy | |
needs: [builds] | |
uses: ./.github/workflows/.dbdeployer.yml | |
with: | |
s3_enabled: false # no backups in dev | |
params: --set global.environment=dev | |
cluster_environment: dev | |
secrets: | |
oc_namespace: ${{ secrets.OC_NAMESPACE }} | |
oc_token: ${{ secrets.OC_TOKEN }} | |
# https://github.com/bcgov/quickstart-openshift-helpers | |
deploys: | |
name: Deploys | |
needs: [builds, crunchy] | |
uses: bcgov/quickstart-openshift-helpers/.github/workflows/[email protected] | |
secrets: | |
oc_namespace: ${{ secrets.OC_NAMESPACE }} | |
oc_token: ${{ secrets.OC_TOKEN }} | |
with: | |
params: --set global.useCrunchy=true --set global.crunchyClusterEnvironment=dev | |
healthcheck: | |
name: Healthcheck Deployment | |
runs-on: ubuntu-22.04 | |
needs: [builds, crunchy] | |
environment: | |
timeout-minutes: 15 | |
if: ${{ ! github.event.pull_request.draft }} | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
sleep 120 # wait for helm release to startup | |
./.github/scripts/rollout_healthcheck.sh | |
env: | |
TIMEOUT_SECONDS: 420 # 7m | |
POLL_INTERVAL_SECONDS: 15 | |
LABEL_SELECTOR: "app.kubernetes.io/instance=nr-compliance-enforcement-${{ github.event.number }}" | |
OC_NAMESPACE: ${{ vars.OC_NAMESPACE }} | |
OC_SERVER: ${{ vars.OC_SERVER }} | |
OC_TOKEN: ${{ secrets.OC_TOKEN }} | |
tests: | |
name: Tests | |
if: needs.deploys.outputs.triggered == 'true' && ${{ !github.event.pull_request.draft }} | |
needs: [deploys] | |
uses: ./.github/workflows/.tests.yml | |
with: | |
target: ${{ github.event.number }} | |
secrets: inherit # so that the tests github action can use the secrests that this action has access to | |
results: | |
name: PR Results | |
needs: [builds, deploys, tests, healthcheck] | |
if: always() && (!failure()) && (!cancelled()) | |
runs-on: ubuntu-22.04 | |
steps: | |
- run: echo "Success!" |