initial pass at switching to herokuish. closes #1091

This commit is contained in:
Michael Hobbs committed 2015-07-06 12:41:54 -07:00
1 parent aa55f027a4
commit 0840d8fd1f
19 files changed
+93 -89

No files matched your search

+9 -9
View File
@@ -11,14 +11,14 @@ case "$1" in
pushd "$TMP_WORK_DIR" &> /dev/null
case "$IMAGE_SOURCE_TYPE" in
buildstep)
herokuish)
id=$(tar -c . | docker run -i -a stdin $DOKKU_IMAGE /bin/bash -c "mkdir -p /app && tar -xC /app")
test "$(docker wait $id)" -eq 0
docker commit $id $IMAGE > /dev/null
[[ -d $CACHE_DIR ]] || mkdir $CACHE_DIR
# *DEPRECATED* in v0.4.0: `pluginhook pre-build` will be removed in future releases
pluginhook pre-build "$APP"
pluginhook pre-build-buildstep "$APP"
pluginhook pre-build-herokuish "$APP"
# *DEPRECATED* in v0.3.14: `pluginhook docker-args` will be removed in future releases
# https://github.com/progrium/dokku/issues/896 & https://github.com/progrium/dokku/issues/906
@@ -31,7 +31,7 @@ case "$1" in
# *DEPRECATED* in v0.4.0: `pluginhook post-build` will be removed in future releases
pluginhook post-build "$APP"
pluginhook post-build-buildstep "$APP"
pluginhook post-build-herokuish "$APP"
;;
dockerfile)
@@ -39,7 +39,7 @@ case "$1" in
DOCKERFILE_PORT=$(grep EXPOSE Dockerfile | head -1 | awk '{ print $2 }' || true)
[[ -n "$DOCKERFILE_PORT" ]] && dokku config:set-norestart $APP DOKKU_DOCKERFILE_PORT=$DOCKERFILE_PORT
# buildstep pluginhooks don't necessarily make sense for dockerfiles. call the new breed!!!
# herokuish pluginhooks don't necessarily make sense for dockerfiles. call the new breed!!!
pluginhook pre-build-dockerfile "$APP"
[[ "$DOKKU_DOCKERFILE_CACHE_BUILD" == "false" ]] && DOKKU_DOCKER_BUILD_OPTS="$DOKKU_DOCKER_BUILD_OPTS --no-cache"
@@ -57,10 +57,10 @@ case "$1" in
release)
APP="$2"; IMAGE="dokku/$APP"; IMAGE_SOURCE_TYPE="$3"
case "$IMAGE_SOURCE_TYPE" in
buildstep)
herokuish)
# *DEPRECATED* in v0.4.0: `pluginhook pre-release` will be removed in future releases
pluginhook pre-release "$APP"
pluginhook pre-release-buildstep "$APP"
pluginhook pre-release-herokuish "$APP"
if [[ -f "$DOKKU_ROOT/ENV" ]]; then
id=$(docker run -i -a stdin $IMAGE /bin/bash -c "mkdir -p /app/.profile.d && cat > /app/.profile.d/00-global-env.sh" < "$DOKKU_ROOT/ENV")
test "$(docker wait $id)" -eq 0
@@ -73,11 +73,11 @@ case "$1" in
fi
# *DEPRECATED* in v0.4.0: `pluginhook post-release` will be removed in future releases
pluginhook post-release "$APP"
pluginhook post-release-buildstep "$APP"
pluginhook post-release-herokuish "$APP"
;;
dockerfile)
# buildstep pluginhooks don't necessarily make sense for dockerfiles. call the new breed!!!
# herokuish pluginhooks don't necessarily make sense for dockerfiles. call the new breed!!!
pluginhook pre-release-dockerfile "$APP"
pluginhook post-release-dockerfile "$APP"
;;
@@ -170,7 +170,7 @@ case "$1" in
DOCKER_ARGS+=$(: | pluginhook docker-args-run $APP)
[[ $DOKKU_RM_CONTAINER ]] && DOKKU_RUN_OPTS="--rm"
has_tty && DOKKU_RUN_OPTS+=" -i -t"
is_image_buildstep_based "$IMAGE" && EXEC_CMD="/exec"
is_image_herokuish_based "$IMAGE" && EXEC_CMD="/exec"
docker run $DOKKU_RUN_OPTS $DOCKER_ARGS $IMAGE $EXEC_CMD "$@"
;;