Hello,
we would like to run integration tests using docker-compose, however we have not been able to get it to run on circleci. The volumes for docker-compose -f docker-compose-it.yaml run run-tests are not populated with the files and it fails with no found pom.xml. In the documentation, it is possible to populate the volumes, but how to use them in docker-compose? The docker compose looks like following:
version: '3'
services:
objectstore:
image: "zenko/cloudserver"
volumes:
- objectstore_volume:/data
ports:
- "8003:8000"
environment:
ENDPOINT: objectstore
REMOTE_MANAGEMENT_DISABLE: 1
SCALITY_ACCESS_KEY_ID: ${OBJECTSTORE_ACCESSKEY}
SCALITY_SECRET_ACCESS_KEY: ${OBJECTSTORE_SECRETKEY}
create-bucket:
image: amazon/aws-cli
environment:
- AWS_ACCESS_KEY_ID=${OBJECTSTORE_ACCESSKEY}
- AWS_SECRET_ACCESS_KEY=${OBJECTSTORE_SECRETKEY}
command: aws s3api create-bucket --bucket test --endpoint-url http://objectstore:8000 --acl public-read
depends_on:
- objectstore
run-tests:
stop_signal: SIGKILL
working_dir: $PWD
environment:
- CWA_OBJECTSTORE_ENDPOINT=http://objectstore
- CWA_OBJECTSTORE_PORT=8000
depends_on:
- objectstore
- create-bucket
image: maven:3.6.3-jdk-11
command: mvn failsafe:integration-test --batch-mode package
volumes:
- $PWD:$PWD
- ~/.m2:/root/.m2
volumes:
objectstore_volume:
and the config:
[...]
- setup_remote_docker:
docker_layer_caching: true
- run:
name: Run all tests on Docker
command: |
docker-compose -f docker-compose-it.yaml up -d objectstore
docker-compose -f docker-compose-it.yaml up -d create-bucket
docker-compose -f docker-compose-it.yaml run run-tests
[...]
Any help is appreciated, thanks!