@@ -303,23 +303,57 @@ jobs:
303303 - name : Cleanup cache
304304 uses : ./.github/actions/post-cache
305305
306- - name : Trigger Indexer deployment workflow
307- run : |
308- curl -X POST 'https://api.github.com/repos/Cardinal-Cryptography/indexer/actions/workflows/build-and-deploy-to-devnet.yml/dispatches' \
309- -H "Accept: application/vnd.github+json" \
310- -H 'Authorization: Bearer ${{ secrets.CI_GH_TOKEN }}' \
311- -d '{ "ref":"master" }'
306+ - name : GIT | Checkout aleph-apps repo
307+ uses : actions/checkout@master
308+ with :
309+ repository : Cardinal-Cryptography/aleph-apps
310+ token : ${{ secrets.CI_GH_TOKEN }}
311+ path : " aleph-apps"
312+ ref : main
313+
314+ - name : KUSTOMIZE | Init kustomize
315+ uses : imranismail/setup-kustomize@v1
316+ with :
317+ kustomize-version : ' 3.8.6'
312318
313- - name : Setup kubectl
319+ - name : KUBECTL | Setup kubectl
314320 uses : azure/setup-kubectl@v2.0
315321 with :
316322 version : ' v1.23.6'
317323
318- - name : Restart the-button deployment
324+ - name : INDEXER | Destroy archive and squid apps
319325 shell : bash
320326 run : |
321327 aws eks --region eu-central-1 update-kubeconfig --name alephzero-devnet-eu-central-1-eks
328+ kubectl delete -n indexer-squid --ignore-not-found=true deploy squid-api
329+ kubectl delete -n indexer-squid --ignore-not-found=true deploy squid-processor
330+ kubectl delete -n indexer-archive --ignore-not-found=true deploy archive-gateway
331+ kubectl delete -n indexer-archive --ignore-not-found=true deploy archive-ingest
332+
333+ - name : INDEXER | Create archive db and archive apps
334+ shell : bash
335+ run : |
336+ kubectl rollout restart statefulset archive-db -n indexer-archive
337+ kubectl rollout status --watch --timeout=600s -n indexer-archive statefulset/archive-db
338+ cd aleph-apps/indexer/archive/overlays/devnet/eu-central-1
339+ kustomize build . | kubectl apply -f -
340+ sleep 3
341+ kubectl rollout status --watch --timeout=600s -n indexer-archive deploy/archive-ingest
342+ kubectl rollout status --watch --timeout=600s -n indexer-archive deploy/archive-gateway
343+
344+ - name : INDEXER | Create squid db and squid apps
345+ shell : bash
346+ run : |
347+ kubectl rollout restart statefulset squid-db -n indexer-squid
348+ kubectl rollout status --watch --timeout=600s -n indexer-squid statefulset/squid-db
349+ cd aleph-apps/indexer/squid/overlays/devnet/eu-central-1
350+ kustomize build . | kubectl apply -f -
351+ sleep 3
352+ kubectl rollout status --watch --timeout=600s -n indexer-squid deploy/squid-processor
353+ kubectl rollout status --watch --timeout=600s -n indexer-squid deploy/squid-api
354+
355+ - name : BUTTON | Restart the-button deployment
356+ shell : bash
357+ run : |
322358 kubectl rollout restart deployment the-button -n the-button
323359 kubectl rollout status --watch --timeout=600s -n the-button deploy/the-button
324-
325- # TODO : Here the workflow should wait for a hook that notifies this workflow when the two prior steps have been finished succesfully
0 commit comments