Manual batch e2e #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Manual batch e2e | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| batch_size: | |
| description: "Number of ChainInstances applied per batch" | |
| default: "5" | |
| ready_timeout: | |
| description: "Per-batch timeout (seconds) waiting for height>0" | |
| default: "600" | |
| chains_filter: | |
| description: "Regex applied to sample filenames (empty = all)" | |
| default: "" | |
| jobs: | |
| batch: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 350 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Free disk space | |
| run: | | |
| df -h / | |
| sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL || true | |
| sudo docker image prune -af || true | |
| df -h / | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| - name: Install kind | |
| run: | | |
| curl -Lo ./kind https://kind.sigs.k8s.io/dl/latest/kind-linux-amd64 | |
| chmod +x ./kind | |
| sudo mv ./kind /usr/local/bin/kind | |
| kind version | |
| - name: Install yq | |
| run: | | |
| sudo curl -Lo /usr/local/bin/yq \ | |
| https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 | |
| sudo chmod +x /usr/local/bin/yq | |
| yq --version | |
| - name: Install helm | |
| uses: azure/setup-helm@v4 | |
| - name: Create kind cluster | |
| run: kind create cluster --config scripts/kind-batch.yaml --wait 120s | |
| - name: Install cert-manager | |
| run: | | |
| kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.16.3/cert-manager.yaml | |
| kubectl wait --for=condition=Available -n cert-manager deploy --all --timeout=180s | |
| - name: Build operator image | |
| run: | | |
| docker build -t chainplane:e2e . | |
| kind load docker-image chainplane:e2e | |
| - name: Install chart | |
| run: | | |
| helm install chainplane ./charts/chainplane \ | |
| -n chainplane-system --create-namespace \ | |
| --set image.repository=chainplane \ | |
| --set image.tag=e2e \ | |
| --set image.pullPolicy=Never \ | |
| --set webhook.certManager.enabled=true \ | |
| --set replicaCount=1 \ | |
| --set leaderElection.enabled=false | |
| kubectl -n chainplane-system rollout status deploy/chainplane --timeout=180s | |
| - name: Apply ChainVersionCatalog samples | |
| run: kubectl apply -f config/samples/chains_v1alpha2_chainversioncatalog.yaml | |
| - name: Run batch test | |
| env: | |
| STORAGE_CLASS: standard | |
| BATCH_SIZE: ${{ inputs.batch_size }} | |
| READY_TIMEOUT: ${{ inputs.ready_timeout }} | |
| CHAINS_FILTER: ${{ inputs.chains_filter }} | |
| run: bash scripts/manual-batch-test.sh | |
| - name: Collect controller logs on failure | |
| if: failure() | |
| run: | | |
| mkdir -p artifacts | |
| kubectl -n chainplane-system logs -l control-plane=controller-manager --tail=2000 > artifacts/controller.log 2>&1 || true | |
| kubectl -n chainplane-batch get events --sort-by=.lastTimestamp > artifacts/events.log 2>&1 || true | |
| kubectl get chaininstances -A -o yaml > artifacts/chaininstances.yaml 2>&1 || true | |
| - name: Upload artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: batch-e2e-artifacts | |
| path: artifacts/ |