这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions plugins/builder-pack/docker-args-process-deploy
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,23 @@ set -eo pipefail
trigger-builder-pack-docker-args-process-deploy() {
declare desc="builder-pack core-post-deploy plugin trigger"
declare trigger="docker-args-process-deploy"
declare APP="$1" IMAGE_SOURCE_TYPE="$2"
declare APP="$1" IMAGE_SOURCE_TYPE="$2" IMAGE_TAG="$3" PROC_TYPE="$4"
local STDIN=$(cat)
local output
local inject_launcher output

if [[ "$IMAGE_SOURCE_TYPE" != "pack" ]]; then
return
fi

# without this, the command and arguments are passed as args to the default process type
output="--entrypoint launcher "
inject_launcher=true
if [[ -n "$IMAGE_TAG" ]] && [[ -n "$PROC_TYPE" ]] && [[ -z "$(plugn trigger procfile-get-command "$APP" "$PROC_TYPE" "5000" 2>/dev/null || echo '')" ]]; then
inject_launcher=false
fi

if [[ "$inject_launcher" == "true" ]]; then
# without this, the command and arguments are passed as args to the default process type
output="--entrypoint launcher "
fi

echo -n "$STDIN$output"
}
Expand Down
7 changes: 7 additions & 0 deletions tests/unit/builder-pack.bats
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ teardown() {
assert_output_contains 'Installing requirements with pip'
}

@test "(builder-pack) git:from-image without a Procfile" {
run /bin/bash -c "dokku git:from-image $TEST_APP dokku/smoke-test-gradle-app:1"
echo "output: $output"
echo "status: $status"
assert_success
}

inject_requirements_txt() {
local APP="$1"
local APP_REPO_DIR="$2"
Expand Down