Skip to content

Commit

Permalink
Fixed circle.yml (cache)
Browse files Browse the repository at this point in the history
  • Loading branch information
Warchant committed Jan 19, 2017
1 parent f6401e8 commit 54dddfc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ machine:
java:
version: 'oraclejdk8'


checkout:
post:
- git submodule sync
Expand All @@ -20,9 +19,11 @@ dependencies:
- ~/docker
override:
# one way to cache iroha-dev container is to save it to tar image. 2 mins vs 10 mins without caching.
- if [[ -e ~/docker/iroha-dev.tar ]]; then docker load -i ~/docker/iroha-dev.tar; fi
# build iroha-dev (if it is in cache, this step will be skipped) and iroha-docker (production) images
- ${IROHA_HOME}/docker/build.sh
- if [[ -e ~/docker/iroha-dev.tar ]]; then docker load -i ~/docker/iroha-dev.tar; else docker build --rm=false -t hyperledger/iroha-dev ${IROHA_HOME}/docker/dev; fi
# build iroha. Result of this instruction is ${IROHA_HOME}/docker/build/iroha.tar
- docker run -i -v ${IROHA_HOME}/docker/build:/build -v ${IROHA_HOME}:/opt/iroha hyperledger/iroha-dev sh <<< "cd /opt/iroha; /build-iroha.sh || exit 2; /mktar-iroha.sh || exit 3; cp /tmp/iroha.tar /build/iroha.tar || exit 4"
# build iroha-docker image
- docker build --rm=false -t hyperledger/iroha-docker ${IROHA_HOME}/docker/build
# cache iroha-dev image. takes 30 sec to save into file
- mkdir -p ~/docker; docker save hyperledger/iroha-dev > ~/docker/iroha-dev.tar

Expand All @@ -42,4 +43,3 @@ deployment:
commands:
- docker login -u ${DOCKER_USER} -p ${DOCKER_PASS}
- docker push hyperledger/iroha-docker

0 comments on commit 54dddfc

Please sign in to comment.