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 29, 2020
1 parent d0fa334 commit beb5805
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ version: 2.1
jobs:
build:
working_directory: ~/cwa-server
docker:
- image: circleci/openjdk:11-jdk
machine:
image: ubuntu-1604:201903-01
# docker:
# - image: circleci/openjdk:11-jdk
steps:
- checkout
- run:
Expand All @@ -22,9 +24,15 @@ 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 run
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
38 changes: 38 additions & 0 deletions docker-compose-it.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
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 cwa --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
- /var/run/docker.sock:/var/run/docker.sock
- ~/.m2:/root/.m2
volumes:
objectstore_volume:

0 comments on commit beb5805

Please sign in to comment.