github.com/susy-go/susy-graviton@v0.0.0-20190614130430-36cddae42305/circle.yml (about) 1 machine: 2 services: 3 - docker 4 5 dependencies: 6 cache_directories: 7 - "~/.sofash" # Cache the sofash DAG generated by hive for consecutive builds 8 - "~/.docker" # Cache all docker images manually to avoid lengthy rebuilds 9 override: 10 # Restore all previously cached docker images 11 - mkdir -p ~/.docker 12 - for img in `ls ~/.docker`; do docker load -i ~/.docker/$img; done 13 14 # Pull in and hive, restore cached sofash DAGs and do a dry run 15 - go get -u github.com/karalabe/hive 16 - (cd ~/.go_workspace/src/github.com/karalabe/hive && mkdir -p workspace/sofash/ ~/.sofash) 17 - (cd ~/.go_workspace/src/github.com/karalabe/hive && cp -r ~/.sofash/. workspace/sofash/) 18 - (cd ~/.go_workspace/src/github.com/karalabe/hive && hive --docker-noshell --client=NONE --test=. --sim=. --loglevel=6) 19 20 # Cache all the docker images and the sofash DAGs 21 - for img in `docker images | grep -v "^<none>" | tail -n +2 | awk '{print $1}'`; do docker save $img > ~/.docker/`echo $img | tr '/' ':'`.tar; done 22 - cp -r ~/.go_workspace/src/github.com/karalabe/hive/workspace/sofash/. ~/.sofash 23 24 test: 25 override: 26 # Build Graviton and move into a known folder 27 - make graviton 28 - cp ./build/bin/graviton $HOME/graviton 29 30 # Run hive and move all generated logs into the public artifacts folder 31 - (cd ~/.go_workspace/src/github.com/karalabe/hive && hive --docker-noshell --client=susy-graviton:local --override=$HOME/graviton --test=. --sim=.) 32 - cp -r ~/.go_workspace/src/github.com/karalabe/hive/workspace/logs/* $CIRCLE_ARTIFACTS