这是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
19 changes: 19 additions & 0 deletions docs/appendices/0.30.0-migration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,22 @@
- `post-release-dockerfile`
- `post-release-pack`
- The ability to call `logs:failed` without specifying an app or `--all` flag has been removed. This was deprecated in 0.22.0. Please see the [logs:failed](/docs/deployment/logs.md#failed-deploy-logs).
- The following app shell functions - deprecated since 0.20.0 - have been removed in favor of their plugin trigger equivalents. Sourcing the `app/functions` file will fail going forward.
- `apps#apps_create()` is removed in favor of `plugn trigger app-create`.
- `apps#apps_destroy()` is removed in favor of `plugn trigger app-destroy`.
- `apps#apps_exists()` is removed in favor of `plugn trigger app-exists`.
- `apps#apps_maybe_create()` is removed in favor of `plugn trigger app-maybe-create`.
- The following common shell functions have been removed:
- `common#is_container_running()` (deprecated since 0.12.6) is removed in favor of `common#is_container_status()`.
- `common#is_app_running()` (deprecated since 0.22.0) is removed in favor of `ps#fn-ps-is-app-running()`.
- The global `--rm-container` and `--rm` flags - deprecated since 0.25.0 - have been removed.
- The following git shell functions have been removed:
- `git#use_git_worktree()` (deprecated since 0.23.7) has been removed. There is no alternative as the function has been made internal.
- `git#git_deploy_branch()`(deprecated since 0.21.0) has been removed in favor of `plugn trigger git-deploy-branch`.
- The following nginx commands - deprecated since 0.20.0 - have been removed:
- `nginx:show-conf` has been removed in favor of `nginx:show-config`.
- `nginx:validate` has been removed in favor of `nginx:validate-config`.
- `nginx:build-config` - deprecated since 0.21.0 - has been removed in favor of `proxy:build-config`.
- The following proxy functions - deprecated since 0.20.0 - have been removed in favor of their plugin trigger equivalents. Sourcing the `proxy/functions` file will fail going forward.
- `proxy#is_app_proxy_enabled()` is removed in favor of `plugn trigger proxy-is-enabled`.
- `proxy#get_app_proxy_type()` is removed in favor of `plugn trigger proxy-type`.
2 changes: 1 addition & 1 deletion docs/development/plugin-triggers.md
Original file line number Diff line number Diff line change
Expand Up @@ -1196,7 +1196,7 @@ echo "$NEW_SUBDOMAIN.$VHOST"
> Warning: The arguments INTERNAL_PORT and INTERNAL_IP_ADDRESS are no longer sufficient to retrieve all app listeners. Please run `plugn trigger network-get-listeners APP` within any implementation of `nginx-pre-reload` in order to retrieve all application listeners.

- Description: Run before nginx reloads hosts
- Invoked by: `dokku nginx:build-config`
- Invoked by: `dokku proxy:build-config`
- Arguments: `$APP $INTERNAL_PORT $INTERNAL_IP_ADDRESS`
- Example:

Expand Down
41 changes: 0 additions & 41 deletions plugins/apps/functions

This file was deleted.

35 changes: 0 additions & 35 deletions plugins/common/functions
Original file line number Diff line number Diff line change
Expand Up @@ -430,9 +430,6 @@ parse_args() {
--trace)
export DOKKU_TRACE=1
;;
--rm-container | --rm)
dokku_log_warn_quiet "Deprecated: all run containers are now removed on exit by default"
;;
--force)
export DOKKU_APPS_FORCE_DELETE=1
;;
Expand Down Expand Up @@ -573,22 +570,6 @@ is_deployed() {
"$PLUGIN_CORE_AVAILABLE_PATH/common/common" --quiet is-deployed "$APP"
}

is_container_running() {
declare desc="return 0 if given docker container id is in running state"
declare deprecated=true
declare CID="$1"
local CONTAINER_STATUS

dokku_log_warn "Deprecated: common#is_container_status"
CONTAINER_STATUS=$("$DOCKER_BIN" container inspect --format '{{.State.Running}}' "$CID" || true)

if [[ "$CONTAINER_STATUS" == "true" ]]; then
return 0
fi

return 1
}

