Skip to content

Commit

Permalink
wormchain: contracts deploy to Tilt devnet (wormhole-foundation#2300)
Browse files Browse the repository at this point in the history
  • Loading branch information
justinschuldt authored Jan 31, 2023
1 parent 30d8fb4 commit 15f4858
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -763,6 +763,12 @@ if wormchain:
target = "vue-export",
)

docker_build(
ref = "wormchain-deploy",
context = "./wormchain",
dockerfile = "./wormchain/Dockerfile.deploy",
)

def build_wormchain_yaml(yaml_path, num_instances):
wormchain_yaml = read_yaml_stream(yaml_path)

Expand Down Expand Up @@ -814,6 +820,12 @@ if wormchain:
trigger_mode = trigger_mode,
)

k8s_resource(
"wormchain-deploy",
resource_deps = ["wormchain"],
labels = ["wormchain"],
trigger_mode = trigger_mode,
)

if ibc_relayer:
docker_build(
Expand Down
35 changes: 35 additions & 0 deletions devnet/wormchain.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,38 @@ spec:
path: /
periodSeconds: 5
restartPolicy: Always
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
labels:
app: wormchain-deploy
name: wormchain-deploy
spec:
selector:
matchLabels:
app: wormchain-deploy
replicas: 1
updateStrategy:
type: RollingUpdate
template:
metadata:
labels:
app: wormchain-deploy
spec:
containers:
- name: wormchain-deploy
image: wormchain-deploy
command:
- /bin/sh
- -c
- "npm run deploy-wormchain --prefix=/app/tools && touch /app/tools/success && sleep infinity"
readinessProbe:
exec:
command:
- test
- -e
- "/app/tools/success"
initialDelaySeconds: 5
periodSeconds: 5
restartPolicy: Always

0 comments on commit 15f4858

Please sign in to comment.