Skip to content

Commit aa5feaf

Browse files
feat(deployment): add sequencer deployment stage to system test workflow
1 parent 6fddf89 commit aa5feaf

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/consolidated_system_test.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,21 @@ jobs:
3535
- name: Checkout repository
3636
uses: actions/checkout@v4
3737

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+
3853
# Install rust components.
3954
- uses: ./.github/actions/bootstrap
4055
with:
@@ -93,3 +108,34 @@ jobs:
93108
echo "Generating Kubernetes manifests using deployment config at: ${{ env.deployment_config_path }}:"
94109
cat "${{ env.deployment_config_path }}"
95110
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

Comments
 (0)