Skip to content

Fixing some jobs

Fixing some jobs #12

Workflow file for this run

name: Run integration checkout test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
checkout-test:
runs-on: ubuntu-latest
container:
image: registry.access.redhat.com/ubi8/ubi:8.6
env:
DOCKER_BUILDKIT: "1"
AUTHNZ_EMU: "1"
ANMS_COMPOSE_OPTS: "-f docker-compose.yml -p anms"
AGENT_COMPOSE_OPTS: "-f agent-compose.yml -p agents"
steps:
- name: Setup OS
run: |
dnf install -y git
dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
dnf install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin
docker info
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
- run: find anms-ui/ -name '*.json'
- name: Build
run: |
./build.sh buildonly
./create_volume.sh ./puppet/modules/apl_test/files/anms/tls
- name: Start
run: |
for OPTS_NAME in ANMS_COMPOSE_OPTS AGENT_COMPOSE_OPTS; do
docker-compose ${!OPTS_NAME} up --detach --force-recreate
done
sleep 5
- name: Status
run: |
for BADSTATUS in stopped restarting; do
docker-compose ${ANMS_COMPOSE_OPTS} ps --services --filter status=${BADSTATUS} | tee -a /tmp/notgood
done
# Show hints at what may be wrong
for SERVNAME in $(cat /tmp/notgood); do
docker-compose ${ANMS_COMPOSE_OPTS} logs --tail 50 ${SERVNAME}
done
# Fail if any names are in the file
! grep '[^[:space:]]' /tmp/notgood
- name: Test
run: |
# Checkout the running gateway+backend
docker build -t checkout-test checkout-test
docker 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