-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Description
I've set up a simple repo (https://github.com/motin/drone-dokku-sanity-check) that replicates the issue. Here is the log output from a non-interactive drone build session:
$ git clone --depth=50 --recursive --branch=develop git://github.com/motin/drone-dokku-sanity-check.git /var/cache/drone/src/github.com/motin/drone-dokku-sanity-check
Cloning into '/var/cache/drone/src/github.com/motin/drone-dokku-sanity-check'...
$ git checkout -qf 6346af224ced5a82fdeaf5ab5917bdd571f1f633
$ export DOKKU_HOST=dokku.example.com
$ bash drone.sh
+ set -o errexit
+ echo '===== Prepare some sample repository to deploy with dokku ====='
===== Prepare some sample repository to deploy with dokku =====
+ mkdir /tmp/empty-git
+ cd /tmp/empty-git
+ git init
Initialized empty Git repository in /tmp/empty-git/.git/
+ git checkout -b master
+ touch index.php
+ git add index.php
+ echo 'echo Hello'
+ chmod +x shell-script.sh
+ git add shell-script.sh
+ git commit -m 'Dokku sanity check commit'
[master (root-commit) ff20eef] Dokku sanity check commit
1 file changed, 1 insertion(+)
create mode 100644 index.php
create mode 100755 shell-script.sh
Done
===== Check access to dokku ====
+ echo Done
+ echo
+ echo '===== Check access to dokku ===='
+ git push dokku@dokku.example.com:sanity-check master:master -f
Warning: Permanently added 'dokku.example.com,188.226.184.43' (ECDSA) to the list of known hosts.
++ id -un
+ [[ dokku != \d\o\k\k\u ]]
+ case "$1" in
++ ls -d /var/lib/dokku/plugins/00_dokku-standard/commands /var/lib/dokku/plugins/backup/commands /var/lib/dokku/plugins/config/commands /var/lib/dokku/plugins/domains-plugin/commands /var/lib/dokku/plugins/git/commands /var/lib/dokku/plugins/mariadb/commands /var/lib/dokku/plugins/nginx-vhosts/commands /var/lib/dokku/plugins/rebuild/commands
+ for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
+ /var/lib/dokku/plugins/00_dokku-standard/commands git-receive-pack ''\''sanity-check'\'''
+ case "$1" in
+ for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
+ /var/lib/dokku/plugins/backup/commands git-receive-pack ''\''sanity-check'\'''
+ CURRENT_BACKUP_VERSION=1
+ set -e
+ case "$1" in
+ for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
+ /var/lib/dokku/plugins/config/commands git-receive-pack ''\''sanity-check'\'''
+ [[ git-receive-pack == config ]]
+ [[ git-receive-pack == config:* ]]
+ case "$1" in
+ for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
+ /var/lib/dokku/plugins/domains-plugin/commands git-receive-pack ''\''sanity-check'\'''
+ [[ git-receive-pack == domains ]]
+ [[ git-receive-pack == domains:* ]]
+ case "$1" in
+ for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
+ /var/lib/dokku/plugins/git/commands git-receive-pack ''\''sanity-check'\'''
+ case "$1" in
++ echo ''\''sanity-check'\'''
++ perl -pe 's/(?<!\\)'\''//g'
++ sed 's/\\'\''/'\''/g'
+ APP=sanity-check
+ APP_PATH=/home/dokku/sanity-check
+ [[ git-receive-pack == \g\i\t\-\r\e\c\e\i\v\e\-\p\a\c\k ]]
+ [[ ! -d /home/dokku/sanity-check/refs ]]
+ git init --bare /home/dokku/sanity-check
+ PRERECEIVE_HOOK=/home/dokku/sanity-check/hooks/pre-receive
+ cat
+ chmod +x /home/dokku/sanity-check/hooks/pre-receive
+ args='git-receive-pack '\''sanity-check'\'''
+ git-shell -c 'git-receive-pack '\''sanity-check'\'''
remote: ++ id -un
remote: + [[ dokku != \d\o\k\k\u ]]
remote: + case "$1" in
remote: ++ ls -d /var/lib/dokku/plugins/00_dokku-standard/commands /var/lib/dokku/plugins/backup/commands /var/lib/dokku/plugins/config/commands /var/lib/dokku/plugins/domains-plugin/commands /var/lib/dokku/plugins/git/commands /var/lib/dokku/plugins/mariadb/commands /var/lib/dokku/plugins/nginx-vhosts/commands /var/lib/dokku/plugins/rebuild/commands
remote: + for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
remote: + /var/lib/dokku/plugins/00_dokku-standard/commands git-hook sanity-check
remote: + case "$1" in
remote: + for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
remote: + /var/lib/dokku/plugins/backup/commands git-hook sanity-check
remote: + CURRENT_BACKUP_VERSION=1
remote: + set -e
remote: + case "$1" in
remote: + for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
remote: + /var/lib/dokku/plugins/config/commands git-hook sanity-check
remote: + [[ git-hook == config ]]
remote: + [[ git-hook == config:* ]]
remote: + case "$1" in
remote: + for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
remote: + /var/lib/dokku/plugins/domains-plugin/commands git-hook sanity-check
remote: + [[ git-hook == domains ]]
remote: + [[ git-hook == domains:* ]]
remote: + case "$1" in
remote: + for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
remote: + /var/lib/dokku/plugins/git/commands git-hook sanity-check
remote: + case "$1" in
remote: + APP=sanity-check
remote: + read oldrev newrev refname
remote: + [[ refs/heads/master = \r\e\f\s\/\h\e\a\d\s\/\m\a\s\t\e\r ]]
remote: + dokku receive sanity-check
remote: + git_archive_all sanity-check ff20eef07c00ffed7a60dfe953ae48a26deae343
remote: + APP=sanity-check
remote: + REV=ff20eef07c00ffed7a60dfe953ae48a26deae343
remote: + sed -u 's/^/�[1G/'
remote: ++ mktemp -d
remote: ++ id -un
remote: + TMP_WORK_DIR=/tmp/tmp.SvxBHcYvbX
remote: + chmod 755 /tmp/tmp.SvxBHcYvbX
remote: + [[ dokku != \d\o\k\k\u ]]
remote: + unset GIT_DIR GIT_WORK_TREE
remote: + git clone /home/dokku/sanity-check /tmp/tmp.SvxBHcYvbX
remote: + case "$1" in
remote: + APP=sanity-check
remote: + IMAGE=dokku/sanity-check
remote: + echo '-----> Cleaning up ...'
remote: �[1G-----> Cleaning up ...
remote: + dokku cleanup
remote: ++ id -un
remote: + [[ dokku != \d\o\k\k\u ]]
remote: + case "$1" in
remote: + docker ps -a
remote: + grep Exit
remote: + docker images
remote: + grep '<none>'
remote: + awk '{print $1}'
remote: warning: You appear to have cloned an empty repository.
remote: + awk '{print $3}'
remote: + echo '-----> Building sanity-check ...'
remote: �[1G-----> Building sanity-check ...
remote: + xargs docker rmi
remote: + xargs docker rm
remote: + cat
remote: + dokku build sanity-check
remote: + pushd /tmp/tmp.SvxBHcYvbX
remote: + git config advice.detachedHead false
remote: + git checkout ff20eef07c00ffed7a60dfe953ae48a26deae343
remote: HEAD is now at ff20eef... Dokku sanity check commit
remote: + git submodule update --init --recursive
remote: ++ id -un
remote: + [[ dokku != \d\o\k\k\u ]]
remote: + case "$1" in
remote: + APP=sanity-check
remote: + IMAGE=dokku/sanity-check
remote: + CACHE_DIR=/home/dokku/sanity-check/cache
remote: ++ docker run -i -a stdin progrium/buildstep /bin/bash -c 'mkdir -p /app && tar -xC /app'
remote: ++ cat
remote: + find -name .git -prune -exec rm -rf '{}' ';'
remote: + tar c .
remote: + popd
remote: + rm -rf /tmp/tmp.SvxBHcYvbX
remote: + id=19724721128b8f716e776f470f9a2bdbcf15e1d9522c5f96e948502481407b36
remote: ++ docker wait 19724721128b8f716e776f470f9a2bdbcf15e1d9522c5f96e948502481407b36
remote: + test 0 -eq 0
remote: + docker commit 19724721128b8f716e776f470f9a2bdbcf15e1d9522c5f96e948502481407b36 dokku/sanity-check
remote: + [[ -d /home/dokku/sanity-check/cache ]]
remote: + mkdir /home/dokku/sanity-check/cache
remote: + pluginhook pre-build sanity-check
remote: + APP=sanity-check
remote: + IMAGE=dokku/sanity-check
remote: + SOURCE_ENV_PATH=/home/dokku/sanity-check/ENV
remote: + [[ -f /home/dokku/sanity-check/ENV ]]
remote: ++ docker run -d -v /home/dokku/sanity-check/cache:/cache dokku/sanity-check /build/builder
remote: + id=5c4da47729df015257819249f6a293bae5011fd94986a20ef4a85b89f91599de
remote: + docker attach 5c4da47729df015257819249f6a293bae5011fd94986a20ef4a85b89f91599de
remote: �[1G PHP (classic) app detected
remote: �[1G-----> Bundling NGINX 1.4.4
remote: �[1G-----> Bundling PHP 5.5.10
remote: �[1G-----> Bundling extensions
remote: �[1G apcu
remote: �[1G phpredis
remote: �[1G mongo
remote: �[1G-----> Setting up default configuration
remote: �[1G-----> Vendoring binaries into slug
remote: �[1G-----> Discovering process types
remote: �[1G Default process types for PHP (classic) -> web
remote: ++ docker wait 5c4da47729df015257819249f6a293bae5011fd94986a20ef4a85b89f91599de
remote: + test 0 -eq 0
remote: + docker commit 5c4da47729df015257819249f6a293bae5011fd94986a20ef4a85b89f91599de dokku/sanity-check
remote: + pluginhook post-build sanity-check
remote: + echo '-----> Releasing sanity-check ...'
remote: + dokku release sanity-check
remote: �[1G-----> Releasing sanity-check ...
remote: ++ id -un
remote: + [[ dokku != \d\o\k\k\u ]]
remote: + case "$1" in
remote: + APP=sanity-check
remote: + IMAGE=dokku/sanity-check
remote: + pluginhook pre-release sanity-check
remote: + [[ -f /home/dokku/sanity-check/ENV ]]
remote: + pluginhook post-release sanity-check
remote: + echo '-----> Deploying sanity-check ...'
remote: + dokku deploy sanity-check
remote: �[1G-----> Deploying sanity-check ...
remote: ++ id -un
remote: + [[ dokku != \d\o\k\k\u ]]
remote: + case "$1" in
remote: + APP=sanity-check
remote: + IMAGE=dokku/sanity-check
remote: + pluginhook pre-deploy sanity-check
remote: + [[ -f /home/dokku/sanity-check/CONTAINER ]]
remote: ++ :
remote: ++ pluginhook docker-args sanity-check
remote: + DOCKER_ARGS=
remote: ++ docker run -d -p 5000 -e PORT=5000 dokku/sanity-check /bin/bash -c '/start web'
remote: + id=da54efefd1a96ae59191e0c5a4cb630c1dc3032e363829dbcffd8d795768c10f
remote: + echo da54efefd1a96ae59191e0c5a4cb630c1dc3032e363829dbcffd8d795768c10f
remote: ++ sed s/0.0.0.0://
remote: ++ docker port da54efefd1a96ae59191e0c5a4cb630c1dc3032e363829dbcffd8d795768c10f 5000
remote: + port=49625
remote: + echo 49625
remote: + echo http://gapminder.org:49625
remote: + pluginhook post-deploy sanity-check 49625
remote: + APP=sanity-check
remote: + PORT=49625
remote: + DOMAINS_FILE=/home/dokku/sanity-check/DOMAINS
remote: + [[ -f /home/dokku/sanity-check/DOMAINS ]]
remote: + APP=sanity-check
remote: + PORT=49625
remote: + WILDCARD_SSL=/home/dokku/tls
remote: + SSL=/home/dokku/sanity-check/tls
remote: + [[ -f /home/dokku/VHOST ]]
remote: + VHOST=gapminder.org
remote: + SUBDOMAIN=sanity-check
remote: + [[ sanity-check == *.* ]]
remote: + hostname=sanity-check.gapminder.org
remote: + [[ -e /home/dokku/sanity-check/tls/server.crt ]]
remote: + [[ -e /home/dokku/tls/server.crt ]]
remote: + [[ -n '' ]]
remote: + cat
remote: + echo http://sanity-check.gapminder.org
remote: + pluginhook nginx-pre-reload sanity-check
remote: + sudo /etc/init.d/nginx reload
remote: + echo '=====> Application deployed:'
remote: �[1G=====> Application deployed:
remote: ++ dokku url sanity-check
remote: ++ id -un
remote: + [[ dokku != \d\o\k\k\u ]]
remote: + case "$1" in
remote: ++ ls -d /var/lib/dokku/plugins/00_dokku-standard/commands /var/lib/dokku/plugins/backup/commands /var/lib/dokku/plugins/config/commands /var/lib/dokku/plugins/domains-plugin/commands /var/lib/dokku/plugins/git/commands /var/lib/dokku/plugins/mariadb/commands /var/lib/dokku/plugins/nginx-vhosts/commands /var/lib/dokku/plugins/rebuild/commands
remote: + for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
remote: + /var/lib/dokku/plugins/00_dokku-standard/commands url sanity-check
remote: + case "$1" in
remote: + APP=sanity-check
remote: + [[ ! -d /home/dokku/sanity-check ]]
remote: + [[ -f /home/dokku/sanity-check/URL ]]
remote: + echo http://sanity-check.gapminder.org
remote: + for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
remote: + /var/lib/dokku/plugins/backup/commands url sanity-check
remote: + CURRENT_BACKUP_VERSION=1
remote: + set -e
remote: + case "$1" in
remote: + for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
remote: + /var/lib/dokku/plugins/config/commands url sanity-check
remote: + [[ url == config ]]
remote: + [[ url == config:* ]]
remote: + case "$1" in
remote: + for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
remote: + /var/lib/dokku/plugins/domains-plugin/commands url sanity-check
remote: + [[ url == domains ]]
remote: + [[ url == domains:* ]]
remote: + case "$1" in
remote: + for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
remote: + /var/lib/dokku/plugins/git/commands url sanity-check
remote: + case "$1" in
remote: + for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
remote: + /var/lib/dokku/plugins/mariadb/commands url sanity-check
remote: + for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
remote: + /var/lib/dokku/plugins/nginx-vhosts/commands url sanity-check
remote: + case "$1" in
remote: + for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
remote: + /var/lib/dokku/plugins/rebuild/commands url sanity-check
remote: + case "$1" in
remote: + echo ' http://sanity-check.gapminder.org'
remote: + echo
remote: �[1G http://sanity-check.gapminder.org
remote: �[1G
remote: + read oldrev newrev refname
remote: + for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
remote: + /var/lib/dokku/plugins/mariadb/commands git-hook sanity-check
remote: + for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
remote: + /var/lib/dokku/plugins/nginx-vhosts/commands git-hook sanity-check
remote: + case "$1" in
remote: + for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
remote: + /var/lib/dokku/plugins/rebuild/commands git-hook sanity-check
remote: + case "$1" in
+ for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
+ /var/lib/dokku/plugins/mariadb/commands git-receive-pack ''\''sanity-check'\'''
+ for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
+ /var/lib/dokku/plugins/nginx-vhosts/commands git-receive-pack ''\''sanity-check'\'''
+ case "$1" in
+ for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
+ /var/lib/dokku/plugins/rebuild/commands git-receive-pack ''\''sanity-check'\'''
+ case "$1" in
To dokku@dokku.example.com:sanity-check
* [new branch] master -> master
Done
===== Check output of remote dokku commands ====
+ echo Done
+ echo
+ echo '===== Check output of remote dokku commands ===='
+ ssh dokku@dokku.example.com run sanity-check /bin/bash /app/shell-script.sh
++ id -un
+ [[ dokku != \d\o\k\k\u ]]
+ case "$1" in
++ ls -d /var/lib/dokku/plugins/00_dokku-standard/commands /var/lib/dokku/plugins/backup/commands /var/lib/dokku/plugins/config/commands /var/lib/dokku/plugins/domains-plugin/commands /var/lib/dokku/plugins/git/commands /var/lib/dokku/plugins/mariadb/commands /var/lib/dokku/plugins/nginx-vhosts/commands /var/lib/dokku/plugins/rebuild/commands
+ for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
+ /var/lib/dokku/plugins/00_dokku-standard/commands run sanity-check /bin/bash /app/shell-script.sh
+ case "$1" in
+ [[ -z sanity-check ]]
+ APP=sanity-check
+ IMAGE=dokku/sanity-check
+ [[ ! -d /home/dokku/sanity-check ]]
+ shift 2
++ :
++ pluginhook docker-args sanity-check
+ DOCKER_ARGS=
+ docker run -i -t dokku/sanity-check /exec /bin/bash /app/shell-script.sh
+ for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
+ /var/lib/dokku/plugins/backup/commands run sanity-check /bin/bash /app/shell-script.sh
+ CURRENT_BACKUP_VERSION=1
+ set -e
+ case "$1" in
+ for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
+ /var/lib/dokku/plugins/config/commands run sanity-check /bin/bash /app/shell-script.sh
+ [[ run == config ]]
+ [[ run == config:* ]]
+ case "$1" in
+ for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
+ /var/lib/dokku/plugins/domains-plugin/commands run sanity-check /bin/bash /app/shell-script.sh
+ [[ run == domains ]]
+ [[ run == domains:* ]]
+ case "$1" in
+ for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
+ /var/lib/dokku/plugins/git/commands run sanity-check /bin/bash /app/shell-script.sh
+ case "$1" in
+ for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
+ /var/lib/dokku/plugins/mariadb/commands run sanity-check /bin/bash /app/shell-script.sh
+ for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
+ /var/lib/dokku/plugins/nginx-vhosts/commands run sanity-check /bin/bash /app/shell-script.sh
+ case "$1" in
+ for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
+ /var/lib/dokku/plugins/rebuild/commands run sanity-check /bin/bash /app/shell-script.sh
+ case "$1" in
+ echo Done
+ exit 0
Done
$ exit 0
Running the same command locally over ssh works fine:
$ ssh dokku@dokku.example.com run sanity-check /bin/bash /app/shell-script.sh
++ id -un
+ [[ dokku != \d\o\k\k\u ]]
+ case "$1" in
++ ls -d /var/lib/dokku/plugins/00_dokku-standard/commands /var/lib/dokku/plugins/backup/commands /var/lib/dokku/plugins/config/commands /var/lib/dokku/plugins/domains-plugin/commands /var/lib/dokku/plugins/git/commands /var/lib/dokku/plugins/mariadb/commands /var/lib/dokku/plugins/nginx-vhosts/commands /var/lib/dokku/plugins/rebuild/commands
+ for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
+ /var/lib/dokku/plugins/00_dokku-standard/commands run sanity-check-manual /bin/bash /app/shell-script.sh
+ case "$1" in
+ [[ -z sanity-check-manual ]]
+ APP=sanity-check-manual
+ IMAGE=dokku/sanity-check-manual
+ [[ ! -d /home/dokku/sanity-check-manual ]]
+ shift 2
++ :
++ pluginhook docker-args sanity-check-manual
+ DOCKER_ARGS=
+ docker run -i -t dokku/sanity-check-manual /exec /bin/bash /app/shell-script.sh
Hello
foo
bar
+ for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
+ /var/lib/dokku/plugins/backup/commands run sanity-check-manual /bin/bash /app/shell-script.sh
+ CURRENT_BACKUP_VERSION=1
+ set -e
+ case "$1" in
+ for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
+ /var/lib/dokku/plugins/config/commands run sanity-check-manual /bin/bash /app/shell-script.sh
+ [[ run == config ]]
+ [[ run == config:* ]]
+ case "$1" in
+ for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
+ /var/lib/dokku/plugins/domains-plugin/commands run sanity-check-manual /bin/bash /app/shell-script.sh
+ [[ run == domains ]]
+ [[ run == domains:* ]]
+ case "$1" in
+ for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
+ /var/lib/dokku/plugins/git/commands run sanity-check-manual /bin/bash /app/shell-script.sh
+ case "$1" in
+ for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
+ /var/lib/dokku/plugins/mariadb/commands run sanity-check-manual /bin/bash /app/shell-script.sh
+ for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
+ /var/lib/dokku/plugins/nginx-vhosts/commands run sanity-check-manual /bin/bash /app/shell-script.sh
+ case "$1" in
+ for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
+ /var/lib/dokku/plugins/rebuild/commands run sanity-check-manual /bin/bash /app/shell-script.sh
+ case "$1" in
Running it locally on the dokku host also works fine:
root@dokku:~# dokku run sanity-check /app/shell-script.sh
++ id -un
+ [[ root != \d\o\k\k\u ]]
+ [[ run != \p\l\u\g\i\n\s\-\i\n\s\t\a\l\l ]]
+ sudo -u dokku -H /usr/local/bin/dokku run sanity-check /app/shell-script.sh
++ id -un
+ [[ dokku != \d\o\k\k\u ]]
+ case "$1" in
++ ls -d /var/lib/dokku/plugins/00_dokku-standard/commands /var/lib/dokku/plugins/backup/commands /var/lib/dokku/plugins/config/commands /var/lib/dokku/plugins/domains-plugin/commands /var/lib/dokku/plugins/git/commands /var/lib/dokku/plugins/mariadb/commands /var/lib/dokku/plugins/nginx-vhosts/commands /var/lib/dokku/plugins/rebuild/commands
+ for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
+ /var/lib/dokku/plugins/00_dokku-standard/commands run sanity-check /app/shell-script.sh
+ case "$1" in
+ [[ -z sanity-check ]]
+ APP=sanity-check
+ IMAGE=dokku/sanity-check
+ [[ ! -d /home/dokku/sanity-check ]]
+ shift 2
++ :
++ pluginhook docker-args sanity-check
+ DOCKER_ARGS=
+ docker run -i -t dokku/sanity-check /exec /app/shell-script.sh
Hello
foo
bar
+ for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
+ /var/lib/dokku/plugins/backup/commands run sanity-check /app/shell-script.sh
+ CURRENT_BACKUP_VERSION=1
+ set -e
+ case "$1" in
+ for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
+ /var/lib/dokku/plugins/config/commands run sanity-check /app/shell-script.sh
+ [[ run == config ]]
+ [[ run == config:* ]]
+ case "$1" in
+ for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
+ /var/lib/dokku/plugins/domains-plugin/commands run sanity-check /app/shell-script.sh
+ [[ run == domains ]]
+ [[ run == domains:* ]]
+ case "$1" in
+ for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
+ /var/lib/dokku/plugins/git/commands run sanity-check /app/shell-script.sh
+ case "$1" in
+ for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
+ /var/lib/dokku/plugins/mariadb/commands run sanity-check /app/shell-script.sh
+ for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
+ /var/lib/dokku/plugins/nginx-vhosts/commands run sanity-check /app/shell-script.sh
+ case "$1" in
+ for script in '$(ls -d /var/lib/dokku/plugins/*/commands)'
+ /var/lib/dokku/plugins/rebuild/commands run sanity-check /app/shell-script.sh
+ case "$1" in
+ exit
Running it locally over ssh, the output stops after "Hello" until I press Enter, whereafter the rest of the output above is displayed. Thus, I can imagine that the problem is related to some requesting of a tty or some redirection of stdin/stdout, but how can this be worked around or fixed so that the output is shown in the drone logs?