Skip to content

Commit e3d7db4

Browse files
balasankarcJoão Pereira
andcommitted
Merge branch 'reg-import-log' into 'master'
Add log to stdout option to gitlab-ctl registry import command See merge request https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/7327 Merged-by: Balasankar 'Balu' C <[email protected]> Approved-by: Clemens Beck <[email protected]> Approved-by: Andrew Patterson <[email protected]> Approved-by: Balasankar 'Balu' C <[email protected]> Co-authored-by: João Pereira <[email protected]>
2 parents baca027 + e7cca1d commit e3d7db4

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

files/gitlab-ctl-commands/lib/registry/import.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ def self.indent(str, len)
2828
-1, --step-one pre-import Perform step one of a multi-step import: alias for pre-import
2929
-2, --step-two all-repositories Perform step two of a multi-step import: alias for all-repositories
3030
-3, --step-three common-blobs Perform step three of a multi-step import: alias for common-blobs
31+
-l, --log-to-stdout Write detailed log to standard output instead of showing progress bars
3132
EOS
3233

3334
def self.parse_options!(args, parser, options)
@@ -81,6 +82,9 @@ def self.parse_options!(args, parser, options)
8182
options[:step_three] = '--step-three'
8283
end
8384

85+
parser.on('-l', '--log-to-stdout', indent('write detailed log to standard output instead of showing progress bars', DESC_INDENT)) do
86+
options[:log_to_stdout] = '--log-to-stdout'
87+
end
8488
parser.order!(args)
8589

8690
options

spec/chef/gitlab-ctl-commands/lib/registry/import_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
[:all_repositories, 'all-repositories', true],
1818
[:step_one, 'step-one', false],
1919
[:step_two, 'step-two', true],
20-
[:step_three, 'step-three', false]
20+
[:step_three, 'step-three', false],
21+
[:log_to_stdout, 'log-to-stdout', false]
2122
]
2223

2324
options_data.each do |option, option_name, read_only|

0 commit comments

Comments
 (0)