1
0
mirror of https://github.com/zokradonh/kopano-docker.git synced 2026-08-11 16:32:59 +00:00

fail make target when docker wait returns with non zero output (#184)

just install python3-minimal in base
clear apt key todo
rework test-ci to fail when the test containers exits with error code != 1
This commit is contained in:
Felix Bartels
2019-06-15 19:21:54 +02:00
committed by GitHub
parent aa2b8332dd
commit adfbfeb4a3
9 changed files with 16 additions and 36 deletions
+4 -6
View File
@@ -344,15 +344,13 @@ test: ## Build and start new containers for testing (also deletes existing data
test-update-env: ## Recreate containers based on updated .env.
docker-compose -f $(DOCKERCOMPOSE_FILE) up -d
.PHONY: test-ci
test-ci: ## Test if all containers start up
docker-compose -f $(DOCKERCOMPOSE_FILE) -f tests/test-container.yml build
docker-compose -f $(DOCKERCOMPOSE_FILE) -f tests/test-container.yml up -d
docker-compose -f $(DOCKERCOMPOSE_FILE) -f tests/test-container.yml ps
# TODO this just echos the exit code of the kopano_test container. if this is not 0 we should do something with it.
docker wait kopano_test_1
docker logs --tail 10 kopano_test_1
docker-compose -f $(DOCKERCOMPOSE_FILE) up -d
docker-compose -f $(DOCKERCOMPOSE_FILE) ps
docker-compose -f $(DOCKERCOMPOSE_FILE) -f tests/test-container.yml run test || (docker-compose -f $(DOCKERCOMPOSE_FILE) -f tests/test-container.yml down -v; exit 1)
docker-compose -f $(DOCKERCOMPOSE_FILE) -f tests/test-container.yml stop 2>/dev/null
docker rm kopano_test_1
test-security: ## Scan containers with Trivy for known security risks (not part of CI workflow for now).
cat $(TAG_FILE) | xargs -I % sh -c 'trivy --exit-code 0 --severity HIGH --quiet --auto-refresh %'