88 - cron : ' 0 0 * * 0' # weekly
99
1010jobs :
11- checkout-test :
11+ podman- checkout-test :
1212 runs-on : ubuntu-latest
1313 env :
1414 DOCKER_BUILDKIT : " 1"
15- AUTHNZ_EMU : " 1 "
15+ AUTHNZ_EMU : " authnz-emu "
1616 ANMS_COMPOSE_OPTS : " -f docker-compose.yml -p anms"
1717 AGENT_COMPOSE_OPTS : " -f agent-compose.yml -p agents"
18+ DOCKER_CMD : " podman"
19+ AUTHNZ_PORT : 8084
20+ AUTHNZ_HTTPS_PORT : 8443
21+ steps :
22+ - name : Start Podman API Service
23+ run : |
24+ systemctl --user start podman.socket
25+ systemctl --user enable podman.socket
26+ export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/podman/podman.sock
27+ - name : Versions
28+ run : |
29+ podman -v
30+ podman ps
31+ podman compose ls
32+ - name : Checkout repository
33+ uses : actions/checkout@v4
34+ with :
35+ submodules : recursive
36+ - name : Tag name env
37+ run : |
38+ DOCKER_IMAGE_TAG=$(echo ${{ github.head_ref || github.ref_name }} | sed 's/[^a-zA-Z0-9\-\._]/-/g')
39+ echo "DOCKER_IMAGE_TAG=${DOCKER_IMAGE_TAG}" >> $GITHUB_ENV
40+ - name : Debug GitHub workspace
41+ run : |
42+ echo "GITHUB_WORKSPACE=${{ github.workspace }}"
43+ ls -al ${{ github.workspace }}
44+ - name : Build Main
45+ run : podman compose build
46+ - name : Build Agents
47+ run : podman compose -f agent-compose.yml build
48+ - name : Build Volume
49+ run : |
50+ ./create_volume.sh ./puppet/modules/apl_test/files/anms/tls
51+ - name : Start
52+ run : |
53+ podman compose up -d --force-recreate
54+ podman compose -f agent-compose.yml up -d --force-recreate
55+ sleep 5
56+ - name : Status
57+ run : |
58+ for BADSTATUS in stopped restarting; do
59+ podman compose ${ANMS_COMPOSE_OPTS} ps --services --filter status=${BADSTATUS} | tee -a /tmp/notgood
60+ done
61+ # Show hints at what may be wrong
62+ for SERVNAME in $(cat /tmp/notgood); do
63+ podman compose ${ANMS_COMPOSE_OPTS} logs --tail 50 ${SERVNAME}
64+ done
65+ # Fail if any names are in the file
66+ ! grep '[^[:space:]]' /tmp/notgood
67+ - name : Test
68+ run : |
69+ # Checkout the running gateway+backend
70+ podman build -t checkout-test checkout-test
71+ podman run --network anms -v $PWD:/mnt -e XUNIT_OUTFILE=/mnt/testresults.xml -e CHECKOUT_BASE_URL=http://authnz/ -e SSL_CERT_FILE=/mnt/puppet/modules/apl_test/files/anms/tls/certs/ammos-ca-bundle.crt checkout-test
72+ - name : Stop
73+ if : always()
74+ run : |
75+ for OPTS_NAME in ANMS_COMPOSE_OPTS AGENT_COMPOSE_OPTS; do
76+ podman compose ${!OPTS_NAME} rm --stop --force
77+ done
78+ docker-checkout-test :
79+ runs-on : ubuntu-latest
80+ env :
81+ DOCKER_BUILDKIT : " 1"
82+ AUTHNZ_EMU : " authnz-emu"
83+ ANMS_COMPOSE_OPTS : " -f docker-compose.yml -p anms"
84+ AGENT_COMPOSE_OPTS : " -f agent-compose.yml -p agents"
85+ DOCKER_CMD : " docker"
1886 steps :
1987 - name : Versions
2088 run : |
@@ -29,15 +97,21 @@ jobs:
2997 run : |
3098 DOCKER_IMAGE_TAG=$(echo ${{ github.head_ref || github.ref_name }} | sed 's/[^a-zA-Z0-9\-\._]/-/g')
3199 echo "DOCKER_IMAGE_TAG=${DOCKER_IMAGE_TAG}" >> $GITHUB_ENV
32- - name : Build
100+ - name : Debug GitHub workspace
101+ run : |
102+ echo "GITHUB_WORKSPACE=${{ github.workspace }}"
103+ ls -al ${{ github.workspace }}
104+ - name : Build Main
105+ run : docker compose build
106+ - name : Build Agents
107+ run : docker compose -f agent-compose.yml build
108+ - name : Build Volume
33109 run : |
34- ./build.sh buildonly
35110 ./create_volume.sh ./puppet/modules/apl_test/files/anms/tls
36111 - name : Start
37112 run : |
38- for OPTS_NAME in ANMS_COMPOSE_OPTS AGENT_COMPOSE_OPTS; do
39- docker compose ${!OPTS_NAME} up --detach --force-recreate
40- done
113+ docker compose up -d --force-recreate
114+ docker compose -f agent-compose.yml up -d --force-recreate
41115 sleep 5
42116 - name : Status
43117 run : |
0 commit comments