-
Notifications
You must be signed in to change notification settings - Fork 302
76 lines (68 loc) · 2.46 KB
/
deploy-preview.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
74
75
76
---
# Deploys the latest changes on 'main' branch, via a container
# image tagged with 'main', to testnet-preview.penumbra.zone.
name: Deploy testnet-preview.penumbra.zone
on:
workflow_dispatch:
inputs:
image_tag:
description: 'Docker image tag to deploy'
# The container tag "main" comes from the name of the main branch.
# It's important we deploy this tag for preview, rather than "latest",
# as "latest" maps to the most recent tag (i.e. weekly testnet).
default: "main"
required: true
push:
branches:
- main
# Cancel any pending preview deploys, in favor of a newer PR
# that was just merged.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-container:
name: Build container for preview
uses: ./.github/workflows/containers.yml
secrets: inherit
deploy:
name: Deploy preview to cluster
permissions:
contents: 'read'
id-token: 'write'
needs:
- build-container
runs-on: ubuntu-latest
timeout-minutes: 30
environment: testnet-preview
steps:
- name: checkout
uses: actions/checkout@v3
- id: gcloudauth
uses: google-github-actions/auth@v0
with:
workload_identity_provider: 'projects/1006847873719/locations/global/workloadIdentityPools/gh-runner-pool/providers/my-provider'
service_account: '[email protected]'
- name: get gke credentials
uses: google-github-actions/get-gke-credentials@v0
with:
cluster_name: testnet
project_id: penumbra-sl-testnet
location: us-central1
- name: deploy
run: |-
cd deployments/
export PENUMBRA_VERSION='main'
export HELM_RELEASE='penumbra-testnet-preview'
./ci.sh
- name: bounce grpcui
run: kubectl rollout restart deployment grpcui-preview
- name: bounce osiris
run: kubectl rollout restart deployment osiris-preview
# We only run one (1) relayer instance, and re-deploy it as part of the preview update.
# The other end of the configured path is the long-running testnet.
# We ignore errors on the bounce, because we may have removed the deployment out of band:
# we're still working on reliable packet relaying between test chains.
- name: bounce relayer
run: |-
./deployments/scripts/bounce-relayer || true