@click.command(name='dir')
@click.argument('directory')
+@click.option(
+ '-m', '--mode', type=str, default='parallel',
+ help='Signing mode serial|parallel')
@click.pass_context
-def directory(ctx, directory):
+def directory(ctx, directory, mode):
"""GPG signs all of the files in a directory."""
- status = subprocess.call(['sign', 'dir', directory])
+ status = subprocess.call(['sign', 'dir', directory, mode])
sys.exit(status)
'-d', '--sign-dir', type=str,
default=None,
help='Local directory to clone repository. (default /tmp/gpg-signatures.*)')
+@click.option(
+ '-m', '--mode', type=str, default='parallel',
+ help='Signing mode serial|parallel')
@click.option(
'-w', '--sign-with', type=str, default='gpg',
help='Sign artifacts with GPG or Sigul. (default gpg)')
@click.pass_context
-def nexus(ctx, sign_dir, sign_with, nexus_repo_url):
+def nexus(ctx, sign_dir, sign_with, nexus_repo_url, mode):
"""Fetch and GPG or Sigul sign a Nexus repo."""
if not sign_dir:
sign_dir = tempfile.mkdtemp(prefix='gpg-signatures.')
- status = subprocess.call(['sign', 'nexus', '-d', sign_dir, '-w', sign_with, nexus_repo_url])
+ status = subprocess.call(['sign', 'nexus', '-d', sign_dir, '-m', mode, '-w', sign_with, nexus_repo_url])
sys.exit(status)
@click.command(name='sigul')
@click.argument('directory')
+@click.option(
+ '-m', '--mode', type=str, default='parallel',
+ help='Signing mode serial|parallel')
@click.pass_context
-def sigul(ctx, directory):
+def sigul(ctx, directory, mode):
"""Sigul signs all of the files in a directory."""
- status = subprocess.call(['sign', 'sigul', directory])
+ status = subprocess.call(['sign', 'sigul', directory, mode])
sys.exit(status)
'-d', '--sign-dir', type=str,
default=None,
help='Local directory to clone repository. (default /tmp/gpg-signatures.*)')
+@click.option(
+ '-m', '--mode', type=str, default='parallel',
+ help='Signing mode serial|parallel')
@click.option(
'-r', '--root-domain', type=str, default='org',
help='Root download path of staging repo. (default org)')
'-w', '--sign-with', type=str, default='gpg',
help='Sign artifacts with GPG or Sigul. (default gpg)')
@click.pass_context
-def deploy_nexus(ctx, nexus_url, nexus_repo, staging_profile_id, sign_dir, sign_with, root_domain):
+def deploy_nexus(ctx, nexus_url, nexus_repo, staging_profile_id, sign_dir, sign_with, root_domain, mode):
"""Sign artifacts from a Nexus repo then upload to a staging repo.
This is a porcelain command that ties the lftools sign and deploy tools
if not sign_dir:
sign_dir = tempfile.mkdtemp(prefix='gpg-signatures.')
- status = subprocess.call(['sign', 'nexus', '-d', sign_dir, '-w', sign_with, nexus_repo_url])
+ status = subprocess.call(['sign', 'nexus', '-d', sign_dir, '-m', mode, '-w', sign_with, nexus_repo_url])
if status:
sys.exit(status)