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