Skip to content

Commit cd1f7ae

Browse files
feat(deployment): add sequencer deployment stage to system test workflow
1 parent 3a29f08 commit cd1f7ae

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/consolidated_system_test.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,20 @@ 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+
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+
3650
# Install rust components.
3751
- uses: ./.github/actions/bootstrap
3852
with:
@@ -88,3 +102,34 @@ jobs:
88102
echo "Generating Kubernetes manifests using deployment config at: ${{ env.deployment_config_path }}:"
89103
cat "${{ env.deployment_config_path }}"
90104
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

Comments
 (0)