-
Notifications
You must be signed in to change notification settings - Fork 2
88 lines (84 loc) · 3.36 KB
/
ci-openshift-prod.yaml
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
74
75
76
77
78
79
80
81
82
83
84
85
86
name: Build And Add Job to Openshift Prod
on:
workflow_dispatch:
inputs:
RELEASE_VERSION:
required: true
description: The Tag release to PROD.
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
builds:
name: Builds
runs-on: ubuntu-22.04
permissions:
packages: write
timeout-minutes: 10
steps:
- uses: bcgov-nr/[email protected]
with:
package: sris
tag: ${{ github.event.inputs.RELEASE_VERSION }}
tag_fallback: latest
build_file: ./Dockerfile
build_context: .
deploy:
name: Deploy
runs-on: ubuntu-22.04
needs: [builds]
environment: prod # read secrets from prod environment in github.
steps:
- uses: bcgov-nr/[email protected]
with:
oc_server: ${{ secrets.OPENSHIFT_SERVER }}
oc_namespace: ${{ vars.OC_NAMESPACE }}
oc_token: ${{ secrets.OPENSHIFT_TOKEN }}
overwrite: true
penetration_test: false
file: ./openshift/sris-schedule-job.yml
parameters: |
APP_NAME=sris \
TAG=${{ github.event.inputs.RELEASE_VERSION }} \
NAMESPACE=${{ vars.OC_NAMESPACE }} \
CHEFS_SOILS_FORM_ID=${{ secrets.CHEFS_SOILS_FORM_ID }} \
CHEFS_SOILS_API_KEY=${{ secrets.CHEFS_SOILS_API_KEY }} \
CHEFS_SOILS_FORM_VERSION=${{ secrets.CHEFS_SOILS_FORM_VERSION }} \
CHEFS_HV_FORM_ID=${{ secrets.CHEFS_HV_FORM_ID }} \
CHEFS_HV_API_KEY=${{ secrets.CHEFS_HV_API_KEY }} \
CHEFS_HV_FORM_VERSION=${{ secrets.CHEFS_HV_FORM_VERSION }} \
CHEFS_MAIL_FORM_ID=${{ secrets.CHEFS_MAIL_FORM_ID }} \
CHEFS_MAIL_API_KEY=${{ secrets.CHEFS_MAIL_API_KEY }} \
CHEFS_MAIL_FORM_VERSION=${{ secrets.CHEFS_MAIL_FORM_VERSION }} \
CHES_API_OAUTH_SECRET=${{ secrets.CHES_API_OAUTH_SECRET }} \
MAPHUB_USER=${{ secrets.MAPHUB_USER }} \
MAPHUB_PASS=${{ secrets.MAPHUB_PASS }} \
SRC_CSV_ID=${{ secrets.SRC_CSV_ID }} \
SRC_LAYER_ID=${{ secrets.SRC_LAYER_ID }} \
RCV_CSV_ID=${{ secrets.RCV_CSV_ID }} \
RCV_LAYER_ID=${{ secrets.RCV_LAYER_ID }} \
HV_CSV_ID=${{ secrets.HV_CSV_ID }} \
HV_LAYER_ID=${{ secrets.HV_LAYER_ID }} \
WEB_MAP_APP_ID=${{ secrets.WEB_MAP_APP_ID }} \
CHEFS_API_URL=${{ secrets.CHEFS_API_URL }} \
AUTH_URL=${{ secrets.AUTH_URL }} \
CHES_URL=${{ secrets.CHES_URL }} \
LOGLEVEL=${{ secrets.LOGLEVEL }} \
NOTICE_STANDARD_TIME=${{ secrets.NOTICE_STANDARD_TIME }} \
AGOL_UPDATE_FLAG=${{ secrets.AGOL_UPDATE_FLAG }} \
EMAIL_NOTIFY_FLAG=${{ secrets.EMAIL_NOTIFY_FLAG }} \
TIMEOUT_SECONDS=${{ secrets.TIMEOUT_SECONDS }} \
CHEFS_API_TIMEOUT=${{ secrets.CHEFS_API_TIMEOUT }} \
CHES_API_TIMEOUT=${{ secrets.CHES_API_TIMEOUT }} \
release:
name: Release
runs-on: ubuntu-22.04
needs: [ builds, deploy ]
steps:
- uses: actions/checkout@v4
name: checkout
- uses: rickstaa/action-create-tag@v1
name: Create Release Tag in Git
with:
tag: "release/${{ github.event.inputs.RELEASE_VERSION }}"
message: "Release version ${{ github.event.inputs.RELEASE_VERSION }}"