DBC22-2998: fixed advisories panel on map #1179
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: 1. Build & Deploy to Dev | |
#Will automatically run on a push to main, but can also be run manually | |
on: | |
push: | |
branches: [ "main" ] | |
paths-ignore: | |
- '.github/**' | |
workflow_dispatch: | |
env: | |
ENVIRONMENT: dev | |
IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }} | |
REGISTRY_USER: ${{ github.actor }} | |
REGISTRY_PASSWORD: ${{ github.token }} | |
jobs: | |
build-static: | |
runs-on: ubuntu-latest | |
name: Build & Push Static Image | |
environment: dev | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Build Static | |
id: build_image | |
uses: redhat-actions/buildah-build@v2 | |
with: | |
context: . | |
layers: true | |
image: drivebc-static | |
tags: latest latest-dev ${{ github.sha }} | |
labels: | | |
app=drivebc | |
containerfiles: ./compose/frontend/StaticBuild | |
build-args: | | |
FONTAWESOME_PACKAGE_TOKEN=${{ secrets.FONTAWESOME_PACKAGE_TOKEN }} | |
DEBUG_BUILD=true | |
- name: Push to Github Packages | |
uses: redhat-actions/push-to-registry@v2 | |
with: | |
image: ${{ steps.build_image.outputs.image }} | |
tags: ${{ steps.build_image.outputs.tags }} | |
registry: ${{ env.IMAGE_REGISTRY }} | |
username: ${{ env.REGISTRY_USER }} | |
password: ${{ env.REGISTRY_PASSWORD }} | |
build-backend: | |
runs-on: ubuntu-latest | |
name: Build & Push Backend Image | |
environment: dev | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Build Backend | |
id: build_image | |
uses: redhat-actions/buildah-build@v2 | |
with: | |
image: drivebc-django | |
tags: latest latest-dev ${{ github.sha }} | |
labels: | | |
app=drivebc | |
containerfiles: ./compose/backend/Dockerfile | |
build-args: | |
DEBUG_BUILD=true | |
- name: Push to Github Packages | |
uses: redhat-actions/push-to-registry@v2 | |
with: | |
image: ${{ steps.build_image.outputs.image }} | |
tags: ${{ steps.build_image.outputs.tags }} | |
registry: ${{ env.IMAGE_REGISTRY }} | |
username: ${{ env.REGISTRY_USER }} | |
password: ${{ env.REGISTRY_PASSWORD }} | |
build-redis: | |
runs-on: ubuntu-latest | |
name: Build & Push Redis Image | |
environment: dev | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Build Redis | |
id: build_image | |
uses: redhat-actions/buildah-build@v2 | |
with: | |
image: drivebc-redis | |
tags: latest latest-dev ${{ github.sha }} | |
labels: | | |
app=drivebc | |
containerfiles: ./compose/redis/Dockerfile | |
- name: Push to Github Packages | |
uses: redhat-actions/push-to-registry@v2 | |
with: | |
image: ${{ steps.build_image.outputs.image }} | |
tags: ${{ steps.build_image.outputs.tags }} | |
registry: ${{ env.IMAGE_REGISTRY }} | |
username: ${{ env.REGISTRY_USER }} | |
password: ${{ env.REGISTRY_PASSWORD }} | |
build-openshiftjobs: | |
runs-on: ubuntu-latest | |
name: Build & Push OpenShift Jobs Image | |
environment: dev | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Build OpenShift Jobs | |
id: build_image | |
uses: redhat-actions/buildah-build@v2 | |
with: | |
context: . | |
layers: true | |
image: drivebc-openshiftjobs | |
tags: latest latest-dev ${{ github.sha }} | |
labels: | | |
app=drivebc | |
containerfiles: ./compose/openshiftjobs/DockerFile | |
- name: Push to Github Packages | |
uses: redhat-actions/push-to-registry@v2 | |
with: | |
image: ${{ steps.build_image.outputs.image }} | |
tags: ${{ steps.build_image.outputs.tags }} | |
registry: ${{ env.IMAGE_REGISTRY }} | |
username: ${{ env.REGISTRY_USER }} | |
password: ${{ env.REGISTRY_PASSWORD }} | |
versionUpdate: | |
needs: [build-static, build-backend, build-redis, build-openshiftjobs] | |
runs-on: ubuntu-latest | |
name: Deploy Latest Images | |
environment: | |
name: dev | |
url: https://dev-drivebc.apps.gold.devops.gov.bc.ca | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Authenticate and set context | |
uses: redhat-actions/oc-login@v1 | |
with: | |
openshift_server_url: ${{ secrets.OPENSHIFT_SERVER }} | |
openshift_token: ${{ secrets.OPENSHIFT_TOKEN }} | |
namespace: ${{ vars.OPENSHIFT_NAMESPACE }} | |
insecure_skip_tls_verify: true | |
- name: Helm upgrade on OpenShift Environment | |
run: | | |
helm dependency update ./infrastructure/main | |
helm upgrade dev-drivebc -f ./infrastructure/main/values-dev.yaml ./infrastructure/main --set django.image.tag="${{ github.sha }}" --set redis.image.tag="${{ github.sha }}" --set static.image.tag="${{ github.sha }}" --set tasks.image.tag="${{ github.sha }}" --set openshiftjobs.image.tag="${{ github.sha }}" | |
automatedTests: | |
needs: [versionUpdate] | |
name: Automated Smoke Test | |
uses: bcgov/DriveBC.ca-automated-tests/.github/workflows/playwright.yml@main | |
with: | |
environment: 'dev' | |
secrets: inherit |