@@ -37,115 +37,106 @@ jobs:
37
37
with :
38
38
path : ~/go/pkg/mod
39
39
key : ${{ runner.os }}-build-${{ hashFiles('**/go.sum') }}
40
- - name : Install bee-local
41
- run : |
42
- export URL=$(curl -s https://api.github.com/repos/ethersphere/bee-local/releases/latest | jq -r .tarball_url)
43
- curl -Ls ${URL} -o bee-local.tar.gz
44
- tar --strip-components=1 --wildcards -xzf bee-local.tar.gz ethersphere-bee-local-*/{beeinfra.sh,helm-values,hack}
45
- - name : Install latest beekeeper
46
- run : |
47
- export TAG=$(curl -s https://api.github.com/repos/ethersphere/beekeeper/releases/latest | jq -r .tag_name)
48
- curl -Ls https://github.com/ethersphere/beekeeper/releases/download/${TAG}/beekeeper-linux-amd64 -o beekeeper
49
- chmod +x beekeeper
50
- - name : Prepare testing cluster (DNS discovery)
40
+ - name : Prepare local cluster
51
41
run : |
52
42
printf ${{ secrets.CR_PAT }} | docker login ghcr.io -u bee-worker --password-stdin
53
- timeout 30m ./beeinfra.sh prepare --geth --k3s
43
+ make beekeeper BEEKEEPER_INSTALL_DIR=/usr/local/bin BEEKEEPER_USE_SUDO=true
44
+ timeout 10m make beelocal OPTS='ci skip-vet'
54
45
- name : Set kube config
55
46
run : |
56
47
mkdir -p ~/.kube
57
48
cp /etc/rancher/k3s/k3s.yaml ~/.kube/config
58
- echo "kubeconfig: ${HOME}/.kube/config" > ~/.beekeeper.yaml
59
49
- name : Apply patches
60
50
run : |
61
51
patch pkg/postage/batchstore/reserve.go .github/patches/postagereserve.patch
62
52
patch pkg/postage/postagecontract/contract.go .github/patches/postagecontract.patch
63
53
patch pkg/postage/listener/listener.go .github/patches/listener.patch
64
- - name : Set testing cluster (DNS discovery)
54
+ - name : Set local cluster
65
55
run : |
66
- echo -e "127.0.0.10\tregistry.localhost" | sudo tee -a /etc/hosts
67
- for ((i=0; i<REPLICA; i++)); do echo -e "127.0.1.$((i+1))\tbee-${i}.localhost bee-${i}-debug.localhost"; done | sudo tee -a /etc/hosts
68
- timeout 30m ./beeinfra.sh install --local -r "${REPLICA}" --bootnode /dnsaddr/localhost --geth --k3s --pay-threshold 1500000000000 --postage
56
+ make beelocal ACTION=add-hosts
57
+ timeout 10m make deploylocal BEEKEEPER_CLUSTER=local-dns
69
58
- name : Test pingpong
70
59
id : pingpong-1
71
- run : until ./ beekeeper check pingpong --api-scheme http --debug-api-scheme http --disable-namespace --debug-api-domain localhost --api-domain localhost --node-count "${REPLICA}" ; do echo "waiting for pingpong..."; sleep .3; done
60
+ run : until beekeeper check --cluster-name local-dns --checks ci-pingpong ; do echo "waiting for pingpong..."; sleep .3; done
72
61
- name : Test fullconnectivity
73
62
id : fullconnectivity-1
74
- run : ./ beekeeper check fullconnectivity --api-scheme http --debug-api-scheme http --disable-namespace --debug-api-domain localhost --api-domain localhost --node-count "${REPLICA}"
63
+ run : beekeeper check --cluster-name local-dns --checks=ci-full-connectivity
75
64
- name : Test settlements
76
65
id : settlements-1
77
- run : |
78
- ./beekeeper check settlements --api-scheme http --debug-api-scheme http --disable-namespace --debug-api-domain localhost --api-domain localhost --node-count "${REPLICA}" --upload-node-count "${REPLICA}" -t 1500000000000
79
- sleep 2
66
+ run : beekeeper check --cluster-name local-dns --checks=ci-settlements
67
+ - name : Sleep for time allowance to replenish
68
+ run : sleep 2
80
69
- name : Test pss
81
70
id : pss
82
- run : ./ beekeeper check pss --api-scheme http --debug-api-scheme http --disable-namespace --debug-api-domain localhost --api-domain localhost --node-count "${REPLICA}" --timeout 5m
71
+ run : beekeeper check --cluster-name local-dns --checks=ci-pss
83
72
- name : Test soc
84
73
id : soc
85
- run : ./ beekeeper check soc --api-scheme http --debug-api-scheme http --disable-namespace --debug-api-domain localhost --api-domain localhost --node-count "${REPLICA}"
74
+ run : beekeeper check --cluster-name local-dns --checks=ci-soc
86
75
- name : Test pushsync (chunks)
87
76
id : pushsync-chunks-1
88
- run : ./ beekeeper check pushsync --api-scheme http --debug-api-scheme http --disable-namespace --debug-api-domain localhost --api-domain localhost --node-count "${REPLICA}" --upload-node-count "${REPLICA}" -- chunks-per-node 3 --upload-chunks --retry-delay 15s
77
+ run : beekeeper check --cluster-name local-dns --checks=ci-pushsync- chunks
89
78
- name : Test retrieval
90
79
id : retrieval-1
91
- run : ./ beekeeper check retrieval --api-scheme http --debug-api-scheme http --disable-namespace --debug-api-domain localhost --api-domain localhost --node-count "${REPLICA}" --upload-node-count "${REPLICA}" --chunks-per-node 3
80
+ run : beekeeper check --cluster-name local-dns --checks=ci-retrieval
92
81
- name : Test manifest
93
82
id : manifest-1
94
- run : ./ beekeeper check manifest --api-scheme http --debug-api-scheme http --disable-namespace --debug-api-domain localhost --api-domain localhost --node-count "${REPLICA}"
83
+ run : beekeeper check --cluster-name local-dns --checks=ci-manifest
95
84
- name : Destroy the cluster
96
85
run : |
97
- ./beeinfra.sh uninstall
86
+ beekeeper delete bee-cluster --cluster-name local-dns
87
+ make beelocal ACTION=uninstall
98
88
- name : Prepare testing cluster (Node connection and clef enabled)
99
89
run : |
100
- timeout 30m ./beeinfra.sh prepare --geth --clef --k3s
90
+ timeout 10m make beelocal OPTS='ci skip-vet'
101
91
- name : Set kube config
102
92
run : |
103
93
mkdir -p ~/.kube
104
94
cp /etc/rancher/k3s/k3s.yaml ~/.kube/config
105
95
- name : Set testing cluster (Node connection and clef enabled)
106
96
run : |
107
- timeout 30m ./beeinfra.sh install -- local -r "${REPLICA}" --geth -- clef --k3s --pay-threshold 1500000000000 --postage
97
+ timeout 10m make deploylocal BEEKEEPER_CLUSTER= local- clef
108
98
- name : Test pingpong
109
99
id : pingpong-2
110
- run : until ./ beekeeper check pingpong --api-scheme http --debug-api-scheme http --disable-namespace --debug-api-domain localhost --api-domain localhost --node-count "${REPLICA}" ; do echo "waiting for pingpong..."; sleep .3; done
100
+ run : until beekeeper check --cluster-name local-clef --checks ci-pingpong ; do echo "waiting for pingpong..."; sleep .3; done
111
101
- name : Test fullconnectivity
112
102
id : fullconnectivity-2
113
- run : ./ beekeeper check fullconnectivity --api-scheme http --debug-api-scheme http --disable-namespace --debug-api-domain localhost --api-domain localhost --node-count "${REPLICA}"
103
+ run : beekeeper check --cluster-name local-clef --checks=ci-full-connectivity
114
104
- name : Test settlements
115
105
id : settlements-2
116
- run : ./ beekeeper check settlements --api-scheme http --debug-api-scheme http --disable-namespace --debug-api-domain localhost --api-domain localhost --node-count "${REPLICA}" --upload-node-count "${REPLICA}" -t 1500000000000
106
+ run : beekeeper check --cluster-name local-clef --checks=ci-settlements-clef
117
107
- name : Destroy the cluster
118
108
run : |
119
- ./beeinfra.sh uninstall
109
+ beekeeper delete bee-cluster --cluster-name local-clef
110
+ make beelocal ACTION=uninstall
120
111
- name : Apply patches
121
112
run : |
122
113
patch pkg/postage/batchstore/reserve.go .github/patches/postagereserve_gc.patch
123
114
- name : Prepare testing cluster (storage incentives setup)
124
115
run : |
125
- timeout 10m ./beeinfra.sh prepare --geth --k3s
116
+ timeout 10m make beelocal OPTS='ci skip-vet'
126
117
- name : Set kube config
127
118
run : |
128
119
mkdir -p ~/.kube
129
120
cp /etc/rancher/k3s/k3s.yaml ~/.kube/config
130
121
- name : Set testing cluster (storage incentives setup)
131
122
run : |
132
- timeout 10m ./beeinfra.sh install --local -r "${REPLICA}" --geth --k3s --pay-threshold 1500000000000 --postage --db-capacity 100
123
+ timeout 10m make deploylocal BEEKEEPER_CLUSTER=local-gc
124
+ - name : Test pingpong
125
+ id : pingpong-3
126
+ run : until beekeeper check --cluster-name local-gc --checks ci-pingpong; do echo "waiting for pingpong..."; sleep .3; done
133
127
- name : Test gc
134
128
id : gc-chunk-1
135
- run : ./beekeeper check gc --cache-capacity 100 --api-scheme http --debug-api-scheme http --disable-namespace --debug-api-domain localhost --api-domain localhost --node-count "${REPLICA}"
136
- - name : Destroy the cluster
137
- run : |
138
- ./beeinfra.sh uninstall
129
+ run : beekeeper check --cluster-name local-gc --checks=ci-gc
139
130
- name : Retag Docker image and push for cache
140
131
if : success()
141
132
run : |
142
- docker tag registry.localhost:5000/ethersphere/bee:latest ghcr.io/ethersphere/bee
133
+ docker tag k3d- registry.localhost:5000/ethersphere/bee:latest ghcr.io/ethersphere/bee
143
134
docker push ghcr.io/ethersphere/bee
144
135
- name : Retag Docker image and push
145
136
if : github.ref == 'refs/heads/master' && github.event.action != 'beekeeper' && success()
146
137
run : |
147
- docker tag registry.localhost:5000/ethersphere/bee:latest ethersphere/bee:latest
148
- docker tag registry.localhost:5000/ethersphere/bee:latest quay.io/ethersphere/bee:latest
138
+ docker tag k3d- registry.localhost:5000/ethersphere/bee:latest ethersphere/bee:latest
139
+ docker tag k3d- registry.localhost:5000/ethersphere/bee:latest quay.io/ethersphere/bee:latest
149
140
printf ${{ secrets.DOCKERHUB_PASSWORD }} | docker login --username ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
150
141
printf ${{ secrets.QUAY_PASSWORD }} | docker login --username ${{ secrets.QUAY_USERNAME }} quay.io --password-stdin
151
142
docker push ethersphere/bee:latest
@@ -172,12 +163,13 @@ jobs:
172
163
if ${{ steps.pushsync-chunks-1.outcome=='failure' }}; then FAILED=pushsync-chunks-1; fi
173
164
if ${{ steps.retrieval-1.outcome=='failure' }}; then FAILED=retrieval-1; fi
174
165
if ${{ steps.manifest-1.outcome=='failure' }}; then FAILED=manifest-1; fi
175
- if ${{ steps.gc-chunk-1.outcome=='failure' }}; then FAILED=gc-chunk-1; fi
176
166
if ${{ steps.pingpong-2.outcome=='failure' }}; then FAILED=pingpong-2; fi
177
167
if ${{ steps.fullconnectivity-2.outcome=='failure' }}; then FAILED=fullconnectivity-2; fi
178
168
if ${{ steps.settlements-2.outcome=='failure' }}; then FAILED=settlements-2; fi
179
169
if ${{ steps.pss.outcome=='failure' }}; then FAILED=pss; fi
180
170
if ${{ steps.soc.outcome=='failure' }}; then FAILED=soc; fi
171
+ if ${{ steps.pingpong-3.outcome=='failure' }}; then FAILED=pingpong-3; fi
172
+ if ${{ steps.gc-chunk-1.outcome=='failure' }}; then FAILED=gc-chunk-1; fi
181
173
KEYS=$(curl -sSf -X POST https://eu.relay.tunshell.com/api/sessions)
182
174
curl -sSf -X POST -H "Content-Type: application/json" -d "{\"text\": \"**${RUN_TYPE}** ${{ github.head_ref }}\nFailed -> \`${FAILED}\`\nDebug -> \`sh <(curl -sSf https://lets.tunshell.com/init.sh) L $(echo $KEYS | jq -r .peer2_key) \${TUNSHELL_SECRET} eu.relay.tunshell.com\`\"}" https://beehive.ethswarm.org/hooks/${{ secrets.WEBHOOK_KEY }}
183
175
echo "Failed test: ${FAILED}"
0 commit comments