This repository has been archived by the owner on Sep 16, 2024. It is now read-only.
generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 2
73 lines (69 loc) · 2.18 KB
/
.deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: .Deploys
on:
workflow_call:
inputs:
environment:
description: GitHub environment; e.g. PR number (omit), TEST or PROD
required: false
type: string
tag:
description: Image tag; e.g. PR number or latest
default: ${{ github.event.number }}
required: false
type: string
target:
description: Deployment target; e.g. PR number (omit), test or prod
default: ${{ github.event.number }}
required: false
type: string
jobs:
database:
name: Database
environment: ${{ inputs.environment }}
runs-on: ubuntu-22.04
steps:
- name: Deploy Database
uses: bcgov-nr/[email protected]
with:
oc_namespace: ${{ vars.OC_NAMESPACE }}
oc_server: ${{ vars.OC_SERVER }}
oc_token: ${{ secrets.OC_TOKEN }}
file: database/openshift.deploy.yml
overwrite: false
parameters:
-p TAG=${{ inputs.tag }} -p TARGET=${{ inputs.target }}
backend:
name: Backend
needs: [database]
environment: ${{ inputs.environment }}
runs-on: ubuntu-22.04
steps:
- name: Deploy Backend
uses: bcgov-nr/[email protected]
with:
oc_namespace: ${{ vars.OC_NAMESPACE }}
oc_server: ${{ vars.OC_SERVER }}
oc_token: ${{ secrets.OC_TOKEN }}
file: backend/openshift.deploy.yml
overwrite: true
parameters:
-p TAG=${{ inputs.tag }} -p TARGET=${{ inputs.target }}
verification_path: /api/health
verification_retry_attempts: "5"
verification_retry_seconds: "15"
frontend:
name: Frontend
needs: [backend]
environment: ${{ inputs.environment }}
runs-on: ubuntu-22.04
steps:
- name: Deploy Frontend
uses: bcgov-nr/[email protected]
with:
oc_namespace: ${{ vars.OC_NAMESPACE }}
oc_server: ${{ vars.OC_SERVER }}
oc_token: ${{ secrets.OC_TOKEN }}
file: frontend/openshift.deploy.yml
overwrite: true
parameters:
-p TAG=${{ inputs.tag }} -p TARGET=${{ inputs.target }}