Skip to content

Commit

Permalink
Merge pull request #126 from glimchb/ci
Browse files Browse the repository at this point in the history
ci: add tacklebox validation to ci
  • Loading branch information
mraineri committed Apr 19, 2024
2 parents 8da867e + d87fd7c commit 869ae70
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 21 deletions.
28 changes: 10 additions & 18 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,18 @@ jobs:
- uses: docker/setup-buildx-action@v3.0.0
- name: Start containers
run: docker-compose up --build --force-recreate --detach
- name: Verify no-ssl success
- name: Verify all tests completed successfully
run: |
set -x
name=$(docker-compose ps | grep test | grep -v ssl | awk '{print $1}')
rc=$(docker wait "${name}")
if [ "${rc}" != "0" ]; then
echo "test failed:"
docker logs "${name}"
exit 1
fi
- name: Verify ssl success
run: |
set -x
name=$(docker-compose ps | grep test-ssl | awk '{print $1}')
rc=$(docker wait "${name}")
if [ "${rc}" != "0" ]; then
echo "test-ssl failed:"
docker logs "${name}"
exit 1
fi
for testname in test-curl-nossl test-curl-ssl test-utils-nossl test-utils-ssl; do
name=$(docker-compose ps | grep ${testname} | awk '{print $1}')
rc=$(docker wait "${name}")
if [ "${rc}" != "0" ]; then
echo "test failed:"
docker logs "${name}"
exit 1
fi
done
- name: Logs
if: always()
run: docker-compose logs
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ services:
networks:
- dmtf

test:
test-curl-nossl:
image: docker.io/curlimages/curl:8.5.0
depends_on:
bmc:
Expand All @@ -21,7 +21,7 @@ services:
- dmtf
command: ["--fail", "-i", "-H", "Accept:application/yang-data+json", "http://bmc:8000/redfish/v1/Managers"]

test-utils:
test-utils-nossl:
image: docker.io/dmtf/redfish-tacklebox:latest
depends_on:
bmc:
Expand Down Expand Up @@ -59,7 +59,7 @@ services:
healthcheck:
test: curl --insecure --fail https://localhost:9000/redfish/

test-ssl:
test-curl-ssl:
image: docker.io/curlimages/curl:8.5.0
depends_on:
bmc-ssl:
Expand Down

0 comments on commit 869ae70

Please sign in to comment.