Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Commit

Permalink
Docker object store on circle ci
Browse files Browse the repository at this point in the history
  • Loading branch information
johanneseschrig committed Jun 23, 2020
1 parent d0fa334 commit 1783ae6
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,16 @@ jobs:
paths:
- ~/.m2
key: cwa-server-{{ checksum "~/pom-checksum" }}
- setup_remote_docker:
docker_layer_caching: true
- run:
name: Test and Package
command: mvn failsafe:integration-test --batch-mode package
name: Run all tests on Docker
command: |
docker create --network cwa-server_default -v /app --name volume alpine:3.4 /bin/true
docker cp . volume:/app
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
- run:
name: Save test results
command: |
Expand Down
37 changes: 37 additions & 0 deletions docker-compose-it.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
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}
# entrypoint: ["/root/scripts/wait-for-it/wait-for-it.sh", "objectstore:8000", "-t", "30", "--"]
# volumes:
# - ./scripts/wait-for-it:/root/scripts/wait-for-it
command: aws s3api create-bucket --bucket cwa --endpoint-url http://objectstore:8000 --acl public-read
depends_on:
- objectstore
run-tests:
environment:
- CWA_OBJECTSTORE_ENDPOINT=http://objectstore
- CWA_OBJECTSTORE_PORT=8000
depends_on:
- objectstore
- create-bucket
image: maven:3.6.3-jdk-11
command: mvn -f app/pom.xml failsafe:integration-test --batch-mode package
volumes:
- /home/circleci/cwa-server/:/app
volumes:
objectstore_volume:

0 comments on commit 1783ae6

Please sign in to comment.