10
10
- cron : ' 0 0 * * 0' # weekly
11
11
12
12
jobs :
13
+ podman-checkout-test :
14
+ runs-on : ubuntu-latest
15
+ env :
16
+ DOCKER_BUILDKIT : " 1"
17
+ AUTHNZ_EMU : " 1"
18
+ ANMS_COMPOSE_OPTS : " -f docker-compose.yml -p anms"
19
+ AGENT_COMPOSE_OPTS : " -f agent-compose.yml -p agents"
20
+ steps :
21
+ - name : Versions
22
+ run : |
23
+ podman -v
24
+ podman ps
25
+ podman compose ls
26
+ - name : Checkout repository
27
+ uses : actions/checkout@v4
28
+ with :
29
+ submodules : recursive
30
+ - name : Tag name env
31
+ run : |
32
+ DOCKER_IMAGE_TAG=$(echo ${{ github.head_ref || github.ref_name }} | sed 's/[^a-zA-Z0-9\-\._]/-/g')
33
+ echo "DOCKER_IMAGE_TAG=${DOCKER_IMAGE_TAG}" >> $GITHUB_ENV
34
+ - name : Debug GitHub workspace
35
+ run : |
36
+ echo "GITHUB_WORKSPACE=${{ github.workspace }}"
37
+ ls -al ${{ github.workspace }}
38
+ - name : Build
39
+ run : |
40
+ podman compose build --no-cache
41
+ podman compose -f agent-compose.yml build
42
+ ./create_volume.sh ./puppet/modules/apl_test/files/anms/tls
43
+ - name : Start
44
+ run : |
45
+ podman compose up -d --force-recreate
46
+ podman compose -f agent-compose.yml up -d --force-recreate
47
+ sleep 5
48
+ - name : Status
49
+ run : |
50
+ for BADSTATUS in stopped restarting; do
51
+ podman compose ${ANMS_COMPOSE_OPTS} ps --services --filter status=${BADSTATUS} | tee -a /tmp/notgood
52
+ done
53
+ # Show hints at what may be wrong
54
+ for SERVNAME in $(cat /tmp/notgood); do
55
+ podman compose ${ANMS_COMPOSE_OPTS} logs --tail 50 ${SERVNAME}
56
+ done
57
+ # Fail if any names are in the file
58
+ ! grep '[^[:space:]]' /tmp/notgood
59
+ - name : Test
60
+ run : |
61
+ # Checkout the running gateway+backend
62
+ podman build -t checkout-test checkout-test
63
+ 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
64
+ - name : Stop
65
+ if : always()
66
+ run : |
67
+ for OPTS_NAME in ANMS_COMPOSE_OPTS AGENT_COMPOSE_OPTS; do
68
+ podman compose ${!OPTS_NAME} rm --stop --force
69
+ done
13
70
checkout-test :
14
71
runs-on : ubuntu-latest
15
72
env :
@@ -35,10 +92,10 @@ jobs:
35
92
run : |
36
93
echo "GITHUB_WORKSPACE=${{ github.workspace }}"
37
94
ls -al ${{ github.workspace }}
38
- - name : List Directories
39
- run : find ${{ github.workspace }} -maxdepth 2
40
- - name : Clear Cache
41
- run : rm -rf /home/runner/.cache
95
+ # - name: List Directories
96
+ # run: find ${{ github.workspace }} -maxdepth 2
97
+ # - name: Clear Cache
98
+ # run: rm -rf /home/runner/.cache
42
99
- name : Build
43
100
run : |
44
101
docker compose build --no-cache
0 commit comments