Preserve cache directory between builds
This commit is contained in:
1 parent
7b74935210
commit
6350f373be
2 files changed
+5
-3
No files matched your search
+2
-1
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
## 0.2.0 (in progress)
|
## 0.2.0 (in progress)
|
||||||
|
|
||||||
|
* Cache dir is preserved across builds
|
||||||
* Application config (environment variable management)
|
* Application config (environment variable management)
|
||||||
* Basic hooks/plugin system
|
* Basic hooks/plugin system
|
||||||
* Exposed commands over SSH using sshcommand
|
* Exposed commands over SSH using sshcommand
|
||||||
@@ -17,4 +18,4 @@
|
|||||||
* Bootstrap script for Ubuntu system
|
* Bootstrap script for Ubuntu system
|
||||||
* Basic push / deploy with git
|
* Basic push / deploy with git
|
||||||
* Hostname support with Nginx
|
* Hostname support with Nginx
|
||||||
* Support for Java, Ruby, Node.js buildpacks
|
* Support for Java, Ruby, Node.js buildpacks
|
||||||
@@ -23,12 +23,13 @@ case "$1" in
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
build)
|
build)
|
||||||
APP="$2"; IMAGE="$3"
|
APP="$2"; IMAGE="$3"; CACHE_DIR="$HOME/$APP/cache"
|
||||||
id=$(cat | docker run -i -a stdin progrium/buildstep /bin/bash -c "mkdir -p /app && tar -xC /app")
|
id=$(cat | docker run -i -a stdin progrium/buildstep /bin/bash -c "mkdir -p /app && tar -xC /app")
|
||||||
test $(docker wait $id) -eq 0
|
test $(docker wait $id) -eq 0
|
||||||
docker commit $id $IMAGE > /dev/null
|
docker commit $id $IMAGE > /dev/null
|
||||||
|
[[ -d $CACHE_DIR ]] || mkdir $CACHE_DIR
|
||||||
pluginhook pre-build $APP $IMAGE
|
pluginhook pre-build $APP $IMAGE
|
||||||
id=$(docker run -d $IMAGE /build/builder)
|
id=$(docker run -d -v $CACHE_DIR:/cache $IMAGE /build/builder)
|
||||||
docker attach $id
|
docker attach $id
|
||||||
test $(docker wait $id) -eq 0
|
test $(docker wait $id) -eq 0
|
||||||
docker commit $id $IMAGE > /dev/null
|
docker commit $id $IMAGE > /dev/null
|
||||||
|
|||||||
Reference in new issue
Block a user