plugins: Invoke setup_parser_common_args explicitly from setup_parser
This allows to define plugins which do not need have any of common args. Move setup_parser_common_args into libkas for this as it now becomes a library function. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
@@ -359,3 +359,17 @@ def ssh_no_host_key_check():
|
||||
os.mkdir(home + '/.ssh')
|
||||
with open(home + '/.ssh/config', 'w') as fds:
|
||||
fds.write('Host *\n\tStrictHostKeyChecking no\n\n')
|
||||
|
||||
|
||||
def setup_parser_common_args(parser):
|
||||
parser.add_argument('config',
|
||||
help='Config file')
|
||||
parser.add_argument('--skip',
|
||||
help='Skip build steps',
|
||||
default=[])
|
||||
parser.add_argument('--force-checkout', action='store_true',
|
||||
help='Always checkout the desired refspec of each '
|
||||
'repository, discarding any local changes')
|
||||
parser.add_argument('--update', action='store_true',
|
||||
help='Pull new upstream changes to the desired '
|
||||
'refspec even if it is already checked out locally')
|
||||
|
Reference in New Issue
Block a user