Skip to content

Commit

Permalink
Merge pull request #31 from lubomir/default-env
Browse files Browse the repository at this point in the history
Improve defaults and help
  • Loading branch information
lubomir committed Nov 27, 2019
2 parents 3b2fb2a + 0522b50 commit 6c1d95f
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions rcm_nexus/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
def init():
"""Create a starter configuration for rcm-nexus.
More Information: https://mojo.redhat.com/docs/DOC-1132234
More information: https://mojo.redhat.com/docs/DOC-1199638
"""
conf_path = config.init_config()
print("""Wrote starter config to:
Expand All @@ -31,15 +31,20 @@ def init():
- Set url to git repository with product configuration.
- Fine tune each environment's configuration (username, ssl-verify, etc.).
- Setup passwords (`pass` is a nice tool for this) to match the configured password keys.
For more information on using rcm-nexus (nexus-push, nexus-rollback), see:
https://mojo.redhat.com/docs/DOC-1132234
For more information on using rcm-nexus (nexus-push etc.), see:
https://mojo.redhat.com/docs/DOC-1199638
""" % conf_path)

@click.command()
@click.argument('repo', type=click.Path(exists=True))
@click.option('--environment', '-e', help='The target Nexus environment (from config file)')
@click.option(
"--environment",
"-e",
help="The target Nexus environment (from config file)",
default="prod",
)
@click.option('--product', '-p', help='The product key, used to lookup profileId from the configuration')
@click.option('--version', '-v', help='The product version, used in repository definition metadata')
@click.option('--ga', '-g', is_flag=True, default=False, help='Push content to the GA group (as opposed to earlyaccess)')
Expand All @@ -48,7 +53,7 @@ def push(repo, environment, product, version, ga=False, debug=False):
"""Push Apache Maven repository content to a Nexus staging repository,
then add the staging repository to appropriate content groups.
More Information: https://mojo.redhat.com/docs/DOC-1132234
More information: https://mojo.redhat.com/docs/DOC-1199638
"""

nexus_config = config.load(environment, debug=debug)
Expand Down Expand Up @@ -133,7 +138,7 @@ def push(repo, environment, product, version, ga=False, debug=False):
def rollback(staging_repo_name, environment, debug=False):
"""Drop given staging repository.
More Information: https://mojo.redhat.com/docs/DOC-1132234
More information: https://mojo.redhat.com/docs/DOC-1199638
"""
nexus_config = config.load(environment, debug=debug)

Expand Down Expand Up @@ -221,6 +226,8 @@ def add_product(
PRODUCT_NAME is the name used by the Nexus service
PRODUCT_KEY is the shorthand used to reference the product by rcm-nexus tools
More information: https://mojo.redhat.com/docs/DOC-1199638
"""
ids = {}
nexus_config = config.load(environment, debug=debug)
Expand Down

0 comments on commit 6c1d95f

Please sign in to comment.