Show More
This diff has been collapsed as it changes many lines, (947 lines changed) Show them Hide them | |||||
@@ -20,16 +20,10 b' version_command() {' | |||||
20 | # :command.usage |
|
20 | # :command.usage | |
21 | rcstack_usage() { |
|
21 | rcstack_usage() { | |
22 | if [[ -n $long_usage ]]; then |
|
22 | if [[ -n $long_usage ]]; then | |
23 | printf "rcstack\n" |
|
23 | printf "rcstack\n\n" | |
24 | echo |
|
24 | printf " CLI for installing and managing RhodeCode Cluster Stack \nSupport:\n https://community.rhodecode.com\nDocs: https://docs.rhodecode.com/rcstack\n\n" | |
25 |
|
||||
26 | printf " CLI for installing and managing RhodeCode Cluster Stack \nSupport:\n https://community.rhodecode.com\nDocs: https://docs.rhodecode.com/rcstack\n" |
|
|||
27 | echo |
|
|||
28 |
|
||||
29 | else |
|
25 | else | |
30 | printf "rcstack - CLI for installing and managing RhodeCode Cluster Stack \nSupport: https://community.rhodecode.com\nDocs: https://docs.rhodecode.com/rcstack\n" |
|
26 | printf "rcstack - CLI for installing and managing RhodeCode Cluster Stack \nSupport: https://community.rhodecode.com\nDocs: https://docs.rhodecode.com/rcstack\n\n" | |
31 | echo |
|
|||
32 |
|
||||
33 | fi |
|
27 | fi | |
34 |
|
28 | |||
35 | printf "%s\n" "Usage:" |
|
29 | printf "%s\n" "Usage:" | |
@@ -60,8 +54,8 b' rcstack_usage() {' | |||||
60 | echo |
|
54 | echo | |
61 |
|
55 | |||
62 | # :command.long_usage |
|
56 | # :command.long_usage | |
63 | if [[ -n $long_usage ]]; then |
|
57 | if [[ -n "$long_usage" ]]; then | |
64 | printf "%s\n" "Options:" |
|
58 | printf "%s\n" "Global Options:" | |
65 |
|
59 | |||
66 | # :command.usage_flags |
|
60 | # :command.usage_flags | |
67 | # :flag.usage |
|
61 | # :flag.usage | |
@@ -88,7 +82,7 b' rcstack_usage() {' | |||||
88 | # :environment_variable.usage |
|
82 | # :environment_variable.usage | |
89 | printf " %s\n" "RCC_CONFIG" |
|
83 | printf " %s\n" "RCC_CONFIG" | |
90 | printf " default config file for rcstack\n" |
|
84 | printf " default config file for rcstack\n" | |
91 |
printf " Default: .rcstack.ini |
|
85 | printf " %s\n" "Default: .rcstack.ini" | |
92 | echo |
|
86 | echo | |
93 |
|
87 | |||
94 | # :environment_variable.usage |
|
88 | # :environment_variable.usage | |
@@ -99,25 +93,25 b' rcstack_usage() {' | |||||
99 | # :environment_variable.usage |
|
93 | # :environment_variable.usage | |
100 | printf " %s\n" "RC_STACK_ROUTER_EXT" |
|
94 | printf " %s\n" "RC_STACK_ROUTER_EXT" | |
101 | printf "\n" |
|
95 | printf "\n" | |
102 |
printf " Default: .custom/docker-compose-router.override.yaml |
|
96 | printf " %s\n" "Default: .custom/docker-compose-router.override.yaml" | |
103 | echo |
|
97 | echo | |
104 |
|
98 | |||
105 | # :environment_variable.usage |
|
99 | # :environment_variable.usage | |
106 | printf " %s\n" "RC_STACK_METRICS_EXT" |
|
100 | printf " %s\n" "RC_STACK_METRICS_EXT" | |
107 | printf "\n" |
|
101 | printf "\n" | |
108 |
printf " Default: .custom/docker-compose-metrics.override.yaml |
|
102 | printf " %s\n" "Default: .custom/docker-compose-metrics.override.yaml" | |
109 | echo |
|
103 | echo | |
110 |
|
104 | |||
111 | # :environment_variable.usage |
|
105 | # :environment_variable.usage | |
112 | printf " %s\n" "RC_STACK_SERVICES_EXT" |
|
106 | printf " %s\n" "RC_STACK_SERVICES_EXT" | |
113 | printf "\n" |
|
107 | printf "\n" | |
114 |
printf " Default: .custom/docker-compose-services.override.yaml |
|
108 | printf " %s\n" "Default: .custom/docker-compose-services.override.yaml" | |
115 | echo |
|
109 | echo | |
116 |
|
110 | |||
117 | # :environment_variable.usage |
|
111 | # :environment_variable.usage | |
118 | printf " %s\n" "RC_STACK_RHODECODE_EXT" |
|
112 | printf " %s\n" "RC_STACK_RHODECODE_EXT" | |
119 | printf "\n" |
|
113 | printf "\n" | |
120 |
printf " Default: .custom/docker-compose-apps.override.yaml |
|
114 | printf " %s\n" "Default: .custom/docker-compose-apps.override.yaml" | |
121 | echo |
|
115 | echo | |
122 |
|
116 | |||
123 | # :command.footer |
|
117 | # :command.footer | |
@@ -129,15 +123,7 b' rcstack_usage() {' | |||||
129 |
|
123 | |||
130 | # :command.usage |
|
124 | # :command.usage | |
131 | rcstack_get_started_usage() { |
|
125 | rcstack_get_started_usage() { | |
132 | if [[ -n $long_usage ]]; then |
|
126 | printf "rcstack get-started - Print instructions to get started with rhodecode docker stack\n\n" | |
133 | printf "rcstack get-started - Print instructions to get started with rhodecode docker stack\n" |
|
|||
134 | echo |
|
|||
135 |
|
||||
136 | else |
|
|||
137 | printf "rcstack get-started - Print instructions to get started with rhodecode docker stack\n" |
|
|||
138 | echo |
|
|||
139 |
|
||||
140 | fi |
|
|||
141 |
|
127 | |||
142 | printf "%s\n" "Usage:" |
|
128 | printf "%s\n" "Usage:" | |
143 | printf " rcstack get-started\n" |
|
129 | printf " rcstack get-started\n" | |
@@ -145,7 +131,7 b' rcstack_get_started_usage() {' | |||||
145 | echo |
|
131 | echo | |
146 |
|
132 | |||
147 | # :command.long_usage |
|
133 | # :command.long_usage | |
148 | if [[ -n $long_usage ]]; then |
|
134 | if [[ -n "$long_usage" ]]; then | |
149 | printf "%s\n" "Options:" |
|
135 | printf "%s\n" "Options:" | |
150 |
|
136 | |||
151 | # :command.usage_fixed_flags |
|
137 | # :command.usage_fixed_flags | |
@@ -158,15 +144,7 b' rcstack_get_started_usage() {' | |||||
158 |
|
144 | |||
159 | # :command.usage |
|
145 | # :command.usage | |
160 | rcstack_init_usage() { |
|
146 | rcstack_init_usage() { | |
161 | if [[ -n $long_usage ]]; then |
|
147 | printf "rcstack init - Bootstrap this machine, check docker version and install rhodecode-network\n\n" | |
162 | printf "rcstack init - Bootstrap this machine, check docker version and install rhodecode-network\n" |
|
|||
163 | echo |
|
|||
164 |
|
||||
165 | else |
|
|||
166 | printf "rcstack init - Bootstrap this machine, check docker version and install rhodecode-network\n" |
|
|||
167 | echo |
|
|||
168 |
|
||||
169 | fi |
|
|||
170 |
|
148 | |||
171 | printf "%s\n" "Usage:" |
|
149 | printf "%s\n" "Usage:" | |
172 | printf " rcstack init [OPTIONS]\n" |
|
150 | printf " rcstack init [OPTIONS]\n" | |
@@ -174,7 +152,7 b' rcstack_init_usage() {' | |||||
174 | echo |
|
152 | echo | |
175 |
|
153 | |||
176 | # :command.long_usage |
|
154 | # :command.long_usage | |
177 | if [[ -n $long_usage ]]; then |
|
155 | if [[ -n "$long_usage" ]]; then | |
178 | printf "%s\n" "Options:" |
|
156 | printf "%s\n" "Options:" | |
179 |
|
157 | |||
180 | # :command.usage_flags |
|
158 | # :command.usage_flags | |
@@ -186,7 +164,7 b' rcstack_init_usage() {' | |||||
186 | # :flag.usage |
|
164 | # :flag.usage | |
187 | printf " %s\n" "--arg-rc-edition ARG_RC_EDITION" |
|
165 | printf " %s\n" "--arg-rc-edition ARG_RC_EDITION" | |
188 | printf " specify rc_edition [ee|ce] for setup\n" |
|
166 | printf " specify rc_edition [ee|ce] for setup\n" | |
189 |
printf " Allowed: ce, ee |
|
167 | printf " %s\n" "Allowed: ce, ee" | |
190 | echo |
|
168 | echo | |
191 |
|
169 | |||
192 | # :flag.usage |
|
170 | # :flag.usage | |
@@ -202,13 +180,13 b' rcstack_init_usage() {' | |||||
202 | # :flag.usage |
|
180 | # :flag.usage | |
203 | printf " %s\n" "--arg-database-type ARG_DATABASE_TYPE" |
|
181 | printf " %s\n" "--arg-database-type ARG_DATABASE_TYPE" | |
204 | printf " pick database type for installation, 'postgres', 'mysql', 'none', choose\n none for sqlite or own DB hosting\n" |
|
182 | printf " pick database type for installation, 'postgres', 'mysql', 'none', choose\n none for sqlite or own DB hosting\n" | |
205 |
printf " Allowed: postgres, mysql, none |
|
183 | printf " %s\n" "Allowed: postgres, mysql, none" | |
206 | echo |
|
184 | echo | |
207 |
|
185 | |||
208 | # :flag.usage |
|
186 | # :flag.usage | |
209 | printf " %s\n" "--arg-use-ssl ARG_USE_SSL" |
|
187 | printf " %s\n" "--arg-use-ssl ARG_USE_SSL" | |
210 | printf " specify use_ssl [y|n] for setup\n" |
|
188 | printf " specify use_ssl [y|n] for setup\n" | |
211 |
printf " Allowed: y, |
|
189 | printf " %s\n" "Allowed: y, n" | |
212 | echo |
|
190 | echo | |
213 |
|
191 | |||
214 | # :flag.usage |
|
192 | # :flag.usage | |
@@ -249,7 +227,7 b' rcstack_init_usage() {' | |||||
249 | # :flag.usage |
|
227 | # :flag.usage | |
250 | printf " %s\n" "--docker-revision DOCKER_REVISION" |
|
228 | printf " %s\n" "--docker-revision DOCKER_REVISION" | |
251 | printf " revision to fetch new docker definitions.\n" |
|
229 | printf " revision to fetch new docker definitions.\n" | |
252 |
printf " Default: stable |
|
230 | printf " %s\n" "Default: stable" | |
253 | echo |
|
231 | echo | |
254 |
|
232 | |||
255 | # :flag.usage |
|
233 | # :flag.usage | |
@@ -260,7 +238,7 b' rcstack_init_usage() {' | |||||
260 | # :flag.usage |
|
238 | # :flag.usage | |
261 | printf " %s\n" "--server-url SERVER_URL" |
|
239 | printf " %s\n" "--server-url SERVER_URL" | |
262 | printf " Specify RhodeCode server location where the rcstack archive should be\n downloaded from\n" |
|
240 | printf " Specify RhodeCode server location where the rcstack archive should be\n downloaded from\n" | |
263 |
printf " Default: https://dls.rhodecode.com/get_archive |
|
241 | printf " %s\n" "Default: https://dls.rhodecode.com/get_archive" | |
264 | echo |
|
242 | echo | |
265 |
|
243 | |||
266 | # :flag.usage |
|
244 | # :flag.usage | |
@@ -283,15 +261,7 b' rcstack_init_usage() {' | |||||
283 |
|
261 | |||
284 | # :command.usage |
|
262 | # :command.usage | |
285 | rcstack_destroy_usage() { |
|
263 | rcstack_destroy_usage() { | |
286 | if [[ -n $long_usage ]]; then |
|
264 | printf "rcstack destroy - Destroy volumes and containers created by rcstack\n\n" | |
287 | printf "rcstack destroy - Destroy volumes and containers created by rcstack\n" |
|
|||
288 | echo |
|
|||
289 |
|
||||
290 | else |
|
|||
291 | printf "rcstack destroy - Destroy volumes and containers created by rcstack\n" |
|
|||
292 | echo |
|
|||
293 |
|
||||
294 | fi |
|
|||
295 |
|
265 | |||
296 | printf "%s\n" "Usage:" |
|
266 | printf "%s\n" "Usage:" | |
297 | printf " rcstack destroy [OPTIONS]\n" |
|
267 | printf " rcstack destroy [OPTIONS]\n" | |
@@ -299,7 +269,7 b' rcstack_destroy_usage() {' | |||||
299 | echo |
|
269 | echo | |
300 |
|
270 | |||
301 | # :command.long_usage |
|
271 | # :command.long_usage | |
302 | if [[ -n $long_usage ]]; then |
|
272 | if [[ -n "$long_usage" ]]; then | |
303 | printf "%s\n" "Options:" |
|
273 | printf "%s\n" "Options:" | |
304 |
|
274 | |||
305 | # :command.usage_flags |
|
275 | # :command.usage_flags | |
@@ -323,15 +293,7 b' rcstack_destroy_usage() {' | |||||
323 |
|
293 | |||
324 | # :command.usage |
|
294 | # :command.usage | |
325 | rcstack_self_update_usage() { |
|
295 | rcstack_self_update_usage() { | |
326 | if [[ -n $long_usage ]]; then |
|
296 | printf "rcstack self-update - Update rcstack and it's docker definitions\n\n" | |
327 | printf "rcstack self-update - Update rcstack and it's docker definitions\n" |
|
|||
328 | echo |
|
|||
329 |
|
||||
330 | else |
|
|||
331 | printf "rcstack self-update - Update rcstack and it's docker definitions\n" |
|
|||
332 | echo |
|
|||
333 |
|
||||
334 | fi |
|
|||
335 |
|
297 | |||
336 | printf "%s\n" "Usage:" |
|
298 | printf "%s\n" "Usage:" | |
337 | printf " rcstack self-update [OPTIONS]\n" |
|
299 | printf " rcstack self-update [OPTIONS]\n" | |
@@ -339,7 +301,7 b' rcstack_self_update_usage() {' | |||||
339 | echo |
|
301 | echo | |
340 |
|
302 | |||
341 | # :command.long_usage |
|
303 | # :command.long_usage | |
342 | if [[ -n $long_usage ]]; then |
|
304 | if [[ -n "$long_usage" ]]; then | |
343 | printf "%s\n" "Options:" |
|
305 | printf "%s\n" "Options:" | |
344 |
|
306 | |||
345 | # :command.usage_flags |
|
307 | # :command.usage_flags | |
@@ -356,24 +318,26 b' rcstack_self_update_usage() {' | |||||
356 | # :flag.usage |
|
318 | # :flag.usage | |
357 | printf " %s\n" "--cli-file CLI_FILE" |
|
319 | printf " %s\n" "--cli-file CLI_FILE" | |
358 | printf " file path to fetch new rcstack cli tool.\n" |
|
320 | printf " file path to fetch new rcstack cli tool.\n" | |
|
321 | printf " %s\n" "Conflicts: --cli-revision" | |||
359 | echo |
|
322 | echo | |
360 |
|
323 | |||
361 | # :flag.usage |
|
324 | # :flag.usage | |
362 | printf " %s\n" "--cli-revision CLI_REVISION" |
|
325 | printf " %s\n" "--cli-revision CLI_REVISION" | |
363 | printf " commit or branch to fetch new rcstack cli tool.\n" |
|
326 | printf " commit or branch to fetch new rcstack cli tool.\n" | |
364 |
printf " Default: stable |
|
327 | printf " %s\n" "Default: stable" | |
|
328 | printf " %s\n" "Conflicts: --cli-file" | |||
365 | echo |
|
329 | echo | |
366 |
|
330 | |||
367 | # :flag.usage |
|
331 | # :flag.usage | |
368 | printf " %s\n" "--docker-revision DOCKER_REVISION" |
|
332 | printf " %s\n" "--docker-revision DOCKER_REVISION" | |
369 | printf " commit or branch to fetch new docker definitions.\n" |
|
333 | printf " commit or branch to fetch new docker definitions.\n" | |
370 |
printf " Default: stable |
|
334 | printf " %s\n" "Default: stable" | |
371 | echo |
|
335 | echo | |
372 |
|
336 | |||
373 | # :flag.usage |
|
337 | # :flag.usage | |
374 | printf " %s\n" "--server-url SERVER_URL" |
|
338 | printf " %s\n" "--server-url SERVER_URL" | |
375 | printf " Specify RhodeCode server location where the rcstack archive should be\n downloaded from\n" |
|
339 | printf " Specify RhodeCode server location where the rcstack archive should be\n downloaded from\n" | |
376 |
printf " Default: https://dls.rhodecode.com/get_archive |
|
340 | printf " %s\n" "Default: https://dls.rhodecode.com/get_archive" | |
377 | echo |
|
341 | echo | |
378 |
|
342 | |||
379 | # :flag.usage |
|
343 | # :flag.usage | |
@@ -396,15 +360,7 b' rcstack_self_update_usage() {' | |||||
396 |
|
360 | |||
397 | # :command.usage |
|
361 | # :command.usage | |
398 | rcstack_self_upgrade_usage() { |
|
362 | rcstack_self_upgrade_usage() { | |
399 | if [[ -n $long_usage ]]; then |
|
363 | printf "rcstack self-upgrade - Perform rcstack upgrade procedure. This aims at changing existing installations with some changes required that are not backward compatible\n\n" | |
400 | printf "rcstack self-upgrade - Perform rcstack upgrade procedure. This aims at changing existing installations with some changes required that are not backward compatible\n" |
|
|||
401 | echo |
|
|||
402 |
|
||||
403 | else |
|
|||
404 | printf "rcstack self-upgrade - Perform rcstack upgrade procedure. This aims at changing existing installations with some changes required that are not backward compatible\n" |
|
|||
405 | echo |
|
|||
406 |
|
||||
407 | fi |
|
|||
408 |
|
364 | |||
409 | printf "%s\n" "Usage:" |
|
365 | printf "%s\n" "Usage:" | |
410 | printf " rcstack self-upgrade [OPTIONS]\n" |
|
366 | printf " rcstack self-upgrade [OPTIONS]\n" | |
@@ -412,7 +368,7 b' rcstack_self_upgrade_usage() {' | |||||
412 | echo |
|
368 | echo | |
413 |
|
369 | |||
414 | # :command.long_usage |
|
370 | # :command.long_usage | |
415 | if [[ -n $long_usage ]]; then |
|
371 | if [[ -n "$long_usage" ]]; then | |
416 | printf "%s\n" "Options:" |
|
372 | printf "%s\n" "Options:" | |
417 |
|
373 | |||
418 | # :command.usage_flags |
|
374 | # :command.usage_flags | |
@@ -441,15 +397,7 b' rcstack_self_upgrade_usage() {' | |||||
441 |
|
397 | |||
442 | # :command.usage |
|
398 | # :command.usage | |
443 | rcstack_stack_usage() { |
|
399 | rcstack_stack_usage() { | |
444 | if [[ -n $long_usage ]]; then |
|
400 | printf "rcstack stack - Run one of available cluster stacks, run stack -h for more details\n\n" | |
445 | printf "rcstack stack - Run one of available cluster stacks, run stack -h for more details\n" |
|
|||
446 | echo |
|
|||
447 |
|
||||
448 | else |
|
|||
449 | printf "rcstack stack - Run one of available cluster stacks, run stack -h for more details\n" |
|
|||
450 | echo |
|
|||
451 |
|
||||
452 | fi |
|
|||
453 |
|
401 | |||
454 | printf "%s\n" "Usage:" |
|
402 | printf "%s\n" "Usage:" | |
455 | printf " rcstack stack [OPTIONS] COMMAND\n" |
|
403 | printf " rcstack stack [OPTIONS] COMMAND\n" | |
@@ -465,14 +413,14 b' rcstack_stack_usage() {' | |||||
465 | echo |
|
413 | echo | |
466 |
|
414 | |||
467 | # :command.long_usage |
|
415 | # :command.long_usage | |
468 | if [[ -n $long_usage ]]; then |
|
416 | if [[ -n "$long_usage" ]]; then | |
469 | printf "%s\n" "Options:" |
|
417 | printf "%s\n" "Global Options:" | |
470 |
|
418 | |||
471 | # :command.usage_flags |
|
419 | # :command.usage_flags | |
472 | # :flag.usage |
|
420 | # :flag.usage | |
473 | printf " %s\n" "--env-file-path ENV_FILE_PATH" |
|
421 | printf " %s\n" "--env-file-path ENV_FILE_PATH" | |
474 | printf " Set custom env file\n" |
|
422 | printf " Set custom env file\n" | |
475 |
printf " Default: $PWD/.custom/.runtime.env |
|
423 | printf " %s\n" "Default: $PWD/.custom/.runtime.env" | |
476 | echo |
|
424 | echo | |
477 |
|
425 | |||
478 | # :flag.usage |
|
426 | # :flag.usage | |
@@ -495,23 +443,15 b' rcstack_stack_usage() {' | |||||
495 |
|
443 | |||
496 | # :command.usage |
|
444 | # :command.usage | |
497 | rcstack_stack_router_usage() { |
|
445 | rcstack_stack_router_usage() { | |
498 | if [[ -n $long_usage ]]; then |
|
446 | printf "rcstack stack router - execute commands for the router stack\n\n" | |
499 | printf "rcstack stack router - execute commands for the router stack\n" |
|
|||
500 | echo |
|
|||
501 |
|
||||
502 | else |
|
|||
503 | printf "rcstack stack router - execute commands for the router stack\n" |
|
|||
504 | echo |
|
|||
505 |
|
||||
506 | fi |
|
|||
507 |
|
447 | |||
508 | printf "%s\n" "Usage:" |
|
448 | printf "%s\n" "Usage:" | |
509 | printf " rcstack stack router [SERVICES PARAMS...]\n" |
|
449 | printf " rcstack stack router [--] [SERVICES PARAMS...]\n" | |
510 | printf " rcstack stack router --help | -h\n" |
|
450 | printf " rcstack stack router --help | -h\n" | |
511 | echo |
|
451 | echo | |
512 |
|
452 | |||
513 | # :command.long_usage |
|
453 | # :command.long_usage | |
514 | if [[ -n $long_usage ]]; then |
|
454 | if [[ -n "$long_usage" ]]; then | |
515 | printf "%s\n" "Options:" |
|
455 | printf "%s\n" "Options:" | |
516 |
|
456 | |||
517 | # :command.usage_fixed_flags |
|
457 | # :command.usage_fixed_flags | |
@@ -531,23 +471,15 b' rcstack_stack_router_usage() {' | |||||
531 |
|
471 | |||
532 | # :command.usage |
|
472 | # :command.usage | |
533 | rcstack_stack_metrics_usage() { |
|
473 | rcstack_stack_metrics_usage() { | |
534 | if [[ -n $long_usage ]]; then |
|
474 | printf "rcstack stack metrics - execute commands for the router stack\n\n" | |
535 | printf "rcstack stack metrics - execute commands for the router stack\n" |
|
|||
536 | echo |
|
|||
537 |
|
||||
538 | else |
|
|||
539 | printf "rcstack stack metrics - execute commands for the router stack\n" |
|
|||
540 | echo |
|
|||
541 |
|
||||
542 | fi |
|
|||
543 |
|
475 | |||
544 | printf "%s\n" "Usage:" |
|
476 | printf "%s\n" "Usage:" | |
545 | printf " rcstack stack metrics [SERVICES PARAMS...]\n" |
|
477 | printf " rcstack stack metrics [--] [SERVICES PARAMS...]\n" | |
546 | printf " rcstack stack metrics --help | -h\n" |
|
478 | printf " rcstack stack metrics --help | -h\n" | |
547 | echo |
|
479 | echo | |
548 |
|
480 | |||
549 | # :command.long_usage |
|
481 | # :command.long_usage | |
550 | if [[ -n $long_usage ]]; then |
|
482 | if [[ -n "$long_usage" ]]; then | |
551 | printf "%s\n" "Options:" |
|
483 | printf "%s\n" "Options:" | |
552 |
|
484 | |||
553 | # :command.usage_fixed_flags |
|
485 | # :command.usage_fixed_flags | |
@@ -567,23 +499,15 b' rcstack_stack_metrics_usage() {' | |||||
567 |
|
499 | |||
568 | # :command.usage |
|
500 | # :command.usage | |
569 | rcstack_stack_services_usage() { |
|
501 | rcstack_stack_services_usage() { | |
570 | if [[ -n $long_usage ]]; then |
|
502 | printf "rcstack stack services - execute commands for the router stack\n\n" | |
571 | printf "rcstack stack services - execute commands for the router stack\n" |
|
|||
572 | echo |
|
|||
573 |
|
||||
574 | else |
|
|||
575 | printf "rcstack stack services - execute commands for the router stack\n" |
|
|||
576 | echo |
|
|||
577 |
|
||||
578 | fi |
|
|||
579 |
|
503 | |||
580 | printf "%s\n" "Usage:" |
|
504 | printf "%s\n" "Usage:" | |
581 | printf " rcstack stack services [SERVICES PARAMS...]\n" |
|
505 | printf " rcstack stack services [--] [SERVICES PARAMS...]\n" | |
582 | printf " rcstack stack services --help | -h\n" |
|
506 | printf " rcstack stack services --help | -h\n" | |
583 | echo |
|
507 | echo | |
584 |
|
508 | |||
585 | # :command.long_usage |
|
509 | # :command.long_usage | |
586 | if [[ -n $long_usage ]]; then |
|
510 | if [[ -n "$long_usage" ]]; then | |
587 | printf "%s\n" "Options:" |
|
511 | printf "%s\n" "Options:" | |
588 |
|
512 | |||
589 | # :command.usage_fixed_flags |
|
513 | # :command.usage_fixed_flags | |
@@ -603,23 +527,15 b' rcstack_stack_services_usage() {' | |||||
603 |
|
527 | |||
604 | # :command.usage |
|
528 | # :command.usage | |
605 | rcstack_stack_rhodecode_usage() { |
|
529 | rcstack_stack_rhodecode_usage() { | |
606 | if [[ -n $long_usage ]]; then |
|
530 | printf "rcstack stack rhodecode - execute commands for the router stack\n\n" | |
607 | printf "rcstack stack rhodecode - execute commands for the router stack\n" |
|
|||
608 | echo |
|
|||
609 |
|
||||
610 | else |
|
|||
611 | printf "rcstack stack rhodecode - execute commands for the router stack\n" |
|
|||
612 | echo |
|
|||
613 |
|
||||
614 | fi |
|
|||
615 |
|
531 | |||
616 | printf "%s\n" "Usage:" |
|
532 | printf "%s\n" "Usage:" | |
617 | printf " rcstack stack rhodecode [SERVICES PARAMS...]\n" |
|
533 | printf " rcstack stack rhodecode [--] [SERVICES PARAMS...]\n" | |
618 | printf " rcstack stack rhodecode --help | -h\n" |
|
534 | printf " rcstack stack rhodecode --help | -h\n" | |
619 | echo |
|
535 | echo | |
620 |
|
536 | |||
621 | # :command.long_usage |
|
537 | # :command.long_usage | |
622 | if [[ -n $long_usage ]]; then |
|
538 | if [[ -n "$long_usage" ]]; then | |
623 | printf "%s\n" "Options:" |
|
539 | printf "%s\n" "Options:" | |
624 |
|
540 | |||
625 | # :command.usage_fixed_flags |
|
541 | # :command.usage_fixed_flags | |
@@ -639,23 +555,15 b' rcstack_stack_rhodecode_usage() {' | |||||
639 |
|
555 | |||
640 | # :command.usage |
|
556 | # :command.usage | |
641 | rcstack_stack_all_usage() { |
|
557 | rcstack_stack_all_usage() { | |
642 | if [[ -n $long_usage ]]; then |
|
558 | printf "rcstack stack all - execute commands for all stacks in order\n\n" | |
643 | printf "rcstack stack all - execute commands for all stacks in order\n" |
|
|||
644 | echo |
|
|||
645 |
|
||||
646 | else |
|
|||
647 | printf "rcstack stack all - execute commands for all stacks in order\n" |
|
|||
648 | echo |
|
|||
649 |
|
||||
650 | fi |
|
|||
651 |
|
559 | |||
652 | printf "%s\n" "Usage:" |
|
560 | printf "%s\n" "Usage:" | |
653 | printf " rcstack stack all [SERVICES PARAMS...]\n" |
|
561 | printf " rcstack stack all [--] [SERVICES PARAMS...]\n" | |
654 | printf " rcstack stack all --help | -h\n" |
|
562 | printf " rcstack stack all --help | -h\n" | |
655 | echo |
|
563 | echo | |
656 |
|
564 | |||
657 | # :command.long_usage |
|
565 | # :command.long_usage | |
658 | if [[ -n $long_usage ]]; then |
|
566 | if [[ -n "$long_usage" ]]; then | |
659 | printf "%s\n" "Options:" |
|
567 | printf "%s\n" "Options:" | |
660 |
|
568 | |||
661 | # :command.usage_fixed_flags |
|
569 | # :command.usage_fixed_flags | |
@@ -675,16 +583,7 b' rcstack_stack_all_usage() {' | |||||
675 |
|
583 | |||
676 | # :command.usage |
|
584 | # :command.usage | |
677 | rcstack_stack_status_usage() { |
|
585 | rcstack_stack_status_usage() { | |
678 | if [[ -n $long_usage ]]; then |
|
586 | printf "rcstack stack-status - Show stack status\n\n" | |
679 | printf "rcstack stack-status - Show stack status\n" |
|
|||
680 | echo |
|
|||
681 |
|
||||
682 | else |
|
|||
683 | printf "rcstack stack-status - Show stack status\n" |
|
|||
684 | echo |
|
|||
685 |
|
||||
686 | fi |
|
|||
687 |
|
||||
688 | printf "Alias: status\n" |
|
587 | printf "Alias: status\n" | |
689 | echo |
|
588 | echo | |
690 |
|
589 | |||
@@ -694,7 +593,7 b' rcstack_stack_status_usage() {' | |||||
694 | echo |
|
593 | echo | |
695 |
|
594 | |||
696 | # :command.long_usage |
|
595 | # :command.long_usage | |
697 | if [[ -n $long_usage ]]; then |
|
596 | if [[ -n "$long_usage" ]]; then | |
698 | printf "%s\n" "Options:" |
|
597 | printf "%s\n" "Options:" | |
699 |
|
598 | |||
700 | # :command.usage_flags |
|
599 | # :command.usage_flags | |
@@ -723,15 +622,7 b' rcstack_stack_status_usage() {' | |||||
723 |
|
622 | |||
724 | # :command.usage |
|
623 | # :command.usage | |
725 | rcstack_stack_upgrade_usage() { |
|
624 | rcstack_stack_upgrade_usage() { | |
726 | if [[ -n $long_usage ]]; then |
|
625 | printf "rcstack stack-upgrade - Upgrade a stack, run stack-upgrade -h for more details\n\n" | |
727 | printf "rcstack stack-upgrade - Upgrade a stack, run stack-upgrade -h for more details\n" |
|
|||
728 | echo |
|
|||
729 |
|
||||
730 | else |
|
|||
731 | printf "rcstack stack-upgrade - Upgrade a stack, run stack-upgrade -h for more details\n" |
|
|||
732 | echo |
|
|||
733 |
|
||||
734 | fi |
|
|||
735 |
|
626 | |||
736 | printf "%s\n" "Usage:" |
|
627 | printf "%s\n" "Usage:" | |
737 | printf " rcstack stack-upgrade [OPTIONS] COMMAND\n" |
|
628 | printf " rcstack stack-upgrade [OPTIONS] COMMAND\n" | |
@@ -746,8 +637,8 b' rcstack_stack_upgrade_usage() {' | |||||
746 | echo |
|
637 | echo | |
747 |
|
638 | |||
748 | # :command.long_usage |
|
639 | # :command.long_usage | |
749 | if [[ -n $long_usage ]]; then |
|
640 | if [[ -n "$long_usage" ]]; then | |
750 | printf "%s\n" "Options:" |
|
641 | printf "%s\n" "Global Options:" | |
751 |
|
642 | |||
752 | # :command.usage_flags |
|
643 | # :command.usage_flags | |
753 | # :flag.usage |
|
644 | # :flag.usage | |
@@ -770,15 +661,7 b' rcstack_stack_upgrade_usage() {' | |||||
770 |
|
661 | |||
771 | # :command.usage |
|
662 | # :command.usage | |
772 | rcstack_stack_upgrade_router_usage() { |
|
663 | rcstack_stack_upgrade_router_usage() { | |
773 | if [[ -n $long_usage ]]; then |
|
664 | printf "rcstack stack-upgrade router - upgrade the router stack\n\n" | |
774 | printf "rcstack stack-upgrade router - upgrade the router stack\n" |
|
|||
775 | echo |
|
|||
776 |
|
||||
777 | else |
|
|||
778 | printf "rcstack stack-upgrade router - upgrade the router stack\n" |
|
|||
779 | echo |
|
|||
780 |
|
||||
781 | fi |
|
|||
782 |
|
665 | |||
783 | printf "%s\n" "Usage:" |
|
666 | printf "%s\n" "Usage:" | |
784 | printf " rcstack stack-upgrade router\n" |
|
667 | printf " rcstack stack-upgrade router\n" | |
@@ -786,7 +669,7 b' rcstack_stack_upgrade_router_usage() {' | |||||
786 | echo |
|
669 | echo | |
787 |
|
670 | |||
788 | # :command.long_usage |
|
671 | # :command.long_usage | |
789 | if [[ -n $long_usage ]]; then |
|
672 | if [[ -n "$long_usage" ]]; then | |
790 | printf "%s\n" "Options:" |
|
673 | printf "%s\n" "Options:" | |
791 |
|
674 | |||
792 | # :command.usage_fixed_flags |
|
675 | # :command.usage_fixed_flags | |
@@ -799,15 +682,7 b' rcstack_stack_upgrade_router_usage() {' | |||||
799 |
|
682 | |||
800 | # :command.usage |
|
683 | # :command.usage | |
801 | rcstack_stack_upgrade_services_usage() { |
|
684 | rcstack_stack_upgrade_services_usage() { | |
802 | if [[ -n $long_usage ]]; then |
|
685 | printf "rcstack stack-upgrade services - upgrade the services stack\n\n" | |
803 | printf "rcstack stack-upgrade services - upgrade the services stack\n" |
|
|||
804 | echo |
|
|||
805 |
|
||||
806 | else |
|
|||
807 | printf "rcstack stack-upgrade services - upgrade the services stack\n" |
|
|||
808 | echo |
|
|||
809 |
|
||||
810 | fi |
|
|||
811 |
|
686 | |||
812 | printf "%s\n" "Usage:" |
|
687 | printf "%s\n" "Usage:" | |
813 | printf " rcstack stack-upgrade services\n" |
|
688 | printf " rcstack stack-upgrade services\n" | |
@@ -815,7 +690,7 b' rcstack_stack_upgrade_services_usage() {' | |||||
815 | echo |
|
690 | echo | |
816 |
|
691 | |||
817 | # :command.long_usage |
|
692 | # :command.long_usage | |
818 | if [[ -n $long_usage ]]; then |
|
693 | if [[ -n "$long_usage" ]]; then | |
819 | printf "%s\n" "Options:" |
|
694 | printf "%s\n" "Options:" | |
820 |
|
695 | |||
821 | # :command.usage_fixed_flags |
|
696 | # :command.usage_fixed_flags | |
@@ -828,15 +703,7 b' rcstack_stack_upgrade_services_usage() {' | |||||
828 |
|
703 | |||
829 | # :command.usage |
|
704 | # :command.usage | |
830 | rcstack_stack_upgrade_metrics_usage() { |
|
705 | rcstack_stack_upgrade_metrics_usage() { | |
831 | if [[ -n $long_usage ]]; then |
|
706 | printf "rcstack stack-upgrade metrics - upgrade the metrics stack\n\n" | |
832 | printf "rcstack stack-upgrade metrics - upgrade the metrics stack\n" |
|
|||
833 | echo |
|
|||
834 |
|
||||
835 | else |
|
|||
836 | printf "rcstack stack-upgrade metrics - upgrade the metrics stack\n" |
|
|||
837 | echo |
|
|||
838 |
|
||||
839 | fi |
|
|||
840 |
|
707 | |||
841 | printf "%s\n" "Usage:" |
|
708 | printf "%s\n" "Usage:" | |
842 | printf " rcstack stack-upgrade metrics\n" |
|
709 | printf " rcstack stack-upgrade metrics\n" | |
@@ -844,7 +711,7 b' rcstack_stack_upgrade_metrics_usage() {' | |||||
844 | echo |
|
711 | echo | |
845 |
|
712 | |||
846 | # :command.long_usage |
|
713 | # :command.long_usage | |
847 | if [[ -n $long_usage ]]; then |
|
714 | if [[ -n "$long_usage" ]]; then | |
848 | printf "%s\n" "Options:" |
|
715 | printf "%s\n" "Options:" | |
849 |
|
716 | |||
850 | # :command.usage_fixed_flags |
|
717 | # :command.usage_fixed_flags | |
@@ -857,15 +724,7 b' rcstack_stack_upgrade_metrics_usage() {' | |||||
857 |
|
724 | |||
858 | # :command.usage |
|
725 | # :command.usage | |
859 | rcstack_stack_upgrade_rhodecode_usage() { |
|
726 | rcstack_stack_upgrade_rhodecode_usage() { | |
860 | if [[ -n $long_usage ]]; then |
|
727 | printf "rcstack stack-upgrade rhodecode - upgrade the rhodecode stack\n\n" | |
861 | printf "rcstack stack-upgrade rhodecode - upgrade the rhodecode stack\n" |
|
|||
862 | echo |
|
|||
863 |
|
||||
864 | else |
|
|||
865 | printf "rcstack stack-upgrade rhodecode - upgrade the rhodecode stack\n" |
|
|||
866 | echo |
|
|||
867 |
|
||||
868 | fi |
|
|||
869 |
|
728 | |||
870 | printf "%s\n" "Usage:" |
|
729 | printf "%s\n" "Usage:" | |
871 | printf " rcstack stack-upgrade rhodecode [OPTIONS]\n" |
|
730 | printf " rcstack stack-upgrade rhodecode [OPTIONS]\n" | |
@@ -873,20 +732,20 b' rcstack_stack_upgrade_rhodecode_usage() {' | |||||
873 | echo |
|
732 | echo | |
874 |
|
733 | |||
875 | # :command.long_usage |
|
734 | # :command.long_usage | |
876 | if [[ -n $long_usage ]]; then |
|
735 | if [[ -n "$long_usage" ]]; then | |
877 | printf "%s\n" "Options:" |
|
736 | printf "%s\n" "Options:" | |
878 |
|
737 | |||
879 | # :command.usage_flags |
|
738 | # :command.usage_flags | |
880 | # :flag.usage |
|
739 | # :flag.usage | |
881 | printf " %s\n" "--stop-wait STOP_WAIT" |
|
740 | printf " %s\n" "--stop-wait STOP_WAIT" | |
882 | printf " Number of seconds to wait for stopping old containers, use low value to\n quickly restart and recycle containers\n" |
|
741 | printf " Number of seconds to wait for stopping old containers, use low value to\n quickly restart and recycle containers\n" | |
883 |
printf " Default: 120 |
|
742 | printf " %s\n" "Default: 120" | |
884 | echo |
|
743 | echo | |
885 |
|
744 | |||
886 | # :flag.usage |
|
745 | # :flag.usage | |
887 | printf " %s\n" "--docker-stop-wait DOCKER_STOP_WAIT" |
|
746 | printf " %s\n" "--docker-stop-wait DOCKER_STOP_WAIT" | |
888 | printf " Number of seconds to pass to docker stop command that will wait for\n container to gracefully stop\n" |
|
747 | printf " Number of seconds to pass to docker stop command that will wait for\n container to gracefully stop\n" | |
889 |
printf " Default: 3600 |
|
748 | printf " %s\n" "Default: 3600" | |
890 | echo |
|
749 | echo | |
891 |
|
750 | |||
892 | # :command.usage_fixed_flags |
|
751 | # :command.usage_fixed_flags | |
@@ -899,15 +758,7 b' rcstack_stack_upgrade_rhodecode_usage() {' | |||||
899 |
|
758 | |||
900 | # :command.usage |
|
759 | # :command.usage | |
901 | rcstack_stack_monitor_usage() { |
|
760 | rcstack_stack_monitor_usage() { | |
902 | if [[ -n $long_usage ]]; then |
|
761 | printf "rcstack stack-monitor - run monitoring on stack items\n\n" | |
903 | printf "rcstack stack-monitor - run monitoring on stack items\n" |
|
|||
904 | echo |
|
|||
905 |
|
||||
906 | else |
|
|||
907 | printf "rcstack stack-monitor - run monitoring on stack items\n" |
|
|||
908 | echo |
|
|||
909 |
|
||||
910 | fi |
|
|||
911 |
|
762 | |||
912 | printf "%s\n" "Usage:" |
|
763 | printf "%s\n" "Usage:" | |
913 | printf " rcstack stack-monitor COMMAND\n" |
|
764 | printf " rcstack stack-monitor COMMAND\n" | |
@@ -919,7 +770,7 b' rcstack_stack_monitor_usage() {' | |||||
919 | echo |
|
770 | echo | |
920 |
|
771 | |||
921 | # :command.long_usage |
|
772 | # :command.long_usage | |
922 | if [[ -n $long_usage ]]; then |
|
773 | if [[ -n "$long_usage" ]]; then | |
923 | printf "%s\n" "Options:" |
|
774 | printf "%s\n" "Options:" | |
924 |
|
775 | |||
925 | # :command.usage_fixed_flags |
|
776 | # :command.usage_fixed_flags | |
@@ -932,15 +783,7 b' rcstack_stack_monitor_usage() {' | |||||
932 |
|
783 | |||
933 | # :command.usage |
|
784 | # :command.usage | |
934 | rcstack_stack_monitor_restart_unhealthy_usage() { |
|
785 | rcstack_stack_monitor_restart_unhealthy_usage() { | |
935 | if [[ -n $long_usage ]]; then |
|
786 | printf "rcstack stack-monitor restart-unhealthy - monitor stack containers that are unhealthy and restart them\n\n" | |
936 | printf "rcstack stack-monitor restart-unhealthy - monitor stack containers that are unhealthy and restart them\n" |
|
|||
937 | echo |
|
|||
938 |
|
||||
939 | else |
|
|||
940 | printf "rcstack stack-monitor restart-unhealthy - monitor stack containers that are unhealthy and restart them\n" |
|
|||
941 | echo |
|
|||
942 |
|
||||
943 | fi |
|
|||
944 |
|
787 | |||
945 | printf "%s\n" "Usage:" |
|
788 | printf "%s\n" "Usage:" | |
946 | printf " rcstack stack-monitor restart-unhealthy [OPTIONS]\n" |
|
789 | printf " rcstack stack-monitor restart-unhealthy [OPTIONS]\n" | |
@@ -948,14 +791,14 b' rcstack_stack_monitor_restart_unhealthy_usage() {' | |||||
948 | echo |
|
791 | echo | |
949 |
|
792 | |||
950 | # :command.long_usage |
|
793 | # :command.long_usage | |
951 | if [[ -n $long_usage ]]; then |
|
794 | if [[ -n "$long_usage" ]]; then | |
952 | printf "%s\n" "Options:" |
|
795 | printf "%s\n" "Options:" | |
953 |
|
796 | |||
954 | # :command.usage_flags |
|
797 | # :command.usage_flags | |
955 | # :flag.usage |
|
798 | # :flag.usage | |
956 | printf " %s\n" "--loop LOOP" |
|
799 | printf " %s\n" "--loop LOOP" | |
957 | printf " run in a loop to monitor continuously every N seconds\n" |
|
800 | printf " run in a loop to monitor continuously every N seconds\n" | |
958 |
printf " Default: 0 |
|
801 | printf " %s\n" "Default: 0" | |
959 | echo |
|
802 | echo | |
960 |
|
803 | |||
961 | # :command.usage_fixed_flags |
|
804 | # :command.usage_fixed_flags | |
@@ -973,15 +816,7 b' rcstack_stack_monitor_restart_unhealthy_usage() {' | |||||
973 |
|
816 | |||
974 | # :command.usage |
|
817 | # :command.usage | |
975 | rcstack_cli_usage() { |
|
818 | rcstack_cli_usage() { | |
976 | if [[ -n $long_usage ]]; then |
|
819 | printf "rcstack cli - Various CLI tools, run cli -h for more details\n\n" | |
977 | printf "rcstack cli - Various CLI tools, run cli -h for more details\n" |
|
|||
978 | echo |
|
|||
979 |
|
||||
980 | else |
|
|||
981 | printf "rcstack cli - Various CLI tools, run cli -h for more details\n" |
|
|||
982 | echo |
|
|||
983 |
|
||||
984 | fi |
|
|||
985 |
|
820 | |||
986 | printf "%s\n" "Usage:" |
|
821 | printf "%s\n" "Usage:" | |
987 | printf " rcstack cli COMMAND\n" |
|
822 | printf " rcstack cli COMMAND\n" | |
@@ -1008,9 +843,12 b' rcstack_cli_usage() {' | |||||
1008 | printf " %s set current setup to either CE (Community) or EE (Enterprise) type\n" "set-edition " |
|
843 | printf " %s set current setup to either CE (Community) or EE (Enterprise) type\n" "set-edition " | |
1009 | printf " %s set hostname to .runtime.env file\n" "set-hostname " |
|
844 | printf " %s set hostname to .runtime.env file\n" "set-hostname " | |
1010 | echo |
|
845 | echo | |
|
846 | printf "%s\n" "System health checks Commands:" | |||
|
847 | printf " %s runs a traffic test against the current rhodecode instance\n" "test-traffic " | |||
|
848 | echo | |||
1011 |
|
849 | |||
1012 | # :command.long_usage |
|
850 | # :command.long_usage | |
1013 | if [[ -n $long_usage ]]; then |
|
851 | if [[ -n "$long_usage" ]]; then | |
1014 | printf "%s\n" "Options:" |
|
852 | printf "%s\n" "Options:" | |
1015 |
|
853 | |||
1016 | # :command.usage_fixed_flags |
|
854 | # :command.usage_fixed_flags | |
@@ -1023,23 +861,15 b' rcstack_cli_usage() {' | |||||
1023 |
|
861 | |||
1024 | # :command.usage |
|
862 | # :command.usage | |
1025 | rcstack_cli_cmd_usage() { |
|
863 | rcstack_cli_cmd_usage() { | |
1026 | if [[ -n $long_usage ]]; then |
|
864 | printf "rcstack cli cmd - run a custom command on top of docker image from RhodeCode\n\n" | |
1027 | printf "rcstack cli cmd - run a custom command on top of docker image from RhodeCode\n" |
|
|||
1028 | echo |
|
|||
1029 |
|
||||
1030 | else |
|
|||
1031 | printf "rcstack cli cmd - run a custom command on top of docker image from RhodeCode\n" |
|
|||
1032 | echo |
|
|||
1033 |
|
||||
1034 | fi |
|
|||
1035 |
|
865 | |||
1036 | printf "%s\n" "Usage:" |
|
866 | printf "%s\n" "Usage:" | |
1037 | printf " rcstack cli cmd [OPTIONS] [CALL ARGUMENTS...]\n" |
|
867 | printf " rcstack cli cmd [OPTIONS] [--] [CALL ARGUMENTS...]\n" | |
1038 | printf " rcstack cli cmd --help | -h\n" |
|
868 | printf " rcstack cli cmd --help | -h\n" | |
1039 | echo |
|
869 | echo | |
1040 |
|
870 | |||
1041 | # :command.long_usage |
|
871 | # :command.long_usage | |
1042 | if [[ -n $long_usage ]]; then |
|
872 | if [[ -n "$long_usage" ]]; then | |
1043 | printf "%s\n" "Options:" |
|
873 | printf "%s\n" "Options:" | |
1044 |
|
874 | |||
1045 | # :command.usage_flags |
|
875 | # :command.usage_flags | |
@@ -1056,7 +886,7 b' rcstack_cli_cmd_usage() {' | |||||
1056 | # :flag.usage |
|
886 | # :flag.usage | |
1057 | printf " %s\n" "--env-file-path ENV_FILE_PATH" |
|
887 | printf " %s\n" "--env-file-path ENV_FILE_PATH" | |
1058 | printf " Set custom env file\n" |
|
888 | printf " Set custom env file\n" | |
1059 |
printf " Default: $PWD/.custom/.runtime.env |
|
889 | printf " %s\n" "Default: $PWD/.custom/.runtime.env" | |
1060 | echo |
|
890 | echo | |
1061 |
|
891 | |||
1062 | # :command.usage_fixed_flags |
|
892 | # :command.usage_fixed_flags | |
@@ -1076,15 +906,7 b' rcstack_cli_cmd_usage() {' | |||||
1076 |
|
906 | |||
1077 | # :command.usage |
|
907 | # :command.usage | |
1078 | rcstack_cli_ishell_usage() { |
|
908 | rcstack_cli_ishell_usage() { | |
1079 | if [[ -n $long_usage ]]; then |
|
909 | printf "rcstack cli ishell - ishell attached to running RhodeCode instance\n\n" | |
1080 | printf "rcstack cli ishell - ishell attached to running RhodeCode instance\n" |
|
|||
1081 | echo |
|
|||
1082 |
|
||||
1083 | else |
|
|||
1084 | printf "rcstack cli ishell - ishell attached to running RhodeCode instance\n" |
|
|||
1085 | echo |
|
|||
1086 |
|
||||
1087 | fi |
|
|||
1088 |
|
910 | |||
1089 | printf "%s\n" "Usage:" |
|
911 | printf "%s\n" "Usage:" | |
1090 | printf " rcstack cli ishell [OPTIONS]\n" |
|
912 | printf " rcstack cli ishell [OPTIONS]\n" | |
@@ -1092,7 +914,7 b' rcstack_cli_ishell_usage() {' | |||||
1092 | echo |
|
914 | echo | |
1093 |
|
915 | |||
1094 | # :command.long_usage |
|
916 | # :command.long_usage | |
1095 | if [[ -n $long_usage ]]; then |
|
917 | if [[ -n "$long_usage" ]]; then | |
1096 | printf "%s\n" "Options:" |
|
918 | printf "%s\n" "Options:" | |
1097 |
|
919 | |||
1098 | # :command.usage_flags |
|
920 | # :command.usage_flags | |
@@ -1109,7 +931,7 b' rcstack_cli_ishell_usage() {' | |||||
1109 | # :flag.usage |
|
931 | # :flag.usage | |
1110 | printf " %s\n" "--env-file-path ENV_FILE_PATH" |
|
932 | printf " %s\n" "--env-file-path ENV_FILE_PATH" | |
1111 | printf " Set custom env file\n" |
|
933 | printf " Set custom env file\n" | |
1112 |
printf " Default: $PWD/.custom/.runtime.env |
|
934 | printf " %s\n" "Default: $PWD/.custom/.runtime.env" | |
1113 | echo |
|
935 | echo | |
1114 |
|
936 | |||
1115 | # :command.usage_fixed_flags |
|
937 | # :command.usage_fixed_flags | |
@@ -1122,15 +944,7 b' rcstack_cli_ishell_usage() {' | |||||
1122 |
|
944 | |||
1123 | # :command.usage |
|
945 | # :command.usage | |
1124 | rcstack_cli_image_info_usage() { |
|
946 | rcstack_cli_image_info_usage() { | |
1125 | if [[ -n $long_usage ]]; then |
|
947 | printf "rcstack cli image-info - print out stored docker image version\n\n" | |
1126 | printf "rcstack cli image-info - print out stored docker image version\n" |
|
|||
1127 | echo |
|
|||
1128 |
|
||||
1129 | else |
|
|||
1130 | printf "rcstack cli image-info - print out stored docker image version\n" |
|
|||
1131 | echo |
|
|||
1132 |
|
||||
1133 | fi |
|
|||
1134 |
|
948 | |||
1135 | printf "%s\n" "Usage:" |
|
949 | printf "%s\n" "Usage:" | |
1136 | printf " rcstack cli image-info [OPTIONS]\n" |
|
950 | printf " rcstack cli image-info [OPTIONS]\n" | |
@@ -1138,7 +952,7 b' rcstack_cli_image_info_usage() {' | |||||
1138 | echo |
|
952 | echo | |
1139 |
|
953 | |||
1140 | # :command.long_usage |
|
954 | # :command.long_usage | |
1141 | if [[ -n $long_usage ]]; then |
|
955 | if [[ -n "$long_usage" ]]; then | |
1142 | printf "%s\n" "Options:" |
|
956 | printf "%s\n" "Options:" | |
1143 |
|
957 | |||
1144 | # :command.usage_flags |
|
958 | # :command.usage_flags | |
@@ -1157,15 +971,7 b' rcstack_cli_image_info_usage() {' | |||||
1157 |
|
971 | |||
1158 | # :command.usage |
|
972 | # :command.usage | |
1159 | rcstack_cli_image_list_usage() { |
|
973 | rcstack_cli_image_list_usage() { | |
1160 | if [[ -n $long_usage ]]; then |
|
974 | printf "rcstack cli image-list - print out list of all images used for rcstack\n\n" | |
1161 | printf "rcstack cli image-list - print out list of all images used for rcstack\n" |
|
|||
1162 | echo |
|
|||
1163 |
|
||||
1164 | else |
|
|||
1165 | printf "rcstack cli image-list - print out list of all images used for rcstack\n" |
|
|||
1166 | echo |
|
|||
1167 |
|
||||
1168 | fi |
|
|||
1169 |
|
975 | |||
1170 | printf "%s\n" "Usage:" |
|
976 | printf "%s\n" "Usage:" | |
1171 | printf " rcstack cli image-list [OPTIONS]\n" |
|
977 | printf " rcstack cli image-list [OPTIONS]\n" | |
@@ -1173,7 +979,7 b' rcstack_cli_image_list_usage() {' | |||||
1173 | echo |
|
979 | echo | |
1174 |
|
980 | |||
1175 | # :command.long_usage |
|
981 | # :command.long_usage | |
1176 | if [[ -n $long_usage ]]; then |
|
982 | if [[ -n "$long_usage" ]]; then | |
1177 | printf "%s\n" "Options:" |
|
983 | printf "%s\n" "Options:" | |
1178 |
|
984 | |||
1179 | # :command.usage_flags |
|
985 | # :command.usage_flags | |
@@ -1190,7 +996,7 b' rcstack_cli_image_list_usage() {' | |||||
1190 | # :flag.usage |
|
996 | # :flag.usage | |
1191 | printf " %s\n" "--env-file-path ENV_FILE_PATH" |
|
997 | printf " %s\n" "--env-file-path ENV_FILE_PATH" | |
1192 | printf " Set custom env file\n" |
|
998 | printf " Set custom env file\n" | |
1193 |
printf " Default: $PWD/.custom/.runtime.env |
|
999 | printf " %s\n" "Default: $PWD/.custom/.runtime.env" | |
1194 | echo |
|
1000 | echo | |
1195 |
|
1001 | |||
1196 | # :command.usage_fixed_flags |
|
1002 | # :command.usage_fixed_flags | |
@@ -1203,15 +1009,7 b' rcstack_cli_image_list_usage() {' | |||||
1203 |
|
1009 | |||
1204 | # :command.usage |
|
1010 | # :command.usage | |
1205 | rcstack_cli_set_image_usage() { |
|
1011 | rcstack_cli_set_image_usage() { | |
1206 | if [[ -n $long_usage ]]; then |
|
1012 | printf "rcstack cli set-image - set version to .runtime.env file\n\n" | |
1207 | printf "rcstack cli set-image - set version to .runtime.env file\n" |
|
|||
1208 | echo |
|
|||
1209 |
|
||||
1210 | else |
|
|||
1211 | printf "rcstack cli set-image - set version to .runtime.env file\n" |
|
|||
1212 | echo |
|
|||
1213 |
|
||||
1214 | fi |
|
|||
1215 |
|
1013 | |||
1216 | printf "%s\n" "Usage:" |
|
1014 | printf "%s\n" "Usage:" | |
1217 | printf " rcstack cli set-image VERSION\n" |
|
1015 | printf " rcstack cli set-image VERSION\n" | |
@@ -1219,7 +1017,7 b' rcstack_cli_set_image_usage() {' | |||||
1219 | echo |
|
1017 | echo | |
1220 |
|
1018 | |||
1221 | # :command.long_usage |
|
1019 | # :command.long_usage | |
1222 | if [[ -n $long_usage ]]; then |
|
1020 | if [[ -n "$long_usage" ]]; then | |
1223 | printf "%s\n" "Options:" |
|
1021 | printf "%s\n" "Options:" | |
1224 |
|
1022 | |||
1225 | # :command.usage_fixed_flags |
|
1023 | # :command.usage_fixed_flags | |
@@ -1239,16 +1037,41 b' rcstack_cli_set_image_usage() {' | |||||
1239 | } |
|
1037 | } | |
1240 |
|
1038 | |||
1241 | # :command.usage |
|
1039 | # :command.usage | |
1242 |
|
|
1040 | rcstack_cli_test_traffic_usage() { | |
1243 | if [[ -n $long_usage ]]; then |
|
1041 | printf "rcstack cli test-traffic - runs a traffic test against the current rhodecode instance\n\n" | |
1244 | printf "rcstack cli set-runtime-image - DEPRECATED - use 'set-image' instead\n" |
|
1042 | ||
|
1043 | printf "%s\n" "Usage:" | |||
|
1044 | printf " rcstack cli test-traffic [OPTIONS]\n" | |||
|
1045 | printf " rcstack cli test-traffic --help | -h\n" | |||
|
1046 | echo | |||
|
1047 | ||||
|
1048 | # :command.long_usage | |||
|
1049 | if [[ -n "$long_usage" ]]; then | |||
|
1050 | printf "%s\n" "Options:" | |||
|
1051 | ||||
|
1052 | # :command.usage_flags | |||
|
1053 | # :flag.usage | |||
|
1054 | printf " %s\n" "--verbose" | |||
|
1055 | printf " rich output about image\n" | |||
1245 | echo |
|
1056 | echo | |
1246 |
|
1057 | |||
1247 | else |
|
1058 | # :flag.usage | |
1248 | printf "rcstack cli set-runtime-image - DEPRECATED - use 'set-image' instead\n" |
|
1059 | printf " %s\n" "--test-url TEST_URL" | |
|
1060 | printf " sub path url to test\n" | |||
|
1061 | printf " %s\n" "Default: http://127.0.0.1/_admin/ops/ping" | |||
|
1062 | echo | |||
|
1063 | ||||
|
1064 | # :command.usage_fixed_flags | |||
|
1065 | printf " %s\n" "--help, -h" | |||
|
1066 | printf " Show this help\n" | |||
1249 | echo |
|
1067 | echo | |
1250 |
|
1068 | |||
1251 | fi |
|
1069 | fi | |
|
1070 | } | |||
|
1071 | ||||
|
1072 | # :command.usage | |||
|
1073 | deprecated_cli_set_runtime_image_usage() { | |||
|
1074 | printf "rcstack cli set-runtime-image - DEPRECATED - use 'set-image' instead\n\n" | |||
1252 |
|
1075 | |||
1253 | printf "%s\n" "Usage:" |
|
1076 | printf "%s\n" "Usage:" | |
1254 | printf " rcstack cli set-runtime-image VERSION\n" |
|
1077 | printf " rcstack cli set-runtime-image VERSION\n" | |
@@ -1256,7 +1079,7 b' deprecated_cli_set_runtime_image_usage() {' | |||||
1256 | echo |
|
1079 | echo | |
1257 |
|
1080 | |||
1258 | # :command.long_usage |
|
1081 | # :command.long_usage | |
1259 | if [[ -n $long_usage ]]; then |
|
1082 | if [[ -n "$long_usage" ]]; then | |
1260 | printf "%s\n" "Options:" |
|
1083 | printf "%s\n" "Options:" | |
1261 |
|
1084 | |||
1262 | # :command.usage_fixed_flags |
|
1085 | # :command.usage_fixed_flags | |
@@ -1281,15 +1104,7 b' deprecated_cli_set_runtime_image_usage() {' | |||||
1281 |
|
1104 | |||
1282 | # :command.usage |
|
1105 | # :command.usage | |
1283 | rcstack_cli_set_edition_usage() { |
|
1106 | rcstack_cli_set_edition_usage() { | |
1284 | if [[ -n $long_usage ]]; then |
|
1107 | printf "rcstack cli set-edition - set current setup to either CE (Community) or EE (Enterprise) type\n\n" | |
1285 | printf "rcstack cli set-edition - set current setup to either CE (Community) or EE (Enterprise) type\n" |
|
|||
1286 | echo |
|
|||
1287 |
|
||||
1288 | else |
|
|||
1289 | printf "rcstack cli set-edition - set current setup to either CE (Community) or EE (Enterprise) type\n" |
|
|||
1290 | echo |
|
|||
1291 |
|
||||
1292 | fi |
|
|||
1293 |
|
1108 | |||
1294 | printf "%s\n" "Usage:" |
|
1109 | printf "%s\n" "Usage:" | |
1295 | printf " rcstack cli set-edition EDITION_TYPE\n" |
|
1110 | printf " rcstack cli set-edition EDITION_TYPE\n" | |
@@ -1297,7 +1112,7 b' rcstack_cli_set_edition_usage() {' | |||||
1297 | echo |
|
1112 | echo | |
1298 |
|
1113 | |||
1299 | # :command.long_usage |
|
1114 | # :command.long_usage | |
1300 | if [[ -n $long_usage ]]; then |
|
1115 | if [[ -n "$long_usage" ]]; then | |
1301 | printf "%s\n" "Options:" |
|
1116 | printf "%s\n" "Options:" | |
1302 |
|
1117 | |||
1303 | # :command.usage_fixed_flags |
|
1118 | # :command.usage_fixed_flags | |
@@ -1311,7 +1126,7 b' rcstack_cli_set_edition_usage() {' | |||||
1311 | # :argument.usage |
|
1126 | # :argument.usage | |
1312 | printf " %s\n" "EDITION_TYPE" |
|
1127 | printf " %s\n" "EDITION_TYPE" | |
1313 | printf " pick type CE or EE\n" |
|
1128 | printf " pick type CE or EE\n" | |
1314 |
printf " Allowed: ce, ee |
|
1129 | printf " %s\n" "Allowed: ce, ee" | |
1315 | echo |
|
1130 | echo | |
1316 |
|
1131 | |||
1317 | # :command.usage_examples |
|
1132 | # :command.usage_examples | |
@@ -1325,15 +1140,7 b' rcstack_cli_set_edition_usage() {' | |||||
1325 |
|
1140 | |||
1326 | # :command.usage |
|
1141 | # :command.usage | |
1327 | rcstack_cli_set_hostname_usage() { |
|
1142 | rcstack_cli_set_hostname_usage() { | |
1328 | if [[ -n $long_usage ]]; then |
|
1143 | printf "rcstack cli set-hostname - set hostname to .runtime.env file\n\n" | |
1329 | printf "rcstack cli set-hostname - set hostname to .runtime.env file\n" |
|
|||
1330 | echo |
|
|||
1331 |
|
||||
1332 | else |
|
|||
1333 | printf "rcstack cli set-hostname - set hostname to .runtime.env file\n" |
|
|||
1334 | echo |
|
|||
1335 |
|
||||
1336 | fi |
|
|||
1337 |
|
1144 | |||
1338 | printf "%s\n" "Usage:" |
|
1145 | printf "%s\n" "Usage:" | |
1339 | printf " rcstack cli set-hostname HOSTNAME\n" |
|
1146 | printf " rcstack cli set-hostname HOSTNAME\n" | |
@@ -1341,7 +1148,7 b' rcstack_cli_set_hostname_usage() {' | |||||
1341 | echo |
|
1148 | echo | |
1342 |
|
1149 | |||
1343 | # :command.long_usage |
|
1150 | # :command.long_usage | |
1344 | if [[ -n $long_usage ]]; then |
|
1151 | if [[ -n "$long_usage" ]]; then | |
1345 | printf "%s\n" "Options:" |
|
1152 | printf "%s\n" "Options:" | |
1346 |
|
1153 | |||
1347 | # :command.usage_fixed_flags |
|
1154 | # :command.usage_fixed_flags | |
@@ -1362,15 +1169,7 b' rcstack_cli_set_hostname_usage() {' | |||||
1362 |
|
1169 | |||
1363 | # :command.usage |
|
1170 | # :command.usage | |
1364 | rcstack_cli_docker_info_usage() { |
|
1171 | rcstack_cli_docker_info_usage() { | |
1365 | if [[ -n $long_usage ]]; then |
|
1172 | printf "rcstack cli docker-info - get current docker info\n\n" | |
1366 | printf "rcstack cli docker-info - get current docker info\n" |
|
|||
1367 | echo |
|
|||
1368 |
|
||||
1369 | else |
|
|||
1370 | printf "rcstack cli docker-info - get current docker info\n" |
|
|||
1371 | echo |
|
|||
1372 |
|
||||
1373 | fi |
|
|||
1374 |
|
1173 | |||
1375 | printf "%s\n" "Usage:" |
|
1174 | printf "%s\n" "Usage:" | |
1376 | printf " rcstack cli docker-info [OPTIONS]\n" |
|
1175 | printf " rcstack cli docker-info [OPTIONS]\n" | |
@@ -1378,7 +1177,7 b' rcstack_cli_docker_info_usage() {' | |||||
1378 | echo |
|
1177 | echo | |
1379 |
|
1178 | |||
1380 | # :command.long_usage |
|
1179 | # :command.long_usage | |
1381 | if [[ -n $long_usage ]]; then |
|
1180 | if [[ -n "$long_usage" ]]; then | |
1382 | printf "%s\n" "Options:" |
|
1181 | printf "%s\n" "Options:" | |
1383 |
|
1182 | |||
1384 | # :command.usage_flags |
|
1183 | # :command.usage_flags | |
@@ -1397,15 +1196,7 b' rcstack_cli_docker_info_usage() {' | |||||
1397 |
|
1196 | |||
1398 | # :command.usage |
|
1197 | # :command.usage | |
1399 | rcstack_cli_docker_upgrade_usage() { |
|
1198 | rcstack_cli_docker_upgrade_usage() { | |
1400 | if [[ -n $long_usage ]]; then |
|
1199 | printf "rcstack cli docker-upgrade - force upgrade docker\n\n" | |
1401 | printf "rcstack cli docker-upgrade - force upgrade docker\n" |
|
|||
1402 | echo |
|
|||
1403 |
|
||||
1404 | else |
|
|||
1405 | printf "rcstack cli docker-upgrade - force upgrade docker\n" |
|
|||
1406 | echo |
|
|||
1407 |
|
||||
1408 | fi |
|
|||
1409 |
|
1200 | |||
1410 | printf "%s\n" "Usage:" |
|
1201 | printf "%s\n" "Usage:" | |
1411 | printf " rcstack cli docker-upgrade [OPTIONS]\n" |
|
1202 | printf " rcstack cli docker-upgrade [OPTIONS]\n" | |
@@ -1413,7 +1204,7 b' rcstack_cli_docker_upgrade_usage() {' | |||||
1413 | echo |
|
1204 | echo | |
1414 |
|
1205 | |||
1415 | # :command.long_usage |
|
1206 | # :command.long_usage | |
1416 | if [[ -n $long_usage ]]; then |
|
1207 | if [[ -n "$long_usage" ]]; then | |
1417 | printf "%s\n" "Options:" |
|
1208 | printf "%s\n" "Options:" | |
1418 |
|
1209 | |||
1419 | # :command.usage_flags |
|
1210 | # :command.usage_flags | |
@@ -1430,17 +1221,9 b' rcstack_cli_docker_upgrade_usage() {' | |||||
1430 | fi |
|
1221 | fi | |
1431 | } |
|
1222 | } | |
1432 |
|
1223 | |||
1433 | # :command.usage |
|
1224 | # :command.usage | |
1434 | rcstack_cli_redis_usage() { |
|
1225 | rcstack_cli_redis_usage() { | |
1435 | if [[ -n $long_usage ]]; then |
|
1226 | printf "rcstack cli redis - CLI for Redis\n\n" | |
1436 | printf "rcstack cli redis - CLI for Redis\n" |
|
|||
1437 | echo |
|
|||
1438 |
|
||||
1439 | else |
|
|||
1440 | printf "rcstack cli redis - CLI for Redis\n" |
|
|||
1441 | echo |
|
|||
1442 |
|
||||
1443 | fi |
|
|||
1444 |
|
1227 | |||
1445 | printf "%s\n" "Usage:" |
|
1228 | printf "%s\n" "Usage:" | |
1446 | printf " rcstack cli redis [OPTIONS]\n" |
|
1229 | printf " rcstack cli redis [OPTIONS]\n" | |
@@ -1448,7 +1231,7 b' rcstack_cli_redis_usage() {' | |||||
1448 | echo |
|
1231 | echo | |
1449 |
|
1232 | |||
1450 | # :command.long_usage |
|
1233 | # :command.long_usage | |
1451 | if [[ -n $long_usage ]]; then |
|
1234 | if [[ -n "$long_usage" ]]; then | |
1452 | printf "%s\n" "Options:" |
|
1235 | printf "%s\n" "Options:" | |
1453 |
|
1236 | |||
1454 | # :command.usage_flags |
|
1237 | # :command.usage_flags | |
@@ -1465,13 +1248,13 b' rcstack_cli_redis_usage() {' | |||||
1465 | # :flag.usage |
|
1248 | # :flag.usage | |
1466 | printf " %s\n" "--env-file-path ENV_FILE_PATH" |
|
1249 | printf " %s\n" "--env-file-path ENV_FILE_PATH" | |
1467 | printf " Set custom env file\n" |
|
1250 | printf " Set custom env file\n" | |
1468 |
printf " Default: $PWD/.custom/.runtime.env |
|
1251 | printf " %s\n" "Default: $PWD/.custom/.runtime.env" | |
1469 | echo |
|
1252 | echo | |
1470 |
|
1253 | |||
1471 | # :flag.usage |
|
1254 | # :flag.usage | |
1472 | printf " %s\n" "--db DB" |
|
1255 | printf " %s\n" "--db DB" | |
1473 | printf " select Redis db, defaults 0\n" |
|
1256 | printf " select Redis db, defaults 0\n" | |
1474 |
printf " Default: 0 |
|
1257 | printf " %s\n" "Default: 0" | |
1475 | echo |
|
1258 | echo | |
1476 |
|
1259 | |||
1477 | # :command.usage_fixed_flags |
|
1260 | # :command.usage_fixed_flags | |
@@ -1489,15 +1272,7 b' rcstack_cli_redis_usage() {' | |||||
1489 |
|
1272 | |||
1490 | # :command.usage |
|
1273 | # :command.usage | |
1491 | rcstack_cli_db_usage() { |
|
1274 | rcstack_cli_db_usage() { | |
1492 | if [[ -n $long_usage ]]; then |
|
1275 | printf "rcstack cli db - CLI with Database connection\n\n" | |
1493 | printf "rcstack cli db - CLI with Database connection\n" |
|
|||
1494 | echo |
|
|||
1495 |
|
||||
1496 | else |
|
|||
1497 | printf "rcstack cli db - CLI with Database connection\n" |
|
|||
1498 | echo |
|
|||
1499 |
|
||||
1500 | fi |
|
|||
1501 |
|
1276 | |||
1502 | printf "%s\n" "Usage:" |
|
1277 | printf "%s\n" "Usage:" | |
1503 | printf " rcstack cli db [OPTIONS]\n" |
|
1278 | printf " rcstack cli db [OPTIONS]\n" | |
@@ -1505,7 +1280,7 b' rcstack_cli_db_usage() {' | |||||
1505 | echo |
|
1280 | echo | |
1506 |
|
1281 | |||
1507 | # :command.long_usage |
|
1282 | # :command.long_usage | |
1508 | if [[ -n $long_usage ]]; then |
|
1283 | if [[ -n "$long_usage" ]]; then | |
1509 | printf "%s\n" "Options:" |
|
1284 | printf "%s\n" "Options:" | |
1510 |
|
1285 | |||
1511 | # :command.usage_flags |
|
1286 | # :command.usage_flags | |
@@ -1522,7 +1297,7 b' rcstack_cli_db_usage() {' | |||||
1522 | # :flag.usage |
|
1297 | # :flag.usage | |
1523 | printf " %s\n" "--env-file-path ENV_FILE_PATH" |
|
1298 | printf " %s\n" "--env-file-path ENV_FILE_PATH" | |
1524 | printf " Set custom env file\n" |
|
1299 | printf " Set custom env file\n" | |
1525 |
printf " Default: $PWD/.custom/.runtime.env |
|
1300 | printf " %s\n" "Default: $PWD/.custom/.runtime.env" | |
1526 | echo |
|
1301 | echo | |
1527 |
|
1302 | |||
1528 | # :command.usage_fixed_flags |
|
1303 | # :command.usage_fixed_flags | |
@@ -1540,15 +1315,7 b' rcstack_cli_db_usage() {' | |||||
1540 |
|
1315 | |||
1541 | # :command.usage |
|
1316 | # :command.usage | |
1542 | rcstack_cli_db_upgrade_usage() { |
|
1317 | rcstack_cli_db_upgrade_usage() { | |
1543 | if [[ -n $long_usage ]]; then |
|
1318 | printf "rcstack cli db-upgrade - CLI to run db upgrade\n\n" | |
1544 | printf "rcstack cli db-upgrade - CLI to run db upgrade\n" |
|
|||
1545 | echo |
|
|||
1546 |
|
||||
1547 | else |
|
|||
1548 | printf "rcstack cli db-upgrade - CLI to run db upgrade\n" |
|
|||
1549 | echo |
|
|||
1550 |
|
||||
1551 | fi |
|
|||
1552 |
|
1319 | |||
1553 | printf "%s\n" "Usage:" |
|
1320 | printf "%s\n" "Usage:" | |
1554 | printf " rcstack cli db-upgrade\n" |
|
1321 | printf " rcstack cli db-upgrade\n" | |
@@ -1556,7 +1323,7 b' rcstack_cli_db_upgrade_usage() {' | |||||
1556 | echo |
|
1323 | echo | |
1557 |
|
1324 | |||
1558 | # :command.long_usage |
|
1325 | # :command.long_usage | |
1559 | if [[ -n $long_usage ]]; then |
|
1326 | if [[ -n "$long_usage" ]]; then | |
1560 | printf "%s\n" "Options:" |
|
1327 | printf "%s\n" "Options:" | |
1561 |
|
1328 | |||
1562 | # :command.usage_fixed_flags |
|
1329 | # :command.usage_fixed_flags | |
@@ -1569,15 +1336,7 b' rcstack_cli_db_upgrade_usage() {' | |||||
1569 |
|
1336 | |||
1570 | # :command.usage |
|
1337 | # :command.usage | |
1571 | rcstack_cli_storage_usage() { |
|
1338 | rcstack_cli_storage_usage() { | |
1572 | if [[ -n $long_usage ]]; then |
|
1339 | printf "rcstack cli storage - CLI for repository storage. Exposes a basic image with mounted data and repositories volumes or attach to currently running containers storage\n\n" | |
1573 | printf "rcstack cli storage - CLI for repository storage. Exposes a basic image with mounted data and repositories volumes or attach to currently running containers storage\n" |
|
|||
1574 | echo |
|
|||
1575 |
|
||||
1576 | else |
|
|||
1577 | printf "rcstack cli storage - CLI for repository storage. Exposes a basic image with mounted data and repositories volumes or attach to currently running containers storage\n" |
|
|||
1578 | echo |
|
|||
1579 |
|
||||
1580 | fi |
|
|||
1581 |
|
1340 | |||
1582 | printf "%s\n" "Usage:" |
|
1341 | printf "%s\n" "Usage:" | |
1583 | printf " rcstack cli storage [OPTIONS]\n" |
|
1342 | printf " rcstack cli storage [OPTIONS]\n" | |
@@ -1585,7 +1344,7 b' rcstack_cli_storage_usage() {' | |||||
1585 | echo |
|
1344 | echo | |
1586 |
|
1345 | |||
1587 | # :command.long_usage |
|
1346 | # :command.long_usage | |
1588 | if [[ -n $long_usage ]]; then |
|
1347 | if [[ -n "$long_usage" ]]; then | |
1589 | printf "%s\n" "Options:" |
|
1348 | printf "%s\n" "Options:" | |
1590 |
|
1349 | |||
1591 | # :command.usage_flags |
|
1350 | # :command.usage_flags | |
@@ -1609,15 +1368,7 b' rcstack_cli_storage_usage() {' | |||||
1609 |
|
1368 | |||
1610 | # :command.usage |
|
1369 | # :command.usage | |
1611 | rcstack_cli_attach_usage() { |
|
1370 | rcstack_cli_attach_usage() { | |
1612 | if [[ -n $long_usage ]]; then |
|
1371 | printf "rcstack cli attach - attach to running instance of RhodeCode, by default it attaches to rhodecode main web app\n\n" | |
1613 | printf "rcstack cli attach - attach to running instance of RhodeCode, by default it attaches to rhodecode main web app\n" |
|
|||
1614 | echo |
|
|||
1615 |
|
||||
1616 | else |
|
|||
1617 | printf "rcstack cli attach - attach to running instance of RhodeCode, by default it attaches to rhodecode main web app\n" |
|
|||
1618 | echo |
|
|||
1619 |
|
||||
1620 | fi |
|
|||
1621 |
|
1372 | |||
1622 | printf "%s\n" "Usage:" |
|
1373 | printf "%s\n" "Usage:" | |
1623 | printf " rcstack cli attach [OPTIONS]\n" |
|
1374 | printf " rcstack cli attach [OPTIONS]\n" | |
@@ -1625,7 +1376,7 b' rcstack_cli_attach_usage() {' | |||||
1625 | echo |
|
1376 | echo | |
1626 |
|
1377 | |||
1627 | # :command.long_usage |
|
1378 | # :command.long_usage | |
1628 | if [[ -n $long_usage ]]; then |
|
1379 | if [[ -n "$long_usage" ]]; then | |
1629 | printf "%s\n" "Options:" |
|
1380 | printf "%s\n" "Options:" | |
1630 |
|
1381 | |||
1631 | # :command.usage_flags |
|
1382 | # :command.usage_flags | |
@@ -1637,7 +1388,7 b' rcstack_cli_attach_usage() {' | |||||
1637 | # :flag.usage |
|
1388 | # :flag.usage | |
1638 | printf " %s\n" "--instance-type INSTANCE_TYPE" |
|
1389 | printf " %s\n" "--instance-type INSTANCE_TYPE" | |
1639 | printf " type of instance to attach to\n" |
|
1390 | printf " type of instance to attach to\n" | |
1640 |
printf " Default: rhodecode |
|
1391 | printf " %s\n" "Default: rhodecode" | |
1641 | echo |
|
1392 | echo | |
1642 |
|
1393 | |||
1643 | # :command.usage_fixed_flags |
|
1394 | # :command.usage_fixed_flags | |
@@ -1655,15 +1406,7 b' rcstack_cli_attach_usage() {' | |||||
1655 |
|
1406 | |||
1656 | # :command.usage |
|
1407 | # :command.usage | |
1657 | rcstack_cli_configure_vcsserver_usage() { |
|
1408 | rcstack_cli_configure_vcsserver_usage() { | |
1658 | if [[ -n $long_usage ]]; then |
|
1409 | printf "rcstack cli configure-vcsserver - reconfigure the vcsserver.ini file\n\n" | |
1659 | printf "rcstack cli configure-vcsserver - reconfigure the vcsserver.ini file\n" |
|
|||
1660 | echo |
|
|||
1661 |
|
||||
1662 | else |
|
|||
1663 | printf "rcstack cli configure-vcsserver - reconfigure the vcsserver.ini file\n" |
|
|||
1664 | echo |
|
|||
1665 |
|
||||
1666 | fi |
|
|||
1667 |
|
1410 | |||
1668 | printf "%s\n" "Usage:" |
|
1411 | printf "%s\n" "Usage:" | |
1669 | printf " rcstack cli configure-vcsserver INI_PATH\n" |
|
1412 | printf " rcstack cli configure-vcsserver INI_PATH\n" | |
@@ -1671,7 +1414,7 b' rcstack_cli_configure_vcsserver_usage() {' | |||||
1671 | echo |
|
1414 | echo | |
1672 |
|
1415 | |||
1673 | # :command.long_usage |
|
1416 | # :command.long_usage | |
1674 | if [[ -n $long_usage ]]; then |
|
1417 | if [[ -n "$long_usage" ]]; then | |
1675 | printf "%s\n" "Options:" |
|
1418 | printf "%s\n" "Options:" | |
1676 |
|
1419 | |||
1677 | # :command.usage_fixed_flags |
|
1420 | # :command.usage_fixed_flags | |
@@ -1697,15 +1440,7 b' rcstack_cli_configure_vcsserver_usage() {' | |||||
1697 |
|
1440 | |||
1698 | # :command.usage |
|
1441 | # :command.usage | |
1699 | rcstack_cli_configure_rhodecode_usage() { |
|
1442 | rcstack_cli_configure_rhodecode_usage() { | |
1700 | if [[ -n $long_usage ]]; then |
|
1443 | printf "rcstack cli configure-rhodecode - reconfigure the rhodecode.ini file\n\n" | |
1701 | printf "rcstack cli configure-rhodecode - reconfigure the rhodecode.ini file\n" |
|
|||
1702 | echo |
|
|||
1703 |
|
||||
1704 | else |
|
|||
1705 | printf "rcstack cli configure-rhodecode - reconfigure the rhodecode.ini file\n" |
|
|||
1706 | echo |
|
|||
1707 |
|
||||
1708 | fi |
|
|||
1709 |
|
1444 | |||
1710 | printf "%s\n" "Usage:" |
|
1445 | printf "%s\n" "Usage:" | |
1711 | printf " rcstack cli configure-rhodecode INI_PATH\n" |
|
1446 | printf " rcstack cli configure-rhodecode INI_PATH\n" | |
@@ -1713,7 +1448,7 b' rcstack_cli_configure_rhodecode_usage() {' | |||||
1713 | echo |
|
1448 | echo | |
1714 |
|
1449 | |||
1715 | # :command.long_usage |
|
1450 | # :command.long_usage | |
1716 | if [[ -n $long_usage ]]; then |
|
1451 | if [[ -n "$long_usage" ]]; then | |
1717 | printf "%s\n" "Options:" |
|
1452 | printf "%s\n" "Options:" | |
1718 |
|
1453 | |||
1719 | # :command.usage_fixed_flags |
|
1454 | # :command.usage_fixed_flags | |
@@ -1739,15 +1474,7 b' rcstack_cli_configure_rhodecode_usage() {' | |||||
1739 |
|
1474 | |||
1740 | # :command.usage |
|
1475 | # :command.usage | |
1741 | rcstack_backup_db_usage() { |
|
1476 | rcstack_backup_db_usage() { | |
1742 | if [[ -n $long_usage ]]; then |
|
1477 | printf "rcstack backup-db - Backup Database\n\n" | |
1743 | printf "rcstack backup-db - Backup Database\n" |
|
|||
1744 | echo |
|
|||
1745 |
|
||||
1746 | else |
|
|||
1747 | printf "rcstack backup-db - Backup Database\n" |
|
|||
1748 | echo |
|
|||
1749 |
|
||||
1750 | fi |
|
|||
1751 |
|
1478 | |||
1752 | printf "%s\n" "Usage:" |
|
1479 | printf "%s\n" "Usage:" | |
1753 | printf " rcstack backup-db DESTINATION\n" |
|
1480 | printf " rcstack backup-db DESTINATION\n" | |
@@ -1755,7 +1482,7 b' rcstack_backup_db_usage() {' | |||||
1755 | echo |
|
1482 | echo | |
1756 |
|
1483 | |||
1757 | # :command.long_usage |
|
1484 | # :command.long_usage | |
1758 | if [[ -n $long_usage ]]; then |
|
1485 | if [[ -n "$long_usage" ]]; then | |
1759 | printf "%s\n" "Options:" |
|
1486 | printf "%s\n" "Options:" | |
1760 |
|
1487 | |||
1761 | # :command.usage_fixed_flags |
|
1488 | # :command.usage_fixed_flags | |
@@ -1781,15 +1508,7 b' rcstack_backup_db_usage() {' | |||||
1781 |
|
1508 | |||
1782 | # :command.usage |
|
1509 | # :command.usage | |
1783 | rcstack_backup_data_usage() { |
|
1510 | rcstack_backup_data_usage() { | |
1784 | if [[ -n $long_usage ]]; then |
|
1511 | printf "rcstack backup-data - Backup RhodeCode storage\n\n" | |
1785 | printf "rcstack backup-data - Backup RhodeCode storage\n" |
|
|||
1786 | echo |
|
|||
1787 |
|
||||
1788 | else |
|
|||
1789 | printf "rcstack backup-data - Backup RhodeCode storage\n" |
|
|||
1790 | echo |
|
|||
1791 |
|
||||
1792 | fi |
|
|||
1793 |
|
1512 | |||
1794 | printf "%s\n" "Usage:" |
|
1513 | printf "%s\n" "Usage:" | |
1795 | printf " rcstack backup-data DESTINATION\n" |
|
1514 | printf " rcstack backup-data DESTINATION\n" | |
@@ -1797,7 +1516,7 b' rcstack_backup_data_usage() {' | |||||
1797 | echo |
|
1516 | echo | |
1798 |
|
1517 | |||
1799 | # :command.long_usage |
|
1518 | # :command.long_usage | |
1800 | if [[ -n $long_usage ]]; then |
|
1519 | if [[ -n "$long_usage" ]]; then | |
1801 | printf "%s\n" "Options:" |
|
1520 | printf "%s\n" "Options:" | |
1802 |
|
1521 | |||
1803 | # :command.usage_fixed_flags |
|
1522 | # :command.usage_fixed_flags | |
@@ -1823,15 +1542,7 b' rcstack_backup_data_usage() {' | |||||
1823 |
|
1542 | |||
1824 | # :command.usage |
|
1543 | # :command.usage | |
1825 | rcstack__completions_usage() { |
|
1544 | rcstack__completions_usage() { | |
1826 | if [[ -n $long_usage ]]; then |
|
1545 | printf "rcstack _completions - Generate completions\n\n" | |
1827 | printf "rcstack _completions - Generate completions\n" |
|
|||
1828 | echo |
|
|||
1829 |
|
||||
1830 | else |
|
|||
1831 | printf "rcstack _completions - Generate completions\n" |
|
|||
1832 | echo |
|
|||
1833 |
|
||||
1834 | fi |
|
|||
1835 |
|
1546 | |||
1836 | printf "%s\n" "Usage:" |
|
1547 | printf "%s\n" "Usage:" | |
1837 | printf " rcstack _completions\n" |
|
1548 | printf " rcstack _completions\n" | |
@@ -1839,7 +1550,7 b' rcstack__completions_usage() {' | |||||
1839 | echo |
|
1550 | echo | |
1840 |
|
1551 | |||
1841 | # :command.long_usage |
|
1552 | # :command.long_usage | |
1842 | if [[ -n $long_usage ]]; then |
|
1553 | if [[ -n "$long_usage" ]]; then | |
1843 | printf "%s\n" "Options:" |
|
1554 | printf "%s\n" "Options:" | |
1844 |
|
1555 | |||
1845 | # :command.usage_fixed_flags |
|
1556 | # :command.usage_fixed_flags | |
@@ -1851,12 +1562,16 b' rcstack__completions_usage() {' | |||||
1851 | } |
|
1562 | } | |
1852 |
|
1563 | |||
1853 | # :command.normalize_input |
|
1564 | # :command.normalize_input | |
|
1565 | # :command.normalize_input_function | |||
1854 | normalize_input() { |
|
1566 | normalize_input() { | |
1855 | local arg flags |
|
1567 | local arg passthru flags | |
|
1568 | passthru=false | |||
1856 |
|
1569 | |||
1857 | while [[ $# -gt 0 ]]; do |
|
1570 | while [[ $# -gt 0 ]]; do | |
1858 | arg="$1" |
|
1571 | arg="$1" | |
1859 | if [[ $arg =~ ^(--[a-zA-Z0-9_\-]+)=(.+)$ ]]; then |
|
1572 | if [[ $passthru == true ]]; then | |
|
1573 | input+=("$arg") | |||
|
1574 | elif [[ $arg =~ ^(--[a-zA-Z0-9_\-]+)=(.+)$ ]]; then | |||
1860 | input+=("${BASH_REMATCH[1]}") |
|
1575 | input+=("${BASH_REMATCH[1]}") | |
1861 | input+=("${BASH_REMATCH[2]}") |
|
1576 | input+=("${BASH_REMATCH[2]}") | |
1862 | elif [[ $arg =~ ^(-[a-zA-Z0-9])=(.+)$ ]]; then |
|
1577 | elif [[ $arg =~ ^(-[a-zA-Z0-9])=(.+)$ ]]; then | |
@@ -1867,6 +1582,9 b' normalize_input() {' | |||||
1867 | for ((i = 0; i < ${#flags}; i++)); do |
|
1582 | for ((i = 0; i < ${#flags}; i++)); do | |
1868 | input+=("-${flags:i:1}") |
|
1583 | input+=("-${flags:i:1}") | |
1869 | done |
|
1584 | done | |
|
1585 | elif [[ "$arg" == "--" ]]; then | |||
|
1586 | passthru=true | |||
|
1587 | input+=("$arg") | |||
1870 | else |
|
1588 | else | |
1871 | input+=("$arg") |
|
1589 | input+=("$arg") | |
1872 | fi |
|
1590 | fi | |
@@ -1874,12 +1592,15 b' normalize_input() {' | |||||
1874 | shift |
|
1592 | shift | |
1875 | done |
|
1593 | done | |
1876 | } |
|
1594 | } | |
|
1595 | ||||
1877 | # :command.inspect_args |
|
1596 | # :command.inspect_args | |
1878 | inspect_args() { |
|
1597 | inspect_args() { | |
1879 | if ((${#args[@]})); then |
|
1598 | if ((${#args[@]})); then | |
1880 | readarray -t sorted_keys < <(printf '%s\n' "${!args[@]}" | sort) |
|
1599 | readarray -t sorted_keys < <(printf '%s\n' "${!args[@]}" | sort) | |
1881 | echo args: |
|
1600 | echo args: | |
1882 |
for k in "${sorted_keys[@]}"; do |
|
1601 | for k in "${sorted_keys[@]}"; do | |
|
1602 | echo "- \${args[$k]} = ${args[$k]}" | |||
|
1603 | done | |||
1883 | else |
|
1604 | else | |
1884 | echo args: none |
|
1605 | echo args: none | |
1885 | fi |
|
1606 | fi | |
@@ -1897,9 +1618,19 b' inspect_args() {' | |||||
1897 | readarray -t sorted_keys < <(printf '%s\n' "${!deps[@]}" | sort) |
|
1618 | readarray -t sorted_keys < <(printf '%s\n' "${!deps[@]}" | sort) | |
1898 | echo |
|
1619 | echo | |
1899 | echo deps: |
|
1620 | echo deps: | |
1900 |
for k in "${sorted_keys[@]}"; do |
|
1621 | for k in "${sorted_keys[@]}"; do | |
|
1622 | echo "- \${deps[$k]} = ${deps[$k]}" | |||
|
1623 | done | |||
1901 | fi |
|
1624 | fi | |
1902 |
|
1625 | |||
|
1626 | if ((${#env_var_names[@]})); then | |||
|
1627 | readarray -t sorted_names < <(printf '%s\n' "${env_var_names[@]}" | sort) | |||
|
1628 | echo | |||
|
1629 | echo "environment variables:" | |||
|
1630 | for k in "${sorted_names[@]}"; do | |||
|
1631 | echo "- \$$k = ${!k:-}" | |||
|
1632 | done | |||
|
1633 | fi | |||
1903 | } |
|
1634 | } | |
1904 |
|
1635 | |||
1905 | # :command.user_lib |
|
1636 | # :command.user_lib | |
@@ -2004,22 +1735,21 b' magenta_underlined() { print_in_color "\\e[4;35m" "$*"; }' | |||||
2004 | cyan_underlined() { print_in_color "\e[4;36m" "$*"; } |
|
1735 | cyan_underlined() { print_in_color "\e[4;36m" "$*"; } | |
2005 |
|
1736 | |||
2006 | # src/lib/config.sh |
|
1737 | # src/lib/config.sh | |
2007 |
|
||||
2008 | config_show() { |
|
1738 | config_show() { | |
2009 | config_load |
|
1739 | config_load | |
2010 | ini_show |
|
1740 | ini_show | |
2011 | } |
|
1741 | } | |
2012 |
|
1742 | |||
2013 | config_get() { |
|
1743 | config_get() { | |
2014 | local key="$1" |
|
1744 | local key="${1-}" | |
2015 | local default_value="$2" |
|
1745 | local default_value="${2-}" | |
2016 |
|
1746 | |||
2017 | config_load |
|
1747 | config_load | |
2018 | echo "${ini["$key"]:-$default_value}" |
|
1748 | echo "${ini["$key"]:-$default_value}" | |
2019 | } |
|
1749 | } | |
2020 |
|
1750 | |||
2021 | config_set() { |
|
1751 | config_set() { | |
2022 | local key="$1" |
|
1752 | local key="${1-}" | |
2023 | shift |
|
1753 | shift | |
2024 | local value="$*" |
|
1754 | local value="$*" | |
2025 |
|
1755 | |||
@@ -2029,7 +1759,7 b' config_set() {' | |||||
2029 | } |
|
1759 | } | |
2030 |
|
1760 | |||
2031 | config_del() { |
|
1761 | config_del() { | |
2032 | local key="$1" |
|
1762 | local key="${1-}" | |
2033 |
|
1763 | |||
2034 | config_load |
|
1764 | config_load | |
2035 | unset "ini[$key]" |
|
1765 | unset "ini[$key]" | |
@@ -2051,7 +1781,7 b' config_reload() {' | |||||
2051 | } |
|
1781 | } | |
2052 |
|
1782 | |||
2053 | config_load() { |
|
1783 | config_load() { | |
2054 | [[ "$config_loaded" == "true" ]] && return |
|
1784 | [[ "${config_loaded-}" == "true" ]] && return | |
2055 |
|
1785 | |||
2056 | declare -g CONFIG_FILE=${CONFIG_FILE:=config.ini} |
|
1786 | declare -g CONFIG_FILE=${CONFIG_FILE:=config.ini} | |
2057 | declare -g config_loaded=true |
|
1787 | declare -g config_loaded=true | |
@@ -2220,7 +1950,6 b' get_docker_definitions() {' | |||||
2220 | } |
|
1950 | } | |
2221 |
|
1951 | |||
2222 | # src/lib/ini.sh |
|
1952 | # src/lib/ini.sh | |
2223 |
|
||||
2224 | ini_load() { |
|
1953 | ini_load() { | |
2225 | declare -gA ini |
|
1954 | declare -gA ini | |
2226 |
|
1955 | |||
@@ -2241,6 +1970,7 b' ini_load() {' | |||||
2241 | elif [[ $line =~ $key_regex ]]; then |
|
1970 | elif [[ $line =~ $key_regex ]]; then | |
2242 | key="${BASH_REMATCH[1]}" |
|
1971 | key="${BASH_REMATCH[1]}" | |
2243 | value="${BASH_REMATCH[2]}" |
|
1972 | value="${BASH_REMATCH[2]}" | |
|
1973 | [[ $value == *\$* ]] && eval "value=\"$value\"" | |||
2244 | ini["${section}${key}"]="$value" |
|
1974 | ini["${section}${key}"]="$value" | |
2245 | fi |
|
1975 | fi | |
2246 | done <"$ini_file" |
|
1976 | done <"$ini_file" | |
@@ -4625,6 +4355,26 b' rcstack_cli_set_image_command() {' | |||||
4625 | } |
|
4355 | } | |
4626 |
|
4356 | |||
4627 | # :command.function |
|
4357 | # :command.function | |
|
4358 | rcstack_cli_test_traffic_command() { | |||
|
4359 | # src/cli_test_traffic_command.sh | |||
|
4360 | echo "# this file is located in 'src/cli_test_traffic_command.sh'" | |||
|
4361 | echo "# code for 'rcstack cli test-traffic' goes here" | |||
|
4362 | echo "# you can edit it freely and regenerate (it will not be overwritten)" | |||
|
4363 | inspect_args | |||
|
4364 | ||||
|
4365 | test_url=${args[--test-url]} | |||
|
4366 | ||||
|
4367 | .env --file $RUNTIME_ENV | |||
|
4368 | ||||
|
4369 | .env get_or_error RC_HOSTNAME | |||
|
4370 | HOSTNAME=$REPLY | |||
|
4371 | ||||
|
4372 | echo "$(green "Testing traffic from Host: $HOSTNAME to $test_url")" | |||
|
4373 | curl -v -L --fail --header "Host: $HOSTNAME" $test_url | |||
|
4374 | echo "" | |||
|
4375 | } | |||
|
4376 | ||||
|
4377 | # :command.function | |||
4628 | deprecated_cli_set_runtime_image_command() { |
|
4378 | deprecated_cli_set_runtime_image_command() { | |
4629 | # src/cli_set_runtime_image_command.sh |
|
4379 | # src/cli_set_runtime_image_command.sh | |
4630 | echo "$(red DEPRECATED: Use 'cli set-image' instead)" >&2 |
|
4380 | echo "$(red DEPRECATED: Use 'cli set-image' instead)" >&2 | |
@@ -5304,6 +5054,13 b' parse_requirements() {' | |||||
5304 | export RC_STACK_SERVICES_EXT="${RC_STACK_SERVICES_EXT:-.custom/docker-compose-services.override.yaml}" |
|
5054 | export RC_STACK_SERVICES_EXT="${RC_STACK_SERVICES_EXT:-.custom/docker-compose-services.override.yaml}" | |
5305 | export RC_STACK_RHODECODE_EXT="${RC_STACK_RHODECODE_EXT:-.custom/docker-compose-apps.override.yaml}" |
|
5055 | export RC_STACK_RHODECODE_EXT="${RC_STACK_RHODECODE_EXT:-.custom/docker-compose-apps.override.yaml}" | |
5306 |
|
5056 | |||
|
5057 | env_var_names+=("RCC_CONFIG") | |||
|
5058 | env_var_names+=("AUTH_TOKEN") | |||
|
5059 | env_var_names+=("RC_STACK_ROUTER_EXT") | |||
|
5060 | env_var_names+=("RC_STACK_METRICS_EXT") | |||
|
5061 | env_var_names+=("RC_STACK_SERVICES_EXT") | |||
|
5062 | env_var_names+=("RC_STACK_RHODECODE_EXT") | |||
|
5063 | ||||
5307 | # :command.command_filter |
|
5064 | # :command.command_filter | |
5308 | action=${1:-} |
|
5065 | action=${1:-} | |
5309 |
|
5066 | |||
@@ -5541,7 +5298,6 b' rcstack_init_parse_requirements() {' | |||||
5541 |
|
5298 | |||
5542 | # :flag.case_arg |
|
5299 | # :flag.case_arg | |
5543 | if [[ -n ${2+x} ]]; then |
|
5300 | if [[ -n ${2+x} ]]; then | |
5544 |
|
||||
5545 | args['--arg-rc-edition']="$2" |
|
5301 | args['--arg-rc-edition']="$2" | |
5546 | shift |
|
5302 | shift | |
5547 | shift |
|
5303 | shift | |
@@ -5556,7 +5312,6 b' rcstack_init_parse_requirements() {' | |||||
5556 |
|
5312 | |||
5557 | # :flag.case_arg |
|
5313 | # :flag.case_arg | |
5558 | if [[ -n ${2+x} ]]; then |
|
5314 | if [[ -n ${2+x} ]]; then | |
5559 |
|
||||
5560 | args['--arg-rc-version']="$2" |
|
5315 | args['--arg-rc-version']="$2" | |
5561 | shift |
|
5316 | shift | |
5562 | shift |
|
5317 | shift | |
@@ -5571,7 +5326,6 b' rcstack_init_parse_requirements() {' | |||||
5571 |
|
5326 | |||
5572 | # :flag.case_arg |
|
5327 | # :flag.case_arg | |
5573 | if [[ -n ${2+x} ]]; then |
|
5328 | if [[ -n ${2+x} ]]; then | |
5574 |
|
||||
5575 | args['--arg-hostname']="$2" |
|
5329 | args['--arg-hostname']="$2" | |
5576 | shift |
|
5330 | shift | |
5577 | shift |
|
5331 | shift | |
@@ -5586,7 +5340,6 b' rcstack_init_parse_requirements() {' | |||||
5586 |
|
5340 | |||
5587 | # :flag.case_arg |
|
5341 | # :flag.case_arg | |
5588 | if [[ -n ${2+x} ]]; then |
|
5342 | if [[ -n ${2+x} ]]; then | |
5589 |
|
||||
5590 | args['--arg-database-type']="$2" |
|
5343 | args['--arg-database-type']="$2" | |
5591 | shift |
|
5344 | shift | |
5592 | shift |
|
5345 | shift | |
@@ -5601,7 +5354,6 b' rcstack_init_parse_requirements() {' | |||||
5601 |
|
5354 | |||
5602 | # :flag.case_arg |
|
5355 | # :flag.case_arg | |
5603 | if [[ -n ${2+x} ]]; then |
|
5356 | if [[ -n ${2+x} ]]; then | |
5604 |
|
||||
5605 | args['--arg-use-ssl']="$2" |
|
5357 | args['--arg-use-ssl']="$2" | |
5606 | shift |
|
5358 | shift | |
5607 | shift |
|
5359 | shift | |
@@ -5616,7 +5368,6 b' rcstack_init_parse_requirements() {' | |||||
5616 |
|
5368 | |||
5617 | # :flag.case_arg |
|
5369 | # :flag.case_arg | |
5618 | if [[ -n ${2+x} ]]; then |
|
5370 | if [[ -n ${2+x} ]]; then | |
5619 |
|
||||
5620 | args['--arg-admin-email']="$2" |
|
5371 | args['--arg-admin-email']="$2" | |
5621 | shift |
|
5372 | shift | |
5622 | shift |
|
5373 | shift | |
@@ -5631,7 +5382,6 b' rcstack_init_parse_requirements() {' | |||||
5631 |
|
5382 | |||
5632 | # :flag.case_arg |
|
5383 | # :flag.case_arg | |
5633 | if [[ -n ${2+x} ]]; then |
|
5384 | if [[ -n ${2+x} ]]; then | |
5634 |
|
||||
5635 | args['--arg-admin-user']="$2" |
|
5385 | args['--arg-admin-user']="$2" | |
5636 | shift |
|
5386 | shift | |
5637 | shift |
|
5387 | shift | |
@@ -5646,7 +5396,6 b' rcstack_init_parse_requirements() {' | |||||
5646 |
|
5396 | |||
5647 | # :flag.case_arg |
|
5397 | # :flag.case_arg | |
5648 | if [[ -n ${2+x} ]]; then |
|
5398 | if [[ -n ${2+x} ]]; then | |
5649 |
|
||||
5650 | args['--arg-admin-pass']="$2" |
|
5399 | args['--arg-admin-pass']="$2" | |
5651 | shift |
|
5400 | shift | |
5652 | shift |
|
5401 | shift | |
@@ -5661,7 +5410,6 b' rcstack_init_parse_requirements() {' | |||||
5661 |
|
5410 | |||
5662 | # :flag.case_arg |
|
5411 | # :flag.case_arg | |
5663 | if [[ -n ${2+x} ]]; then |
|
5412 | if [[ -n ${2+x} ]]; then | |
5664 |
|
||||
5665 | args['--arg-license-token']="$2" |
|
5413 | args['--arg-license-token']="$2" | |
5666 | shift |
|
5414 | shift | |
5667 | shift |
|
5415 | shift | |
@@ -5692,11 +5440,11 b' rcstack_init_parse_requirements() {' | |||||
5692 |
|
5440 | |||
5693 | # :flag.case_arg |
|
5441 | # :flag.case_arg | |
5694 | if [[ -n ${2+x} ]]; then |
|
5442 | if [[ -n ${2+x} ]]; then | |
5695 |
|
5443 | escaped="$(printf '%q' "$2")" | ||
5696 | if [[ -z ${args['--stage']+x} ]]; then |
|
5444 | if [[ -z ${args['--stage']+x} ]]; then | |
5697 |
args['--stage']=" |
|
5445 | args['--stage']="$escaped" | |
5698 | else |
|
5446 | else | |
5699 |
args['--stage']="${args[--stage |
|
5447 | args['--stage']="${args['--stage']} $escaped" | |
5700 | fi |
|
5448 | fi | |
5701 | shift |
|
5449 | shift | |
5702 | shift |
|
5450 | shift | |
@@ -5711,7 +5459,6 b' rcstack_init_parse_requirements() {' | |||||
5711 |
|
5459 | |||
5712 | # :flag.case_arg |
|
5460 | # :flag.case_arg | |
5713 | if [[ -n ${2+x} ]]; then |
|
5461 | if [[ -n ${2+x} ]]; then | |
5714 |
|
||||
5715 | args['--docker-revision']="$2" |
|
5462 | args['--docker-revision']="$2" | |
5716 | shift |
|
5463 | shift | |
5717 | shift |
|
5464 | shift | |
@@ -5726,7 +5473,6 b' rcstack_init_parse_requirements() {' | |||||
5726 |
|
5473 | |||
5727 | # :flag.case_arg |
|
5474 | # :flag.case_arg | |
5728 | if [[ -n ${2+x} ]]; then |
|
5475 | if [[ -n ${2+x} ]]; then | |
5729 |
|
||||
5730 | args['--install-docker']="$2" |
|
5476 | args['--install-docker']="$2" | |
5731 | shift |
|
5477 | shift | |
5732 | shift |
|
5478 | shift | |
@@ -5741,7 +5487,6 b' rcstack_init_parse_requirements() {' | |||||
5741 |
|
5487 | |||
5742 | # :flag.case_arg |
|
5488 | # :flag.case_arg | |
5743 | if [[ -n ${2+x} ]]; then |
|
5489 | if [[ -n ${2+x} ]]; then | |
5744 |
|
||||
5745 | args['--server-url']="$2" |
|
5490 | args['--server-url']="$2" | |
5746 | shift |
|
5491 | shift | |
5747 | shift |
|
5492 | shift | |
@@ -5756,7 +5501,6 b' rcstack_init_parse_requirements() {' | |||||
5756 |
|
5501 | |||
5757 | # :flag.case_arg |
|
5502 | # :flag.case_arg | |
5758 | if [[ -n ${2+x} ]]; then |
|
5503 | if [[ -n ${2+x} ]]; then | |
5759 |
|
||||
5760 | args['--auth-token']="$2" |
|
5504 | args['--auth-token']="$2" | |
5761 | shift |
|
5505 | shift | |
5762 | shift |
|
5506 | shift | |
@@ -5787,15 +5531,15 b' rcstack_init_parse_requirements() {' | |||||
5787 | [[ -n ${args['--server-url']:-} ]] || args['--server-url']="https://dls.rhodecode.com/get_archive" |
|
5531 | [[ -n ${args['--server-url']:-} ]] || args['--server-url']="https://dls.rhodecode.com/get_archive" | |
5788 |
|
5532 | |||
5789 | # :command.whitelist_filter |
|
5533 | # :command.whitelist_filter | |
5790 | if [[ ${args['--arg-rc-edition']} ]] && [[ ! ${args['--arg-rc-edition']} =~ ^(ce|ee)$ ]]; then |
|
5534 | if [[ ${args['--arg-rc-edition']:-} ]] && [[ ! ${args['--arg-rc-edition']:-} =~ ^(ce|ee)$ ]]; then | |
5791 | printf "%s\n" "--arg-rc-edition must be one of: ce, ee" >&2 |
|
5535 | printf "%s\n" "--arg-rc-edition must be one of: ce, ee" >&2 | |
5792 | exit 1 |
|
5536 | exit 1 | |
5793 | fi |
|
5537 | fi | |
5794 | if [[ ${args['--arg-database-type']} ]] && [[ ! ${args['--arg-database-type']} =~ ^(postgres|mysql|none)$ ]]; then |
|
5538 | if [[ ${args['--arg-database-type']:-} ]] && [[ ! ${args['--arg-database-type']:-} =~ ^(postgres|mysql|none)$ ]]; then | |
5795 | printf "%s\n" "--arg-database-type must be one of: postgres, mysql, none" >&2 |
|
5539 | printf "%s\n" "--arg-database-type must be one of: postgres, mysql, none" >&2 | |
5796 | exit 1 |
|
5540 | exit 1 | |
5797 | fi |
|
5541 | fi | |
5798 | if [[ ${args['--arg-use-ssl']} ]] && [[ ! ${args['--arg-use-ssl']} =~ ^(y|n)$ ]]; then |
|
5542 | if [[ ${args['--arg-use-ssl']:-} ]] && [[ ! ${args['--arg-use-ssl']:-} =~ ^(y|n)$ ]]; then | |
5799 | printf "%s\n" "--arg-use-ssl must be one of: y, n" >&2 |
|
5543 | printf "%s\n" "--arg-use-ssl must be one of: y, n" >&2 | |
5800 | exit 1 |
|
5544 | exit 1 | |
5801 | fi |
|
5545 | fi | |
@@ -5906,7 +5650,6 b' rcstack_self_update_parse_requirements() {' | |||||
5906 |
|
5650 | |||
5907 | # :flag.case_arg |
|
5651 | # :flag.case_arg | |
5908 | if [[ -n ${2+x} ]]; then |
|
5652 | if [[ -n ${2+x} ]]; then | |
5909 |
|
||||
5910 | args['--update-docker-image']="$2" |
|
5653 | args['--update-docker-image']="$2" | |
5911 | shift |
|
5654 | shift | |
5912 | shift |
|
5655 | shift | |
@@ -5926,7 +5669,6 b' rcstack_self_update_parse_requirements() {' | |||||
5926 |
|
5669 | |||
5927 | # :flag.case_arg |
|
5670 | # :flag.case_arg | |
5928 | if [[ -n ${2+x} ]]; then |
|
5671 | if [[ -n ${2+x} ]]; then | |
5929 |
|
||||
5930 | args['--cli-file']="$2" |
|
5672 | args['--cli-file']="$2" | |
5931 | shift |
|
5673 | shift | |
5932 | shift |
|
5674 | shift | |
@@ -5946,7 +5688,6 b' rcstack_self_update_parse_requirements() {' | |||||
5946 |
|
5688 | |||
5947 | # :flag.case_arg |
|
5689 | # :flag.case_arg | |
5948 | if [[ -n ${2+x} ]]; then |
|
5690 | if [[ -n ${2+x} ]]; then | |
5949 |
|
||||
5950 | args['--cli-revision']="$2" |
|
5691 | args['--cli-revision']="$2" | |
5951 | shift |
|
5692 | shift | |
5952 | shift |
|
5693 | shift | |
@@ -5961,7 +5702,6 b' rcstack_self_update_parse_requirements() {' | |||||
5961 |
|
5702 | |||
5962 | # :flag.case_arg |
|
5703 | # :flag.case_arg | |
5963 | if [[ -n ${2+x} ]]; then |
|
5704 | if [[ -n ${2+x} ]]; then | |
5964 |
|
||||
5965 | args['--docker-revision']="$2" |
|
5705 | args['--docker-revision']="$2" | |
5966 | shift |
|
5706 | shift | |
5967 | shift |
|
5707 | shift | |
@@ -5976,7 +5716,6 b' rcstack_self_update_parse_requirements() {' | |||||
5976 |
|
5716 | |||
5977 | # :flag.case_arg |
|
5717 | # :flag.case_arg | |
5978 | if [[ -n ${2+x} ]]; then |
|
5718 | if [[ -n ${2+x} ]]; then | |
5979 |
|
||||
5980 | args['--server-url']="$2" |
|
5719 | args['--server-url']="$2" | |
5981 | shift |
|
5720 | shift | |
5982 | shift |
|
5721 | shift | |
@@ -5991,7 +5730,6 b' rcstack_self_update_parse_requirements() {' | |||||
5991 |
|
5730 | |||
5992 | # :flag.case_arg |
|
5731 | # :flag.case_arg | |
5993 | if [[ -n ${2+x} ]]; then |
|
5732 | if [[ -n ${2+x} ]]; then | |
5994 |
|
||||
5995 | args['--auth-token']="$2" |
|
5733 | args['--auth-token']="$2" | |
5996 | shift |
|
5734 | shift | |
5997 | shift |
|
5735 | shift | |
@@ -6069,7 +5807,6 b' rcstack_self_upgrade_parse_requirements() {' | |||||
6069 |
|
5807 | |||
6070 | # :flag.case_arg |
|
5808 | # :flag.case_arg | |
6071 | if [[ -n ${2+x} ]]; then |
|
5809 | if [[ -n ${2+x} ]]; then | |
6072 |
|
||||
6073 | args['--from-ver']="$2" |
|
5810 | args['--from-ver']="$2" | |
6074 | shift |
|
5811 | shift | |
6075 | shift |
|
5812 | shift | |
@@ -6084,7 +5821,6 b' rcstack_self_upgrade_parse_requirements() {' | |||||
6084 |
|
5821 | |||
6085 | # :flag.case_arg |
|
5822 | # :flag.case_arg | |
6086 | if [[ -n ${2+x} ]]; then |
|
5823 | if [[ -n ${2+x} ]]; then | |
6087 |
|
||||
6088 | args['--to-ver']="$2" |
|
5824 | args['--to-ver']="$2" | |
6089 | shift |
|
5825 | shift | |
6090 | shift |
|
5826 | shift | |
@@ -6128,12 +5864,6 b' rcstack_stack_parse_requirements() {' | |||||
6128 |
|
5864 | |||
6129 | # :flag.case_arg |
|
5865 | # :flag.case_arg | |
6130 | if [[ -n ${2+x} ]]; then |
|
5866 | if [[ -n ${2+x} ]]; then | |
6131 | # :flag.validations |
|
|||
6132 | if [[ -n $(validate_file_exists "$2") ]]; then |
|
|||
6133 | printf "validation error in %s:\n%s\n" "--env-file-path ENV_FILE_PATH" "$(validate_file_exists "$2")" >&2 |
|
|||
6134 | exit 1 |
|
|||
6135 | fi |
|
|||
6136 |
|
||||
6137 | args['--env-file-path']="$2" |
|
5867 | args['--env-file-path']="$2" | |
6138 | shift |
|
5868 | shift | |
6139 | shift |
|
5869 | shift | |
@@ -6148,7 +5878,6 b' rcstack_stack_parse_requirements() {' | |||||
6148 |
|
5878 | |||
6149 | # :flag.case_arg |
|
5879 | # :flag.case_arg | |
6150 | if [[ -n ${2+x} ]]; then |
|
5880 | if [[ -n ${2+x} ]]; then | |
6151 |
|
||||
6152 | args['--stack-prefix']="$2" |
|
5881 | args['--stack-prefix']="$2" | |
6153 | shift |
|
5882 | shift | |
6154 | shift |
|
5883 | shift | |
@@ -6243,6 +5972,13 b' rcstack_stack_parse_requirements() {' | |||||
6243 | # :command.default_assignments |
|
5972 | # :command.default_assignments | |
6244 | [[ -n ${args['--env-file-path']:-} ]] || args['--env-file-path']="$PWD/.custom/.runtime.env" |
|
5973 | [[ -n ${args['--env-file-path']:-} ]] || args['--env-file-path']="$PWD/.custom/.runtime.env" | |
6245 |
|
5974 | |||
|
5975 | # :command.validations | |||
|
5976 | # :flag.validations | |||
|
5977 | if [[ -v args['--env-file-path'] && -n $(validate_file_exists "${args['--env-file-path']:-}") ]]; then | |||
|
5978 | printf "validation error in %s:\n%s\n" "--env-file-path ENV_FILE_PATH" "$(validate_file_exists "${args['--env-file-path']:-}")" >&2 | |||
|
5979 | exit 1 | |||
|
5980 | fi | |||
|
5981 | ||||
6246 | } |
|
5982 | } | |
6247 |
|
5983 | |||
6248 | # :command.parse_requirements |
|
5984 | # :command.parse_requirements | |
@@ -6578,7 +6314,6 b' rcstack_stack_upgrade_parse_requirements() {' | |||||
6578 |
|
6314 | |||
6579 | # :flag.case_arg |
|
6315 | # :flag.case_arg | |
6580 | if [[ -n ${2+x} ]]; then |
|
6316 | if [[ -n ${2+x} ]]; then | |
6581 |
|
||||
6582 | args['--stack-prefix']="$2" |
|
6317 | args['--stack-prefix']="$2" | |
6583 | shift |
|
6318 | shift | |
6584 | shift |
|
6319 | shift | |
@@ -6827,7 +6562,6 b' rcstack_stack_upgrade_rhodecode_parse_requirements() {' | |||||
6827 |
|
6562 | |||
6828 | # :flag.case_arg |
|
6563 | # :flag.case_arg | |
6829 | if [[ -n ${2+x} ]]; then |
|
6564 | if [[ -n ${2+x} ]]; then | |
6830 |
|
||||
6831 | args['--stop-wait']="$2" |
|
6565 | args['--stop-wait']="$2" | |
6832 | shift |
|
6566 | shift | |
6833 | shift |
|
6567 | shift | |
@@ -6842,7 +6576,6 b' rcstack_stack_upgrade_rhodecode_parse_requirements() {' | |||||
6842 |
|
6576 | |||
6843 | # :flag.case_arg |
|
6577 | # :flag.case_arg | |
6844 | if [[ -n ${2+x} ]]; then |
|
6578 | if [[ -n ${2+x} ]]; then | |
6845 |
|
||||
6846 | args['--docker-stop-wait']="$2" |
|
6579 | args['--docker-stop-wait']="$2" | |
6847 | shift |
|
6580 | shift | |
6848 | shift |
|
6581 | shift | |
@@ -6971,12 +6704,6 b' rcstack_stack_monitor_restart_unhealthy_parse_requirements() {' | |||||
6971 |
|
6704 | |||
6972 | # :flag.case_arg |
|
6705 | # :flag.case_arg | |
6973 | if [[ -n ${2+x} ]]; then |
|
6706 | if [[ -n ${2+x} ]]; then | |
6974 | # :flag.validations |
|
|||
6975 | if [[ -n $(validate_integer "$2") ]]; then |
|
|||
6976 | printf "validation error in %s:\n%s\n" "--loop LOOP" "$(validate_integer "$2")" >&2 |
|
|||
6977 | exit 1 |
|
|||
6978 | fi |
|
|||
6979 |
|
||||
6980 | args['--loop']="$2" |
|
6707 | args['--loop']="$2" | |
6981 | shift |
|
6708 | shift | |
6982 | shift |
|
6709 | shift | |
@@ -7005,6 +6732,13 b' rcstack_stack_monitor_restart_unhealthy_parse_requirements() {' | |||||
7005 | # :command.default_assignments |
|
6732 | # :command.default_assignments | |
7006 | [[ -n ${args['--loop']:-} ]] || args['--loop']="0" |
|
6733 | [[ -n ${args['--loop']:-} ]] || args['--loop']="0" | |
7007 |
|
6734 | |||
|
6735 | # :command.validations | |||
|
6736 | # :flag.validations | |||
|
6737 | if [[ -v args['--loop'] && -n $(validate_integer "${args['--loop']:-}") ]]; then | |||
|
6738 | printf "validation error in %s:\n%s\n" "--loop LOOP" "$(validate_integer "${args['--loop']:-}")" >&2 | |||
|
6739 | exit 1 | |||
|
6740 | fi | |||
|
6741 | ||||
7008 | } |
|
6742 | } | |
7009 |
|
6743 | |||
7010 | # :command.parse_requirements |
|
6744 | # :command.parse_requirements | |
@@ -7066,6 +6800,13 b' rcstack_cli_parse_requirements() {' | |||||
7066 | shift $# |
|
6800 | shift $# | |
7067 | ;; |
|
6801 | ;; | |
7068 |
|
6802 | |||
|
6803 | test-traffic) | |||
|
6804 | action="test-traffic" | |||
|
6805 | shift | |||
|
6806 | rcstack_cli_test_traffic_parse_requirements "$@" | |||
|
6807 | shift $# | |||
|
6808 | ;; | |||
|
6809 | ||||
7069 | set-runtime-image) |
|
6810 | set-runtime-image) | |
7070 | action="set-runtime-image" |
|
6811 | action="set-runtime-image" | |
7071 | shift |
|
6812 | shift | |
@@ -7232,12 +6973,6 b' rcstack_cli_cmd_parse_requirements() {' | |||||
7232 |
|
6973 | |||
7233 | # :flag.case_arg |
|
6974 | # :flag.case_arg | |
7234 | if [[ -n ${2+x} ]]; then |
|
6975 | if [[ -n ${2+x} ]]; then | |
7235 | # :flag.validations |
|
|||
7236 | if [[ -n $(validate_file_exists "$2") ]]; then |
|
|||
7237 | printf "validation error in %s:\n%s\n" "--env-file-path ENV_FILE_PATH" "$(validate_file_exists "$2")" >&2 |
|
|||
7238 | exit 1 |
|
|||
7239 | fi |
|
|||
7240 |
|
||||
7241 | args['--env-file-path']="$2" |
|
6976 | args['--env-file-path']="$2" | |
7242 | shift |
|
6977 | shift | |
7243 | shift |
|
6978 | shift | |
@@ -7272,6 +7007,13 b' rcstack_cli_cmd_parse_requirements() {' | |||||
7272 | # :command.default_assignments |
|
7007 | # :command.default_assignments | |
7273 | [[ -n ${args['--env-file-path']:-} ]] || args['--env-file-path']="$PWD/.custom/.runtime.env" |
|
7008 | [[ -n ${args['--env-file-path']:-} ]] || args['--env-file-path']="$PWD/.custom/.runtime.env" | |
7274 |
|
7009 | |||
|
7010 | # :command.validations | |||
|
7011 | # :flag.validations | |||
|
7012 | if [[ -v args['--env-file-path'] && -n $(validate_file_exists "${args['--env-file-path']:-}") ]]; then | |||
|
7013 | printf "validation error in %s:\n%s\n" "--env-file-path ENV_FILE_PATH" "$(validate_file_exists "${args['--env-file-path']:-}")" >&2 | |||
|
7014 | exit 1 | |||
|
7015 | fi | |||
|
7016 | ||||
7275 | } |
|
7017 | } | |
7276 |
|
7018 | |||
7277 | # :command.parse_requirements |
|
7019 | # :command.parse_requirements | |
@@ -7320,12 +7062,6 b' rcstack_cli_ishell_parse_requirements() {' | |||||
7320 |
|
7062 | |||
7321 | # :flag.case_arg |
|
7063 | # :flag.case_arg | |
7322 | if [[ -n ${2+x} ]]; then |
|
7064 | if [[ -n ${2+x} ]]; then | |
7323 | # :flag.validations |
|
|||
7324 | if [[ -n $(validate_file_exists "$2") ]]; then |
|
|||
7325 | printf "validation error in %s:\n%s\n" "--env-file-path ENV_FILE_PATH" "$(validate_file_exists "$2")" >&2 |
|
|||
7326 | exit 1 |
|
|||
7327 | fi |
|
|||
7328 |
|
||||
7329 | args['--env-file-path']="$2" |
|
7065 | args['--env-file-path']="$2" | |
7330 | shift |
|
7066 | shift | |
7331 | shift |
|
7067 | shift | |
@@ -7354,6 +7090,13 b' rcstack_cli_ishell_parse_requirements() {' | |||||
7354 | # :command.default_assignments |
|
7090 | # :command.default_assignments | |
7355 | [[ -n ${args['--env-file-path']:-} ]] || args['--env-file-path']="$PWD/.custom/.runtime.env" |
|
7091 | [[ -n ${args['--env-file-path']:-} ]] || args['--env-file-path']="$PWD/.custom/.runtime.env" | |
7356 |
|
7092 | |||
|
7093 | # :command.validations | |||
|
7094 | # :flag.validations | |||
|
7095 | if [[ -v args['--env-file-path'] && -n $(validate_file_exists "${args['--env-file-path']:-}") ]]; then | |||
|
7096 | printf "validation error in %s:\n%s\n" "--env-file-path ENV_FILE_PATH" "$(validate_file_exists "${args['--env-file-path']:-}")" >&2 | |||
|
7097 | exit 1 | |||
|
7098 | fi | |||
|
7099 | ||||
7357 | } |
|
7100 | } | |
7358 |
|
7101 | |||
7359 | # :command.parse_requirements |
|
7102 | # :command.parse_requirements | |
@@ -7453,12 +7196,6 b' rcstack_cli_image_list_parse_requirements() {' | |||||
7453 |
|
7196 | |||
7454 | # :flag.case_arg |
|
7197 | # :flag.case_arg | |
7455 | if [[ -n ${2+x} ]]; then |
|
7198 | if [[ -n ${2+x} ]]; then | |
7456 | # :flag.validations |
|
|||
7457 | if [[ -n $(validate_file_exists "$2") ]]; then |
|
|||
7458 | printf "validation error in %s:\n%s\n" "--env-file-path ENV_FILE_PATH" "$(validate_file_exists "$2")" >&2 |
|
|||
7459 | exit 1 |
|
|||
7460 | fi |
|
|||
7461 |
|
||||
7462 | args['--env-file-path']="$2" |
|
7199 | args['--env-file-path']="$2" | |
7463 | shift |
|
7200 | shift | |
7464 | shift |
|
7201 | shift | |
@@ -7487,6 +7224,13 b' rcstack_cli_image_list_parse_requirements() {' | |||||
7487 | # :command.default_assignments |
|
7224 | # :command.default_assignments | |
7488 | [[ -n ${args['--env-file-path']:-} ]] || args['--env-file-path']="$PWD/.custom/.runtime.env" |
|
7225 | [[ -n ${args['--env-file-path']:-} ]] || args['--env-file-path']="$PWD/.custom/.runtime.env" | |
7489 |
|
7226 | |||
|
7227 | # :command.validations | |||
|
7228 | # :flag.validations | |||
|
7229 | if [[ -v args['--env-file-path'] && -n $(validate_file_exists "${args['--env-file-path']:-}") ]]; then | |||
|
7230 | printf "validation error in %s:\n%s\n" "--env-file-path ENV_FILE_PATH" "$(validate_file_exists "${args['--env-file-path']:-}")" >&2 | |||
|
7231 | exit 1 | |||
|
7232 | fi | |||
|
7233 | ||||
7490 | } |
|
7234 | } | |
7491 |
|
7235 | |||
7492 | # :command.parse_requirements |
|
7236 | # :command.parse_requirements | |
@@ -7523,8 +7267,8 b' rcstack_cli_set_image_parse_requirements() {' | |||||
7523 | *) |
|
7267 | *) | |
7524 | # :command.parse_requirements_case |
|
7268 | # :command.parse_requirements_case | |
7525 | # :command.parse_requirements_case_simple |
|
7269 | # :command.parse_requirements_case_simple | |
|
7270 | # :argument.case | |||
7526 | if [[ -z ${args['version']+x} ]]; then |
|
7271 | if [[ -z ${args['version']+x} ]]; then | |
7527 |
|
||||
7528 | args['version']=$1 |
|
7272 | args['version']=$1 | |
7529 | shift |
|
7273 | shift | |
7530 | else |
|
7274 | else | |
@@ -7540,12 +7284,81 b' rcstack_cli_set_image_parse_requirements() {' | |||||
7540 | # :command.required_args_filter |
|
7284 | # :command.required_args_filter | |
7541 | if [[ -z ${args['version']+x} ]]; then |
|
7285 | if [[ -z ${args['version']+x} ]]; then | |
7542 | printf "missing required argument: VERSION\nusage: rcstack cli set-image VERSION\n" >&2 |
|
7286 | printf "missing required argument: VERSION\nusage: rcstack cli set-image VERSION\n" >&2 | |
|
7287 | ||||
7543 | exit 1 |
|
7288 | exit 1 | |
7544 | fi |
|
7289 | fi | |
7545 |
|
7290 | |||
7546 | } |
|
7291 | } | |
7547 |
|
7292 | |||
7548 | # :command.parse_requirements |
|
7293 | # :command.parse_requirements | |
|
7294 | rcstack_cli_test_traffic_parse_requirements() { | |||
|
7295 | # :command.fixed_flags_filter | |||
|
7296 | while [[ $# -gt 0 ]]; do | |||
|
7297 | case "${1:-}" in | |||
|
7298 | --help | -h) | |||
|
7299 | long_usage=yes | |||
|
7300 | rcstack_cli_test_traffic_usage | |||
|
7301 | exit | |||
|
7302 | ;; | |||
|
7303 | ||||
|
7304 | *) | |||
|
7305 | break | |||
|
7306 | ;; | |||
|
7307 | ||||
|
7308 | esac | |||
|
7309 | done | |||
|
7310 | ||||
|
7311 | # :command.command_filter | |||
|
7312 | action="cli test-traffic" | |||
|
7313 | ||||
|
7314 | # :command.parse_requirements_while | |||
|
7315 | while [[ $# -gt 0 ]]; do | |||
|
7316 | key="$1" | |||
|
7317 | case "$key" in | |||
|
7318 | # :flag.case | |||
|
7319 | --verbose) | |||
|
7320 | ||||
|
7321 | # :flag.case_no_arg | |||
|
7322 | args['--verbose']=1 | |||
|
7323 | shift | |||
|
7324 | ;; | |||
|
7325 | ||||
|
7326 | # :flag.case | |||
|
7327 | --test-url) | |||
|
7328 | ||||
|
7329 | # :flag.case_arg | |||
|
7330 | if [[ -n ${2+x} ]]; then | |||
|
7331 | args['--test-url']="$2" | |||
|
7332 | shift | |||
|
7333 | shift | |||
|
7334 | else | |||
|
7335 | printf "%s\n" "--test-url requires an argument: --test-url TEST_URL" >&2 | |||
|
7336 | exit 1 | |||
|
7337 | fi | |||
|
7338 | ;; | |||
|
7339 | ||||
|
7340 | -?*) | |||
|
7341 | printf "invalid option: %s\n" "$key" >&2 | |||
|
7342 | exit 1 | |||
|
7343 | ;; | |||
|
7344 | ||||
|
7345 | *) | |||
|
7346 | # :command.parse_requirements_case | |||
|
7347 | # :command.parse_requirements_case_simple | |||
|
7348 | printf "invalid argument: %s\n" "$key" >&2 | |||
|
7349 | exit 1 | |||
|
7350 | ||||
|
7351 | ;; | |||
|
7352 | ||||
|
7353 | esac | |||
|
7354 | done | |||
|
7355 | ||||
|
7356 | # :command.default_assignments | |||
|
7357 | [[ -n ${args['--test-url']:-} ]] || args['--test-url']="http://127.0.0.1/_admin/ops/ping" | |||
|
7358 | ||||
|
7359 | } | |||
|
7360 | ||||
|
7361 | # :command.parse_requirements | |||
7549 | deprecated_cli_set_runtime_image_parse_requirements() { |
|
7362 | deprecated_cli_set_runtime_image_parse_requirements() { | |
7550 | # :command.fixed_flags_filter |
|
7363 | # :command.fixed_flags_filter | |
7551 | while [[ $# -gt 0 ]]; do |
|
7364 | while [[ $# -gt 0 ]]; do | |
@@ -7579,8 +7392,8 b' deprecated_cli_set_runtime_image_parse_requirements() {' | |||||
7579 | *) |
|
7392 | *) | |
7580 | # :command.parse_requirements_case |
|
7393 | # :command.parse_requirements_case | |
7581 | # :command.parse_requirements_case_simple |
|
7394 | # :command.parse_requirements_case_simple | |
|
7395 | # :argument.case | |||
7582 | if [[ -z ${args['version']+x} ]]; then |
|
7396 | if [[ -z ${args['version']+x} ]]; then | |
7583 |
|
||||
7584 | args['version']=$1 |
|
7397 | args['version']=$1 | |
7585 | shift |
|
7398 | shift | |
7586 | else |
|
7399 | else | |
@@ -7596,6 +7409,7 b' deprecated_cli_set_runtime_image_parse_requirements() {' | |||||
7596 | # :command.required_args_filter |
|
7409 | # :command.required_args_filter | |
7597 | if [[ -z ${args['version']+x} ]]; then |
|
7410 | if [[ -z ${args['version']+x} ]]; then | |
7598 | printf "missing required argument: VERSION\nusage: rcstack cli set-runtime-image VERSION\n" >&2 |
|
7411 | printf "missing required argument: VERSION\nusage: rcstack cli set-runtime-image VERSION\n" >&2 | |
|
7412 | ||||
7599 | exit 1 |
|
7413 | exit 1 | |
7600 | fi |
|
7414 | fi | |
7601 |
|
7415 | |||
@@ -7635,8 +7449,8 b' rcstack_cli_set_edition_parse_requirements() {' | |||||
7635 | *) |
|
7449 | *) | |
7636 | # :command.parse_requirements_case |
|
7450 | # :command.parse_requirements_case | |
7637 | # :command.parse_requirements_case_simple |
|
7451 | # :command.parse_requirements_case_simple | |
|
7452 | # :argument.case | |||
7638 | if [[ -z ${args['edition_type']+x} ]]; then |
|
7453 | if [[ -z ${args['edition_type']+x} ]]; then | |
7639 |
|
||||
7640 | args['edition_type']=$1 |
|
7454 | args['edition_type']=$1 | |
7641 | shift |
|
7455 | shift | |
7642 | else |
|
7456 | else | |
@@ -7652,11 +7466,12 b' rcstack_cli_set_edition_parse_requirements() {' | |||||
7652 | # :command.required_args_filter |
|
7466 | # :command.required_args_filter | |
7653 | if [[ -z ${args['edition_type']+x} ]]; then |
|
7467 | if [[ -z ${args['edition_type']+x} ]]; then | |
7654 | printf "missing required argument: EDITION_TYPE\nusage: rcstack cli set-edition EDITION_TYPE\n" >&2 |
|
7468 | printf "missing required argument: EDITION_TYPE\nusage: rcstack cli set-edition EDITION_TYPE\n" >&2 | |
|
7469 | ||||
7655 | exit 1 |
|
7470 | exit 1 | |
7656 | fi |
|
7471 | fi | |
7657 |
|
7472 | |||
7658 | # :command.whitelist_filter |
|
7473 | # :command.whitelist_filter | |
7659 | if [[ -n ${args['edition_type']} ]] && [[ ! ${args['edition_type']} =~ ^(ce|ee)$ ]]; then |
|
7474 | if [[ -n ${args['edition_type']:-} ]] && [[ ! ${args['edition_type']:-} =~ ^(ce|ee)$ ]]; then | |
7660 | printf "%s\n" "edition_type must be one of: ce, ee" >&2 |
|
7475 | printf "%s\n" "edition_type must be one of: ce, ee" >&2 | |
7661 | exit 1 |
|
7476 | exit 1 | |
7662 | fi |
|
7477 | fi | |
@@ -7697,8 +7512,8 b' rcstack_cli_set_hostname_parse_requirements() {' | |||||
7697 | *) |
|
7512 | *) | |
7698 | # :command.parse_requirements_case |
|
7513 | # :command.parse_requirements_case | |
7699 | # :command.parse_requirements_case_simple |
|
7514 | # :command.parse_requirements_case_simple | |
|
7515 | # :argument.case | |||
7700 | if [[ -z ${args['hostname']+x} ]]; then |
|
7516 | if [[ -z ${args['hostname']+x} ]]; then | |
7701 |
|
||||
7702 | args['hostname']=$1 |
|
7517 | args['hostname']=$1 | |
7703 | shift |
|
7518 | shift | |
7704 | else |
|
7519 | else | |
@@ -7714,6 +7529,7 b' rcstack_cli_set_hostname_parse_requirements() {' | |||||
7714 | # :command.required_args_filter |
|
7529 | # :command.required_args_filter | |
7715 | if [[ -z ${args['hostname']+x} ]]; then |
|
7530 | if [[ -z ${args['hostname']+x} ]]; then | |
7716 | printf "missing required argument: HOSTNAME\nusage: rcstack cli set-hostname HOSTNAME\n" >&2 |
|
7531 | printf "missing required argument: HOSTNAME\nusage: rcstack cli set-hostname HOSTNAME\n" >&2 | |
|
7532 | ||||
7717 | exit 1 |
|
7533 | exit 1 | |
7718 | fi |
|
7534 | fi | |
7719 |
|
7535 | |||
@@ -7867,12 +7683,6 b' rcstack_cli_redis_parse_requirements() {' | |||||
7867 |
|
7683 | |||
7868 | # :flag.case_arg |
|
7684 | # :flag.case_arg | |
7869 | if [[ -n ${2+x} ]]; then |
|
7685 | if [[ -n ${2+x} ]]; then | |
7870 | # :flag.validations |
|
|||
7871 | if [[ -n $(validate_file_exists "$2") ]]; then |
|
|||
7872 | printf "validation error in %s:\n%s\n" "--env-file-path ENV_FILE_PATH" "$(validate_file_exists "$2")" >&2 |
|
|||
7873 | exit 1 |
|
|||
7874 | fi |
|
|||
7875 |
|
||||
7876 | args['--env-file-path']="$2" |
|
7686 | args['--env-file-path']="$2" | |
7877 | shift |
|
7687 | shift | |
7878 | shift |
|
7688 | shift | |
@@ -7887,7 +7697,6 b' rcstack_cli_redis_parse_requirements() {' | |||||
7887 |
|
7697 | |||
7888 | # :flag.case_arg |
|
7698 | # :flag.case_arg | |
7889 | if [[ -n ${2+x} ]]; then |
|
7699 | if [[ -n ${2+x} ]]; then | |
7890 |
|
||||
7891 | args['--db']="$2" |
|
7700 | args['--db']="$2" | |
7892 | shift |
|
7701 | shift | |
7893 | shift |
|
7702 | shift | |
@@ -7917,6 +7726,13 b' rcstack_cli_redis_parse_requirements() {' | |||||
7917 | [[ -n ${args['--env-file-path']:-} ]] || args['--env-file-path']="$PWD/.custom/.runtime.env" |
|
7726 | [[ -n ${args['--env-file-path']:-} ]] || args['--env-file-path']="$PWD/.custom/.runtime.env" | |
7918 | [[ -n ${args['--db']:-} ]] || args['--db']="0" |
|
7727 | [[ -n ${args['--db']:-} ]] || args['--db']="0" | |
7919 |
|
7728 | |||
|
7729 | # :command.validations | |||
|
7730 | # :flag.validations | |||
|
7731 | if [[ -v args['--env-file-path'] && -n $(validate_file_exists "${args['--env-file-path']:-}") ]]; then | |||
|
7732 | printf "validation error in %s:\n%s\n" "--env-file-path ENV_FILE_PATH" "$(validate_file_exists "${args['--env-file-path']:-}")" >&2 | |||
|
7733 | exit 1 | |||
|
7734 | fi | |||
|
7735 | ||||
7920 | } |
|
7736 | } | |
7921 |
|
7737 | |||
7922 | # :command.parse_requirements |
|
7738 | # :command.parse_requirements | |
@@ -7965,12 +7781,6 b' rcstack_cli_db_parse_requirements() {' | |||||
7965 |
|
7781 | |||
7966 | # :flag.case_arg |
|
7782 | # :flag.case_arg | |
7967 | if [[ -n ${2+x} ]]; then |
|
7783 | if [[ -n ${2+x} ]]; then | |
7968 | # :flag.validations |
|
|||
7969 | if [[ -n $(validate_file_exists "$2") ]]; then |
|
|||
7970 | printf "validation error in %s:\n%s\n" "--env-file-path ENV_FILE_PATH" "$(validate_file_exists "$2")" >&2 |
|
|||
7971 | exit 1 |
|
|||
7972 | fi |
|
|||
7973 |
|
||||
7974 | args['--env-file-path']="$2" |
|
7784 | args['--env-file-path']="$2" | |
7975 | shift |
|
7785 | shift | |
7976 | shift |
|
7786 | shift | |
@@ -7999,6 +7809,13 b' rcstack_cli_db_parse_requirements() {' | |||||
7999 | # :command.default_assignments |
|
7809 | # :command.default_assignments | |
8000 | [[ -n ${args['--env-file-path']:-} ]] || args['--env-file-path']="$PWD/.custom/.runtime.env" |
|
7810 | [[ -n ${args['--env-file-path']:-} ]] || args['--env-file-path']="$PWD/.custom/.runtime.env" | |
8001 |
|
7811 | |||
|
7812 | # :command.validations | |||
|
7813 | # :flag.validations | |||
|
7814 | if [[ -v args['--env-file-path'] && -n $(validate_file_exists "${args['--env-file-path']:-}") ]]; then | |||
|
7815 | printf "validation error in %s:\n%s\n" "--env-file-path ENV_FILE_PATH" "$(validate_file_exists "${args['--env-file-path']:-}")" >&2 | |||
|
7816 | exit 1 | |||
|
7817 | fi | |||
|
7818 | ||||
8002 | } |
|
7819 | } | |
8003 |
|
7820 | |||
8004 | # :command.parse_requirements |
|
7821 | # :command.parse_requirements | |
@@ -8083,7 +7900,6 b' rcstack_cli_storage_parse_requirements() {' | |||||
8083 |
|
7900 | |||
8084 | # :flag.case_arg |
|
7901 | # :flag.case_arg | |
8085 | if [[ -n ${2+x} ]]; then |
|
7902 | if [[ -n ${2+x} ]]; then | |
8086 |
|
||||
8087 | args['--attached']="$2" |
|
7903 | args['--attached']="$2" | |
8088 | shift |
|
7904 | shift | |
8089 | shift |
|
7905 | shift | |
@@ -8149,7 +7965,6 b' rcstack_cli_attach_parse_requirements() {' | |||||
8149 |
|
7965 | |||
8150 | # :flag.case_arg |
|
7966 | # :flag.case_arg | |
8151 | if [[ -n ${2+x} ]]; then |
|
7967 | if [[ -n ${2+x} ]]; then | |
8152 |
|
||||
8153 | args['--instance-type']="$2" |
|
7968 | args['--instance-type']="$2" | |
8154 | shift |
|
7969 | shift | |
8155 | shift |
|
7970 | shift | |
@@ -8214,13 +8029,8 b' rcstack_cli_configure_vcsserver_parse_requirements() {' | |||||
8214 | *) |
|
8029 | *) | |
8215 | # :command.parse_requirements_case |
|
8030 | # :command.parse_requirements_case | |
8216 | # :command.parse_requirements_case_simple |
|
8031 | # :command.parse_requirements_case_simple | |
|
8032 | # :argument.case | |||
8217 | if [[ -z ${args['ini_path']+x} ]]; then |
|
8033 | if [[ -z ${args['ini_path']+x} ]]; then | |
8218 | # :argument.validations |
|
|||
8219 | if [[ -n $(validate_file_exists "$1") ]]; then |
|
|||
8220 | printf "validation error in %s:\n%s\n" "INI_PATH" "$(validate_file_exists "$1")" >&2 |
|
|||
8221 | exit 1 |
|
|||
8222 | fi |
|
|||
8223 |
|
||||
8224 | args['ini_path']=$1 |
|
8034 | args['ini_path']=$1 | |
8225 | shift |
|
8035 | shift | |
8226 | else |
|
8036 | else | |
@@ -8236,6 +8046,14 b' rcstack_cli_configure_vcsserver_parse_requirements() {' | |||||
8236 | # :command.required_args_filter |
|
8046 | # :command.required_args_filter | |
8237 | if [[ -z ${args['ini_path']+x} ]]; then |
|
8047 | if [[ -z ${args['ini_path']+x} ]]; then | |
8238 | printf "missing required argument: INI_PATH\nusage: rcstack cli configure-vcsserver INI_PATH\n" >&2 |
|
8048 | printf "missing required argument: INI_PATH\nusage: rcstack cli configure-vcsserver INI_PATH\n" >&2 | |
|
8049 | ||||
|
8050 | exit 1 | |||
|
8051 | fi | |||
|
8052 | ||||
|
8053 | # :command.validations | |||
|
8054 | # :argument.validations | |||
|
8055 | if [[ -v args['ini_path'] && -n $(validate_file_exists "${args['ini_path']:-}") ]]; then | |||
|
8056 | printf "validation error in %s:\n%s\n" "INI_PATH" "$(validate_file_exists "${args['ini_path']:-}")" >&2 | |||
8239 | exit 1 |
|
8057 | exit 1 | |
8240 | fi |
|
8058 | fi | |
8241 |
|
8059 | |||
@@ -8275,13 +8093,8 b' rcstack_cli_configure_rhodecode_parse_requirements() {' | |||||
8275 | *) |
|
8093 | *) | |
8276 | # :command.parse_requirements_case |
|
8094 | # :command.parse_requirements_case | |
8277 | # :command.parse_requirements_case_simple |
|
8095 | # :command.parse_requirements_case_simple | |
|
8096 | # :argument.case | |||
8278 | if [[ -z ${args['ini_path']+x} ]]; then |
|
8097 | if [[ -z ${args['ini_path']+x} ]]; then | |
8279 | # :argument.validations |
|
|||
8280 | if [[ -n $(validate_file_exists "$1") ]]; then |
|
|||
8281 | printf "validation error in %s:\n%s\n" "INI_PATH" "$(validate_file_exists "$1")" >&2 |
|
|||
8282 | exit 1 |
|
|||
8283 | fi |
|
|||
8284 |
|
||||
8285 | args['ini_path']=$1 |
|
8098 | args['ini_path']=$1 | |
8286 | shift |
|
8099 | shift | |
8287 | else |
|
8100 | else | |
@@ -8297,6 +8110,14 b' rcstack_cli_configure_rhodecode_parse_requirements() {' | |||||
8297 | # :command.required_args_filter |
|
8110 | # :command.required_args_filter | |
8298 | if [[ -z ${args['ini_path']+x} ]]; then |
|
8111 | if [[ -z ${args['ini_path']+x} ]]; then | |
8299 | printf "missing required argument: INI_PATH\nusage: rcstack cli configure-rhodecode INI_PATH\n" >&2 |
|
8112 | printf "missing required argument: INI_PATH\nusage: rcstack cli configure-rhodecode INI_PATH\n" >&2 | |
|
8113 | ||||
|
8114 | exit 1 | |||
|
8115 | fi | |||
|
8116 | ||||
|
8117 | # :command.validations | |||
|
8118 | # :argument.validations | |||
|
8119 | if [[ -v args['ini_path'] && -n $(validate_file_exists "${args['ini_path']:-}") ]]; then | |||
|
8120 | printf "validation error in %s:\n%s\n" "INI_PATH" "$(validate_file_exists "${args['ini_path']:-}")" >&2 | |||
8300 | exit 1 |
|
8121 | exit 1 | |
8301 | fi |
|
8122 | fi | |
8302 |
|
8123 | |||
@@ -8351,13 +8172,8 b' rcstack_backup_db_parse_requirements() {' | |||||
8351 | *) |
|
8172 | *) | |
8352 | # :command.parse_requirements_case |
|
8173 | # :command.parse_requirements_case | |
8353 | # :command.parse_requirements_case_simple |
|
8174 | # :command.parse_requirements_case_simple | |
|
8175 | # :argument.case | |||
8354 | if [[ -z ${args['destination']+x} ]]; then |
|
8176 | if [[ -z ${args['destination']+x} ]]; then | |
8355 | # :argument.validations |
|
|||
8356 | if [[ -n $(validate_dir_exists "$1") ]]; then |
|
|||
8357 | printf "validation error in %s:\n%s\n" "DESTINATION" "$(validate_dir_exists "$1")" >&2 |
|
|||
8358 | exit 1 |
|
|||
8359 | fi |
|
|||
8360 |
|
||||
8361 | args['destination']=$1 |
|
8177 | args['destination']=$1 | |
8362 | shift |
|
8178 | shift | |
8363 | else |
|
8179 | else | |
@@ -8373,6 +8189,14 b' rcstack_backup_db_parse_requirements() {' | |||||
8373 | # :command.required_args_filter |
|
8189 | # :command.required_args_filter | |
8374 | if [[ -z ${args['destination']+x} ]]; then |
|
8190 | if [[ -z ${args['destination']+x} ]]; then | |
8375 | printf "missing required argument: DESTINATION\nusage: rcstack backup-db DESTINATION\n" >&2 |
|
8191 | printf "missing required argument: DESTINATION\nusage: rcstack backup-db DESTINATION\n" >&2 | |
|
8192 | ||||
|
8193 | exit 1 | |||
|
8194 | fi | |||
|
8195 | ||||
|
8196 | # :command.validations | |||
|
8197 | # :argument.validations | |||
|
8198 | if [[ -v args['destination'] && -n $(validate_dir_exists "${args['destination']:-}") ]]; then | |||
|
8199 | printf "validation error in %s:\n%s\n" "DESTINATION" "$(validate_dir_exists "${args['destination']:-}")" >&2 | |||
8376 | exit 1 |
|
8200 | exit 1 | |
8377 | fi |
|
8201 | fi | |
8378 |
|
8202 | |||
@@ -8427,13 +8251,8 b' rcstack_backup_data_parse_requirements() {' | |||||
8427 | *) |
|
8251 | *) | |
8428 | # :command.parse_requirements_case |
|
8252 | # :command.parse_requirements_case | |
8429 | # :command.parse_requirements_case_simple |
|
8253 | # :command.parse_requirements_case_simple | |
|
8254 | # :argument.case | |||
8430 | if [[ -z ${args['destination']+x} ]]; then |
|
8255 | if [[ -z ${args['destination']+x} ]]; then | |
8431 | # :argument.validations |
|
|||
8432 | if [[ -n $(validate_dir_exists "$1") ]]; then |
|
|||
8433 | printf "validation error in %s:\n%s\n" "DESTINATION" "$(validate_dir_exists "$1")" >&2 |
|
|||
8434 | exit 1 |
|
|||
8435 | fi |
|
|||
8436 |
|
||||
8437 | args['destination']=$1 |
|
8256 | args['destination']=$1 | |
8438 | shift |
|
8257 | shift | |
8439 | else |
|
8258 | else | |
@@ -8449,6 +8268,14 b' rcstack_backup_data_parse_requirements() {' | |||||
8449 | # :command.required_args_filter |
|
8268 | # :command.required_args_filter | |
8450 | if [[ -z ${args['destination']+x} ]]; then |
|
8269 | if [[ -z ${args['destination']+x} ]]; then | |
8451 | printf "missing required argument: DESTINATION\nusage: rcstack backup-data DESTINATION\n" >&2 |
|
8270 | printf "missing required argument: DESTINATION\nusage: rcstack backup-data DESTINATION\n" >&2 | |
|
8271 | ||||
|
8272 | exit 1 | |||
|
8273 | fi | |||
|
8274 | ||||
|
8275 | # :command.validations | |||
|
8276 | # :argument.validations | |||
|
8277 | if [[ -v args['destination'] && -n $(validate_dir_exists "${args['destination']:-}") ]]; then | |||
|
8278 | printf "validation error in %s:\n%s\n" "DESTINATION" "$(validate_dir_exists "${args['destination']:-}")" >&2 | |||
8452 | exit 1 |
|
8279 | exit 1 | |
8453 | fi |
|
8280 | fi | |
8454 |
|
8281 | |||
@@ -8680,6 +8507,7 b' run() {' | |||||
8680 | declare -A args=() |
|
8507 | declare -A args=() | |
8681 | declare -A deps=() |
|
8508 | declare -A deps=() | |
8682 | declare -a other_args=() |
|
8509 | declare -a other_args=() | |
|
8510 | declare -a env_var_names=() | |||
8683 | declare -a input=() |
|
8511 | declare -a input=() | |
8684 | normalize_input "$@" |
|
8512 | normalize_input "$@" | |
8685 | parse_requirements "${input[@]}" |
|
8513 | parse_requirements "${input[@]}" | |
@@ -8710,6 +8538,7 b' run() {' | |||||
8710 | "cli image-info") rcstack_cli_image_info_command ;; |
|
8538 | "cli image-info") rcstack_cli_image_info_command ;; | |
8711 | "cli image-list") rcstack_cli_image_list_command ;; |
|
8539 | "cli image-list") rcstack_cli_image_list_command ;; | |
8712 | "cli set-image") rcstack_cli_set_image_command ;; |
|
8540 | "cli set-image") rcstack_cli_set_image_command ;; | |
|
8541 | "cli test-traffic") rcstack_cli_test_traffic_command ;; | |||
8713 | "cli set-runtime-image") deprecated_cli_set_runtime_image_command ;; |
|
8542 | "cli set-runtime-image") deprecated_cli_set_runtime_image_command ;; | |
8714 | "cli set-edition") rcstack_cli_set_edition_command ;; |
|
8543 | "cli set-edition") rcstack_cli_set_edition_command ;; | |
8715 | "cli set-hostname") rcstack_cli_set_hostname_command ;; |
|
8544 | "cli set-hostname") rcstack_cli_set_hostname_command ;; |
General Comments 0
You need to be logged in to leave comments.
Login now