-
Notifications
You must be signed in to change notification settings - Fork 1
67 lines (60 loc) · 2.29 KB
/
dispatch-deploy.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
name: (Manual) Production Deploy
run-name: Deploy ${{ github.ref_name }} to production.
on:
workflow_dispatch: {}
env:
TARGET_CLUSTER: utility-r1-f-k8s
CHART_REPO: https://harbor.mobilecoin.com/chartrepo/mobilecoinofficial-public
jobs:
deploy-mainnet:
runs-on: mco-dev-small-x64
steps:
- name: Create namespace
uses: mobilecoinofficial/gha-k8s-toolbox@v1
with:
action: namespace-create
namespace: block-explorer-mainnet
rancher_cluster: ${{ env.TARGET_CLUSTER }}
rancher_url: ${{ secrets.RANCHER_B_URL }}
rancher_token: ${{ secrets.RANCHER_B_TOKEN }}
- name: Deploy Prod Mainnet
uses: mobilecoinofficial/gha-k8s-toolbox@v1
with:
action: helm-deploy
chart_repo: ${{ env.CHART_REPO }}
chart_name: block-explorer
chart_set: |
--set=ingress.host=block-explorer.mobilecoin.foundation
--set=image.tag=${{ github.ref_name }}-main
chart_version: ${{ github.ref_name }}
release_name: block-explorer
namespace: block-explorer-mainnet
rancher_cluster: ${{ env.TARGET_CLUSTER }}
rancher_url: ${{ secrets.RANCHER_B_URL }}
rancher_token: ${{ secrets.RANCHER_B_TOKEN }}
deploy-testnet:
runs-on: mco-dev-small-x64
steps:
- name: Create namespace
uses: mobilecoinofficial/gha-k8s-toolbox@v1
with:
action: namespace-create
namespace: block-explorer-testnet
rancher_cluster: ${{ env.TARGET_CLUSTER }}
rancher_url: ${{ secrets.RANCHER_B_URL }}
rancher_token: ${{ secrets.RANCHER_B_TOKEN }}
- name: Deploy Prod Testnet
uses: mobilecoinofficial/gha-k8s-toolbox@v1
with:
action: helm-deploy
chart_repo: ${{ env.CHART_REPO }}
chart_name: block-explorer
chart_set: |
--set=ingress.host=block-explorer.test.mobilecoin.com
--set=image.tag=${{ github.ref_name }}-test
chart_version: ${{ github.ref_name }}
release_name: block-explorer
namespace: block-explorer-testnet
rancher_cluster: ${{ env.TARGET_CLUSTER }}
rancher_url: ${{ secrets.RANCHER_B_URL }}
rancher_token: ${{ secrets.RANCHER_B_TOKEN }}