From: Andrew Grimberg Date: Wed, 24 May 2017 00:02:27 +0000 (-0700) Subject: Add artifact base target to nexus configuration X-Git-Tag: v0.2.0~2^2 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F65%2F4965%2F1;p=releng%2Flftools.git Add artifact base target to nexus configuration Projects should be able to push to $groupId.$artifactId.$extension as well well as anything under that path. Not allowing this means that our projects always are having to define a broken pom that may look like: org.example.artifactId artifactId Which means they always end up deploying a base artifact at $groupId.$artifactId.$artifactId in many cases. Change-Id: I11a2bcebfe07d39251d85f92ab783c1a2ed5288c Signed-off-by: Andrew Grimberg --- diff --git a/lftools/nexus/cmd.py b/lftools/nexus/cmd.py index c92983b5..8940600a 100644 --- a/lftools/nexus/cmd.py +++ b/lftools/nexus/cmd.py @@ -108,7 +108,8 @@ def create_repos(config_file, settings_file): def build_repo(repo, repoId, config, base_groupId): print('Building for %s.%s' % (base_groupId, repo)) groupId = '%s.%s' % (base_groupId, repo) - target = '^/%s/.*' % groupId.replace('.', '[/\.]') + target1 = '^/%s/.*' % groupId.replace('.', '[/\.]') + target2 = '^/%s[\.].*' % groupId.replace('.', '[/\.]') if 'extra_privs' in config: extra_privs = config['extra_privs'] @@ -117,7 +118,7 @@ def create_repos(config_file, settings_file): create_nexus_perms( repoId, - [target], + [target1, target2], settings['email_domain'], config['password'], extra_privs)