|
35 | 35 | - name: Checkout repository
|
36 | 36 | uses: actions/checkout@v4
|
37 | 37 |
|
| 38 | + - name: Create k3d cluster (Local k8s) |
| 39 | + uses: AbsaOSS/k3d-action@v2 |
| 40 | + with: |
| 41 | + # Assumption: only one PR can run per machine at a time. |
| 42 | + cluster-name: "consolidated-system-test" |
| 43 | + args: >- |
| 44 | + --verbose |
| 45 | + --agents 1 |
| 46 | + --no-lb |
| 47 | + --wait |
| 48 | + --timeout 120s |
| 49 | + - uses: ./.github/actions/bootstrap |
| 50 | + with: |
| 51 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
| 52 | + |
38 | 53 | # Install rust components.
|
39 | 54 | - uses: ./.github/actions/bootstrap
|
40 | 55 | with:
|
@@ -93,3 +108,34 @@ jobs:
|
93 | 108 | echo "Generating Kubernetes manifests using deployment config at: ${{ env.deployment_config_path }}:"
|
94 | 109 | cat "${{ env.deployment_config_path }}"
|
95 | 110 | cdk8s synth --app "pipenv run python main.py --namespace ${{ env.namespace }} --deployment-config-file ${{ env.deployment_config_path }}"
|
| 111 | +
|
| 112 | + - name: Deploy Sequencer |
| 113 | + working-directory: deployments/sequencer |
| 114 | + run: | |
| 115 | + echo "Deploying Sequencer..." |
| 116 | + kubectl create namespace ${{ env.namespace }} |
| 117 | + kubectl apply -R -f ./dist/ |
| 118 | +
|
| 119 | + - name: Set default namespace |
| 120 | + run: kubectl config set-context --current --namespace ${{ env.namespace }} |
| 121 | + |
| 122 | + - name: Get container logs |
| 123 | + if: always() |
| 124 | + run: | |
| 125 | + echo "📥 Getting pod logs and descriptions from namespace: $namespace" |
| 126 | +
|
| 127 | + # List all pods in the namespace |
| 128 | + kubectl get pods -n "$namespace" |
| 129 | +
|
| 130 | + # For each pod, get logs and description |
| 131 | + for pod in $(kubectl get pods -n "$namespace" -o jsonpath='{.items[*].metadata.name}'); do |
| 132 | + echo "---------------------------------------------" |
| 133 | + echo "Logs for pod: $pod" |
| 134 | + kubectl logs -n "$namespace" "$pod" || echo "⚠️ Failed to get logs for $pod" |
| 135 | +
|
| 136 | + echo "" |
| 137 | + echo "Description for pod: $pod" |
| 138 | + kubectl describe pod -n "$namespace" "$pod" || echo "⚠️ Failed to describe pod $pod" |
| 139 | + echo "---------------------------------------------" |
| 140 | + echo "" |
| 141 | + done |
0 commit comments