Merge pull request 'Add app .. volume
commands, working vol deletion' (#166) from volume-up into main
Reviewed-on: coop-cloud/abra#166
This commit is contained in:
commit
6a12955649
@ -18,6 +18,7 @@
|
||||
- Add fallback names to `app.json` ([#157](https://git.autonomic.zone/coop-cloud/abra/issues/157))
|
||||
- Remove duplicate message ([#155](https://git.autonomic.zone/coop-cloud/abra/issues/155))
|
||||
- Add `deploy --fast` ([a7f7c96](https://git.autonomic.zone/coop-cloud/abra/commit/a7f7c96))
|
||||
- Add `app .. volume` commands, fix volume deletion with `app .. delete --volumes` ([#161](https://git.autonomic.zone/coop-cloud/abra/issues/161))
|
||||
|
||||
# abra 0.7.4 (2021-05-10)
|
||||
|
||||
|
313
abra
313
abra
@ -35,6 +35,8 @@ Usage:
|
||||
abra [options] app <app> secret insert <secret> <version> <data> [--pass]
|
||||
abra [options] app <app> secret (rm|delete) (<secret>|--all) [--pass]
|
||||
abra [options] app <app> undeploy
|
||||
abra [options] app <app> volume ls
|
||||
abra [options] app <app> volume (rm|delete) (<volume>|--all)
|
||||
abra [options] app <app> <command> [<args>...]
|
||||
abra [options] recipe ls
|
||||
abra [options] recipe create <recipe>
|
||||
@ -165,15 +167,15 @@ eval "var_$1+=($value)"; else eval "var_$1=$value"; fi; return 0; fi; done
|
||||
return 1; }; stdout() { printf -- "cat <<'EOM'\n%s\nEOM\n" "$1"; }; stderr() {
|
||||
printf -- "cat <<'EOM' >&2\n%s\nEOM\n" "$1"; }; error() {
|
||||
[[ -n $1 ]] && stderr "$1"; stderr "$usage"; _return 1; }; _return() {
|
||||
printf -- "exit %d\n" "$1"; exit "$1"; }; set -e; trimmed_doc=${DOC:1:2374}
|
||||
usage=${DOC:40:1765}; digest=a8b0a
|
||||
shorts=(-C -v -h -s -e -U -n -d -b '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '')
|
||||
longs=(--skip-check --verbose --help --stack --env --skip-update --no-prompt --debug --branch --status --server --type --domain --app-name --pass --secrets --all --update --force --fast --skip-version-check --no-domain-poll --volumes --no-tty --user --dev)
|
||||
argcounts=(0 0 0 1 1 0 0 0 1 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 1 0); node_0(){
|
||||
switch __skip_check 0; }; node_1(){ switch __verbose 1; }; node_2(){
|
||||
switch __help 2; }; node_3(){ value __stack 3; }; node_4(){ value __env 4; }
|
||||
node_5(){ switch __skip_update 5; }; node_6(){ switch __no_prompt 6; }
|
||||
node_7(){ switch __debug 7; }; node_8(){ value __branch 8; }; node_9(){
|
||||
printf -- "exit %d\n" "$1"; exit "$1"; }; set -e; trimmed_doc=${DOC:1:2474}
|
||||
usage=${DOC:40:1865}; digest=c7702
|
||||
shorts=(-h -U -C -s -v -b -d -n -e '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '')
|
||||
longs=(--help --skip-update --skip-check --stack --verbose --branch --debug --no-prompt --env --status --server --type --domain --app-name --pass --secrets --all --update --force --fast --skip-version-check --no-domain-poll --volumes --no-tty --user --dev)
|
||||
argcounts=(0 0 0 1 0 1 0 0 1 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 1 0); node_0(){
|
||||
switch __help 0; }; node_1(){ switch __skip_update 1; }; node_2(){
|
||||
switch __skip_check 2; }; node_3(){ value __stack 3; }; node_4(){
|
||||
switch __verbose 4; }; node_5(){ value __branch 5; }; node_6(){ switch __debug 6
|
||||
}; node_7(){ switch __no_prompt 7; }; node_8(){ value __env 8; }; node_9(){
|
||||
switch __status 9; }; node_10(){ value __server 10; }; node_11(){
|
||||
value __type 11; }; node_12(){ value __domain 12; }; node_13(){
|
||||
value __app_name 13; }; node_14(){ switch __pass 14; }; node_15(){
|
||||
@ -186,103 +188,107 @@ switch __no_tty 23; }; node_24(){ value __user 24; }; node_25(){ switch __dev 25
|
||||
value _service_ a; }; node_29(){ value _version_ a; }; node_30(){ value _src_ a
|
||||
}; node_31(){ value _dst_ a; }; node_32(){ value _backup_file_ a; }; node_33(){
|
||||
value _args_ a true; }; node_34(){ value _secret_ a; }; node_35(){ value _cmd_ a
|
||||
}; node_36(){ value _data_ a; }; node_37(){ value _command_ a; }; node_38(){
|
||||
value _recipe_ a; }; node_39(){ value _host_ a; }; node_40(){ value _user_ a; }
|
||||
node_41(){ value _port_ a; }; node_42(){ value _provider_ a; }; node_43(){
|
||||
value _subcommands_ a true; }; node_44(){ _command app; }; node_45(){
|
||||
_command list; }; node_46(){ _command ls; }; node_47(){ _command new; }
|
||||
node_48(){ _command backup; }; node_49(){ _command deploy; }; node_50(){
|
||||
_command check; }; node_51(){ _command version; }; node_52(){ _command config; }
|
||||
node_53(){ _command cp; }; node_54(){ _command logs; }; node_55(){ _command ps
|
||||
}; node_56(){ _command restore; }; node_57(){ _command rm; }; node_58(){
|
||||
_command delete; }; node_59(){ _command run; }; node_60(){ _command rollback; }
|
||||
node_61(){ _command secret; }; node_62(){ _command generate; }; node_63(){
|
||||
_command insert; }; node_64(){ _command undeploy; }; node_65(){ _command recipe
|
||||
}; node_66(){ _command create; }; node_67(){ _command release; }; node_68(){
|
||||
_command versions; }; node_69(){ _command server; }; node_70(){ _command add; }
|
||||
node_71(){ _command __ --; }; node_72(){ _command init; }; node_73(){
|
||||
_command apps; }; node_74(){ _command upgrade; }; node_75(){ _command doctor; }
|
||||
node_76(){ _command help; }; node_77(){ optional 0 1 2 3 4 5 6 7 8; }
|
||||
node_78(){ optional 77; }; node_79(){ either 45 46; }; node_80(){ required 79; }
|
||||
node_81(){ optional 9; }; node_82(){ optional 10; }; node_83(){ optional 11; }
|
||||
node_84(){ required 78 44 80 81 82 83; }; node_85(){ optional 12; }; node_86(){
|
||||
optional 13; }; node_87(){ optional 14; }; node_88(){ optional 15; }; node_89(){
|
||||
required 78 44 47 82 85 86 87 88 26; }; node_90(){ either 28 16; }; node_91(){
|
||||
required 90; }; node_92(){ required 78 44 27 48 91; }; node_93(){ optional 17; }
|
||||
node_94(){ optional 18; }; node_95(){ optional 19; }; node_96(){ optional 20; }
|
||||
node_97(){ optional 21; }; node_98(){ optional 29; }; node_99(){
|
||||
required 78 44 27 49 93 94 95 96 97 98; }; node_100(){ required 78 44 27 50; }
|
||||
node_101(){ required 78 44 27 51; }; node_102(){ required 78 44 27 52; }
|
||||
node_103(){ required 78 44 27 53 30 31; }; node_104(){ optional 28; }
|
||||
node_105(){ required 78 44 27 54 104; }; node_106(){ required 78 44 27 55; }
|
||||
node_107(){ required 78 44 27 56 91; }; node_108(){ either 57 58; }; node_109(){
|
||||
required 108; }; node_110(){ optional 22; }; node_111(){
|
||||
required 78 44 27 109 110 88; }; node_112(){ optional 32; }; node_113(){
|
||||
required 78 44 27 56 28 112; }; node_114(){ optional 23; }; node_115(){
|
||||
optional 24; }; node_116(){ oneormore 33; }; node_117(){
|
||||
required 78 44 27 59 114 115 28 116; }; node_118(){ required 78 44 27 60 98; }
|
||||
node_119(){ required 34 29; }; node_120(){ either 119 16; }; node_121(){
|
||||
required 120; }; node_122(){ optional 35; }; node_123(){
|
||||
required 78 44 27 61 62 121 122 87; }; node_124(){
|
||||
required 78 44 27 61 63 34 29 36 87; }; node_125(){ either 34 16; }; node_126(){
|
||||
required 125; }; node_127(){ required 78 44 27 61 109 126 87; }; node_128(){
|
||||
required 78 44 27 64; }; node_129(){ optional 116; }; node_130(){
|
||||
required 78 44 27 37 129; }; node_131(){ required 78 65 46; }; node_132(){
|
||||
required 78 65 66 38; }; node_133(){ required 78 65 38 67 94; }; node_134(){
|
||||
required 78 65 38 68; }; node_135(){ optional 40; }; node_136(){ optional 41; }
|
||||
node_137(){ required 78 69 70 39 135 136; }; node_138(){
|
||||
required 78 69 47 42 71 33; }; node_139(){ required 78 69 80; }; node_140(){
|
||||
required 78 69 39 57; }; node_141(){ required 78 69 39 72; }; node_142(){
|
||||
required 78 69 39 73 81; }; node_143(){ optional 25; }; node_144(){
|
||||
required 78 74 143; }; node_145(){ required 78 51; }; node_146(){ required 78 75
|
||||
}; node_147(){ oneormore 43; }; node_148(){ optional 147; }; node_149(){
|
||||
required 78 76 148; }; node_150(){ required 78; }; node_151(){
|
||||
either 84 89 92 99 100 101 102 103 105 106 107 111 113 117 118 123 124 127 128 130 131 132 133 134 137 138 139 140 141 142 144 145 146 149 150
|
||||
}; node_152(){ required 151; }; cat <<<' docopt_exit() {
|
||||
[[ -n $1 ]] && printf "%s\n" "$1" >&2; printf "%s\n" "${DOC:40:1765}" >&2
|
||||
exit 1; }'; unset var___skip_check var___verbose var___help var___stack \
|
||||
var___env var___skip_update var___no_prompt var___debug var___branch \
|
||||
var___status var___server var___type var___domain var___app_name var___pass \
|
||||
var___secrets var___all var___update var___force var___fast \
|
||||
var___skip_version_check var___no_domain_poll var___volumes var___no_tty \
|
||||
var___user var___dev var__type_ var__app_ var__service_ var__version_ \
|
||||
var__src_ var__dst_ var__backup_file_ var__args_ var__secret_ var__cmd_ \
|
||||
var__data_ var__command_ var__recipe_ var__host_ var__user_ var__port_ \
|
||||
var__provider_ var__subcommands_ var_app var_list var_ls var_new var_backup \
|
||||
var_deploy var_check var_version var_config var_cp var_logs var_ps var_restore \
|
||||
var_rm var_delete var_run var_rollback var_secret var_generate var_insert \
|
||||
var_undeploy var_recipe var_create var_release var_versions var_server var_add \
|
||||
var___ var_init var_apps var_upgrade var_doctor var_help; parse 152 "$@"
|
||||
local prefix=${DOCOPT_PREFIX:-''}; unset "${prefix}__skip_check" \
|
||||
"${prefix}__verbose" "${prefix}__help" "${prefix}__stack" "${prefix}__env" \
|
||||
"${prefix}__skip_update" "${prefix}__no_prompt" "${prefix}__debug" \
|
||||
"${prefix}__branch" "${prefix}__status" "${prefix}__server" "${prefix}__type" \
|
||||
"${prefix}__domain" "${prefix}__app_name" "${prefix}__pass" \
|
||||
"${prefix}__secrets" "${prefix}__all" "${prefix}__update" "${prefix}__force" \
|
||||
"${prefix}__fast" "${prefix}__skip_version_check" "${prefix}__no_domain_poll" \
|
||||
}; node_36(){ value _data_ a; }; node_37(){ value _volume_ a; }; node_38(){
|
||||
value _command_ a; }; node_39(){ value _recipe_ a; }; node_40(){ value _host_ a
|
||||
}; node_41(){ value _user_ a; }; node_42(){ value _port_ a; }; node_43(){
|
||||
value _provider_ a; }; node_44(){ value _subcommands_ a true; }; node_45(){
|
||||
_command app; }; node_46(){ _command list; }; node_47(){ _command ls; }
|
||||
node_48(){ _command new; }; node_49(){ _command backup; }; node_50(){
|
||||
_command deploy; }; node_51(){ _command check; }; node_52(){ _command version; }
|
||||
node_53(){ _command config; }; node_54(){ _command cp; }; node_55(){
|
||||
_command logs; }; node_56(){ _command ps; }; node_57(){ _command restore; }
|
||||
node_58(){ _command rm; }; node_59(){ _command delete; }; node_60(){
|
||||
_command run; }; node_61(){ _command rollback; }; node_62(){ _command secret; }
|
||||
node_63(){ _command generate; }; node_64(){ _command insert; }; node_65(){
|
||||
_command undeploy; }; node_66(){ _command volume; }; node_67(){ _command recipe
|
||||
}; node_68(){ _command create; }; node_69(){ _command release; }; node_70(){
|
||||
_command versions; }; node_71(){ _command server; }; node_72(){ _command add; }
|
||||
node_73(){ _command __ --; }; node_74(){ _command init; }; node_75(){
|
||||
_command apps; }; node_76(){ _command upgrade; }; node_77(){ _command doctor; }
|
||||
node_78(){ _command help; }; node_79(){ optional 0 1 2 3 4 5 6 7 8; }
|
||||
node_80(){ optional 79; }; node_81(){ either 46 47; }; node_82(){ required 81; }
|
||||
node_83(){ optional 9; }; node_84(){ optional 10; }; node_85(){ optional 11; }
|
||||
node_86(){ required 80 45 82 83 84 85; }; node_87(){ optional 12; }; node_88(){
|
||||
optional 13; }; node_89(){ optional 14; }; node_90(){ optional 15; }; node_91(){
|
||||
required 80 45 48 84 87 88 89 90 26; }; node_92(){ either 28 16; }; node_93(){
|
||||
required 92; }; node_94(){ required 80 45 27 49 93; }; node_95(){ optional 17; }
|
||||
node_96(){ optional 18; }; node_97(){ optional 19; }; node_98(){ optional 20; }
|
||||
node_99(){ optional 21; }; node_100(){ optional 29; }; node_101(){
|
||||
required 80 45 27 50 95 96 97 98 99 100; }; node_102(){ required 80 45 27 51; }
|
||||
node_103(){ required 80 45 27 52; }; node_104(){ required 80 45 27 53; }
|
||||
node_105(){ required 80 45 27 54 30 31; }; node_106(){ optional 28; }
|
||||
node_107(){ required 80 45 27 55 106; }; node_108(){ required 80 45 27 56; }
|
||||
node_109(){ required 80 45 27 57 93; }; node_110(){ either 58 59; }; node_111(){
|
||||
required 110; }; node_112(){ optional 22; }; node_113(){
|
||||
required 80 45 27 111 112 90; }; node_114(){ optional 32; }; node_115(){
|
||||
required 80 45 27 57 28 114; }; node_116(){ optional 23; }; node_117(){
|
||||
optional 24; }; node_118(){ oneormore 33; }; node_119(){
|
||||
required 80 45 27 60 116 117 28 118; }; node_120(){ required 80 45 27 61 100; }
|
||||
node_121(){ required 34 29; }; node_122(){ either 121 16; }; node_123(){
|
||||
required 122; }; node_124(){ optional 35; }; node_125(){
|
||||
required 80 45 27 62 63 123 124 89; }; node_126(){
|
||||
required 80 45 27 62 64 34 29 36 89; }; node_127(){ either 34 16; }; node_128(){
|
||||
required 127; }; node_129(){ required 80 45 27 62 111 128 89; }; node_130(){
|
||||
required 80 45 27 65; }; node_131(){ required 80 45 27 66 47; }; node_132(){
|
||||
either 37 16; }; node_133(){ required 132; }; node_134(){
|
||||
required 80 45 27 66 111 133; }; node_135(){ optional 118; }; node_136(){
|
||||
required 80 45 27 38 135; }; node_137(){ required 80 67 47; }; node_138(){
|
||||
required 80 67 68 39; }; node_139(){ required 80 67 39 69 96; }; node_140(){
|
||||
required 80 67 39 70; }; node_141(){ optional 41; }; node_142(){ optional 42; }
|
||||
node_143(){ required 80 71 72 40 141 142; }; node_144(){
|
||||
required 80 71 48 43 73 33; }; node_145(){ required 80 71 82; }; node_146(){
|
||||
required 80 71 40 58; }; node_147(){ required 80 71 40 74; }; node_148(){
|
||||
required 80 71 40 75 83; }; node_149(){ optional 25; }; node_150(){
|
||||
required 80 76 149; }; node_151(){ required 80 52; }; node_152(){ required 80 77
|
||||
}; node_153(){ oneormore 44; }; node_154(){ optional 153; }; node_155(){
|
||||
required 80 78 154; }; node_156(){ required 80; }; node_157(){
|
||||
either 86 91 94 101 102 103 104 105 107 108 109 113 115 119 120 125 126 129 130 131 134 136 137 138 139 140 143 144 145 146 147 148 150 151 152 155 156
|
||||
}; node_158(){ required 157; }; cat <<<' docopt_exit() {
|
||||
[[ -n $1 ]] && printf "%s\n" "$1" >&2; printf "%s\n" "${DOC:40:1865}" >&2
|
||||
exit 1; }'; unset var___help var___skip_update var___skip_check var___stack \
|
||||
var___verbose var___branch var___debug var___no_prompt var___env var___status \
|
||||
var___server var___type var___domain var___app_name var___pass var___secrets \
|
||||
var___all var___update var___force var___fast var___skip_version_check \
|
||||
var___no_domain_poll var___volumes var___no_tty var___user var___dev \
|
||||
var__type_ var__app_ var__service_ var__version_ var__src_ var__dst_ \
|
||||
var__backup_file_ var__args_ var__secret_ var__cmd_ var__data_ var__volume_ \
|
||||
var__command_ var__recipe_ var__host_ var__user_ var__port_ var__provider_ \
|
||||
var__subcommands_ var_app var_list var_ls var_new var_backup var_deploy \
|
||||
var_check var_version var_config var_cp var_logs var_ps var_restore var_rm \
|
||||
var_delete var_run var_rollback var_secret var_generate var_insert \
|
||||
var_undeploy var_volume var_recipe var_create var_release var_versions \
|
||||
var_server var_add var___ var_init var_apps var_upgrade var_doctor var_help
|
||||
parse 158 "$@"; local prefix=${DOCOPT_PREFIX:-''}; unset "${prefix}__help" \
|
||||
"${prefix}__skip_update" "${prefix}__skip_check" "${prefix}__stack" \
|
||||
"${prefix}__verbose" "${prefix}__branch" "${prefix}__debug" \
|
||||
"${prefix}__no_prompt" "${prefix}__env" "${prefix}__status" \
|
||||
"${prefix}__server" "${prefix}__type" "${prefix}__domain" \
|
||||
"${prefix}__app_name" "${prefix}__pass" "${prefix}__secrets" "${prefix}__all" \
|
||||
"${prefix}__update" "${prefix}__force" "${prefix}__fast" \
|
||||
"${prefix}__skip_version_check" "${prefix}__no_domain_poll" \
|
||||
"${prefix}__volumes" "${prefix}__no_tty" "${prefix}__user" "${prefix}__dev" \
|
||||
"${prefix}_type_" "${prefix}_app_" "${prefix}_service_" "${prefix}_version_" \
|
||||
"${prefix}_src_" "${prefix}_dst_" "${prefix}_backup_file_" "${prefix}_args_" \
|
||||
"${prefix}_secret_" "${prefix}_cmd_" "${prefix}_data_" "${prefix}_command_" \
|
||||
"${prefix}_recipe_" "${prefix}_host_" "${prefix}_user_" "${prefix}_port_" \
|
||||
"${prefix}_provider_" "${prefix}_subcommands_" "${prefix}app" "${prefix}list" \
|
||||
"${prefix}ls" "${prefix}new" "${prefix}backup" "${prefix}deploy" \
|
||||
"${prefix}check" "${prefix}version" "${prefix}config" "${prefix}cp" \
|
||||
"${prefix}logs" "${prefix}ps" "${prefix}restore" "${prefix}rm" \
|
||||
"${prefix}_secret_" "${prefix}_cmd_" "${prefix}_data_" "${prefix}_volume_" \
|
||||
"${prefix}_command_" "${prefix}_recipe_" "${prefix}_host_" "${prefix}_user_" \
|
||||
"${prefix}_port_" "${prefix}_provider_" "${prefix}_subcommands_" \
|
||||
"${prefix}app" "${prefix}list" "${prefix}ls" "${prefix}new" "${prefix}backup" \
|
||||
"${prefix}deploy" "${prefix}check" "${prefix}version" "${prefix}config" \
|
||||
"${prefix}cp" "${prefix}logs" "${prefix}ps" "${prefix}restore" "${prefix}rm" \
|
||||
"${prefix}delete" "${prefix}run" "${prefix}rollback" "${prefix}secret" \
|
||||
"${prefix}generate" "${prefix}insert" "${prefix}undeploy" "${prefix}recipe" \
|
||||
"${prefix}create" "${prefix}release" "${prefix}versions" "${prefix}server" \
|
||||
"${prefix}add" "${prefix}__" "${prefix}init" "${prefix}apps" \
|
||||
"${prefix}generate" "${prefix}insert" "${prefix}undeploy" "${prefix}volume" \
|
||||
"${prefix}recipe" "${prefix}create" "${prefix}release" "${prefix}versions" \
|
||||
"${prefix}server" "${prefix}add" "${prefix}__" "${prefix}init" "${prefix}apps" \
|
||||
"${prefix}upgrade" "${prefix}doctor" "${prefix}help"
|
||||
eval "${prefix}"'__skip_check=${var___skip_check:-false}'
|
||||
eval "${prefix}"'__verbose=${var___verbose:-false}'
|
||||
eval "${prefix}"'__help=${var___help:-false}'
|
||||
eval "${prefix}"'__stack=${var___stack:-}'
|
||||
eval "${prefix}"'__env=${var___env:-}'
|
||||
eval "${prefix}"'__skip_update=${var___skip_update:-false}'
|
||||
eval "${prefix}"'__no_prompt=${var___no_prompt:-false}'
|
||||
eval "${prefix}"'__debug=${var___debug:-false}'
|
||||
eval "${prefix}"'__skip_check=${var___skip_check:-false}'
|
||||
eval "${prefix}"'__stack=${var___stack:-}'
|
||||
eval "${prefix}"'__verbose=${var___verbose:-false}'
|
||||
eval "${prefix}"'__branch=${var___branch:-}'
|
||||
eval "${prefix}"'__debug=${var___debug:-false}'
|
||||
eval "${prefix}"'__no_prompt=${var___no_prompt:-false}'
|
||||
eval "${prefix}"'__env=${var___env:-}'
|
||||
eval "${prefix}"'__status=${var___status:-false}'
|
||||
eval "${prefix}"'__server=${var___server:-}'
|
||||
eval "${prefix}"'__type=${var___type:-}'
|
||||
@ -309,6 +315,7 @@ if declare -p var__args_ >/dev/null 2>&1; then
|
||||
eval "${prefix}"'_args_=("${var__args_[@]}")'; else eval "${prefix}"'_args_=()'
|
||||
fi; eval "${prefix}"'_secret_=${var__secret_:-}'
|
||||
eval "${prefix}"'_cmd_=${var__cmd_:-}'; eval "${prefix}"'_data_=${var__data_:-}'
|
||||
eval "${prefix}"'_volume_=${var__volume_:-}'
|
||||
eval "${prefix}"'_command_=${var__command_:-}'
|
||||
eval "${prefix}"'_recipe_=${var__recipe_:-}'
|
||||
eval "${prefix}"'_host_=${var__host_:-}'
|
||||
@ -336,6 +343,7 @@ eval "${prefix}"'secret=${var_secret:-false}'
|
||||
eval "${prefix}"'generate=${var_generate:-false}'
|
||||
eval "${prefix}"'insert=${var_insert:-false}'
|
||||
eval "${prefix}"'undeploy=${var_undeploy:-false}'
|
||||
eval "${prefix}"'volume=${var_volume:-false}'
|
||||
eval "${prefix}"'recipe=${var_recipe:-false}'
|
||||
eval "${prefix}"'create=${var_create:-false}'
|
||||
eval "${prefix}"'release=${var_release:-false}'
|
||||
@ -348,26 +356,26 @@ eval "${prefix}"'upgrade=${var_upgrade:-false}'
|
||||
eval "${prefix}"'doctor=${var_doctor:-false}'
|
||||
eval "${prefix}"'help=${var_help:-false}'; local docopt_i=1
|
||||
[[ $BASH_VERSION =~ ^4.3 ]] && docopt_i=2; for ((;docopt_i>0;docopt_i--)); do
|
||||
declare -p "${prefix}__skip_check" "${prefix}__verbose" "${prefix}__help" \
|
||||
"${prefix}__stack" "${prefix}__env" "${prefix}__skip_update" \
|
||||
"${prefix}__no_prompt" "${prefix}__debug" "${prefix}__branch" \
|
||||
"${prefix}__status" "${prefix}__server" "${prefix}__type" "${prefix}__domain" \
|
||||
declare -p "${prefix}__help" "${prefix}__skip_update" "${prefix}__skip_check" \
|
||||
"${prefix}__stack" "${prefix}__verbose" "${prefix}__branch" "${prefix}__debug" \
|
||||
"${prefix}__no_prompt" "${prefix}__env" "${prefix}__status" \
|
||||
"${prefix}__server" "${prefix}__type" "${prefix}__domain" \
|
||||
"${prefix}__app_name" "${prefix}__pass" "${prefix}__secrets" "${prefix}__all" \
|
||||
"${prefix}__update" "${prefix}__force" "${prefix}__fast" \
|
||||
"${prefix}__skip_version_check" "${prefix}__no_domain_poll" \
|
||||
"${prefix}__volumes" "${prefix}__no_tty" "${prefix}__user" "${prefix}__dev" \
|
||||
"${prefix}_type_" "${prefix}_app_" "${prefix}_service_" "${prefix}_version_" \
|
||||
"${prefix}_src_" "${prefix}_dst_" "${prefix}_backup_file_" "${prefix}_args_" \
|
||||
"${prefix}_secret_" "${prefix}_cmd_" "${prefix}_data_" "${prefix}_command_" \
|
||||
"${prefix}_recipe_" "${prefix}_host_" "${prefix}_user_" "${prefix}_port_" \
|
||||
"${prefix}_provider_" "${prefix}_subcommands_" "${prefix}app" "${prefix}list" \
|
||||
"${prefix}ls" "${prefix}new" "${prefix}backup" "${prefix}deploy" \
|
||||
"${prefix}check" "${prefix}version" "${prefix}config" "${prefix}cp" \
|
||||
"${prefix}logs" "${prefix}ps" "${prefix}restore" "${prefix}rm" \
|
||||
"${prefix}_secret_" "${prefix}_cmd_" "${prefix}_data_" "${prefix}_volume_" \
|
||||
"${prefix}_command_" "${prefix}_recipe_" "${prefix}_host_" "${prefix}_user_" \
|
||||
"${prefix}_port_" "${prefix}_provider_" "${prefix}_subcommands_" \
|
||||
"${prefix}app" "${prefix}list" "${prefix}ls" "${prefix}new" "${prefix}backup" \
|
||||
"${prefix}deploy" "${prefix}check" "${prefix}version" "${prefix}config" \
|
||||
"${prefix}cp" "${prefix}logs" "${prefix}ps" "${prefix}restore" "${prefix}rm" \
|
||||
"${prefix}delete" "${prefix}run" "${prefix}rollback" "${prefix}secret" \
|
||||
"${prefix}generate" "${prefix}insert" "${prefix}undeploy" "${prefix}recipe" \
|
||||
"${prefix}create" "${prefix}release" "${prefix}versions" "${prefix}server" \
|
||||
"${prefix}add" "${prefix}__" "${prefix}init" "${prefix}apps" \
|
||||
"${prefix}generate" "${prefix}insert" "${prefix}undeploy" "${prefix}volume" \
|
||||
"${prefix}recipe" "${prefix}create" "${prefix}release" "${prefix}versions" \
|
||||
"${prefix}server" "${prefix}add" "${prefix}__" "${prefix}init" "${prefix}apps" \
|
||||
"${prefix}upgrade" "${prefix}doctor" "${prefix}help"; done; }
|
||||
# docopt parser above, complete command for generating this parser is `docopt.sh abra`
|
||||
|
||||
@ -1532,16 +1540,8 @@ sub_app_delete (){
|
||||
rm "$ENV_FILE"
|
||||
|
||||
if [ "$abra___volumes" = "true" ]; then
|
||||
volumes="$(docker volume ls --filter "name=${STACK_NAME}" --quiet)"
|
||||
|
||||
if [ "$abra___volumes" = "true" ]; then
|
||||
# shellcheck disable=SC2086
|
||||
warning "SCARY: About to remove all volumes associated with ${STACK_NAME}: $(echo $volumes | tr -d '\n')"
|
||||
|
||||
prompt_confirm
|
||||
fi
|
||||
|
||||
docker volume rm --force "$volumes"
|
||||
abra___all="true"
|
||||
sub_app_volume_delete
|
||||
fi
|
||||
|
||||
|
||||
@ -1699,6 +1699,75 @@ sub_app_secret_generate(){
|
||||
warning "See https://docs.docker.com/engine/swarm/secrets/ for more on secrets"
|
||||
}
|
||||
|
||||
###### .. app volume
|
||||
|
||||
###### .. app volume ls
|
||||
help_app_volume_ls (){
|
||||
help_app_volume_list
|
||||
}
|
||||
|
||||
sub_app_volume_ls(){
|
||||
sub_app_volume_list
|
||||
}
|
||||
|
||||
help_app_volume_list (){
|
||||
echo "abra [options] app <app> volume (ls|list)
|
||||
|
||||
Show all volumes associated with <app>.
|
||||
|
||||
OPTIONS
|
||||
<secret> Generate a single secret
|
||||
--all Auto-generate all secrets
|
||||
|
||||
POWERED BY
|
||||
docker volume ls"
|
||||
}
|
||||
|
||||
sub_app_volume_list(){
|
||||
docker volume ls --filter "name=${STACK_NAME}"
|
||||
}
|
||||
|
||||
###### .. app volume rm
|
||||
help_app_volume_rm (){
|
||||
help_app_volume_delete
|
||||
}
|
||||
|
||||
sub_app_volume_rm(){
|
||||
sub_app_volume_delete
|
||||
}
|
||||
|
||||
help_app_volume_delete (){
|
||||
echo "abra [options] app <app> volume (delete|rm) (<volume>|--all)
|
||||
|
||||
Remove <app>'s Docker volume <volume>, or all volumes with --all.
|
||||
|
||||
OPTIONS
|
||||
--pass Remove volume(s) from \`pass\` as well
|
||||
--all Delete all volumes for <app>
|
||||
|
||||
POWERED BY
|
||||
docker volume rm
|
||||
docker volume ls # for --all"
|
||||
}
|
||||
|
||||
sub_app_volume_delete(){
|
||||
# if --all is provided then $abra__secret_ will be blank and this will work
|
||||
# auto-magically
|
||||
NAMES=$(docker volume ls --filter "name=${STACK_NAME}_${abra__volume_}" --format "{{.Name}}")
|
||||
|
||||
if [ -z "$NAMES" ]; then
|
||||
error "Could not find any volumes under ${STACK_NAME}_${abra__volume_}"
|
||||
fi
|
||||
|
||||
warning "About to delete volume(s) $(echo "$NAMES" | paste -d "")"
|
||||
prompt_confirm
|
||||
|
||||
for NAME in ${NAMES}; do
|
||||
docker volume rm "$NAME" > /dev/null
|
||||
|
||||
done
|
||||
}
|
||||
|
||||
###### .. app run
|
||||
help_app_run (){
|
||||
echo "abra [options] app <app> run [--no-tty] [--user=<user>] <service> <args>...
|
||||
@ -2425,7 +2494,7 @@ abra() {
|
||||
abra___help abra___branch abra___volumes abra__provider_ abra___type \
|
||||
abra___dev abra___update abra___no_prompt abra___force \
|
||||
abra___skip_version_check abra__recipe_ abra___no_domain_poll \
|
||||
abra___fast
|
||||
abra___fast abra__volume_
|
||||
|
||||
if ! type tput > /dev/null 2>&1; then
|
||||
tput() {
|
||||
|
Reference in New Issue
Block a user