-
Notifications
You must be signed in to change notification settings - Fork 382
feat(ci): add integration tests for AutoTLS in Beekeeper workflow #5350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 7 commits
4420011
00c4ec7
23279ad
2b2b653
9ccf744
8ca3b1e
282665c
31a1d0d
a81b30f
b25030a
3f59296
1102828
00c7a11
13c104e
32c3a15
19df6a0
7fdabb3
d09d15c
a8da204
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,8 +13,8 @@ env: | |
| RUN_TYPE: "PR RUN" | ||
| SETUP_CONTRACT_IMAGE: "ethersphere/bee-localchain" | ||
| SETUP_CONTRACT_IMAGE_TAG: "0.9.4" | ||
| BEELOCAL_BRANCH: "main" | ||
| BEEKEEPER_BRANCH: "master" | ||
| BEELOCAL_BRANCH: "akrem/p2p-wss-support-v2" # TODO: change to main (temporary testing branch) | ||
| BEEKEEPER_BRANCH: "feat/autotls-cluster" # TODO: change to master (temporary testing branch) | ||
| BEEKEEPER_METRICS_ENABLED: false | ||
| REACHABILITY_OVERRIDE_PUBLIC: true | ||
| BATCHFACTOR_OVERRIDE_PUBLIC: 2 | ||
|
|
@@ -25,6 +25,7 @@ env: | |
| AWS_EC2_METADATA_DISABLED: true | ||
| AWS_ENDPOINT: fra1.digitaloceanspaces.com | ||
| VERTAG: ${GITHUB_RUN_ID} | ||
| P2P_WSS_ENABLE: true | ||
| jobs: | ||
| init: | ||
| name: Init | ||
|
|
@@ -34,15 +35,9 @@ jobs: | |
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
| if: github.event.action != 'beekeeper' | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
| if: github.event.action == 'beekeeper' | ||
| with: | ||
| fetch-depth: 0 | ||
| ref: ${{ github.event.client_payload.ref }} | ||
| ref: ${{ github.event.action == 'beekeeper' && github.event.client_payload.ref || github.sha }} | ||
| - name: Setup Go | ||
| uses: actions/setup-go@v6 | ||
| with: | ||
|
|
@@ -99,6 +94,11 @@ jobs: | |
| runs-on: ubuntu-latest | ||
| needs: [init] | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| fetch-depth: 0 | ||
| ref: ${{ github.event.action == 'beekeeper' && github.event.client_payload.ref || github.sha }} | ||
| - name: Cache | ||
| uses: actions/cache@v4 | ||
| with: | ||
|
|
@@ -113,19 +113,17 @@ jobs: | |
| run: | | ||
| chmod +x bee-1 beekeeper .github/bin/beekeeper_artifacts.sh | ||
| mv .beekeeper.yaml ~/.beekeeper.yaml | ||
| mkdir ~/.beekeeper && mv local.yaml ~/.beekeeper/local.yaml | ||
| mkdir -p ~/.beekeeper && mv local.yaml ~/.beekeeper/local.yaml | ||
| mv bee-1 bee | ||
| sudo mv beekeeper /usr/local/bin/beekeeper | ||
| - name: Prepare local cluster | ||
| run: | | ||
| timeout ${TIMEOUT} make beelocal OPTS='ci skip-vet' ACTION=prepare | ||
| run: timeout ${TIMEOUT} make beelocal OPTS='ci skip-vet' ACTION=prepare | ||
| - name: Set kube config | ||
| run: | | ||
| mkdir -p ~/.kube | ||
| cp /etc/rancher/k3s/k3s.yaml ~/.kube/config | ||
| - name: Set local cluster | ||
| run: | | ||
| timeout ${TIMEOUT} make deploylocal BEEKEEPER_CLUSTER=local-dns | ||
| run: timeout ${TIMEOUT} make deploylocal BEEKEEPER_CLUSTER=local-dns | ||
| - name: Test pingpong | ||
| id: pingpong | ||
| run: timeout ${TIMEOUT} bash -c 'until beekeeper check --cluster-name local-dns --checks ci-pingpong; do echo "waiting for pingpong..."; sleep .3; done' | ||
|
|
@@ -182,8 +180,8 @@ jobs: | |
| - name: Test feeds | ||
| id: feeds | ||
| run: timeout ${TIMEOUT} beekeeper check --cluster-name local-dns --checks=ci-feed | ||
| - name: Collect debug artifacts | ||
| if: failure() | ||
| - name: Collect debug artifacts (local-dns) | ||
| if: failure() && (steps.pingpong.outcome == 'failure' || steps.fullconnectivity.outcome == 'failure' || steps.settlements.outcome == 'failure' || steps.pss.outcome == 'failure' || steps.soc.outcome == 'failure' || steps.gsoc.outcome == 'failure' || steps.pushsync-chunks-1.outcome == 'failure' || steps.pushsync-chunks-2.outcome == 'failure' || steps.retrieval.outcome == 'failure' || steps.manifest.outcome == 'failure' || steps.manifest-v1.outcome == 'failure' || steps.postage-stamps.outcome == 'failure' || steps.stake.outcome == 'failure' || steps.withdraw.outcome == 'failure' || steps.redundancy.outcome == 'failure' || steps.act.outcome == 'failure' || steps.feeds.outcome == 'failure' || steps.feeds-v1.outcome == 'failure') | ||
| run: | | ||
| bash .github/bin/beekeeper_artifacts.sh local-dns | ||
| export FAILED='no-test' | ||
|
|
@@ -211,10 +209,40 @@ jobs: | |
| echo "sh <(curl -sSf https://lets.tunshell.com/init.sh) L $(echo $KEYS | jq -r .peer2_key) \${TUNSHELL_SECRET} eu.relay.tunshell.com" | ||
| curl -sSf https://lets.tunshell.com/init.sh | sh /dev/stdin T $(echo $KEYS | jq -r .peer1_key) ${{ secrets.TUNSHELL_SECRET }} eu.relay.tunshell.com | ||
| - uses: actions/upload-artifact@v4 | ||
| if: failure() | ||
| if: failure() && (steps.pingpong.outcome == 'failure' || steps.fullconnectivity.outcome == 'failure' || steps.settlements.outcome == 'failure' || steps.pss.outcome == 'failure' || steps.soc.outcome == 'failure' || steps.gsoc.outcome == 'failure' || steps.pushsync-chunks-1.outcome == 'failure' || steps.pushsync-chunks-2.outcome == 'failure' || steps.retrieval.outcome == 'failure' || steps.manifest.outcome == 'failure' || steps.manifest-v1.outcome == 'failure' || steps.postage-stamps.outcome == 'failure' || steps.stake.outcome == 'failure' || steps.withdraw.outcome == 'failure' || steps.redundancy.outcome == 'failure' || steps.act.outcome == 'failure' || steps.feeds.outcome == 'failure' || steps.feeds-v1.outcome == 'failure') | ||
akrem-chabchoub marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| with: | ||
| name: debug-dump | ||
| path: dump/ | ||
| - name: Set local cluster (local-dns-autotls) | ||
| run: timeout ${TIMEOUT} make deploylocal BEEKEEPER_CLUSTER=local-dns-autotls | ||
| - name: Test pingpong (autotls) | ||
| id: pingpong-autotls | ||
| run: timeout ${TIMEOUT} bash -c 'until beekeeper check --cluster-name local-dns-autotls --checks ci-pingpong; do echo "waiting for pingpong..."; sleep .3; done' | ||
| - name: Test fullconnectivity (autotls) | ||
| id: fullconnectivity-autotls | ||
| run: timeout ${TIMEOUT} bash -c 'until beekeeper check --cluster-name local-dns-autotls --checks=ci-full-connectivity; do echo "waiting for full connectivity..."; sleep .3; done' | ||
| - name: Test retrieval (autotls) | ||
| id: retrieval-autotls | ||
| run: timeout ${TIMEOUT} beekeeper check --cluster-name local-dns-autotls --checks=ci-retrieval | ||
| - name: Test autotls | ||
| id: autotls | ||
| run: timeout ${TIMEOUT} beekeeper check --cluster-name local-dns-autotls --checks=ci-autotls | ||
| - name: Collect debug artifacts (autotls) | ||
| if: failure() && (steps.pingpong-autotls.outcome == 'failure' || steps.fullconnectivity-autotls.outcome == 'failure' || steps.retrieval-autotls.outcome == 'failure' || steps.autotls.outcome == 'failure') | ||
| run: | | ||
| bash .github/bin/beekeeper_artifacts.sh local-dns-autotls | ||
| export FAILED='no-test' | ||
| if ${{ steps.pingpong-autotls.outcome=='failure' }}; then FAILED=pingpong; fi | ||
| if ${{ steps.fullconnectivity-autotls.outcome=='failure' }}; then FAILED=fullconnectivity; fi | ||
| if ${{ steps.retrieval-autotls.outcome=='failure' }}; then FAILED=retrieval; fi | ||
| if ${{ steps.autotls.outcome=='failure' }}; then FAILED=autotls; fi | ||
| curl -sSf -X POST -H "Content-Type: application/json" -d "{\"text\": \"**${RUN_TYPE}** Beekeeper Autotls Error\nBranch: \`${{ github.head_ref }}\`\nUser: @${{ github.event.pull_request.user.login }}\nDebugging artifacts: [click](https://$BUCKET_NAME.$AWS_ENDPOINT/artifacts_$VERTAG.tar.gz)\nStep failed: \`${FAILED}\`\"}" https://beehive.ethswarm.org/hooks/${{ secrets.TUNSHELL_KEY }} | ||
|
||
| echo "Failed test: ${FAILED}" | ||
| - uses: actions/upload-artifact@v4 | ||
| if: failure() && (steps.pingpong-autotls.outcome == 'failure' || steps.fullconnectivity-autotls.outcome == 'failure' || steps.retrieval-autotls.outcome == 'failure' || steps.autotls.outcome == 'failure') | ||
|
||
| with: | ||
| name: debug-dump-autotls | ||
| path: dump/ | ||
| retag: | ||
| name: Retag and Trigger ArgoCD | ||
| env: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line are super long, can we just use
if: failure()?