-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (55 loc) · 1.8 KB
/
config-env.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
# Configuring target env
name: Configuring Target Env
on:
workflow_dispatch:
inputs:
oc_env_suffix:
description: The Env suffic of oc name space
required: true
type: choice
options:
- dev
- test
- production
env:
CLUSTER: https://api.silver.devops.gov.bc.ca:6443
AUTH_TOKEN: ${{ secrets.AUTH_TOKEN_OCP4 }}
BUILD_REF: ${{ github.base_ref }}
ENV_PREFIX: ${{ inputs.oc_env_suffix }}
NAMESPACE_DEV: ${{ vars.NAMESPACE_DEV }}
NAMESPACE_TEST: ${{ vars.NAMESPACE_TEST }}
NAMESPACE_PROD: ${{ vars.NAMESPACE_PROD }}
SOAM_CLIENT_ID_DEV: ${{ vars.SOAM_CLIENT_ID_DEV }}
SOAM_CLIENT_SECRET_DEV: ${{ secrets.SOAM_CLIENT_SECRET_DEV }}
SOAM_CLIENT_ID_TEST: ${{ vars.SOAM_CLIENT_ID_TEST }}
SOAM_CLIENT_SECRET_TEST: ${{ secrets.SOAM_CLIENT_SECRET_TEST }}
SOAM_CLIENT_ID_PROD: ${{ vars.SOAM_CLIENT_ID_PROD }}
SOAM_CLIENT_SECRET_PROD: ${{ secrets.SOAM_CLIENT_SECRET_PROD }}
jobs:
api:
name: Openshift Configure env
runs-on: ubuntu-latest
concurrency: ci-config-${{ inputs.oc_env_suffix }}
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Configure service account and network plocy
working-directory: './tools'
continue-on-error: true
run: |
oc login --token="$AUTH_TOKEN" --server="$CLUSTER"
make init-project
- name: Configure secret and configmap
working-directory: './tools'
run: |
oc login --token="$AUTH_TOKEN" --server="$CLUSTER"
make print-status
make init-project
make init-api-sec
make init-api-config
- name: Deploy redis
working-directory: './tools'
run: |
oc login --token="$AUTH_TOKEN" --server="$CLUSTER"
make deploy-redis