-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
78 lines (67 loc) · 2.01 KB
/
Taskfile.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
77
78
version: '3'
env:
PRIVATE_KEY: "0xac1e735be8536c6534bb4f17f06f6afc73b2b5ba84ac2cfb12f7461b20c0bbe3"
tasks:
cargo-run:
cmds:
- cargo run
env:
ZKSYNC_API_URL: http://localhost:3050
ZKSYNC_WS_URL: ws://localhost:3051
IPFS_BASE_URL: http://localhost:5001
CHECK_ID: false
destroy-local:
cmds:
- helm uninstall node-ecosystem --wait || true
- kubectl delete pvc --all || true
- kubectl delete pv --all || true
- colima stop || true
start-local:
cmds:
- task build-images
- task: start-k8s
- task: deploy-ecosystem
env:
BUILD: '{{ .BUILD }}'
deploy-ecosystem:
cmds:
- helm upgrade --install --wait --timeout 10m --set node.privateKey=$PRIVATE_KEY --set node.checkID=false node-ecosystem helm_chart/
- helm test node-ecosystem
start-k8s:
cmds:
- cp colima.yaml ~/.colima/_templates/colima.yaml
# set explicit --disk for storage (is 60g rn try 30g)
- colima start --cpu 3 --memory 5 --runtime containerd --kubernetes
# run check to see if cluster is up instead of sleeping for 5 seconds
- sleep 5
status:
- colima status
build-images:
cmds:
# do start stop stuff controled by env var so you dont always have to do it
- colima stop || true
- colima start --arch x86_64 --cpu 4 --memory 10 --disk 30 --runtime containerd
- task compile-contract
- nerdctl build -f images/toolbox.Dockerfile . -t toolbox:latest --namespace k8s.io
- nerdctl build -f images/node.Dockerfile . -t node:latest --namespace k8s.io
- colima stop
env:
BUILD: true
status:
- |
if [ "$BUILD" != "true" ]
then
echo Skipping building Dockerfiles
exit 0
else
echo Building Dockerfiles...
exit 1
fi
compile-contract:
dir: 'contract'
cmds:
- yarn install
- yarn hardhat compile
integration-test:
cmds:
- ./scripts/integration_test.sh