chore: remove deprecated tags plugin
This plugin was deprecated in 0.24.0 in favor of git:from-image. Users should migrate to the new command.
This commit is contained in:
@@ -1 +0,0 @@
|
||||
hook
|
||||
@@ -1 +0,0 @@
|
||||
hook
|
||||
@@ -1 +0,0 @@
|
||||
hook
|
||||
@@ -1 +0,0 @@
|
||||
hook
|
||||
@@ -1,37 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
trigger-scheduler-docker-local-scheduler-tags-create() {
|
||||
declare desc="scheduler-docker-local scheduler-tags-create plugin trigger"
|
||||
declare trigger="scheduler-tags-create"
|
||||
declare DOKKU_SCHEDULER="$1" APP="$2" SOURCE_IMAGE="$3" TARGET_IMAGE="$4"
|
||||
|
||||
if [[ "$DOKKU_SCHEDULER" != "docker-local" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
local TAG_OPTS=""
|
||||
[[ $(is_tag_force_available) ]] && TAG_OPTS="-f"
|
||||
# shellcheck disable=SC2086
|
||||
"$DOCKER_BIN" image tag $TAG_OPTS "$SOURCE_IMAGE" "$TARGET_IMAGE"
|
||||
}
|
||||
|
||||
is_tag_force_available() {
|
||||
CLIENT_VERSION_STRING="$(get_docker_version)"
|
||||
MAJOR_VERSION=$(echo "$CLIENT_VERSION_STRING" | awk '{split($0,a,"."); print a[1]}')
|
||||
MINOR_VERSION=$(echo "$CLIENT_VERSION_STRING" | awk '{split($0,a,"."); print a[2]}')
|
||||
PATCH_VERSION=$(echo "$CLIENT_VERSION_STRING" | awk '{split($0,a,"."); print a[3]}')
|
||||
|
||||
# docker tag -f was dropped in 1.12.0
|
||||
if [[ "$MAJOR_VERSION" -gt 1 ]]; then
|
||||
return 1
|
||||
elif [[ "$MAJOR_VERSION" -eq 1 ]] && [[ "$MINOR_VERSION" -ge 12 ]]; then
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
|
||||
trigger-scheduler-docker-local-scheduler-tags-create "$@"
|
||||
@@ -1,18 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
trigger-scheduler-docker-local-scheduler-tags-destroy() {
|
||||
declare desc="scheduler-docker-local scheduler-tags-destroy plugin trigger"
|
||||
declare trigger="scheduler-tags-destroy"
|
||||
declare DOKKU_SCHEDULER="$1" APP="$2" IMAGE_REPO="$3" IMAGE_TAG="$4"
|
||||
|
||||
if [[ "$DOKKU_SCHEDULER" != "docker-local" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
"$DOCKER_BIN" image rm "$IMAGE_REPO:$IMAGE_TAG"
|
||||
}
|
||||
|
||||
trigger-scheduler-docker-local-scheduler-tags-destroy "$@"
|
||||
@@ -1,16 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
[[ " help tags:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
|
||||
source "$PLUGIN_AVAILABLE_PATH/tags/help-functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
case "$1" in
|
||||
help | tags:help)
|
||||
cmd-tags-help "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
|
||||
;;
|
||||
|
||||
esac
|
||||
@@ -1,35 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
cmd-tags-help() {
|
||||
declare desc="help command"
|
||||
declare CMD="$1"
|
||||
local plugin_name="tags"
|
||||
local plugin_description="Manage docker image tags"
|
||||
|
||||
if [[ "$CMD" == "${plugin_name}:help" ]]; then
|
||||
echo -e "Usage: dokku ${plugin_name}[:COMMAND]"
|
||||
echo ''
|
||||
echo "$plugin_description"
|
||||
echo ''
|
||||
echo 'Additional commands:'
|
||||
fn-help-content | sort | column -c2 -t -s,
|
||||
elif [[ $(ps -o command= $PPID) == *"--all"* ]]; then
|
||||
fn-help-content
|
||||
else
|
||||
cat <<help_desc
|
||||
$plugin_name, $plugin_description
|
||||
help_desc
|
||||
fi
|
||||
}
|
||||
|
||||
fn-help-content() {
|
||||
declare desc="return help content"
|
||||
cat <<help_content
|
||||
tags <app>, List all app image tags
|
||||
tags:create <app> <tag>, Add tag to latest running app image
|
||||
tags:deploy <app> <tag>, Deploy tagged app image
|
||||
tags:destroy <app> <tag>, Remove app image tag
|
||||
help_content
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
[plugin]
|
||||
description = "dokku core tags plugin"
|
||||
version = "0.25.7"
|
||||
[plugin.config]
|
||||
@@ -1,23 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
|
||||
cmd-tags-create() {
|
||||
declare desc="creates an images tag for app via command line"
|
||||
declare cmd="tags:create"
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
declare APP="$1" IMAGE_TAG="$2"
|
||||
|
||||
verify_app_name "$APP"
|
||||
|
||||
local IMAGE_REPO=$(get_app_image_repo "$APP")
|
||||
local DOKKU_SCHEDULER=$(get_app_scheduler "$APP")
|
||||
plugn trigger scheduler-tags-create "$DOKKU_SCHEDULER" "$APP" "$IMAGE_REPO:latest" "$IMAGE_REPO:$IMAGE_TAG"
|
||||
|
||||
dokku_log_info2_quiet "Added $IMAGE_TAG tag to $IMAGE_REPO"
|
||||
plugn trigger tags-create "$APP" "$IMAGE_TAG"
|
||||
}
|
||||
|
||||
cmd-tags-create "$@"
|
||||
@@ -1,19 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
cmd-tags-default() {
|
||||
declare desc="shows docker images tags for app via command line"
|
||||
declare cmd="tags"
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
declare APP="$1"
|
||||
|
||||
verify_app_name "$APP"
|
||||
|
||||
local IMAGE_REPO=$(get_app_image_repo "$APP")
|
||||
dokku_log_info2_quiet "Image tags for $IMAGE_REPO"
|
||||
"$DOCKER_BIN" image list "$IMAGE_REPO"
|
||||
}
|
||||
|
||||
cmd-tags-default "$@"
|
||||
@@ -1,25 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
cmd-tags-deploy() {
|
||||
declare desc="deploys an app with a given tagged image via command line"
|
||||
declare cmd="tags:deploy"
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
declare APP="$1" IMAGE_TAG="$2"
|
||||
|
||||
verify_app_name "$APP"
|
||||
|
||||
local IMAGE="$(get_app_image_name "$APP" "$IMAGE_TAG")"
|
||||
verify_image "$IMAGE" || return 1
|
||||
plugn trigger release-and-deploy "$APP" "$IMAGE_TAG"
|
||||
|
||||
if [[ "$IMAGE_TAG" != "latest" ]]; then
|
||||
local DOKKU_SCHEDULER="$(get_app_scheduler "$APP")"
|
||||
local LATEST_IMAGE="$(get_app_image_name "$APP")"
|
||||
plugn trigger scheduler-tags-create "$DOKKU_SCHEDULER" "$APP" "$IMAGE" "$LATEST_IMAGE"
|
||||
fi
|
||||
}
|
||||
|
||||
cmd-tags-deploy "$@"
|
||||
@@ -1,29 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
|
||||
cmd-tags-destroy() {
|
||||
declare desc="destroys an app image tag via command line"
|
||||
declare cmd="tags:destroy"
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
declare APP="$1" IMAGE_TAG="$2"
|
||||
|
||||
verify_app_name "$APP"
|
||||
|
||||
local IMAGE_REPO=$(get_app_image_repo "$APP")
|
||||
case "$IMAGE_TAG" in
|
||||
latest)
|
||||
dokku_log_fail "You can't remove internal dokku tag ($IMAGE_TAG) for $IMAGE_REPO"
|
||||
;;
|
||||
|
||||
*)
|
||||
local DOKKU_SCHEDULER=$(get_app_scheduler "$APP")
|
||||
plugn trigger scheduler-tags-destroy "$DOKKU_SCHEDULER" "$APP" "$IMAGE_REPO" "$IMAGE_TAG"
|
||||
;;
|
||||
esac
|
||||
plugn trigger tags-destroy "$APP" "$IMAGE_TAG"
|
||||
}
|
||||
|
||||
cmd-tags-destroy "$@"
|
||||
Reference in New Issue
Block a user