Adding caching of buildcontainer

This commit is contained in:
Torkel Ödegaard 2015-03-07 13:46:27 +01:00
parent 5b563e3841
commit 0a82b75f2a
3 changed files with 20 additions and 7 deletions

View File

@ -7,6 +7,11 @@ machine:
REPO_PATH: "${ORG_PATH}/grafana" REPO_PATH: "${ORG_PATH}/grafana"
dependencies: dependencies:
cache_directories:
- "~/docker"
pre:
./docker/buildcontainer/build_circle.sh
override: override:
- rm -rf ${GOPATH}/src/${REPO_PATH} - rm -rf ${GOPATH}/src/${REPO_PATH}
- mkdir -p ${GOPATH}/src/${ORG_PATH} - mkdir -p ${GOPATH}/src/${ORG_PATH}
@ -25,4 +30,4 @@ deployment:
branch: develop branch: develop
owner: grafana owner: grafana
commands: commands:
- ./docker/buildcontainer/build_circle.sh - ./docker/buildcontainer/run_circle.sh

View File

@ -1,10 +1,13 @@
#!/bin/bash #!/bin/bash
docker kill gfbuild docker info && docker version
docker rm gfbuild mkdir -p ~/docker
# cache some Docker images to make builds faster
if [[ -e ~/docker/centos.tar ]]; then
docker load -i ~/docker/centos.tar;
else
docker build --tag "grafana/buildcontainer" docker/buildcontainer
fi
docker build --tag "grafana/buildcontainer" docker/buildcontainer
docker run -i -t \
-v /home/ubuntu/.go_workspace:/go \
--name gfbuild grafana/buildcontainer

View File

@ -0,0 +1,5 @@
#!/bin/bash
docker run -i -t \
-v /home/ubuntu/.go_workspace:/go \
--name gfbuild grafana/buildcontainer