Skip to content

Commit f365ce3

Browse files
feat(deployment): add sequencer deployment stage to system test workflow
1 parent f48c73b commit f365ce3

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
@@ -33,6 +33,21 @@ jobs:
3333
- name: Checkout repository
3434
uses: actions/checkout@v4
3535

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

0 commit comments

Comments
 (0)