Skip to content

Decouple SSH configuration from password provisioning #225

Decouple SSH configuration from password provisioning

Decouple SSH configuration from password provisioning #225

Workflow file for this run

name: "E2E Testing"
permissions:
contents: read
pull-requests: write
on:
pull_request:
branches:
- main
types: [opened, synchronize, reopened]
jobs:
e2e-test:
strategy:
fail-fast: false
matrix:
container:
- ubuntu:24.04
- debian:13
- mcr.microsoft.com/azurelinux/base/core:3.0
name: Testinit E2E
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Make start-all.sh executable
run: chmod +x testinit/start-all.sh testinit/stop-all.sh
- name: Run E2E tests
run: |
pushd testinit
echo "Starting E2E test environment with base image: ${{ matrix.container }}"
./start-all.sh "${{ matrix.container }}"
- name: Check service health
run: |
echo "Checking if services are running..."
docker ps -a
- name: Print provisioning agent logs
if: always()
run: |
pushd testinit
# Capture logs to a file (and also print them). Ignore non-zero exit status so checks still run.
docker compose logs provisioning-agent > provisioning_agent_logs.txt 2>&1 || true
cat provisioning_agent_logs.txt
# Fail only if a single line contains both "azure-init" and "failed"/"failure" (case-insensitive).
if grep -i 'azure-init' provisioning_agent_logs.txt | grep -Ei 'failed|failure' >/dev/null; then
echo "ERROR: provisioning-agent logs contain a line with 'azure-init' and failure indicators."
exit 1
fi
- name: Print testing server logs
if: always()
run: |
pushd testinit/testing-server
docker compose logs testing-server || echo "No testing-server logs yet"
popd
- name: Output KVP telemetry
if: always()
run: |
docker exec azureinit-provisioning-agent cat /var/lib/hyperv/.kvp_pool_1
- name: Output Azure-init log
if: always()
run: |
docker exec azureinit-provisioning-agent cat /var/log/azure-init.log
- name: Cleanup - Stop all services
if: always()
working-directory: testinit
run: |
echo "Cleaning up services..."
./stop-all.sh && echo "Cleanup completed"