Install docker + workarounds
@@ -10,8 +10,9 @@ jobs:
- DISTROS: "trusty xenial el6 el7"
- ST2_PACKAGES_REPO: https://github.com/StackStorm/st2-packages
- DEPLOY_PACKAGES: 0
- #- DOCKER_COMPOSE_VERSION: 1.14.0
- - DOCKER_COMPOSE_VERSION: 1.9.0
+ - DOCKER_VERSION: 17.03.0-ce
+ - DOCKER_COMPOSE_VERSION: 1.14.0
+ - COMPOSE_FILE: docker-compose.circle2.yml
steps:
- checkout
- setup_remote_docker:
@@ -23,6 +24,11 @@ jobs:
set -x
apt-get update
apt-get install -y curl git bash
+ # install docker client
+ curl -L -o /tmp/docker-${DOCKER_VERSION}.tgz https://get.docker.com/builds/Linux/x86_64/docker-${DOCKER_VERSION}.tgz
+ tar -xz -C /tmp -f /tmp/docker-${DOCKER_VERSION}.tgz
+ mv /tmp/docker/* /usr/bin
+ # install docker compose
curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
@@ -45,7 +51,7 @@ jobs:
name: Copy st2-packages files to build containers
command: |
# creating dummy container which will hold a volume with data files
- docker create -v /root/st2-packages --name st2-packages-vol alpine:3.4 /bin/true
+ docker create -v /root/st2-packages -v /root/build -v /var/log/st2 -v /var/log/mistral --name st2-packages-vol alpine:3.4 /bin/true
# copy st2-packages data files into this volume
docker cp ~/st2-packages st2-packages-vol:/root
@@ -54,6 +60,15 @@ jobs:
command: docker-compose run trusty build
working_directory: ~/st2-packages
+ - run:
+ name: Copy produced artifacts back
+ command: |
+ # once application container finishes we can copy artifacts directly from it
+ docker cp st2packages_trusty_run_2:/root/build /tmp/st2-packages
+ docker cp st2-packages-vol:/root/build /tmp/st2-packages
+ docker cp st2-packages-vol:/var/log/st2 /tmp/st2-packages/log/st2
+ docker cp st2-packages-vol:/var/log/mistral /tmp/st2-packages/log/mistral
+
- run:
name: Test the packages
command: docker-compose run trusty test
