Skip to content

Blank out default link (#1981) #249

Blank out default link (#1981)

Blank out default link (#1981) #249

Workflow file for this run

name: Build, Update Config, and Deploy Development
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "plugins/**"
- "services/tenant-ui/**"
- "charts/traction/**"
- "charts/tenant-ui/**"
jobs:
build_ui:
name: "Build Tenant UI"
runs-on: ubuntu-latest
if: github.repository_owner == 'bcgov'
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Build service
uses: ./.github/actions/build_ui
id: builder
with:
context: "./services/tenant-ui"
image_name: ${{ github.repository_owner}}/traction-tenant-ui
registry: ghcr.io
registry_username: ${{ github.repository_owner}}
registry_password: ${{ secrets.GITHUB_TOKEN }}
outputs:
image_tag: ${{ steps.builder.outputs.image_tag }}
image_version: ${{ steps.builder.outputs.image_version }}
build_acapy:
name: "Build Traction Aca-Py"
runs-on: ubuntu-latest
if: github.repository_owner == 'bcgov'
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Build Aca-Py Image
uses: ./.github/actions/build_acapy
id: builder
with:
context: "./plugins"
dockerfile: "./plugins/docker/Dockerfile"
image_name: ${{ github.repository_owner}}/traction-plugins-acapy
registry: ghcr.io
registry_username: ${{ github.repository_owner}}
registry_password: ${{ secrets.GITHUB_TOKEN }}
outputs:
image_tag: ${{ steps.builder.outputs.image_tag }}
image_version: ${{ steps.builder.outputs.image_version }}
build_proxy:
name: "Build Traction Tenant Proxy"
runs-on: ubuntu-latest
if: github.repository_owner == 'bcgov'
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Build Aca-Py Image
uses: ./.github/actions/build_acapy
id: builder
with:
context: "./plugins"
dockerfile: "./plugins/docker/Dockerfile.tenant-proxy"
image_name: ${{ github.repository_owner}}/traction-tenant-proxy
registry: ghcr.io
registry_username: ${{ github.repository_owner}}
registry_password: ${{ secrets.GITHUB_TOKEN }}
outputs:
image_tag: ${{ steps.builder.outputs.image_tag }}
image_version: ${{ steps.builder.outputs.image_version }}
deploy_dev:
name: Deploy Dev
runs-on: ubuntu-latest
needs:
- build_ui
- build_acapy
- build_proxy
if: ${{ contains(needs.*.result, 'success') && !(contains(needs.*.result, 'failure')) && (github.repository_owner == 'bcgov') }}
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Checkout services directory from the ministry-gitops-ditp repo
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
repository: bcgov-c/ministry-gitops-ditp
ssh-key: ${{ secrets.DITP_GITOPS_REPO_SECRET }}
sparse-checkout: |
services
path: ministry-gitops-ditp
- name: Install OpenShift CLI tools
uses: redhat-actions/openshift-tools-installer@144527c7d98999f2652264c048c7a9bd103f8a82 # v1.13.1
with:
oc: "4.14"
- name: Authenticate and set context
uses: redhat-actions/oc-login@5eb45e848b168b6bf6b8fe7f1561003c12e3c99d # v1.3
with:
openshift_server_url: ${{ secrets.OPENSHIFT_SERVER }}
openshift_token: ${{ secrets.OPENSHIFT_TOKEN }}
namespace: ${{ secrets.OPENSHIFT_NAMESPACE }}
- name: Deploy Traction to Development
run: |
cp ministry-gitops-ditp/services/traction/charts/dev/values.yaml ./dev-values.yaml
yq e -i 'del(.traction) | . *= load("ministry-gitops-ditp/services/traction/charts/dev/values.yaml").traction' ./dev-values.yaml
helm upgrade --install traction -f ./dev-values.yaml --set acapy.image.tag=${{ needs.build_acapy.outputs.image_version }} --set tenant_proxy.image.tag=${{ needs.build_acapy.outputs.image_version }} --set ui.image.tag=${{ needs.build_ui.outputs.image_version }} ./charts/traction --wait --timeout 10m
- name: Restart Deployments
run: |
oc rollout restart deployment/traction-acapy
oc rollout restart deployment/traction-tenant-proxy
oc rollout restart deployment/traction-tenant-ui