is_container_status() {
declare desc="return 0 if given docker container id is in given state"
local CID=$1
Expand All @@ -602,22 +583,6 @@ is_container_status() {
return 1
}

is_app_running() {
declare desc="return 0 if given app has a running container"
declare deprecated=true
local APP="$1"

dokku_log_warn "Deprecated: ps#fn-ps-is-app-running"

local APP_RUNNING_CONTAINER_IDS=$(get_app_running_container_ids "$APP" 2>/dev/null)

if [[ -n "$APP_RUNNING_CONTAINER_IDS" ]]; then
return 0
else
return 1
fi
}

dokku_build() {
declare desc="build phase"
declare APP="$1" IMAGE_SOURCE_TYPE="$2" SOURCECODE_WORK_DIR="$3"
Expand Down
18 changes: 0 additions & 18 deletions plugins/git/functions
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
#!/usr/bin/env bash
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
source "$PLUGIN_AVAILABLE_PATH/apps/functions"
source "$PLUGIN_AVAILABLE_PATH/config/functions"
source "$PLUGIN_AVAILABLE_PATH/git/internal-functions"
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x

use_git_worktree() {
declare desc="detects whether to use git worktree"
declare deprecated=true
dokku_log_warn "Deprecated: fn-git-use-worktree"

fn-git-use-worktree
}

git_build_app_repo() {
declare desc="builds local git app repo for app"
declare APP="$1" REV="$2"
Expand Down Expand Up @@ -78,15 +69,6 @@ git_trigger_build() {
dokku_receive "$APP" "$BUILDER" "$TMP_WORK_DIR"
}

git_deploy_branch() {
declare desc="retrieve the deploy branch for a given application"
declare APP="$1"
declare deprecated=true
dokku_log_warn "Deprecated: plugn#git-deploy-branch"

fn-git-deploy-branch "$APP"
}

cmd-git-hook() {
declare desc="kick off receive-app trigger from git prereceive hook"
declare cmd="git-hook"
Expand Down
10 changes: 0 additions & 10 deletions plugins/nginx-vhosts/command-functions
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,7 @@ cmd-nginx-report-single() {
cmd-nginx-show-config() {
declare desc="display app nginx config"
declare cmd="nginx:show-config"
declare deprecated=true
[[ "$1" == "$cmd" ]] && shift 1
if [[ "$1" == "nginx:show-conf" ]]; then
dokku_log_warn "Deprecated: Please use nginx:show-config"
shift 1
fi
declare APP="$1"

verify_app_name "$APP"
Expand Down Expand Up @@ -133,12 +128,7 @@ cmd-nginx-stop() {
cmd-nginx-validate-config() {
declare desc="validates and optionally cleans up invalid nginx configurations"
declare cmd="nginx:validate-config"
declare deprecated=true
[[ "$1" == "$cmd" ]] && shift 1
if [[ "$1" == "nginx:validate" ]]; then
dokku_log_warn "Deprecated: Please use nginx:validate-config"
shift 1
fi
declare APP="$1" FLAG="$2"

validate_nginx "$APP" "$FLAG"
Expand Down
24 changes: 0 additions & 24 deletions plugins/nginx-vhosts/subcommands/build-config

This file was deleted.

23 changes: 0 additions & 23 deletions plugins/proxy/functions

This file was deleted.

6 changes: 3 additions & 3 deletions tests/unit/nginx-vhosts_1.bats
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ teardown() {
assert_output "$help_output"
}

@test "(nginx-vhosts) nginx:build-config (domains:disable/enable)" {
@test "(nginx-vhosts) proxy:build-config (domains:disable/enable)" {
deploy_app
dokku domains:disable $TEST_APP

Expand All @@ -45,7 +45,7 @@ teardown() {
assert_http_success http://${TEST_APP}.dokku.me
}

@test "(nginx-vhosts) nginx:build-config (domains:add pre deploy)" {
@test "(nginx-vhosts) proxy:build-config (domains:add pre deploy)" {
create_app
run /bin/bash -c "dokku domains:add $TEST_APP www.test.app.dokku.me"
echo "output: $output"
Expand All @@ -59,7 +59,7 @@ teardown() {
assert_http_success http://www.test.app.dokku.me
}

@test "(nginx-vhosts) nginx:build-config (with global VHOST)" {
@test "(nginx-vhosts) proxy:build-config (with global VHOST)" {
echo "dokku.me" >"$DOKKU_ROOT/VHOST"
deploy_app

Expand Down
20 changes: 10 additions & 10 deletions tests/unit/nginx-vhosts_10.bats
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ teardown() {
echo "status: $status"
assert_success

run /bin/bash -c "dokku nginx:build-config $TEST_APP"
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
echo "output: $output"
echo "status: $status"
assert_success
Expand All @@ -35,7 +35,7 @@ teardown() {
echo "status: $status"
assert_success

run /bin/bash -c "dokku nginx:build-config $TEST_APP"
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
echo "output: $output"
echo "status: $status"
assert_success
Expand All @@ -52,7 +52,7 @@ teardown() {
echo "status: $status"
assert_success

run /bin/bash -c "dokku nginx:build-config $TEST_APP"
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
echo "output: $output"
echo "status: $status"
assert_success
Expand All @@ -67,7 +67,7 @@ teardown() {
echo "status: $status"
assert_success

run /bin/bash -c "dokku nginx:build-config $TEST_APP"
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
echo "output: $output"
echo "status: $status"
assert_success
Expand All @@ -84,7 +84,7 @@ teardown() {
echo "status: $status"
assert_success

run /bin/bash -c "dokku nginx:build-config $TEST_APP"
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
echo "output: $output"
echo "status: $status"
assert_success
Expand All @@ -99,7 +99,7 @@ teardown() {
echo "status: $status"
assert_success

run /bin/bash -c "dokku nginx:build-config $TEST_APP"
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
echo "output: $output"
echo "status: $status"
assert_success
Expand All @@ -116,7 +116,7 @@ teardown() {
echo "status: $status"
assert_success

run /bin/bash -c "dokku nginx:build-config $TEST_APP"
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
echo "output: $output"
echo "status: $status"
assert_success
Expand All @@ -131,7 +131,7 @@ teardown() {
echo "status: $status"
assert_success

run /bin/bash -c "dokku nginx:build-config $TEST_APP"
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
echo "output: $output"
echo "status: $status"
assert_success
Expand All @@ -146,7 +146,7 @@ teardown() {
echo "status: $status"
assert_success

run /bin/bash -c "dokku nginx:build-config $TEST_APP"
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
echo "output: $output"
echo "status: $status"
assert_success
Expand All @@ -161,7 +161,7 @@ teardown() {
echo "status: $status"
assert_success

run /bin/bash -c "dokku nginx:build-config $TEST_APP"
run /bin/bash -c "dokku proxy:build-config $TEST_APP"
echo "output: $output"
echo "status: $status"
assert_success
Expand Down
Loading