Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve defaults and help #31

Merged
merged 2 commits into from
Nov 27, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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