"""
nexuscmd.reorder_staged_repos(settings)
+
nexus.add_command(reorder_staged_repos)
@create.command()
-@click.option('-c', '--config', type=str, required=True,
+@click.option(
+ '-c', '--config', type=str, required=True,
help='Repo config file for how to the Nexus repository should be created.')
-@click.option('-s', '--settings', type=str, required=True,
+@click.option(
+ '-s', '--settings', type=str, required=True,
help='Config file containing administrative settings.')
@click.pass_context
def repo(ctx, config, settings):
"""
pass
+
@click.command()
@click.argument('release-tag')
@click.pass_context
@click.command()
@click.argument('release-tag')
@click.argument('patch-dir')
-@click.option('--project', default='OpenDaylight',
+@click.option(
+ '--project', default='OpenDaylight',
help='Project name to use when tagging. (Default: OpenDaylight)')
@click.pass_context
def patch(ctx, release_tag, patch_dir, project):
to be in the correct reverse sorted order. There is a problem with
Nexus where it is not doing this like it should be.
"""
- with open(settings_file, 'r') as f: settings = yaml.safe_load(f)
+ with open(settings_file, 'r') as f:
+ settings = yaml.safe_load(f)
for setting in ['nexus', 'user', 'password']:
if not setting in settings:
:arg str settings: Settings file containing administrative credentials and
information.
"""
- with open(config_file, 'r') as f: config = yaml.safe_load(f)
- with open(settings_file, 'r') as f: settings = yaml.safe_load(f)
+ with open(config_file, 'r') as f:
+ config = yaml.safe_load(f)
+ with open(settings_file, 'r') as f:
+ settings = yaml.safe_load(f)
for setting in ['nexus', 'user', 'password', 'email_domain']:
if not setting in settings:
print('Building for %s.%s' % (base_groupId, repo))
groupId = '%s.%s' % (base_groupId, repo)
target = '^/%s/.*' % groupId.replace('.', '[/\.]')
+
if 'extra_privs' in config:
extra_privs = config['extra_privs']
else:
extra_privs = []
- create_nexus_perms(repoId, [target], settings['email_domain'],
- config['password'], extra_privs)
+
+ create_nexus_perms(
+ repoId,
+ [target],
+ settings['email_domain'],
+ config['password'],
+ extra_privs)
+
if 'repositories' in config:
for sub_repo in config['repositories']:
sub_repo_id = '%s-%s' % (repoId, sub_repo)
- build_repo(sub_repo, sub_repo_id, config['repositories'][sub_repo],
+ build_repo(
+ sub_repo,
+ sub_repo_id,
+ config['repositories'][sub_repo],
groupId)
for repo in config['repositories']: