Created
May 6, 2016 11:07
-
-
Save aboutlo/fc4606270429793775a84865b3081383 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@dokku:~# dokku tags:deploy node-example latest | |
+ case "$(lsb_release -si)" in | |
++ lsb_release -si | |
+ export DOKKU_DISTRO=ubuntu | |
+ DOKKU_DISTRO=ubuntu | |
+ export DOKKU_IMAGE=gliderlabs/herokuish | |
+ DOKKU_IMAGE=gliderlabs/herokuish | |
+ export DOKKU_LIB_ROOT=/var/lib/dokku | |
+ DOKKU_LIB_ROOT=/var/lib/dokku | |
+ export PLUGIN_PATH=/var/lib/dokku/plugins | |
+ PLUGIN_PATH=/var/lib/dokku/plugins | |
+ export PLUGIN_AVAILABLE_PATH=/var/lib/dokku/plugins/available | |
+ PLUGIN_AVAILABLE_PATH=/var/lib/dokku/plugins/available | |
+ export PLUGIN_ENABLED_PATH=/var/lib/dokku/plugins/enabled | |
+ PLUGIN_ENABLED_PATH=/var/lib/dokku/plugins/enabled | |
+ export PLUGIN_CORE_PATH=/var/lib/dokku/core-plugins | |
+ PLUGIN_CORE_PATH=/var/lib/dokku/core-plugins | |
+ export PLUGIN_CORE_AVAILABLE_PATH=/var/lib/dokku/core-plugins/available | |
+ PLUGIN_CORE_AVAILABLE_PATH=/var/lib/dokku/core-plugins/available | |
+ export PLUGIN_CORE_ENABLED_PATH=/var/lib/dokku/core-plugins/enabled | |
+ PLUGIN_CORE_ENABLED_PATH=/var/lib/dokku/core-plugins/enabled | |
+ export DOKKU_API_VERSION=1 | |
+ DOKKU_API_VERSION=1 | |
+ export DOKKU_NOT_IMPLEMENTED_EXIT=10 | |
+ DOKKU_NOT_IMPLEMENTED_EXIT=10 | |
+ export DOKKU_VALID_EXIT=0 | |
+ DOKKU_VALID_EXIT=0 | |
+ export DOKKU_LOGS_DIR=/var/log/dokku | |
+ DOKKU_LOGS_DIR=/var/log/dokku | |
+ export DOKKU_EVENTS_LOGFILE=/var/log/dokku/events.log | |
+ DOKKU_EVENTS_LOGFILE=/var/log/dokku/events.log | |
+ export DOKKU_CONTAINER_LABEL=dokku | |
+ DOKKU_CONTAINER_LABEL=dokku | |
+ export DOKKU_GLOBAL_RUN_ARGS=--label=dokku | |
+ DOKKU_GLOBAL_RUN_ARGS=--label=dokku | |
+ source /var/lib/dokku/core-plugins/available/common/functions | |
++ set -eo pipefail | |
++ [[ -n 1 ]] | |
++ set -x | |
+ parse_args tags:deploy node-example latest | |
+ declare 'desc=top-level cli arg parser' | |
+ local next_index=1 | |
+ local skip=false | |
+ args=("$@") | |
+ local args | |
+ for arg in '"$@"' | |
+ false | |
+ case "$arg" in | |
+ local next_index=2 | |
+ for arg in '"$@"' | |
+ false | |
+ case "$arg" in | |
+ local next_index=3 | |
+ for arg in '"$@"' | |
+ false | |
+ case "$arg" in | |
+ local next_index=4 | |
+ return 0 | |
+ args=("$@") | |
+ [[ tags:deploy =~ ^--.* ]] | |
+ has_tty | |
+ declare 'desc=return 0 if we have a tty' | |
++ /usr/bin/tty | |
+ [[ /dev/pts/1 == \n\o\t\ \a\ \t\t\y ]] | |
+ return 0 | |
++ id -un | |
+ [[ root != \d\o\k\k\u ]] | |
+ [[ ! tags:deploy =~ plugin:* ]] | |
++ id -un | |
+ export SSH_USER=root | |
+ SSH_USER=root | |
+ sudo -u dokku -E -H /usr/local/bin/dokku tags:deploy node-example latest | |
+ case "$(lsb_release -si)" in | |
++ lsb_release -si | |
+ export DOKKU_DISTRO=ubuntu | |
+ DOKKU_DISTRO=ubuntu | |
+ export DOKKU_IMAGE=gliderlabs/herokuish | |
+ DOKKU_IMAGE=gliderlabs/herokuish | |
+ export DOKKU_LIB_ROOT=/var/lib/dokku | |
+ DOKKU_LIB_ROOT=/var/lib/dokku | |
+ export PLUGIN_PATH=/var/lib/dokku/plugins | |
+ PLUGIN_PATH=/var/lib/dokku/plugins | |
+ export PLUGIN_AVAILABLE_PATH=/var/lib/dokku/plugins/available | |
+ PLUGIN_AVAILABLE_PATH=/var/lib/dokku/plugins/available | |
+ export PLUGIN_ENABLED_PATH=/var/lib/dokku/plugins/enabled | |
+ PLUGIN_ENABLED_PATH=/var/lib/dokku/plugins/enabled | |
+ export PLUGIN_CORE_PATH=/var/lib/dokku/core-plugins | |
+ PLUGIN_CORE_PATH=/var/lib/dokku/core-plugins | |
+ export PLUGIN_CORE_AVAILABLE_PATH=/var/lib/dokku/core-plugins/available | |
+ PLUGIN_CORE_AVAILABLE_PATH=/var/lib/dokku/core-plugins/available | |
+ export PLUGIN_CORE_ENABLED_PATH=/var/lib/dokku/core-plugins/enabled | |
+ PLUGIN_CORE_ENABLED_PATH=/var/lib/dokku/core-plugins/enabled | |
+ export DOKKU_API_VERSION=1 | |
+ DOKKU_API_VERSION=1 | |
+ export DOKKU_NOT_IMPLEMENTED_EXIT=10 | |
+ DOKKU_NOT_IMPLEMENTED_EXIT=10 | |
+ export DOKKU_VALID_EXIT=0 | |
+ DOKKU_VALID_EXIT=0 | |
+ export DOKKU_LOGS_DIR=/var/log/dokku | |
+ DOKKU_LOGS_DIR=/var/log/dokku | |
+ export DOKKU_EVENTS_LOGFILE=/var/log/dokku/events.log | |
+ DOKKU_EVENTS_LOGFILE=/var/log/dokku/events.log | |
+ export DOKKU_CONTAINER_LABEL=dokku | |
+ DOKKU_CONTAINER_LABEL=dokku | |
+ export DOKKU_GLOBAL_RUN_ARGS=--label=dokku | |
+ DOKKU_GLOBAL_RUN_ARGS=--label=dokku | |
+ source /var/lib/dokku/core-plugins/available/common/functions | |
++ set -eo pipefail | |
++ [[ -n 1 ]] | |
++ set -x | |
+ parse_args tags:deploy node-example latest | |
+ declare 'desc=top-level cli arg parser' | |
+ local next_index=1 | |
+ local skip=false | |
+ args=("$@") | |
+ local args | |
+ for arg in '"$@"' | |
+ false | |
+ case "$arg" in | |
+ local next_index=2 | |
+ for arg in '"$@"' | |
+ false | |
+ case "$arg" in | |
+ local next_index=3 | |
+ for arg in '"$@"' | |
+ false | |
+ case "$arg" in | |
+ local next_index=4 | |
+ return 0 | |
+ args=("$@") | |
+ [[ tags:deploy =~ ^--.* ]] | |
+ has_tty | |
+ declare 'desc=return 0 if we have a tty' | |
++ /usr/bin/tty | |
+ [[ /dev/pts/1 == \n\o\t\ \a\ \t\t\y ]] | |
+ return 0 | |
++ id -un | |
+ [[ dokku != \d\o\k\k\u ]] | |
++ id -un | |
+ [[ dokku != \r\o\o\t ]] | |
+ [[ tags:deploy =~ ^plugin:.* ]] | |
+ [[ -n '' ]] | |
+ dokku_auth tags:deploy node-example latest | |
+ declare 'desc=calls user-auth plugin trigger' | |
+ export SSH_USER=root | |
+ SSH_USER=root | |
+ export SSH_NAME=default | |
+ SSH_NAME=default | |
+ plugn trigger user-auth root default tags:deploy node-example latest | |
+ source /var/lib/dokku/core-plugins/available/common/functions | |
++ set -eo pipefail | |
++ [[ -n 1 ]] | |
++ set -x | |
+ [[ ! -n '' ]] | |
+ return 0 | |
+ case "$1" in | |
+ execute_dokku_cmd tags:deploy node-example latest | |
+ declare 'desc=executes dokku sub-commands' | |
+ local PLUGIN_NAME=tags:deploy | |
+ local PLUGIN_CMD=tags:deploy | |
+ local implemented=0 | |
+ local script | |
+ argv=("$@") | |
+ local argv | |
+ case "$PLUGIN_NAME" in | |
++ readlink -f /var/lib/dokku/plugins/enabled/tags | |
+ [[ /var/lib/dokku/core-plugins/available/tags == *core-plugins* ]] | |
+ [[ tags:deploy == \t\a\g\s\:\d\e\p\l\o\y ]] | |
+ shift 1 | |
+ [[ ! -z '' ]] | |
+ set -- tags:deploy node-example latest | |
+ [[ -x /var/lib/dokku/plugins/enabled/tags:deploy/subcommands/default ]] | |
+ [[ -x /var/lib/dokku/plugins/enabled/tags:deploy/subcommands/tags:deploy ]] | |
+ [[ -x /var/lib/dokku/plugins/enabled/tags/subcommands/deploy ]] | |
+ /var/lib/dokku/plugins/enabled/tags/subcommands/deploy tags:deploy node-example latest | |
+ source /var/lib/dokku/core-plugins/available/common/functions | |
++ set -eo pipefail | |
++ [[ -n 1 ]] | |
++ set -x | |
+ source /var/lib/dokku/plugins/available/tags/functions | |
++ set -eo pipefail | |
++ [[ -n 1 ]] | |
++ set -x | |
++ source /var/lib/dokku/core-plugins/available/common/functions | |
+++ set -eo pipefail | |
+++ [[ -n 1 ]] | |
+++ set -x | |
+ tags_deploy_cmd tags:deploy node-example latest | |
+ declare 'desc=deploys an app with a given tagged image via command line' | |
+ local cmd=tags:deploy | |
+ [[ -z node-example ]] | |
+ local APP=node-example | |
+ local IMAGE_TAG=latest | |
+ verify_app_name node-example | |
+ declare 'desc=verify app name format and app existence' | |
+ local APP=node-example | |
+ [[ ! -n node-example ]] | |
+ [[ ! node-example =~ ^[a-z].* ]] | |
+ [[ ! -d /home/dokku/node-example ]] | |
+ return 0 | |
+ release_and_deploy node-example latest | |
+ declare 'desc=main function for releasing and deploying an app' | |
+ source /var/lib/dokku/plugins/available/config/functions | |
++ set -eo pipefail | |
++ [[ -n 1 ]] | |
++ set -x | |
++ source /var/lib/dokku/core-plugins/available/common/functions | |
+++ set -eo pipefail | |
+++ [[ -n 1 ]] | |
+++ set -x | |
+ local APP=node-example | |
+ local IMAGE_TAG=latest | |
++ get_app_image_name node-example latest | |
++ declare 'desc=return image identifier for a given app, tag tuple. validate if tag is presented' | |
++ local APP=node-example | |
++ local IMAGE_TAG=latest | |
+++ get_app_image_repo node-example | |
+++ declare 'desc=central definition of image repo pattern' | |
+++ local APP=node-example | |
+++ local IMAGE_REPO=dokku/node-example | |
+++ [[ -z node-example ]] | |
+++ echo dokku/node-example | |
++ local IMAGE_REPO=dokku/node-example | |
++ [[ -z node-example ]] | |
++ [[ -n latest ]] | |
++ local IMAGE=dokku/node-example:latest | |
++ verify_image dokku/node-example:latest | |
++ declare 'desc=verify image existence' | |
++ local IMAGE=dokku/node-example:latest | |
++ docker inspect dokku/node-example:latest | |
++ return 0 | |
++ echo dokku/node-example:latest | |
+ local IMAGE=dokku/node-example:latest | |
+ verify_app_name node-example | |
+ declare 'desc=verify app name format and app existence' | |
+ local APP=node-example | |
+ [[ ! -n node-example ]] | |
+ [[ ! node-example =~ ^[a-z].* ]] | |
+ [[ ! -d /home/dokku/node-example ]] | |
+ return 0 | |
+ verify_image dokku/node-example:latest | |
+ declare 'desc=verify image existence' | |
+ local IMAGE=dokku/node-example:latest | |
+ docker inspect dokku/node-example:latest | |
+ return 0 | |
+ is_image_herokuish_based dokku/node-example:latest | |
+ declare 'desc=returns true if app image is based on herokuish' | |
+ [[ ! -f /home/ubuntu/.circlerc ]] | |
+ local DOCKER_ARGS=--rm | |
+ docker run --label=dokku --entrypoint=/bin/sh --rm dokku/node-example:latest -c 'test -f /exec' | |
+ local IMAGE_SOURCE_TYPE=dockerfile | |
++ config_get node-example DOKKU_SKIP_DEPLOY | |
++ declare 'desc=get value of given config var' | |
++ [[ node-example == \c\o\n\f\i\g\:\g\e\t ]] | |
++ set -- config:get node-example DOKKU_SKIP_DEPLOY | |
++ config_parse_args config:get node-example DOKKU_SKIP_DEPLOY | |
++ declare 'desc=parse config plugin args' | |
++ unset APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT | |
++ for var in '"$@"' | |
++ [[ config:get == \-\-\g\l\o\b\a\l ]] | |
++ [[ config:get == \-\-\n\o\-\r\e\s\t\a\r\t ]] | |
++ [[ config:get == \-\-\e\x\p\o\r\t ]] | |
++ [[ config:get == \-\-\s\h\e\l\l ]] | |
++ for var in '"$@"' | |
++ [[ node-example == \-\-\g\l\o\b\a\l ]] | |
++ [[ node-example == \-\-\n\o\-\r\e\s\t\a\r\t ]] | |
++ [[ node-example == \-\-\e\x\p\o\r\t ]] | |
++ [[ node-example == \-\-\s\h\e\l\l ]] | |
++ for var in '"$@"' | |
++ [[ DOKKU_SKIP_DEPLOY == \-\-\g\l\o\b\a\l ]] | |
++ [[ DOKKU_SKIP_DEPLOY == \-\-\n\o\-\r\e\s\t\a\r\t ]] | |
++ [[ DOKKU_SKIP_DEPLOY == \-\-\e\x\p\o\r\t ]] | |
++ [[ DOKKU_SKIP_DEPLOY == \-\-\s\h\e\l\l ]] | |
++ SANITIZED_ARGS=($(get_sanitized_config_args "$@")) | |
+++ get_sanitized_config_args config:get node-example DOKKU_SKIP_DEPLOY | |
+++ local 'desc=return sanitized arguments for config plugin' | |
+++ SANITIZED_ARGS=("$@") | |
+++ local SANITIZED_ARGS | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}") | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}") | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}") | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}") | |
+++ echo config:get node-example DOKKU_SKIP_DEPLOY | |
++ local SANITIZED_ARGS | |
++ set -- config:get node-example DOKKU_SKIP_DEPLOY | |
++ DOKKU_CONFIG_TYPE=app | |
++ DOKKU_CONFIG_RESTART=true | |
++ [[ app == \a\p\p ]] | |
++ [[ -z node-example ]] | |
++ verify_app_name node-example | |
++ declare 'desc=verify app name format and app existence' | |
++ local APP=node-example | |
++ [[ ! -n node-example ]] | |
++ [[ ! node-example =~ ^[a-z].* ]] | |
++ [[ ! -d /home/dokku/node-example ]] | |
++ return 0 | |
++ APP=node-example | |
++ ENV_FILE=/home/dokku/node-example/ENV | |
++ export APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT | |
++ SANITIZED_ARGS=($(get_sanitized_config_args "$@")) | |
+++ get_sanitized_config_args config:get node-example DOKKU_SKIP_DEPLOY | |
+++ local 'desc=return sanitized arguments for config plugin' | |
+++ SANITIZED_ARGS=("$@") | |
+++ local SANITIZED_ARGS | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}") | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}") | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}") | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}") | |
+++ echo config:get node-example DOKKU_SKIP_DEPLOY | |
++ local SANITIZED_ARGS | |
++ set -- config:get node-example DOKKU_SKIP_DEPLOY | |
++ [[ -z node-example ]] | |
++ config_create /home/dokku/node-example/ENV | |
++ declare 'desc=create config env file' | |
++ local ENV_FILE=/home/dokku/node-example/ENV | |
++ [[ -f /home/dokku/node-example/ENV ]] | |
++ [[ ! -s /home/dokku/node-example/ENV ]] | |
++ return 0 | |
+ local DOKKU_APP_SKIP_DEPLOY= | |
++ config_get --global DOKKU_SKIP_DEPLOY | |
++ declare 'desc=get value of given config var' | |
++ [[ --global == \c\o\n\f\i\g\:\g\e\t ]] | |
++ set -- config:get --global DOKKU_SKIP_DEPLOY | |
++ config_parse_args config:get --global DOKKU_SKIP_DEPLOY | |
++ declare 'desc=parse config plugin args' | |
++ unset APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT | |
++ for var in '"$@"' | |
++ [[ config:get == \-\-\g\l\o\b\a\l ]] | |
++ [[ config:get == \-\-\n\o\-\r\e\s\t\a\r\t ]] | |
++ [[ config:get == \-\-\e\x\p\o\r\t ]] | |
++ [[ config:get == \-\-\s\h\e\l\l ]] | |
++ for var in '"$@"' | |
++ [[ --global == \-\-\g\l\o\b\a\l ]] | |
++ ENV_FILE=/home/dokku/ENV | |
++ DOKKU_CONFIG_TYPE=global | |
++ DOKKU_CONFIG_RESTART=false | |
++ [[ --global == \-\-\n\o\-\r\e\s\t\a\r\t ]] | |
++ [[ --global == \-\-\e\x\p\o\r\t ]] | |
++ [[ --global == \-\-\s\h\e\l\l ]] | |
++ for var in '"$@"' | |
++ [[ DOKKU_SKIP_DEPLOY == \-\-\g\l\o\b\a\l ]] | |
++ [[ DOKKU_SKIP_DEPLOY == \-\-\n\o\-\r\e\s\t\a\r\t ]] | |
++ [[ DOKKU_SKIP_DEPLOY == \-\-\e\x\p\o\r\t ]] | |
++ [[ DOKKU_SKIP_DEPLOY == \-\-\s\h\e\l\l ]] | |
++ SANITIZED_ARGS=($(get_sanitized_config_args "$@")) | |
+++ get_sanitized_config_args config:get --global DOKKU_SKIP_DEPLOY | |
+++ local 'desc=return sanitized arguments for config plugin' | |
+++ SANITIZED_ARGS=("$@") | |
+++ local SANITIZED_ARGS | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}") | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}") | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}") | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}") | |
+++ echo config:get '' DOKKU_SKIP_DEPLOY | |
++ local SANITIZED_ARGS | |
++ set -- config:get DOKKU_SKIP_DEPLOY | |
++ DOKKU_CONFIG_TYPE=global | |
++ DOKKU_CONFIG_RESTART=false | |
++ [[ global == \a\p\p ]] | |
++ export APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT | |
++ SANITIZED_ARGS=($(get_sanitized_config_args "$@")) | |
+++ get_sanitized_config_args config:get --global DOKKU_SKIP_DEPLOY | |
+++ local 'desc=return sanitized arguments for config plugin' | |
+++ SANITIZED_ARGS=("$@") | |
+++ local SANITIZED_ARGS | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}") | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}") | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}") | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}") | |
+++ echo config:get '' DOKKU_SKIP_DEPLOY | |
++ local SANITIZED_ARGS | |
++ set -- config:get DOKKU_SKIP_DEPLOY | |
++ [[ -z DOKKU_SKIP_DEPLOY ]] | |
++ config_create /home/dokku/ENV | |
++ declare 'desc=create config env file' | |
++ local ENV_FILE=/home/dokku/ENV | |
++ [[ -f /home/dokku/ENV ]] | |
++ [[ ! -s /home/dokku/ENV ]] | |
++ return 0 | |
+ local DOKKU_GLOBAL_SKIP_DEPLOY= | |
+ local DOKKU_SKIP_DEPLOY= | |
+ dokku_log_info1 'Releasing node-example (dokku/node-example:latest)...' | |
+ declare 'desc=log info1 formatter' | |
+ echo '-----> Releasing node-example (dokku/node-example:latest)...' | |
-----> Releasing node-example (dokku/node-example:latest)... | |
+ dokku release node-example dockerfile latest | |
+ case "$(lsb_release -si)" in | |
++ lsb_release -si | |
+ export DOKKU_DISTRO=ubuntu | |
+ DOKKU_DISTRO=ubuntu | |
+ export DOKKU_IMAGE=gliderlabs/herokuish | |
+ DOKKU_IMAGE=gliderlabs/herokuish | |
+ export DOKKU_LIB_ROOT=/var/lib/dokku | |
+ DOKKU_LIB_ROOT=/var/lib/dokku | |
+ export PLUGIN_PATH=/var/lib/dokku/plugins | |
+ PLUGIN_PATH=/var/lib/dokku/plugins | |
+ export PLUGIN_AVAILABLE_PATH=/var/lib/dokku/plugins/available | |
+ PLUGIN_AVAILABLE_PATH=/var/lib/dokku/plugins/available | |
+ export PLUGIN_ENABLED_PATH=/var/lib/dokku/plugins/enabled | |
+ PLUGIN_ENABLED_PATH=/var/lib/dokku/plugins/enabled | |
+ export PLUGIN_CORE_PATH=/var/lib/dokku/core-plugins | |
+ PLUGIN_CORE_PATH=/var/lib/dokku/core-plugins | |
+ export PLUGIN_CORE_AVAILABLE_PATH=/var/lib/dokku/core-plugins/available | |
+ PLUGIN_CORE_AVAILABLE_PATH=/var/lib/dokku/core-plugins/available | |
+ export PLUGIN_CORE_ENABLED_PATH=/var/lib/dokku/core-plugins/enabled | |
+ PLUGIN_CORE_ENABLED_PATH=/var/lib/dokku/core-plugins/enabled | |
+ export DOKKU_API_VERSION=1 | |
+ DOKKU_API_VERSION=1 | |
+ export DOKKU_NOT_IMPLEMENTED_EXIT=10 | |
+ DOKKU_NOT_IMPLEMENTED_EXIT=10 | |
+ export DOKKU_VALID_EXIT=0 | |
+ DOKKU_VALID_EXIT=0 | |
+ export DOKKU_LOGS_DIR=/var/log/dokku | |
+ DOKKU_LOGS_DIR=/var/log/dokku | |
+ export DOKKU_EVENTS_LOGFILE=/var/log/dokku/events.log | |
+ DOKKU_EVENTS_LOGFILE=/var/log/dokku/events.log | |
+ export DOKKU_CONTAINER_LABEL=dokku | |
+ DOKKU_CONTAINER_LABEL=dokku | |
+ export DOKKU_GLOBAL_RUN_ARGS=--label=dokku | |
+ DOKKU_GLOBAL_RUN_ARGS=--label=dokku | |
+ source /var/lib/dokku/core-plugins/available/common/functions | |
++ set -eo pipefail | |
++ [[ -n 1 ]] | |
++ set -x | |
+ parse_args release node-example dockerfile latest | |
+ declare 'desc=top-level cli arg parser' | |
+ local next_index=1 | |
+ local skip=false | |
+ args=("$@") | |
+ local args | |
+ for arg in '"$@"' | |
+ false | |
+ case "$arg" in | |
+ local next_index=2 | |
+ for arg in '"$@"' | |
+ false | |
+ case "$arg" in | |
+ local next_index=3 | |
+ for arg in '"$@"' | |
+ false | |
+ case "$arg" in | |
+ local next_index=4 | |
+ for arg in '"$@"' | |
+ false | |
+ case "$arg" in | |
+ local next_index=5 | |
+ return 0 | |
+ args=("$@") | |
+ [[ release =~ ^--.* ]] | |
+ has_tty | |
+ declare 'desc=return 0 if we have a tty' | |
++ /usr/bin/tty | |
+ [[ /dev/pts/1 == \n\o\t\ \a\ \t\t\y ]] | |
+ return 0 | |
++ id -un | |
+ [[ dokku != \d\o\k\k\u ]] | |
++ id -un | |
+ [[ dokku != \r\o\o\t ]] | |
+ [[ release =~ ^plugin:.* ]] | |
+ [[ -n '' ]] | |
+ dokku_auth release node-example dockerfile latest | |
+ declare 'desc=calls user-auth plugin trigger' | |
+ export SSH_USER=root | |
+ SSH_USER=root | |
+ export SSH_NAME=default | |
+ SSH_NAME=default | |
+ plugn trigger user-auth root default release node-example dockerfile latest | |
+ source /var/lib/dokku/core-plugins/available/common/functions | |
++ set -eo pipefail | |
++ [[ -n 1 ]] | |
++ set -x | |
+ [[ ! -n '' ]] | |
+ return 0 | |
+ case "$1" in | |
+ execute_dokku_cmd release node-example dockerfile latest | |
+ declare 'desc=executes dokku sub-commands' | |
+ local PLUGIN_NAME=release | |
+ local PLUGIN_CMD=release | |
+ local implemented=0 | |
+ local script | |
+ argv=("$@") | |
+ local argv | |
+ case "$PLUGIN_NAME" in | |
+ local PLUGIN_NAME=00_dokku-standard | |
++ readlink -f /var/lib/dokku/plugins/enabled/00_dokku-standard | |
+ [[ /var/lib/dokku/core-plugins/available/00_dokku-standard == *core-plugins* ]] | |
+ [[ release == \r\e\l\e\a\s\e ]] | |
+ shift 1 | |
+ [[ ! -z '' ]] | |
+ set -- release node-example dockerfile latest | |
+ [[ -x /var/lib/dokku/plugins/enabled/00_dokku-standard/subcommands/default ]] | |
+ [[ -x /var/lib/dokku/plugins/enabled/00_dokku-standard/subcommands/release ]] | |
+ /var/lib/dokku/plugins/enabled/00_dokku-standard/subcommands/release release node-example dockerfile latest | |
+ source /var/lib/dokku/core-plugins/available/common/functions | |
++ set -eo pipefail | |
++ [[ -n 1 ]] | |
++ set -x | |
+ source /var/lib/dokku/plugins/available/config/functions | |
++ set -eo pipefail | |
++ [[ -n 1 ]] | |
++ set -x | |
++ source /var/lib/dokku/core-plugins/available/common/functions | |
+++ set -eo pipefail | |
+++ [[ -n 1 ]] | |
+++ set -x | |
+ dokku_release_cmd release node-example dockerfile latest | |
+ declare 'desc=release phase' | |
+ local cmd=release | |
+ local APP=node-example | |
+ local IMAGE_SOURCE_TYPE=dockerfile | |
+ local IMAGE_TAG=latest | |
++ get_app_image_name node-example latest | |
++ declare 'desc=return image identifier for a given app, tag tuple. validate if tag is presented' | |
++ local APP=node-example | |
++ local IMAGE_TAG=latest | |
+++ get_app_image_repo node-example | |
+++ declare 'desc=central definition of image repo pattern' | |
+++ local APP=node-example | |
+++ local IMAGE_REPO=dokku/node-example | |
+++ [[ -z node-example ]] | |
+++ echo dokku/node-example | |
++ local IMAGE_REPO=dokku/node-example | |
++ [[ -z node-example ]] | |
++ [[ -n latest ]] | |
++ local IMAGE=dokku/node-example:latest | |
++ verify_image dokku/node-example:latest | |
++ declare 'desc=verify image existence' | |
++ local IMAGE=dokku/node-example:latest | |
++ docker inspect dokku/node-example:latest | |
++ return 0 | |
++ echo dokku/node-example:latest | |
+ local IMAGE=dokku/node-example:latest | |
+ verify_app_name node-example | |
+ declare 'desc=verify app name format and app existence' | |
+ local APP=node-example | |
+ [[ ! -n node-example ]] | |
+ [[ ! node-example =~ ^[a-z].* ]] | |
+ [[ ! -d /home/dokku/node-example ]] | |
+ return 0 | |
+ case "$IMAGE_SOURCE_TYPE" in | |
+ plugn trigger pre-release-dockerfile node-example latest | |
+ source /var/lib/dokku/core-plugins/available/common/functions | |
++ set -eo pipefail | |
++ [[ -n 1 ]] | |
++ set -x | |
+ [[ ! -n '' ]] | |
+ plugn trigger post-release-dockerfile node-example latest | |
+ source /var/lib/dokku/core-plugins/available/common/functions | |
++ set -eo pipefail | |
++ [[ -n 1 ]] | |
++ set -x | |
+ [[ ! -n '' ]] | |
+ implemented=1 | |
+ [[ 1 -eq 0 ]] | |
+ [[ 1 -eq 0 ]] | |
+ [[ '' != \t\r\u\e ]] | |
+ dokku_log_info1 'Deploying node-example (dokku/node-example:latest)...' | |
+ declare 'desc=log info1 formatter' | |
+ echo '-----> Deploying node-example (dokku/node-example:latest)...' | |
-----> Deploying node-example (dokku/node-example:latest)... | |
+ dokku deploy node-example latest | |
+ case "$(lsb_release -si)" in | |
++ lsb_release -si | |
+ export DOKKU_DISTRO=ubuntu | |
+ DOKKU_DISTRO=ubuntu | |
+ export DOKKU_IMAGE=gliderlabs/herokuish | |
+ DOKKU_IMAGE=gliderlabs/herokuish | |
+ export DOKKU_LIB_ROOT=/var/lib/dokku | |
+ DOKKU_LIB_ROOT=/var/lib/dokku | |
+ export PLUGIN_PATH=/var/lib/dokku/plugins | |
+ PLUGIN_PATH=/var/lib/dokku/plugins | |
+ export PLUGIN_AVAILABLE_PATH=/var/lib/dokku/plugins/available | |
+ PLUGIN_AVAILABLE_PATH=/var/lib/dokku/plugins/available | |
+ export PLUGIN_ENABLED_PATH=/var/lib/dokku/plugins/enabled | |
+ PLUGIN_ENABLED_PATH=/var/lib/dokku/plugins/enabled | |
+ export PLUGIN_CORE_PATH=/var/lib/dokku/core-plugins | |
+ PLUGIN_CORE_PATH=/var/lib/dokku/core-plugins | |
+ export PLUGIN_CORE_AVAILABLE_PATH=/var/lib/dokku/core-plugins/available | |
+ PLUGIN_CORE_AVAILABLE_PATH=/var/lib/dokku/core-plugins/available | |
+ export PLUGIN_CORE_ENABLED_PATH=/var/lib/dokku/core-plugins/enabled | |
+ PLUGIN_CORE_ENABLED_PATH=/var/lib/dokku/core-plugins/enabled | |
+ export DOKKU_API_VERSION=1 | |
+ DOKKU_API_VERSION=1 | |
+ export DOKKU_NOT_IMPLEMENTED_EXIT=10 | |
+ DOKKU_NOT_IMPLEMENTED_EXIT=10 | |
+ export DOKKU_VALID_EXIT=0 | |
+ DOKKU_VALID_EXIT=0 | |
+ export DOKKU_LOGS_DIR=/var/log/dokku | |
+ DOKKU_LOGS_DIR=/var/log/dokku | |
+ export DOKKU_EVENTS_LOGFILE=/var/log/dokku/events.log | |
+ DOKKU_EVENTS_LOGFILE=/var/log/dokku/events.log | |
+ export DOKKU_CONTAINER_LABEL=dokku | |
+ DOKKU_CONTAINER_LABEL=dokku | |
+ export DOKKU_GLOBAL_RUN_ARGS=--label=dokku | |
+ DOKKU_GLOBAL_RUN_ARGS=--label=dokku | |
+ source /var/lib/dokku/core-plugins/available/common/functions | |
++ set -eo pipefail | |
++ [[ -n 1 ]] | |
++ set -x | |
+ parse_args deploy node-example latest | |
+ declare 'desc=top-level cli arg parser' | |
+ local next_index=1 | |
+ local skip=false | |
+ args=("$@") | |
+ local args | |
+ for arg in '"$@"' | |
+ false | |
+ case "$arg" in | |
+ local next_index=2 | |
+ for arg in '"$@"' | |
+ false | |
+ case "$arg" in | |
+ local next_index=3 | |
+ for arg in '"$@"' | |
+ false | |
+ case "$arg" in | |
+ local next_index=4 | |
+ return 0 | |
+ args=("$@") | |
+ [[ deploy =~ ^--.* ]] | |
+ has_tty | |
+ declare 'desc=return 0 if we have a tty' | |
++ /usr/bin/tty | |
+ [[ /dev/pts/1 == \n\o\t\ \a\ \t\t\y ]] | |
+ return 0 | |
++ id -un | |
+ [[ dokku != \d\o\k\k\u ]] | |
++ id -un | |
+ [[ dokku != \r\o\o\t ]] | |
+ [[ deploy =~ ^plugin:.* ]] | |
+ [[ -n '' ]] | |
+ dokku_auth deploy node-example latest | |
+ declare 'desc=calls user-auth plugin trigger' | |
+ export SSH_USER=root | |
+ SSH_USER=root | |
+ export SSH_NAME=default | |
+ SSH_NAME=default | |
+ plugn trigger user-auth root default deploy node-example latest | |
+ source /var/lib/dokku/core-plugins/available/common/functions | |
++ set -eo pipefail | |
++ [[ -n 1 ]] | |
++ set -x | |
+ [[ ! -n '' ]] | |
+ return 0 | |
+ case "$1" in | |
+ execute_dokku_cmd deploy node-example latest | |
+ declare 'desc=executes dokku sub-commands' | |
+ local PLUGIN_NAME=deploy | |
+ local PLUGIN_CMD=deploy | |
+ local implemented=0 | |
+ local script | |
+ argv=("$@") | |
+ local argv | |
+ case "$PLUGIN_NAME" in | |
+ local PLUGIN_NAME=00_dokku-standard | |
++ readlink -f /var/lib/dokku/plugins/enabled/00_dokku-standard | |
+ [[ /var/lib/dokku/core-plugins/available/00_dokku-standard == *core-plugins* ]] | |
+ [[ deploy == \d\e\p\l\o\y ]] | |
+ shift 1 | |
+ [[ ! -z '' ]] | |
+ set -- deploy node-example latest | |
+ [[ -x /var/lib/dokku/plugins/enabled/00_dokku-standard/subcommands/default ]] | |
+ [[ -x /var/lib/dokku/plugins/enabled/00_dokku-standard/subcommands/deploy ]] | |
+ /var/lib/dokku/plugins/enabled/00_dokku-standard/subcommands/deploy deploy node-example latest | |
+ source /var/lib/dokku/core-plugins/available/common/functions | |
++ set -eo pipefail | |
++ [[ -n 1 ]] | |
++ set -x | |
+ source /var/lib/dokku/plugins/available/checks/functions | |
++ set -eo pipefail | |
++ [[ -n 1 ]] | |
++ set -x | |
++ source /var/lib/dokku/core-plugins/available/common/functions | |
+++ set -eo pipefail | |
+++ [[ -n 1 ]] | |
+++ set -x | |
++ source /var/lib/dokku/plugins/available/config/functions | |
+++ set -eo pipefail | |
+++ [[ -n 1 ]] | |
+++ set -x | |
+++ source /var/lib/dokku/core-plugins/available/common/functions | |
++++ set -eo pipefail | |
++++ [[ -n 1 ]] | |
++++ set -x | |
+ source /var/lib/dokku/plugins/available/config/functions | |
++ set -eo pipefail | |
++ [[ -n 1 ]] | |
++ set -x | |
++ source /var/lib/dokku/core-plugins/available/common/functions | |
+++ set -eo pipefail | |
+++ [[ -n 1 ]] | |
+++ set -x | |
+ source /var/lib/dokku/core-plugins/available/proxy/functions | |
++ set -eo pipefail | |
++ [[ -n 1 ]] | |
++ set -x | |
++ source /var/lib/dokku/core-plugins/available/common/functions | |
+++ set -eo pipefail | |
+++ [[ -n 1 ]] | |
+++ set -x | |
++ source /var/lib/dokku/plugins/available/config/functions | |
+++ set -eo pipefail | |
+++ [[ -n 1 ]] | |
+++ set -x | |
+++ source /var/lib/dokku/core-plugins/available/common/functions | |
++++ set -eo pipefail | |
++++ [[ -n 1 ]] | |
++++ set -x | |
+ dokku_deploy_cmd deploy node-example latest | |
+ declare 'desc=deploy phase' | |
+ local cmd=deploy | |
+ [[ -z node-example ]] | |
+ local APP=node-example | |
+ local IMAGE_TAG=latest | |
++ get_app_image_name node-example latest | |
++ declare 'desc=return image identifier for a given app, tag tuple. validate if tag is presented' | |
++ local APP=node-example | |
++ local IMAGE_TAG=latest | |
+++ get_app_image_repo node-example | |
+++ declare 'desc=central definition of image repo pattern' | |
+++ local APP=node-example | |
+++ local IMAGE_REPO=dokku/node-example | |
+++ [[ -z node-example ]] | |
+++ echo dokku/node-example | |
++ local IMAGE_REPO=dokku/node-example | |
++ [[ -z node-example ]] | |
++ [[ -n latest ]] | |
++ local IMAGE=dokku/node-example:latest | |
++ verify_image dokku/node-example:latest | |
++ declare 'desc=verify image existence' | |
++ local IMAGE=dokku/node-example:latest | |
++ docker inspect dokku/node-example:latest | |
++ return 0 | |
++ echo dokku/node-example:latest | |
+ local IMAGE=dokku/node-example:latest | |
+ verify_app_name node-example | |
+ declare 'desc=verify app name format and app existence' | |
+ local APP=node-example | |
+ [[ ! -n node-example ]] | |
+ [[ ! node-example =~ ^[a-z].* ]] | |
+ [[ ! -d /home/dokku/node-example ]] | |
+ return 0 | |
+ plugn trigger pre-deploy node-example latest | |
+ source /var/lib/dokku/core-plugins/available/common/functions | |
++ set -eo pipefail | |
++ [[ -n 1 ]] | |
++ set -x | |
+ source /var/lib/dokku/plugins/available/config/functions | |
++ set -eo pipefail | |
++ [[ -n 1 ]] | |
++ set -x | |
++ source /var/lib/dokku/core-plugins/available/common/functions | |
+++ set -eo pipefail | |
+++ [[ -n 1 ]] | |
+++ set -x | |
+ exec_app_json_scripts node-example latest | |
+ declare 'desc=core app.json scripts execution' | |
+ local 'trigger=/var/lib/dokku/plugins/enabled/00_dokku-standard/pre-deploy app_json_scripts' | |
+ local APP=node-example | |
+ case "$0" in | |
+ local IMAGE_TAG=latest | |
++ get_app_image_name node-example latest | |
++ declare 'desc=return image identifier for a given app, tag tuple. validate if tag is presented' | |
++ local APP=node-example | |
++ local IMAGE_TAG=latest | |
+++ get_app_image_repo node-example | |
+++ declare 'desc=central definition of image repo pattern' | |
+++ local APP=node-example | |
+++ local IMAGE_REPO=dokku/node-example | |
+++ [[ -z node-example ]] | |
+++ echo dokku/node-example | |
++ local IMAGE_REPO=dokku/node-example | |
++ [[ -z node-example ]] | |
++ [[ -n latest ]] | |
++ local IMAGE=dokku/node-example:latest | |
++ verify_image dokku/node-example:latest | |
++ declare 'desc=verify image existence' | |
++ local IMAGE=dokku/node-example:latest | |
++ docker inspect dokku/node-example:latest | |
++ return 0 | |
++ echo dokku/node-example:latest | |
+ local IMAGE=dokku/node-example:latest | |
+ local PHASE_SCRIPT_KEY=predeploy | |
+ dokku_log_info1 'Attempting to run scripts.dokku.predeploy from app.json (if defined)' | |
+ declare 'desc=log info1 formatter' | |
+ echo '-----> Attempting to run scripts.dokku.predeploy from app.json (if defined)' | |
-----> Attempting to run scripts.dokku.predeploy from app.json (if defined) | |
+ execute_script node-example dokku/node-example:latest predeploy | |
+ declare 'desc=executes appropriate phase script key from app.json' | |
+ local APP=node-example | |
+ local IMAGE=dokku/node-example:latest | |
+ local PHASE_SCRIPT_KEY=predeploy | |
++ get_phase_script dokku/node-example:latest predeploy | |
+ local 'SCRIPT_CMD=touch /app/predeploy.test' | |
+ [[ -n touch /app/predeploy.test ]] | |
+ dokku_log_info1 'Running '\''touch /app/predeploy.test'\'' in app container' | |
+ declare 'desc=log info1 formatter' | |
+ echo '-----> Running '\''touch /app/predeploy.test'\'' in app container' | |
-----> Running 'touch /app/predeploy.test' in app container | |
+ local COMMAND | |
+ COMMAND='set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x ; ' | |
+ COMMAND+=' if [[ -d '\''/app'\'' ]]; then ' | |
+ COMMAND+=' export HOME=/app ; ' | |
+ COMMAND+=' cd $HOME ; ' | |
+ COMMAND+=' fi ; ' | |
+ COMMAND+=' if [[ -d '\''/app/.profile.d'\'' ]]; then ' | |
+ COMMAND+=' for file in /app/.profile.d/*; do source $file; done ; ' | |
+ COMMAND+=' fi ; ' | |
+ COMMAND+=' if [[ -d '\''/cache'\'' ]]; then ' | |
+ COMMAND+=' echo restoring installation cache... ; ' | |
+ COMMAND+=' rm -rf /tmp/cache ; ' | |
+ COMMAND+=' ln -sf /cache /tmp/cache ; ' | |
+ COMMAND+=' fi ; ' | |
+ COMMAND+=' touch /app/predeploy.test ;' | |
+ COMMAND+=' if [[ -d '\''/cache'\'' ]]; then ' | |
+ COMMAND+=' echo removing installation cache... ; ' | |
+ COMMAND+=' rm -f /tmp/cache ; ' | |
+ COMMAND+=' fi ' | |
+ local CACHE_DIR=/home/dokku/node-example/cache | |
++ plugn trigger docker-args-deploy node-example | |
++ : | |
+ source /var/lib/dokku/core-plugins/available/common/functions | |
++ set -eo pipefail | |
++ [[ -n 1 ]] | |
++ set -x | |
+ [[ ! -n '' ]] | |
+ source /var/lib/dokku/core-plugins/available/common/functions | |
++ set -eo pipefail | |
++ [[ -n 1 ]] | |
++ set -x | |
+ source /var/lib/dokku/plugins/available/config/functions | |
++ set -eo pipefail | |
++ [[ -n 1 ]] | |
++ set -x | |
++ source /var/lib/dokku/core-plugins/available/common/functions | |
+++ set -eo pipefail | |
+++ [[ -n 1 ]] | |
+++ set -x | |
+ config_docker_args node-example | |
+ declare 'desc=config docker-args plugin trigger' | |
+ local 'trigger=/var/lib/dokku/plugins/enabled/config/docker-args-deploy config_docker_args' | |
++ cat | |
+ local STDIN= | |
+ local APP=node-example | |
+ local IMAGE_TAG= | |
++ get_app_image_name node-example '' | |
++ declare 'desc=return image identifier for a given app, tag tuple. validate if tag is presented' | |
++ local APP=node-example | |
++ local IMAGE_TAG= | |
+++ get_app_image_repo node-example | |
+++ declare 'desc=central definition of image repo pattern' | |
+++ local APP=node-example | |
+++ local IMAGE_REPO=dokku/node-example | |
+++ [[ -z node-example ]] | |
+++ echo dokku/node-example | |
++ local IMAGE_REPO=dokku/node-example | |
++ [[ -z node-example ]] | |
++ [[ -n '' ]] | |
++ local IMAGE=dokku/node-example:latest | |
++ echo dokku/node-example:latest | |
+ local IMAGE=dokku/node-example:latest | |
+ local DOCKERFILE_ENV_FILE=/home/dokku/node-example/DOCKERFILE_ENV_FILE | |
+ verify_app_name node-example | |
+ declare 'desc=verify app name format and app existence' | |
+ local APP=node-example | |
+ [[ ! -n node-example ]] | |
+ [[ ! node-example =~ ^[a-z].* ]] | |
+ [[ ! -d /home/dokku/node-example ]] | |
+ return 0 | |
+ is_image_herokuish_based dokku/node-example:latest | |
+ declare 'desc=returns true if app image is based on herokuish' | |
+ [[ ! -f /home/ubuntu/.circlerc ]] | |
+ local DOCKER_ARGS=--rm | |
+ docker run --label=dokku --entrypoint=/bin/sh --rm dokku/node-example:latest -c 'test -f /exec' | |
+ sed -e 's:^export ::g' -e 's:='\'':=:g' -e 's:'\''$::g' | |
+ config_export global | |
+ declare 'desc=returns export command for config variable of specified type (app/global)' | |
+ local CONFIG_TYPE=global | |
+ local APP= | |
+ local ENV_FILE=/home/dokku//ENV | |
+ [[ global == \g\l\o\b\a\l ]] | |
+ local ENV_FILE=/home/dokku/ENV | |
+ [[ ! -f /home/dokku/ENV ]] | |
+ [[ ! -s /home/dokku/ENV ]] | |
+ return 0 | |
+ sed -e 's:^export ::g' -e 's:='\'':=:g' -e 's:'\''$::g' | |
+ config_export app node-example | |
+ declare 'desc=returns export command for config variable of specified type (app/global)' | |
+ local CONFIG_TYPE=app | |
+ local APP=node-example | |
+ local ENV_FILE=/home/dokku/node-example/ENV | |
+ [[ app == \g\l\o\b\a\l ]] | |
+ [[ ! -f /home/dokku/node-example/ENV ]] | |
+ [[ ! -s /home/dokku/node-example/ENV ]] | |
+ return 0 | |
+ echo -n ' --env-file=/home/dokku/node-example/DOCKERFILE_ENV_FILE' | |
+ docker_args node-example | |
+ declare 'desc=docker args plugin trigger' | |
+ local trigger=/var/lib/dokku/plugins/enabled/docker-options/docker-args-deploy | |
++ cat | |
+ local STDIN= | |
+ local APP=node-example | |
+ local IMAGE_SOURCE_TYPE= | |
+ case "$0" in | |
+ local PHASE=DEPLOY | |
+ local FILE_PREFIX=DOCKER_OPTIONS_ | |
+ local PHASE_FILE_PATH=/home/dokku/node-example/DOCKER_OPTIONS_DEPLOY | |
+ local output= | |
+ [[ -f /home/dokku/node-example/DOCKER_OPTIONS_DEPLOY ]] | |
+ echo -n '' | |
+ local 'DOCKER_ARGS= --env-file=/home/dokku/node-example/DOCKERFILE_ENV_FILE' | |
++ sed -e 's/--restart=[[:graph:]]\+[[:blank:]]\?//g' | |
+ local 'DOCKER_ARGS= --env-file=/home/dokku/node-example/DOCKERFILE_ENV_FILE' | |
++ docker run --label=dokku -e DOKKU_TRACE=1 --label=dokku_phase_script=predeploy -d -v /home/dokku/node-example/cache:/cache --env-file=/home/dokku/node-example/DOCKERFILE_ENV_FILE dokku/node-example:latest /bin/bash -c 'set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x ; if [[ -d '\''/app'\'' ]]; then export HOME=/app ; cd $HOME ; fi ; if [[ -d '\''/app/.profile.d'\'' ]]; then for file in /app/.profile.d/*; do source $file; done ; fi ; if [[ -d '\''/cache'\'' ]]; then echo restoring installation cache... ; rm -rf /tmp/cache ; ln -sf /cache /tmp/cache ; fi ; touch /app/predeploy.test ; if [[ -d '\''/cache'\'' ]]; then echo removing installation cache... ; rm -f /tmp/cache ; fi ' | |
+ local id=6096a9d5f1211f512c0654319c6c54621fc5675a96a13c6baded18c53e84e215 | |
++ docker wait 6096a9d5f1211f512c0654319c6c54621fc5675a96a13c6baded18c53e84e215 | |
+ test 0 -eq 0 | |
+ dokku_container_log_verbose_quiet 6096a9d5f1211f512c0654319c6c54621fc5675a96a13c6baded18c53e84e215 | |
+ declare 'desc=log verbose container output (with quiet option)' | |
+ local CID=6096a9d5f1211f512c0654319c6c54621fc5675a96a13c6baded18c53e84e215 | |
+ shift | |
+ OIFS=' | |
' | |
+ IFS=' | |
' | |
+ local line | |
++ docker logs 6096a9d5f1211f512c0654319c6c54621fc5675a96a13c6baded18c53e84e215 | |
+ for line in '$(docker logs "$CID" 2>&1)' | |
+ dokku_log_verbose_quiet 'restoring installation cache...' | |
+ declare 'desc=log verbose formatter (with quiet option)' | |
+ [[ -z '' ]] | |
+ echo ' restoring installation cache...' | |
restoring installation cache... | |
+ for line in '$(docker logs "$CID" 2>&1)' | |
+ dokku_log_verbose_quiet '+ [[ -d /app ]]' | |
+ declare 'desc=log verbose formatter (with quiet option)' | |
+ [[ -z '' ]] | |
+ echo ' + [[ -d /app ]]' | |
+ [[ -d /app ]] | |
+ for line in '$(docker logs "$CID" 2>&1)' | |
+ dokku_log_verbose_quiet '+ export HOME=/app' | |
+ declare 'desc=log verbose formatter (with quiet option)' | |
+ [[ -z '' ]] | |
+ echo ' + export HOME=/app' | |
+ export HOME=/app | |
+ for line in '$(docker logs "$CID" 2>&1)' | |
+ dokku_log_verbose_quiet '+ HOME=/app' | |
+ declare 'desc=log verbose formatter (with quiet option)' | |
+ [[ -z '' ]] | |
+ echo ' + HOME=/app' | |
+ HOME=/app | |
+ for line in '$(docker logs "$CID" 2>&1)' | |
+ dokku_log_verbose_quiet '+ cd /app' | |
+ declare 'desc=log verbose formatter (with quiet option)' | |
+ [[ -z '' ]] | |
+ echo ' + cd /app' | |
+ cd /app | |
+ for line in '$(docker logs "$CID" 2>&1)' | |
+ dokku_log_verbose_quiet '+ [[ -d /app/.profile.d ]]' | |
+ declare 'desc=log verbose formatter (with quiet option)' | |
+ [[ -z '' ]] | |
+ echo ' + [[ -d /app/.profile.d ]]' | |
+ [[ -d /app/.profile.d ]] | |
+ for line in '$(docker logs "$CID" 2>&1)' | |
+ dokku_log_verbose_quiet '+ [[ -d /cache ]]' | |
+ declare 'desc=log verbose formatter (with quiet option)' | |
+ [[ -z '' ]] | |
+ echo ' + [[ -d /cache ]]' | |
+ [[ -d /cache ]] | |
+ for line in '$(docker logs "$CID" 2>&1)' | |
+ dokku_log_verbose_quiet '+ echo restoring installation cache...' | |
+ declare 'desc=log verbose formatter (with quiet option)' | |
+ [[ -z '' ]] | |
+ echo ' + echo restoring installation cache...' | |
+ echo restoring installation cache... | |
+ for line in '$(docker logs "$CID" 2>&1)' | |
+ dokku_log_verbose_quiet '+ rm -rf /tmp/cache' | |
+ declare 'desc=log verbose formatter (with quiet option)' | |
+ [[ -z '' ]] | |
+ echo ' + rm -rf /tmp/cache' | |
+ rm -rf /tmp/cache | |
+ for line in '$(docker logs "$CID" 2>&1)' | |
+ dokku_log_verbose_quiet 'removing installation cache...' | |
+ declare 'desc=log verbose formatter (with quiet option)' | |
+ [[ -z '' ]] | |
+ echo ' removing installation cache...' | |
removing installation cache... | |
+ for line in '$(docker logs "$CID" 2>&1)' | |
+ dokku_log_verbose_quiet '+ ln -sf /cache /tmp/cache' | |
+ declare 'desc=log verbose formatter (with quiet option)' | |
+ [[ -z '' ]] | |
+ echo ' + ln -sf /cache /tmp/cache' | |
+ ln -sf /cache /tmp/cache | |
+ for line in '$(docker logs "$CID" 2>&1)' | |
+ dokku_log_verbose_quiet '+ touch /app/predeploy.test' | |
+ declare 'desc=log verbose formatter (with quiet option)' | |
+ [[ -z '' ]] | |
+ echo ' + touch /app/predeploy.test' | |
+ touch /app/predeploy.test | |
+ for line in '$(docker logs "$CID" 2>&1)' | |
+ dokku_log_verbose_quiet '+ [[ -d /cache ]]' | |
+ declare 'desc=log verbose formatter (with quiet option)' | |
+ [[ -z '' ]] | |
+ echo ' + [[ -d /cache ]]' | |
+ [[ -d /cache ]] | |
+ for line in '$(docker logs "$CID" 2>&1)' | |
+ dokku_log_verbose_quiet '+ echo removing installation cache...' | |
+ declare 'desc=log verbose formatter (with quiet option)' | |
+ [[ -z '' ]] | |
+ echo ' + echo removing installation cache...' | |
+ echo removing installation cache... | |
+ for line in '$(docker logs "$CID" 2>&1)' | |
+ dokku_log_verbose_quiet '+ rm -f /tmp/cache' | |
+ declare 'desc=log verbose formatter (with quiet option)' | |
+ [[ -z '' ]] | |
+ echo ' + rm -f /tmp/cache' | |
+ rm -f /tmp/cache | |
+ IFS=' | |
' | |
+ [[ predeploy != \p\o\s\t\d\e\p\l\o\y ]] | |
+ is_image_herokuish_based dokku/node-example:latest | |
+ declare 'desc=returns true if app image is based on herokuish' | |
+ [[ ! -f /home/ubuntu/.circlerc ]] | |
+ local DOCKER_ARGS=--rm | |
+ docker run --label=dokku --entrypoint=/bin/sh --rm dokku/node-example:latest -c 'test -f /exec' | |
++ config_get node-example DOKKU_DOCKERFILE_ENTRYPOINT | |
++ declare 'desc=get value of given config var' | |
++ [[ node-example == \c\o\n\f\i\g\:\g\e\t ]] | |
++ set -- config:get node-example DOKKU_DOCKERFILE_ENTRYPOINT | |
++ config_parse_args config:get node-example DOKKU_DOCKERFILE_ENTRYPOINT | |
++ declare 'desc=parse config plugin args' | |
++ unset APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT | |
++ for var in '"$@"' | |
++ [[ config:get == \-\-\g\l\o\b\a\l ]] | |
++ [[ config:get == \-\-\n\o\-\r\e\s\t\a\r\t ]] | |
++ [[ config:get == \-\-\e\x\p\o\r\t ]] | |
++ [[ config:get == \-\-\s\h\e\l\l ]] | |
++ for var in '"$@"' | |
++ [[ node-example == \-\-\g\l\o\b\a\l ]] | |
++ [[ node-example == \-\-\n\o\-\r\e\s\t\a\r\t ]] | |
++ [[ node-example == \-\-\e\x\p\o\r\t ]] | |
++ [[ node-example == \-\-\s\h\e\l\l ]] | |
++ for var in '"$@"' | |
++ [[ DOKKU_DOCKERFILE_ENTRYPOINT == \-\-\g\l\o\b\a\l ]] | |
++ [[ DOKKU_DOCKERFILE_ENTRYPOINT == \-\-\n\o\-\r\e\s\t\a\r\t ]] | |
++ [[ DOKKU_DOCKERFILE_ENTRYPOINT == \-\-\e\x\p\o\r\t ]] | |
++ [[ DOKKU_DOCKERFILE_ENTRYPOINT == \-\-\s\h\e\l\l ]] | |
++ SANITIZED_ARGS=($(get_sanitized_config_args "$@")) | |
+++ get_sanitized_config_args config:get node-example DOKKU_DOCKERFILE_ENTRYPOINT | |
+++ local 'desc=return sanitized arguments for config plugin' | |
+++ SANITIZED_ARGS=("$@") | |
+++ local SANITIZED_ARGS | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}") | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}") | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}") | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}") | |
+++ echo config:get node-example DOKKU_DOCKERFILE_ENTRYPOINT | |
++ local SANITIZED_ARGS | |
++ set -- config:get node-example DOKKU_DOCKERFILE_ENTRYPOINT | |
++ DOKKU_CONFIG_TYPE=app | |
++ DOKKU_CONFIG_RESTART=true | |
++ [[ app == \a\p\p ]] | |
++ [[ -z node-example ]] | |
++ verify_app_name node-example | |
++ declare 'desc=verify app name format and app existence' | |
++ local APP=node-example | |
++ [[ ! -n node-example ]] | |
++ [[ ! node-example =~ ^[a-z].* ]] | |
++ [[ ! -d /home/dokku/node-example ]] | |
++ return 0 | |
++ APP=node-example | |
++ ENV_FILE=/home/dokku/node-example/ENV | |
++ export APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT | |
++ SANITIZED_ARGS=($(get_sanitized_config_args "$@")) | |
+++ get_sanitized_config_args config:get node-example DOKKU_DOCKERFILE_ENTRYPOINT | |
+++ local 'desc=return sanitized arguments for config plugin' | |
+++ SANITIZED_ARGS=("$@") | |
+++ local SANITIZED_ARGS | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}") | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}") | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}") | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}") | |
+++ echo config:get node-example DOKKU_DOCKERFILE_ENTRYPOINT | |
++ local SANITIZED_ARGS | |
++ set -- config:get node-example DOKKU_DOCKERFILE_ENTRYPOINT | |
++ [[ -z node-example ]] | |
++ config_create /home/dokku/node-example/ENV | |
++ declare 'desc=create config env file' | |
++ local ENV_FILE=/home/dokku/node-example/ENV | |
++ [[ -f /home/dokku/node-example/ENV ]] | |
++ [[ ! -s /home/dokku/node-example/ENV ]] | |
++ return 0 | |
+ local DOKKU_DOCKERFILE_ENTRYPOINT= | |
++ config_get node-example DOKKU_DOCKERFILE_CMD | |
++ declare 'desc=get value of given config var' | |
++ [[ node-example == \c\o\n\f\i\g\:\g\e\t ]] | |
++ set -- config:get node-example DOKKU_DOCKERFILE_CMD | |
++ config_parse_args config:get node-example DOKKU_DOCKERFILE_CMD | |
++ declare 'desc=parse config plugin args' | |
++ unset APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT | |
++ for var in '"$@"' | |
++ [[ config:get == \-\-\g\l\o\b\a\l ]] | |
++ [[ config:get == \-\-\n\o\-\r\e\s\t\a\r\t ]] | |
++ [[ config:get == \-\-\e\x\p\o\r\t ]] | |
++ [[ config:get == \-\-\s\h\e\l\l ]] | |
++ for var in '"$@"' | |
++ [[ node-example == \-\-\g\l\o\b\a\l ]] | |
++ [[ node-example == \-\-\n\o\-\r\e\s\t\a\r\t ]] | |
++ [[ node-example == \-\-\e\x\p\o\r\t ]] | |
++ [[ node-example == \-\-\s\h\e\l\l ]] | |
++ for var in '"$@"' | |
++ [[ DOKKU_DOCKERFILE_CMD == \-\-\g\l\o\b\a\l ]] | |
++ [[ DOKKU_DOCKERFILE_CMD == \-\-\n\o\-\r\e\s\t\a\r\t ]] | |
++ [[ DOKKU_DOCKERFILE_CMD == \-\-\e\x\p\o\r\t ]] | |
++ [[ DOKKU_DOCKERFILE_CMD == \-\-\s\h\e\l\l ]] | |
++ SANITIZED_ARGS=($(get_sanitized_config_args "$@")) | |
+++ get_sanitized_config_args config:get node-example DOKKU_DOCKERFILE_CMD | |
+++ local 'desc=return sanitized arguments for config plugin' | |
+++ SANITIZED_ARGS=("$@") | |
+++ local SANITIZED_ARGS | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}") | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}") | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}") | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}") | |
+++ echo config:get node-example DOKKU_DOCKERFILE_CMD | |
++ local SANITIZED_ARGS | |
++ set -- config:get node-example DOKKU_DOCKERFILE_CMD | |
++ DOKKU_CONFIG_TYPE=app | |
++ DOKKU_CONFIG_RESTART=true | |
++ [[ app == \a\p\p ]] | |
++ [[ -z node-example ]] | |
++ verify_app_name node-example | |
++ declare 'desc=verify app name format and app existence' | |
++ local APP=node-example | |
++ [[ ! -n node-example ]] | |
++ [[ ! node-example =~ ^[a-z].* ]] | |
++ [[ ! -d /home/dokku/node-example ]] | |
++ return 0 | |
++ APP=node-example | |
++ ENV_FILE=/home/dokku/node-example/ENV | |
++ export APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT | |
++ SANITIZED_ARGS=($(get_sanitized_config_args "$@")) | |
+++ get_sanitized_config_args config:get node-example DOKKU_DOCKERFILE_CMD | |
+++ local 'desc=return sanitized arguments for config plugin' | |
+++ SANITIZED_ARGS=("$@") | |
+++ local SANITIZED_ARGS | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}") | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}") | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}") | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}") | |
+++ echo config:get node-example DOKKU_DOCKERFILE_CMD | |
++ local SANITIZED_ARGS | |
++ set -- config:get node-example DOKKU_DOCKERFILE_CMD | |
++ [[ -z node-example ]] | |
++ config_create /home/dokku/node-example/ENV | |
++ declare 'desc=create config env file' | |
++ local ENV_FILE=/home/dokku/node-example/ENV | |
++ [[ -f /home/dokku/node-example/ENV ]] | |
++ [[ ! -s /home/dokku/node-example/ENV ]] | |
++ return 0 | |
+ local DOKKU_DOCKERFILE_CMD= | |
+ [[ -n '' ]] | |
+ [[ -n '' ]] | |
+ local 'DOCKER_COMMIT_ARGS= ' | |
+ eval docker commit 6096a9d5f1211f512c0654319c6c54621fc5675a96a13c6baded18c53e84e215 dokku/node-example:latest | |
++ docker commit 6096a9d5f1211f512c0654319c6c54621fc5675a96a13c6baded18c53e84e215 dokku/node-example:latest | |
+ source /var/lib/dokku/core-plugins/available/common/functions | |
++ set -eo pipefail | |
++ [[ -n 1 ]] | |
++ set -x | |
+ [[ ! -n '' ]] | |
+ source /var/lib/dokku/core-plugins/available/common/functions | |
++ set -eo pipefail | |
++ [[ -n 1 ]] | |
++ set -x | |
+ source /var/lib/dokku/plugins/available/ps/functions | |
++ set -eo pipefail | |
++ [[ -n 1 ]] | |
++ set -x | |
++ source /var/lib/dokku/core-plugins/available/common/functions | |
+++ set -eo pipefail | |
+++ [[ -n 1 ]] | |
+++ set -x | |
++ source /var/lib/dokku/plugins/available/config/functions | |
+++ set -eo pipefail | |
+++ [[ -n 1 ]] | |
+++ set -x | |
+++ source /var/lib/dokku/core-plugins/available/common/functions | |
++++ set -eo pipefail | |
++++ [[ -n 1 ]] | |
++++ set -x | |
+ ps_pre_deploy node-example latest | |
+ declare 'desc=ps pre-deploy plugin trigger' | |
+ local trigger=ps_pre_deploy | |
+ local APP=node-example | |
+ extract_procfile node-example | |
+ declare 'desc=extracts procfile from app image' | |
+ local APP=node-example | |
++ get_running_image_tag node-example | |
++ declare 'desc=retrieve current image tag for a given app. returns empty string if no deployed containers are found' | |
++ local APP=node-example | |
++ [[ ! -n node-example ]] | |
++ verify_app_name node-example | |
++ declare 'desc=verify app name format and app existence' | |
++ local APP=node-example | |
++ [[ ! -n node-example ]] | |
++ [[ ! node-example =~ ^[a-z].* ]] | |
++ [[ ! -d /home/dokku/node-example ]] | |
++ return 0 | |
++ CIDS=($(get_app_container_ids "$APP")) | |
+++ get_app_container_ids node-example | |
+++ declare 'desc=returns list of docker container ids for given app' | |
+++ local APP=node-example | |
+++ local CONTAINER_TYPE= | |
+++ verify_app_name node-example | |
+++ declare 'desc=verify app name format and app existence' | |
+++ local APP=node-example | |
+++ [[ ! -n node-example ]] | |
+++ [[ ! node-example =~ ^[a-z].* ]] | |
+++ [[ ! -d /home/dokku/node-example ]] | |
+++ return 0 | |
+++ [[ -f /home/dokku/node-example/CONTAINER ]] | |
+++ [[ -n '' ]] | |
+++ local 'CONTAINER_PATTERN=/home/dokku/node-example/CONTAINER.*' | |
+++ shopt -s nullglob | |
+++ local DOKKU_CID_FILE | |
+++ shopt -u nullglob | |
+++ echo '' | |
++ local CIDS | |
+++ awk -F: '{ print $2 }' | |
+++ docker inspect -f '{{ .Config.Image }}' | |
+++ echo '' | |
++ local RUNNING_IMAGE_TAG= | |
++ echo '' | |
+ local IMAGE_TAG= | |
++ get_app_image_name node-example '' | |
++ declare 'desc=return image identifier for a given app, tag tuple. validate if tag is presented' | |
++ local APP=node-example | |
++ local IMAGE_TAG= | |
+++ get_app_image_repo node-example | |
+++ declare 'desc=central definition of image repo pattern' | |
+++ local APP=node-example | |
+++ local IMAGE_REPO=dokku/node-example | |
+++ [[ -z node-example ]] | |
+++ echo dokku/node-example | |
++ local IMAGE_REPO=dokku/node-example | |
++ [[ -z node-example ]] | |
++ [[ -n '' ]] | |
++ local IMAGE=dokku/node-example:latest | |
++ echo dokku/node-example:latest | |
+ local IMAGE=dokku/node-example:latest | |
+ local DOKKU_PROCFILE=/home/dokku/node-example/DOKKU_PROCFILE | |
+ verify_app_name node-example | |
+ declare 'desc=verify app name format and app existence' | |
+ local APP=node-example | |
+ [[ ! -n node-example ]] | |
+ [[ ! node-example =~ ^[a-z].* ]] | |
+ [[ ! -d /home/dokku/node-example ]] | |
+ return 0 | |
+ copy_from_image dokku/node-example:latest Procfile /home/dokku/node-example/DOKKU_PROCFILE | |
+ [[ -f /home/dokku/node-example/DOKKU_PROCFILE ]] | |
+ dokku_log_info1_quiet 'No Procfile found in app image' | |
+ declare 'desc=log info1 formatter (with quiet option)' | |
+ [[ -z '' ]] | |
+ echo '-----> No Procfile found in app image' | |
-----> No Procfile found in app image | |
+ generate_scale_file node-example | |
+ declare 'desc=generates DOKKU_SCALE file' | |
+ local APP=node-example | |
+ local IMAGE_TAG= | |
++ get_app_image_name node-example '' | |
++ declare 'desc=return image identifier for a given app, tag tuple. validate if tag is presented' | |
++ local APP=node-example | |
++ local IMAGE_TAG= | |
+++ get_app_image_repo node-example | |
+++ declare 'desc=central definition of image repo pattern' | |
+++ local APP=node-example | |
+++ local IMAGE_REPO=dokku/node-example | |
+++ [[ -z node-example ]] | |
+++ echo dokku/node-example | |
++ local IMAGE_REPO=dokku/node-example | |
++ [[ -z node-example ]] | |
++ [[ -n '' ]] | |
++ local IMAGE=dokku/node-example:latest | |
++ echo dokku/node-example:latest | |
+ local IMAGE=dokku/node-example:latest | |
+ local DOKKU_SCALE_FILE=/home/dokku/node-example/DOKKU_SCALE | |
+ local DOKKU_PROCFILE=/home/dokku/node-example/DOKKU_PROCFILE | |
+ verify_app_name node-example | |
+ declare 'desc=verify app name format and app existence' | |
+ local APP=node-example | |
+ [[ ! -n node-example ]] | |
+ [[ ! node-example =~ ^[a-z].* ]] | |
+ [[ ! -d /home/dokku/node-example ]] | |
+ return 0 | |
+ copy_from_image dokku/node-example:latest /app/DOKKU_SCALE /home/dokku/node-example | |
+ [[ ! -f /home/dokku/node-example/DOKKU_SCALE ]] | |
+ dokku_log_info1_quiet 'DOKKU_SCALE file found (/home/dokku/node-example/DOKKU_SCALE)' | |
+ declare 'desc=log info1 formatter (with quiet option)' | |
+ [[ -z '' ]] | |
+ echo '-----> DOKKU_SCALE file found (/home/dokku/node-example/DOKKU_SCALE)' | |
-----> DOKKU_SCALE file found (/home/dokku/node-example/DOKKU_SCALE) | |
+ print_dokku_scale_file node-example | |
+ declare 'desc=prints contents of DOKKU_SCALE file' | |
+ local APP=node-example | |
+ local DOKKU_SCALE_FILE=/home/dokku/node-example/DOKKU_SCALE | |
+ read -r line | |
+ dokku_log_info2_quiet web=1 | |
+ declare 'desc=log info2 formatter (with quiet option)' | |
+ [[ -z '' ]] | |
+ echo '=====> web=1' | |
=====> web=1 | |
+ read -r line | |
+ [[ -n '' ]] | |
+ is_image_herokuish_based dokku/node-example:latest | |
+ declare 'desc=returns true if app image is based on herokuish' | |
+ [[ ! -f /home/ubuntu/.circlerc ]] | |
+ local DOCKER_ARGS=--rm | |
+ docker run --label=dokku --entrypoint=/bin/sh --rm dokku/node-example:latest -c 'test -f /exec' | |
+ local DOKKU_SCALE_FILE=/home/dokku/node-example/DOKKU_SCALE | |
++ get_app_container_ids node-example | |
++ declare 'desc=returns list of docker container ids for given app' | |
++ local APP=node-example | |
++ local CONTAINER_TYPE= | |
++ verify_app_name node-example | |
++ declare 'desc=verify app name format and app existence' | |
++ local APP=node-example | |
++ [[ ! -n node-example ]] | |
++ [[ ! node-example =~ ^[a-z].* ]] | |
++ [[ ! -d /home/dokku/node-example ]] | |
++ return 0 | |
++ [[ -f /home/dokku/node-example/CONTAINER ]] | |
++ [[ -n '' ]] | |
++ local 'CONTAINER_PATTERN=/home/dokku/node-example/CONTAINER.*' | |
++ shopt -s nullglob | |
++ local DOKKU_CID_FILE | |
++ shopt -u nullglob | |
++ echo '' | |
+ local oldids= | |
++ plugn trigger docker-args-deploy node-example latest | |
++ : | |
+ source /var/lib/dokku/core-plugins/available/common/functions | |
++ set -eo pipefail | |
++ [[ -n 1 ]] | |
++ set -x | |
+ [[ ! -n '' ]] | |
+ source /var/lib/dokku/core-plugins/available/common/functions | |
++ set -eo pipefail | |
++ [[ -n 1 ]] | |
++ set -x | |
+ source /var/lib/dokku/plugins/available/config/functions | |
++ set -eo pipefail | |
++ [[ -n 1 ]] | |
++ set -x | |
++ source /var/lib/dokku/core-plugins/available/common/functions | |
+++ set -eo pipefail | |
+++ [[ -n 1 ]] | |
+++ set -x | |
+ config_docker_args node-example latest | |
+ declare 'desc=config docker-args plugin trigger' | |
+ local 'trigger=/var/lib/dokku/plugins/enabled/config/docker-args-deploy config_docker_args' | |
++ cat | |
+ local STDIN= | |
+ local APP=node-example | |
+ local IMAGE_TAG=latest | |
++ get_app_image_name node-example latest | |
++ declare 'desc=return image identifier for a given app, tag tuple. validate if tag is presented' | |
++ local APP=node-example | |
++ local IMAGE_TAG=latest | |
+++ get_app_image_repo node-example | |
+++ declare 'desc=central definition of image repo pattern' | |
+++ local APP=node-example | |
+++ local IMAGE_REPO=dokku/node-example | |
+++ [[ -z node-example ]] | |
+++ echo dokku/node-example | |
++ local IMAGE_REPO=dokku/node-example | |
++ [[ -z node-example ]] | |
++ [[ -n latest ]] | |
++ local IMAGE=dokku/node-example:latest | |
++ verify_image dokku/node-example:latest | |
++ declare 'desc=verify image existence' | |
++ local IMAGE=dokku/node-example:latest | |
++ docker inspect dokku/node-example:latest | |
++ return 0 | |
++ echo dokku/node-example:latest | |
+ local IMAGE=dokku/node-example:latest | |
+ local DOCKERFILE_ENV_FILE=/home/dokku/node-example/DOCKERFILE_ENV_FILE | |
+ verify_app_name node-example | |
+ declare 'desc=verify app name format and app existence' | |
+ local APP=node-example | |
+ [[ ! -n node-example ]] | |
+ [[ ! node-example =~ ^[a-z].* ]] | |
+ [[ ! -d /home/dokku/node-example ]] | |
+ return 0 | |
+ is_image_herokuish_based dokku/node-example:latest | |
+ declare 'desc=returns true if app image is based on herokuish' | |
+ [[ ! -f /home/ubuntu/.circlerc ]] | |
+ local DOCKER_ARGS=--rm | |
+ docker run --label=dokku --entrypoint=/bin/sh --rm dokku/node-example:latest -c 'test -f /exec' | |
+ sed -e 's:^export ::g' -e 's:='\'':=:g' -e 's:'\''$::g' | |
+ config_export global | |
+ declare 'desc=returns export command for config variable of specified type (app/global)' | |
+ local CONFIG_TYPE=global | |
+ local APP= | |
+ local ENV_FILE=/home/dokku//ENV | |
+ [[ global == \g\l\o\b\a\l ]] | |
+ local ENV_FILE=/home/dokku/ENV | |
+ [[ ! -f /home/dokku/ENV ]] | |
+ [[ ! -s /home/dokku/ENV ]] | |
+ return 0 | |
+ sed -e 's:^export ::g' -e 's:='\'':=:g' -e 's:'\''$::g' | |
+ config_export app node-example | |
+ declare 'desc=returns export command for config variable of specified type (app/global)' | |
+ local CONFIG_TYPE=app | |
+ local APP=node-example | |
+ local ENV_FILE=/home/dokku/node-example/ENV | |
+ [[ app == \g\l\o\b\a\l ]] | |
+ [[ ! -f /home/dokku/node-example/ENV ]] | |
+ [[ ! -s /home/dokku/node-example/ENV ]] | |
+ return 0 | |
+ echo -n ' --env-file=/home/dokku/node-example/DOCKERFILE_ENV_FILE' | |
+ docker_args node-example latest | |
+ declare 'desc=docker args plugin trigger' | |
+ local trigger=/var/lib/dokku/plugins/enabled/docker-options/docker-args-deploy | |
++ cat | |
+ local STDIN= | |
+ local APP=node-example | |
+ local IMAGE_SOURCE_TYPE=latest | |
+ case "$0" in | |
+ local PHASE=DEPLOY | |
+ local FILE_PREFIX=DOCKER_OPTIONS_ | |
+ local PHASE_FILE_PATH=/home/dokku/node-example/DOCKER_OPTIONS_DEPLOY | |
+ local output= | |
+ [[ -f /home/dokku/node-example/DOCKER_OPTIONS_DEPLOY ]] | |
+ echo -n '' | |
+ local 'DOKKU_DEFAULT_DOCKER_ARGS= --env-file=/home/dokku/node-example/DOCKERFILE_ENV_FILE' | |
++ is_app_proxy_enabled node-example | |
++ declare 'desc=return true if proxy is enabled; otherwise return false' | |
++ local APP=node-example | |
++ verify_app_name node-example | |
++ declare 'desc=verify app name format and app existence' | |
++ local APP=node-example | |
++ [[ ! -n node-example ]] | |
++ [[ ! node-example =~ ^[a-z].* ]] | |
++ [[ ! -d /home/dokku/node-example ]] | |
++ return 0 | |
++ local APP_PROXY_ENABLED=true | |
+++ config_get node-example DOKKU_DISABLE_PROXY | |
+++ declare 'desc=get value of given config var' | |
+++ [[ node-example == \c\o\n\f\i\g\:\g\e\t ]] | |
+++ set -- config:get node-example DOKKU_DISABLE_PROXY | |
+++ config_parse_args config:get node-example DOKKU_DISABLE_PROXY | |
+++ declare 'desc=parse config plugin args' | |
+++ unset APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT | |
+++ for var in '"$@"' | |
+++ [[ config:get == \-\-\g\l\o\b\a\l ]] | |
+++ [[ config:get == \-\-\n\o\-\r\e\s\t\a\r\t ]] | |
+++ [[ config:get == \-\-\e\x\p\o\r\t ]] | |
+++ [[ config:get == \-\-\s\h\e\l\l ]] | |
+++ for var in '"$@"' | |
+++ [[ node-example == \-\-\g\l\o\b\a\l ]] | |
+++ [[ node-example == \-\-\n\o\-\r\e\s\t\a\r\t ]] | |
+++ [[ node-example == \-\-\e\x\p\o\r\t ]] | |
+++ [[ node-example == \-\-\s\h\e\l\l ]] | |
+++ for var in '"$@"' | |
+++ [[ DOKKU_DISABLE_PROXY == \-\-\g\l\o\b\a\l ]] | |
+++ [[ DOKKU_DISABLE_PROXY == \-\-\n\o\-\r\e\s\t\a\r\t ]] | |
+++ [[ DOKKU_DISABLE_PROXY == \-\-\e\x\p\o\r\t ]] | |
+++ [[ DOKKU_DISABLE_PROXY == \-\-\s\h\e\l\l ]] | |
+++ SANITIZED_ARGS=($(get_sanitized_config_args "$@")) | |
++++ get_sanitized_config_args config:get node-example DOKKU_DISABLE_PROXY | |
++++ local 'desc=return sanitized arguments for config plugin' | |
++++ SANITIZED_ARGS=("$@") | |
++++ local SANITIZED_ARGS | |
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}") | |
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}") | |
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}") | |
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}") | |
++++ echo config:get node-example DOKKU_DISABLE_PROXY | |
+++ local SANITIZED_ARGS | |
+++ set -- config:get node-example DOKKU_DISABLE_PROXY | |
+++ DOKKU_CONFIG_TYPE=app | |
+++ DOKKU_CONFIG_RESTART=true | |
+++ [[ app == \a\p\p ]] | |
+++ [[ -z node-example ]] | |
+++ verify_app_name node-example | |
+++ declare 'desc=verify app name format and app existence' | |
+++ local APP=node-example | |
+++ [[ ! -n node-example ]] | |
+++ [[ ! node-example =~ ^[a-z].* ]] | |
+++ [[ ! -d /home/dokku/node-example ]] | |
+++ return 0 | |
+++ APP=node-example | |
+++ ENV_FILE=/home/dokku/node-example/ENV | |
+++ export APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT | |
+++ SANITIZED_ARGS=($(get_sanitized_config_args "$@")) | |
++++ get_sanitized_config_args config:get node-example DOKKU_DISABLE_PROXY | |
++++ local 'desc=return sanitized arguments for config plugin' | |
++++ SANITIZED_ARGS=("$@") | |
++++ local SANITIZED_ARGS | |
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}") | |
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}") | |
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}") | |
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}") | |
++++ echo config:get node-example DOKKU_DISABLE_PROXY | |
+++ local SANITIZED_ARGS | |
+++ set -- config:get node-example DOKKU_DISABLE_PROXY | |
+++ [[ -z node-example ]] | |
+++ config_create /home/dokku/node-example/ENV | |
+++ declare 'desc=create config env file' | |
+++ local ENV_FILE=/home/dokku/node-example/ENV | |
+++ [[ -f /home/dokku/node-example/ENV ]] | |
+++ [[ ! -s /home/dokku/node-example/ENV ]] | |
+++ return 0 | |
++ local DOKKU_DISABLE_PROXY= | |
++ [[ -n '' ]] | |
++ echo true | |
+ local DOKKU_IS_APP_PROXY_ENABLED=true | |
+ local line | |
+ local PROC_TYPE | |
+ local PROC_COUNT | |
+ local CONTAINER_INDEX | |
+ read -r line | |
+ [[ web=1 =~ ^#.* ]] | |
++ strip_inline_comments web=1 | |
++ declare 'desc=removes bash-style comment from input line' | |
++ local line=web=1 | |
++ local stripped_line=web=1 | |
++ echo web=1 | |
+ line=web=1 | |
+ PROC_TYPE=web | |
+ PROC_COUNT=1 | |
+ CONTAINER_INDEX=1 | |
+ [[ 1 -le 1 ]] | |
+ local id= | |
+ local port= | |
+ local ipaddr= | |
+ local DOKKU_CONTAINER_ID_FILE=/home/dokku/node-example/CONTAINER.web.1 | |
+ local DOKKU_IP_FILE=/home/dokku/node-example/IP.web.1 | |
+ local DOKKU_PORT_FILE=/home/dokku/node-example/PORT.web.1 | |
+ local 'DOCKER_ARGS= --env-file=/home/dokku/node-example/DOCKERFILE_ENV_FILE' | |
+ local 'DOCKER_ARGS+= -e DYNO='\''web.1'\'' ' | |
+ [[ -n 1 ]] | |
+ local 'DOCKER_ARGS+= -e TRACE=true ' | |
+ [[ -n '' ]] | |
+ [[ -z '' ]] | |
+ DOKKU_DOCKERFILE_PORTS=($(config_get "$APP" DOKKU_DOCKERFILE_PORTS || true)) | |
++ config_get node-example DOKKU_DOCKERFILE_PORTS | |
++ declare 'desc=get value of given config var' | |
++ [[ node-example == \c\o\n\f\i\g\:\g\e\t ]] | |
++ set -- config:get node-example DOKKU_DOCKERFILE_PORTS | |
++ config_parse_args config:get node-example DOKKU_DOCKERFILE_PORTS | |
++ declare 'desc=parse config plugin args' | |
++ unset APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT | |
++ for var in '"$@"' | |
++ [[ config:get == \-\-\g\l\o\b\a\l ]] | |
++ [[ config:get == \-\-\n\o\-\r\e\s\t\a\r\t ]] | |
++ [[ config:get == \-\-\e\x\p\o\r\t ]] | |
++ [[ config:get == \-\-\s\h\e\l\l ]] | |
++ for var in '"$@"' | |
++ [[ node-example == \-\-\g\l\o\b\a\l ]] | |
++ [[ node-example == \-\-\n\o\-\r\e\s\t\a\r\t ]] | |
++ [[ node-example == \-\-\e\x\p\o\r\t ]] | |
++ [[ node-example == \-\-\s\h\e\l\l ]] | |
++ for var in '"$@"' | |
++ [[ DOKKU_DOCKERFILE_PORTS == \-\-\g\l\o\b\a\l ]] | |
++ [[ DOKKU_DOCKERFILE_PORTS == \-\-\n\o\-\r\e\s\t\a\r\t ]] | |
++ [[ DOKKU_DOCKERFILE_PORTS == \-\-\e\x\p\o\r\t ]] | |
++ [[ DOKKU_DOCKERFILE_PORTS == \-\-\s\h\e\l\l ]] | |
++ SANITIZED_ARGS=($(get_sanitized_config_args "$@")) | |
+++ get_sanitized_config_args config:get node-example DOKKU_DOCKERFILE_PORTS | |
+++ local 'desc=return sanitized arguments for config plugin' | |
+++ SANITIZED_ARGS=("$@") | |
+++ local SANITIZED_ARGS | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}") | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}") | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}") | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}") | |
+++ echo config:get node-example DOKKU_DOCKERFILE_PORTS | |
++ local SANITIZED_ARGS | |
++ set -- config:get node-example DOKKU_DOCKERFILE_PORTS | |
++ DOKKU_CONFIG_TYPE=app | |
++ DOKKU_CONFIG_RESTART=true | |
++ [[ app == \a\p\p ]] | |
++ [[ -z node-example ]] | |
++ verify_app_name node-example | |
++ declare 'desc=verify app name format and app existence' | |
++ local APP=node-example | |
++ [[ ! -n node-example ]] | |
++ [[ ! node-example =~ ^[a-z].* ]] | |
++ [[ ! -d /home/dokku/node-example ]] | |
++ return 0 | |
++ APP=node-example | |
++ ENV_FILE=/home/dokku/node-example/ENV | |
++ export APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT | |
++ SANITIZED_ARGS=($(get_sanitized_config_args "$@")) | |
+++ get_sanitized_config_args config:get node-example DOKKU_DOCKERFILE_PORTS | |
+++ local 'desc=return sanitized arguments for config plugin' | |
+++ SANITIZED_ARGS=("$@") | |
+++ local SANITIZED_ARGS | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}") | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}") | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}") | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}") | |
+++ echo config:get node-example DOKKU_DOCKERFILE_PORTS | |
++ local SANITIZED_ARGS | |
++ set -- config:get node-example DOKKU_DOCKERFILE_PORTS | |
++ [[ -z node-example ]] | |
++ config_create /home/dokku/node-example/ENV | |
++ declare 'desc=create config env file' | |
++ local ENV_FILE=/home/dokku/node-example/ENV | |
++ [[ -f /home/dokku/node-example/ENV ]] | |
++ [[ ! -s /home/dokku/node-example/ENV ]] | |
++ return 0 | |
+ local DOKKU_DOCKERFILE_PORTS | |
++ config_get node-example DOKKU_DOCKERFILE_START_CMD | |
++ declare 'desc=get value of given config var' | |
++ [[ node-example == \c\o\n\f\i\g\:\g\e\t ]] | |
++ set -- config:get node-example DOKKU_DOCKERFILE_START_CMD | |
++ config_parse_args config:get node-example DOKKU_DOCKERFILE_START_CMD | |
++ declare 'desc=parse config plugin args' | |
++ unset APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT | |
++ for var in '"$@"' | |
++ [[ config:get == \-\-\g\l\o\b\a\l ]] | |
++ [[ config:get == \-\-\n\o\-\r\e\s\t\a\r\t ]] | |
++ [[ config:get == \-\-\e\x\p\o\r\t ]] | |
++ [[ config:get == \-\-\s\h\e\l\l ]] | |
++ for var in '"$@"' | |
++ [[ node-example == \-\-\g\l\o\b\a\l ]] | |
++ [[ node-example == \-\-\n\o\-\r\e\s\t\a\r\t ]] | |
++ [[ node-example == \-\-\e\x\p\o\r\t ]] | |
++ [[ node-example == \-\-\s\h\e\l\l ]] | |
++ for var in '"$@"' | |
++ [[ DOKKU_DOCKERFILE_START_CMD == \-\-\g\l\o\b\a\l ]] | |
++ [[ DOKKU_DOCKERFILE_START_CMD == \-\-\n\o\-\r\e\s\t\a\r\t ]] | |
++ [[ DOKKU_DOCKERFILE_START_CMD == \-\-\e\x\p\o\r\t ]] | |
++ [[ DOKKU_DOCKERFILE_START_CMD == \-\-\s\h\e\l\l ]] | |
++ SANITIZED_ARGS=($(get_sanitized_config_args "$@")) | |
+++ get_sanitized_config_args config:get node-example DOKKU_DOCKERFILE_START_CMD | |
+++ local 'desc=return sanitized arguments for config plugin' | |
+++ SANITIZED_ARGS=("$@") | |
+++ local SANITIZED_ARGS | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}") | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}") | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}") | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}") | |
+++ echo config:get node-example DOKKU_DOCKERFILE_START_CMD | |
++ local SANITIZED_ARGS | |
++ set -- config:get node-example DOKKU_DOCKERFILE_START_CMD | |
++ DOKKU_CONFIG_TYPE=app | |
++ DOKKU_CONFIG_RESTART=true | |
++ [[ app == \a\p\p ]] | |
++ [[ -z node-example ]] | |
++ verify_app_name node-example | |
++ declare 'desc=verify app name format and app existence' | |
++ local APP=node-example | |
++ [[ ! -n node-example ]] | |
++ [[ ! node-example =~ ^[a-z].* ]] | |
++ [[ ! -d /home/dokku/node-example ]] | |
++ return 0 | |
++ APP=node-example | |
++ ENV_FILE=/home/dokku/node-example/ENV | |
++ export APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT | |
++ SANITIZED_ARGS=($(get_sanitized_config_args "$@")) | |
+++ get_sanitized_config_args config:get node-example DOKKU_DOCKERFILE_START_CMD | |
+++ local 'desc=return sanitized arguments for config plugin' | |
+++ SANITIZED_ARGS=("$@") | |
+++ local SANITIZED_ARGS | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}") | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}") | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}") | |
+++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}") | |
+++ echo config:get node-example DOKKU_DOCKERFILE_START_CMD | |
++ local SANITIZED_ARGS | |
++ set -- config:get node-example DOKKU_DOCKERFILE_START_CMD | |
++ [[ -z node-example ]] | |
++ config_create /home/dokku/node-example/ENV | |
++ declare 'desc=create config env file' | |
++ local ENV_FILE=/home/dokku/node-example/ENV | |
++ [[ -f /home/dokku/node-example/ENV ]] | |
++ [[ ! -s /home/dokku/node-example/ENV ]] | |
++ return 0 | |
+ local DOKKU_DOCKERFILE_START_CMD= | |
++ get_cmd_from_procfile node-example web | |
++ declare 'desc=parse cmd from app Procfile' | |
++ local APP=node-example | |
++ local PROC_TYPE=web | |
++ local DOKKU_PROCFILE=/home/dokku/node-example/DOKKU_PROCFILE | |
++ verify_app_name node-example | |
++ declare 'desc=verify app name format and app existence' | |
++ local APP=node-example | |
++ [[ ! -n node-example ]] | |
++ [[ ! node-example =~ ^[a-z].* ]] | |
++ [[ ! -d /home/dokku/node-example ]] | |
++ return 0 | |
++ [[ -f /home/dokku/node-example/DOKKU_PROCFILE ]] | |
+ local DOKKU_PROCFILE_START_CMD= | |
+ local START_CMD= | |
+ [[ web == \w\e\b ]] | |
+ [[ -z '' ]] | |
+ local port=5000 | |
+ local 'DOKKU_DOCKER_PORT_ARGS+=-p 5000' | |
+ [[ true == \t\r\u\e ]] | |
++ docker run --label=dokku -d -e PORT=5000 --env-file=/home/dokku/node-example/DOCKERFILE_ENV_FILE -e 'DYNO='\''web.1'\''' -e TRACE=true dokku/node-example:latest | |
+ local id=4d83baff6b52e664131881fd55dad91e0dc37a4655a14d265e5f85ed99e4235a | |
++ docker inspect '--format={{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' 4d83baff6b52e664131881fd55dad91e0dc37a4655a14d265e5f85ed99e4235a | |
+ local ipaddr=172.17.0.2 | |
+ [[ -z 172.17.0.2 ]] | |
++ is_app_checks_enabled node-example | |
++ declare 'desc=return app zero-downtime checks status' | |
++ local APP=node-example | |
++ verify_app_name node-example | |
++ declare 'desc=verify app name format and app existence' | |
++ local APP=node-example | |
++ [[ ! -n node-example ]] | |
++ [[ ! node-example =~ ^[a-z].* ]] | |
++ [[ ! -d /home/dokku/node-example ]] | |
++ return 0 | |
+++ config_get node-example DOKKU_CHECKS_ENABLED | |
+++ declare 'desc=get value of given config var' | |
+++ [[ node-example == \c\o\n\f\i\g\:\g\e\t ]] | |
+++ set -- config:get node-example DOKKU_CHECKS_ENABLED | |
+++ config_parse_args config:get node-example DOKKU_CHECKS_ENABLED | |
+++ declare 'desc=parse config plugin args' | |
+++ unset APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT | |
+++ for var in '"$@"' | |
+++ [[ config:get == \-\-\g\l\o\b\a\l ]] | |
+++ [[ config:get == \-\-\n\o\-\r\e\s\t\a\r\t ]] | |
+++ [[ config:get == \-\-\e\x\p\o\r\t ]] | |
+++ [[ config:get == \-\-\s\h\e\l\l ]] | |
+++ for var in '"$@"' | |
+++ [[ node-example == \-\-\g\l\o\b\a\l ]] | |
+++ [[ node-example == \-\-\n\o\-\r\e\s\t\a\r\t ]] | |
+++ [[ node-example == \-\-\e\x\p\o\r\t ]] | |
+++ [[ node-example == \-\-\s\h\e\l\l ]] | |
+++ for var in '"$@"' | |
+++ [[ DOKKU_CHECKS_ENABLED == \-\-\g\l\o\b\a\l ]] | |
+++ [[ DOKKU_CHECKS_ENABLED == \-\-\n\o\-\r\e\s\t\a\r\t ]] | |
+++ [[ DOKKU_CHECKS_ENABLED == \-\-\e\x\p\o\r\t ]] | |
+++ [[ DOKKU_CHECKS_ENABLED == \-\-\s\h\e\l\l ]] | |
+++ SANITIZED_ARGS=($(get_sanitized_config_args "$@")) | |
++++ get_sanitized_config_args config:get node-example DOKKU_CHECKS_ENABLED | |
++++ local 'desc=return sanitized arguments for config plugin' | |
++++ SANITIZED_ARGS=("$@") | |
++++ local SANITIZED_ARGS | |
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}") | |
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}") | |
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}") | |
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}") | |
++++ echo config:get node-example DOKKU_CHECKS_ENABLED | |
+++ local SANITIZED_ARGS | |
+++ set -- config:get node-example DOKKU_CHECKS_ENABLED | |
+++ DOKKU_CONFIG_TYPE=app | |
+++ DOKKU_CONFIG_RESTART=true | |
+++ [[ app == \a\p\p ]] | |
+++ [[ -z node-example ]] | |
+++ verify_app_name node-example | |
+++ declare 'desc=verify app name format and app existence' | |
+++ local APP=node-example | |
+++ [[ ! -n node-example ]] | |
+++ [[ ! node-example =~ ^[a-z].* ]] | |
+++ [[ ! -d /home/dokku/node-example ]] | |
+++ return 0 | |
+++ APP=node-example | |
+++ ENV_FILE=/home/dokku/node-example/ENV | |
+++ export APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT | |
+++ SANITIZED_ARGS=($(get_sanitized_config_args "$@")) | |
++++ get_sanitized_config_args config:get node-example DOKKU_CHECKS_ENABLED | |
++++ local 'desc=return sanitized arguments for config plugin' | |
++++ SANITIZED_ARGS=("$@") | |
++++ local SANITIZED_ARGS | |
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}") | |
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}") | |
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}") | |
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}") | |
++++ echo config:get node-example DOKKU_CHECKS_ENABLED | |
+++ local SANITIZED_ARGS | |
+++ set -- config:get node-example DOKKU_CHECKS_ENABLED | |
+++ [[ -z node-example ]] | |
+++ config_create /home/dokku/node-example/ENV | |
+++ declare 'desc=create config env file' | |
+++ local ENV_FILE=/home/dokku/node-example/ENV | |
+++ [[ -f /home/dokku/node-example/ENV ]] | |
+++ [[ ! -s /home/dokku/node-example/ENV ]] | |
+++ return 0 | |
++ local DOKKU_CHECKS_ENABLED= | |
++ [[ -z '' ]] | |
++ local status=true | |
++ echo true | |
+ [[ true == \f\a\l\s\e ]] | |
+ trap 'kill_new $id' INT TERM EXIT | |
+ dokku_log_info1 'Running pre-flight checks' | |
+ declare 'desc=log info1 formatter' | |
+ echo '-----> Running pre-flight checks' | |
-----> Running pre-flight checks | |
+ plugn trigger check-deploy node-example 4d83baff6b52e664131881fd55dad91e0dc37a4655a14d265e5f85ed99e4235a web 5000 172.17.0.2 | |
+ source /var/lib/dokku/core-plugins/available/common/functions | |
++ set -eo pipefail | |
++ [[ -n 1 ]] | |
++ set -x | |
+ [[ ! -n '' ]] | |
+ source /var/lib/dokku/core-plugins/available/common/functions | |
++ set -eo pipefail | |
++ [[ -n 1 ]] | |
++ set -x | |
+ source /var/lib/dokku/plugins/available/checks/functions | |
++ set -eo pipefail | |
++ [[ -n 1 ]] | |
++ set -x | |
++ source /var/lib/dokku/core-plugins/available/common/functions | |
+++ set -eo pipefail | |
+++ [[ -n 1 ]] | |
+++ set -x | |
++ source /var/lib/dokku/plugins/available/config/functions | |
+++ set -eo pipefail | |
+++ [[ -n 1 ]] | |
+++ set -x | |
+++ source /var/lib/dokku/core-plugins/available/common/functions | |
++++ set -eo pipefail | |
++++ [[ -n 1 ]] | |
++++ set -x | |
+ source /var/lib/dokku/plugins/available/config/functions | |
++ set -eo pipefail | |
++ [[ -n 1 ]] | |
++ set -x | |
++ source /var/lib/dokku/core-plugins/available/common/functions | |
+++ set -eo pipefail | |
+++ [[ -n 1 ]] | |
+++ set -x | |
+ checks_check_deploy node-example 4d83baff6b52e664131881fd55dad91e0dc37a4655a14d265e5f85ed99e4235a web 5000 172.17.0.2 | |
+ declare 'desc=checks check-deploy plugin trigger' | |
+ local trigger=checks_check_deploy | |
+ local APP=node-example | |
+ local DOKKU_APP_CONTAINER_ID=4d83baff6b52e664131881fd55dad91e0dc37a4655a14d265e5f85ed99e4235a | |
+ local DOKKU_APP_CONTAINER_TYPE=web | |
+ local DOKKU_APP_LISTEN_PORT=5000 | |
+ local DOKKU_APP_LISTEN_IP=172.17.0.2 | |
+ [[ -z 5000 ]] | |
+ [[ -z 172.17.0.2 ]] | |
+ [[ -z 4d83baff6b52e664131881fd55dad91e0dc37a4655a14d265e5f85ed99e4235a ]] | |
++ config_export global | |
++ declare 'desc=returns export command for config variable of specified type (app/global)' | |
++ local CONFIG_TYPE=global | |
++ local APP= | |
++ local ENV_FILE=/home/dokku//ENV | |
++ [[ global == \g\l\o\b\a\l ]] | |
++ local ENV_FILE=/home/dokku/ENV | |
++ [[ ! -f /home/dokku/ENV ]] | |
++ [[ ! -s /home/dokku/ENV ]] | |
++ return 0 | |
+ eval '' | |
++ config_export app node-example | |
++ declare 'desc=returns export command for config variable of specified type (app/global)' | |
++ local CONFIG_TYPE=app | |
++ local APP=node-example | |
++ local ENV_FILE=/home/dokku/node-example/ENV | |
++ [[ app == \g\l\o\b\a\l ]] | |
++ [[ ! -f /home/dokku/node-example/ENV ]] | |
++ [[ ! -s /home/dokku/node-example/ENV ]] | |
++ return 0 | |
+ eval '' | |
++ is_app_checks_enabled node-example | |
++ declare 'desc=return app zero-downtime checks status' | |
++ local APP=node-example | |
++ verify_app_name node-example | |
++ declare 'desc=verify app name format and app existence' | |
++ local APP=node-example | |
++ [[ ! -n node-example ]] | |
++ [[ ! node-example =~ ^[a-z].* ]] | |
++ [[ ! -d /home/dokku/node-example ]] | |
++ return 0 | |
+++ config_get node-example DOKKU_CHECKS_ENABLED | |
+++ declare 'desc=get value of given config var' | |
+++ [[ node-example == \c\o\n\f\i\g\:\g\e\t ]] | |
+++ set -- config:get node-example DOKKU_CHECKS_ENABLED | |
+++ config_parse_args config:get node-example DOKKU_CHECKS_ENABLED | |
+++ declare 'desc=parse config plugin args' | |
+++ unset APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT | |
+++ for var in '"$@"' | |
+++ [[ config:get == \-\-\g\l\o\b\a\l ]] | |
+++ [[ config:get == \-\-\n\o\-\r\e\s\t\a\r\t ]] | |
+++ [[ config:get == \-\-\e\x\p\o\r\t ]] | |
+++ [[ config:get == \-\-\s\h\e\l\l ]] | |
+++ for var in '"$@"' | |
+++ [[ node-example == \-\-\g\l\o\b\a\l ]] | |
+++ [[ node-example == \-\-\n\o\-\r\e\s\t\a\r\t ]] | |
+++ [[ node-example == \-\-\e\x\p\o\r\t ]] | |
+++ [[ node-example == \-\-\s\h\e\l\l ]] | |
+++ for var in '"$@"' | |
+++ [[ DOKKU_CHECKS_ENABLED == \-\-\g\l\o\b\a\l ]] | |
+++ [[ DOKKU_CHECKS_ENABLED == \-\-\n\o\-\r\e\s\t\a\r\t ]] | |
+++ [[ DOKKU_CHECKS_ENABLED == \-\-\e\x\p\o\r\t ]] | |
+++ [[ DOKKU_CHECKS_ENABLED == \-\-\s\h\e\l\l ]] | |
+++ SANITIZED_ARGS=($(get_sanitized_config_args "$@")) | |
++++ get_sanitized_config_args config:get node-example DOKKU_CHECKS_ENABLED | |
++++ local 'desc=return sanitized arguments for config plugin' | |
++++ SANITIZED_ARGS=("$@") | |
++++ local SANITIZED_ARGS | |
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}") | |
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}") | |
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}") | |
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}") | |
++++ echo config:get node-example DOKKU_CHECKS_ENABLED | |
+++ local SANITIZED_ARGS | |
+++ set -- config:get node-example DOKKU_CHECKS_ENABLED | |
+++ DOKKU_CONFIG_TYPE=app | |
+++ DOKKU_CONFIG_RESTART=true | |
+++ [[ app == \a\p\p ]] | |
+++ [[ -z node-example ]] | |
+++ verify_app_name node-example | |
+++ declare 'desc=verify app name format and app existence' | |
+++ local APP=node-example | |
+++ [[ ! -n node-example ]] | |
+++ [[ ! node-example =~ ^[a-z].* ]] | |
+++ [[ ! -d /home/dokku/node-example ]] | |
+++ return 0 | |
+++ APP=node-example | |
+++ ENV_FILE=/home/dokku/node-example/ENV | |
+++ export APP ENV_FILE DOKKU_CONFIG_TYPE DOKKU_CONFIG_RESTART DOKKU_CONFIG_EXPORT | |
+++ SANITIZED_ARGS=($(get_sanitized_config_args "$@")) | |
++++ get_sanitized_config_args config:get node-example DOKKU_CHECKS_ENABLED | |
++++ local 'desc=return sanitized arguments for config plugin' | |
++++ SANITIZED_ARGS=("$@") | |
++++ local SANITIZED_ARGS | |
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--global/}") | |
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--no-restart/}") | |
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--export/}") | |
++++ SANITIZED_ARGS=("${SANITIZED_ARGS[@]//--shell/}") | |
++++ echo config:get node-example DOKKU_CHECKS_ENABLED | |
+++ local SANITIZED_ARGS | |
+++ set -- config:get node-example DOKKU_CHECKS_ENABLED | |
+++ [[ -z node-example ]] | |
+++ config_create /home/dokku/node-example/ENV | |
+++ declare 'desc=create config env file' | |
+++ local ENV_FILE=/home/dokku/node-example/ENV | |
+++ [[ -f /home/dokku/node-example/ENV ]] | |
+++ [[ ! -s /home/dokku/node-example/ENV ]] | |
+++ return 0 | |
++ local DOKKU_CHECKS_ENABLED= | |
++ [[ -z '' ]] | |
++ local status=true | |
++ echo true | |
+ [[ true == \f\a\l\s\e ]] | |
+ local WAIT=5 | |
+ local TIMEOUT=30 | |
+ local ATTEMPTS=5 | |
++ mktemp -d /tmp/dokku_CHECKS.XXXXX | |
+ local CHECK_DEPLOY_TMP_WORK_DIR=/tmp/dokku_CHECKS.qIUDz | |
+ docker cp 4d83baff6b52e664131881fd55dad91e0dc37a4655a14d265e5f85ed99e4235a:/app/CHECKS /tmp/dokku_CHECKS.qIUDz | |
+ true | |
+ local FILENAME=/tmp/dokku_CHECKS.qIUDz/CHECKS | |
+ trap 'checks_check_deploy_cleanup $DOKKU_APP_CONTAINER_ID' RETURN INT TERM EXIT | |
+ [[ ! -s /tmp/dokku_CHECKS.qIUDz/CHECKS ]] | |
+ [[ web == \w\e\b ]] | |
+ dokku_log_verbose 'For more efficient zero downtime deployments, create a file CHECKS.' | |
+ declare 'desc=log verbose formatter' | |
+ echo ' For more efficient zero downtime deployments, create a file CHECKS.' | |
For more efficient zero downtime deployments, create a file CHECKS. | |
+ dokku_log_verbose 'See http://dokku.viewdocs.io/dokku/checks-examples.md for examples' | |
+ declare 'desc=log verbose formatter' | |
+ echo ' See http://dokku.viewdocs.io/dokku/checks-examples.md for examples' | |
See http://dokku.viewdocs.io/dokku/checks-examples.md for examples | |
+ dokku_log_verbose 'CHECKS file not found in container: Running simple container check...' | |
+ declare 'desc=log verbose formatter' | |
+ echo ' CHECKS file not found in container: Running simple container check...' | |
CHECKS file not found in container: Running simple container check... | |
+ rm -rf /tmp/dokku_CHECKS.qIUDz | |
+ local DOKKU_DEFAULT_CHECKS_WAIT=10 | |
+ dokku_log_info1 'Waiting for 10 seconds ...' | |
+ declare 'desc=log info1 formatter' | |
+ echo '-----> Waiting for 10 seconds ...' | |
-----> Waiting for 10 seconds ... | |
+ sleep 10 | |
+ is_container_running 4d83baff6b52e664131881fd55dad91e0dc37a4655a14d265e5f85ed99e4235a | |
+ declare 'desc=return 0 if given docker container id is in running state' | |
+ local CID=4d83baff6b52e664131881fd55dad91e0dc37a4655a14d265e5f85ed99e4235a | |
++ docker inspect -f '{{.State.Running}}' 4d83baff6b52e664131881fd55dad91e0dc37a4655a14d265e5f85ed99e4235a | |
+ local CONTAINER_STATUS=false | |
+ [[ false == \t\r\u\e ]] | |
+ return 1 | |
+ dokku_log_fail 'App container failed to start!!' | |
+ declare 'desc=log fail formatter' | |
+ echo 'App container failed to start!!' | |
App container failed to start!! | |
+ exit 1 | |
+ checks_check_deploy_cleanup 4d83baff6b52e664131881fd55dad91e0dc37a4655a14d265e5f85ed99e4235a | |
+ declare 'desc=cleans up CHECK_DEPLOY_TMP_WORK_DIR and print container output' | |
+ local id=4d83baff6b52e664131881fd55dad91e0dc37a4655a14d265e5f85ed99e4235a | |
+ rm -rf /tmp/dokku_CHECKS.qIUDz | |
+ [[ -n 4d83baff6b52e664131881fd55dad91e0dc37a4655a14d265e5f85ed99e4235a ]] | |
+ dokku_log_info2_quiet 'node-example web container output:' | |
+ declare 'desc=log info2 formatter (with quiet option)' | |
+ [[ -z '' ]] | |
+ echo '=====> node-example web container output:' | |
=====> node-example web container output: | |
+ dokku_container_log_verbose_quiet 4d83baff6b52e664131881fd55dad91e0dc37a4655a14d265e5f85ed99e4235a | |
+ declare 'desc=log verbose container output (with quiet option)' | |
+ local CID=4d83baff6b52e664131881fd55dad91e0dc37a4655a14d265e5f85ed99e4235a | |
+ shift | |
+ OIFS=' | |
' | |
+ IFS=' | |
' | |
+ local line | |
++ docker logs 4d83baff6b52e664131881fd55dad91e0dc37a4655a14d265e5f85ed99e4235a | |
+ for line in '$(docker logs "$CID" 2>&1)' | |
+ dokku_log_verbose_quiet 'restoring installation cache...' | |
+ declare 'desc=log verbose formatter (with quiet option)' | |
+ [[ -z '' ]] | |
+ echo ' restoring installation cache...' | |
restoring installation cache... | |
+ for line in '$(docker logs "$CID" 2>&1)' | |
+ dokku_log_verbose_quiet '+ [[ -d /app ]]' | |
+ declare 'desc=log verbose formatter (with quiet option)' | |
+ [[ -z '' ]] | |
+ echo ' + [[ -d /app ]]' | |
+ [[ -d /app ]] | |
+ for line in '$(docker logs "$CID" 2>&1)' | |
+ dokku_log_verbose_quiet '+ export HOME=/app' | |
+ declare 'desc=log verbose formatter (with quiet option)' | |
+ [[ -z '' ]] | |
+ echo ' + export HOME=/app' | |
+ export HOME=/app | |
+ for line in '$(docker logs "$CID" 2>&1)' | |
+ dokku_log_verbose_quiet '+ HOME=/app' | |
+ declare 'desc=log verbose formatter (with quiet option)' | |
+ [[ -z '' ]] | |
+ echo ' + HOME=/app' | |
+ HOME=/app | |
+ for line in '$(docker logs "$CID" 2>&1)' | |
+ dokku_log_verbose_quiet '+ cd /app' | |
+ declare 'desc=log verbose formatter (with quiet option)' | |
+ [[ -z '' ]] | |
+ echo ' + cd /app' | |
+ cd /app | |
+ for line in '$(docker logs "$CID" 2>&1)' | |
+ dokku_log_verbose_quiet '+ [[ -d /app/.profile.d ]]' | |
+ declare 'desc=log verbose formatter (with quiet option)' | |
+ [[ -z '' ]] | |
+ echo ' + [[ -d /app/.profile.d ]]' | |
+ [[ -d /app/.profile.d ]] | |
+ for line in '$(docker logs "$CID" 2>&1)' | |
+ dokku_log_verbose_quiet '+ [[ -d /cache ]]' | |
+ declare 'desc=log verbose formatter (with quiet option)' | |
+ [[ -z '' ]] | |
+ echo ' + [[ -d /cache ]]' | |
+ [[ -d /cache ]] | |
+ for line in '$(docker logs "$CID" 2>&1)' | |
+ dokku_log_verbose_quiet '+ echo restoring installation cache...' | |
+ declare 'desc=log verbose formatter (with quiet option)' | |
+ [[ -z '' ]] | |
+ echo ' + echo restoring installation cache...' | |
+ echo restoring installation cache... | |
+ for line in '$(docker logs "$CID" 2>&1)' | |
+ dokku_log_verbose_quiet '+ rm -rf /tmp/cache' | |
+ declare 'desc=log verbose formatter (with quiet option)' | |
+ [[ -z '' ]] | |
+ echo ' + rm -rf /tmp/cache' | |
+ rm -rf /tmp/cache | |
+ for line in '$(docker logs "$CID" 2>&1)' | |
+ dokku_log_verbose_quiet '+ ln -sf /cache /tmp/cache' | |
+ declare 'desc=log verbose formatter (with quiet option)' | |
+ [[ -z '' ]] | |
+ echo ' + ln -sf /cache /tmp/cache' | |
+ ln -sf /cache /tmp/cache | |
+ for line in '$(docker logs "$CID" 2>&1)' | |
+ dokku_log_verbose_quiet 'removing installation cache...' | |
+ declare 'desc=log verbose formatter (with quiet option)' | |
+ [[ -z '' ]] | |
+ echo ' removing installation cache...' | |
removing installation cache... | |
+ for line in '$(docker logs "$CID" 2>&1)' | |
+ dokku_log_verbose_quiet '+ touch /app/predeploy.test' | |
+ declare 'desc=log verbose formatter (with quiet option)' | |
+ [[ -z '' ]] | |
+ echo ' + touch /app/predeploy.test' | |
+ touch /app/predeploy.test | |
+ for line in '$(docker logs "$CID" 2>&1)' | |
+ dokku_log_verbose_quiet '+ [[ -d /cache ]]' | |
+ declare 'desc=log verbose formatter (with quiet option)' | |
+ [[ -z '' ]] | |
+ echo ' + [[ -d /cache ]]' | |
+ [[ -d /cache ]] | |
+ for line in '$(docker logs "$CID" 2>&1)' | |
+ dokku_log_verbose_quiet '+ echo removing installation cache...' | |
+ declare 'desc=log verbose formatter (with quiet option)' | |
+ [[ -z '' ]] | |
+ echo ' + echo removing installation cache...' | |
+ echo removing installation cache... | |
+ for line in '$(docker logs "$CID" 2>&1)' | |
+ dokku_log_verbose_quiet '+ rm -f /tmp/cache' | |
+ declare 'desc=log verbose formatter (with quiet option)' | |
+ [[ -z '' ]] | |
+ echo ' + rm -f /tmp/cache' | |
+ rm -f /tmp/cache | |
+ IFS=' | |
' | |
+ dokku_log_info2_quiet 'end node-example web container output' | |
+ declare 'desc=log info2 formatter (with quiet option)' | |
+ [[ -z '' ]] | |
+ echo '=====> end node-example web container output' | |
=====> end node-example web container output | |
+ kill_new 4d83baff6b52e664131881fd55dad91e0dc37a4655a14d265e5f85ed99e4235a | |
+ declare 'desc=wrapper function to kill newly started app container' | |
+ local id=4d83baff6b52e664131881fd55dad91e0dc37a4655a14d265e5f85ed99e4235a | |
+ docker inspect 4d83baff6b52e664131881fd55dad91e0dc37a4655a14d265e5f85ed99e4235a | |
+ docker stop 4d83baff6b52e664131881fd55dad91e0dc37a4655a14d265e5f85ed99e4235a | |
+ docker kill 4d83baff6b52e664131881fd55dad91e0dc37a4655a14d265e5f85ed99e4235a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment