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

Show all defaults in help text, consolidate some #177

Merged
merged 1 commit into from
Jan 14, 2021

Conversation

AlanCoding
Copy link
Member

@AlanCoding AlanCoding commented Jan 13, 2021

I noticed that the default --tag was not showing up. This is very high up there on the scale of user impact, so I really want the help text to show it.

I also tried to have all options share a common pattern for printing their default value.

$ ansible-builder build --help
usage: ansible-builder build [-h] [-t TAG] [-f FILENAME] [-c BUILD_CONTEXT]
                             [--container-runtime {podman,docker}] [--build-arg BUILD_ARGS]
                             [-v {0,1,2,3}]

Creates a build context (including a Containerfile) from an execution environment spec. The build
context will be populated from the execution environment spec. After that, the specified container
runtime podman/docker will be invoked to build an image from that definition. After building the image,
it can be used locally or published using the supplied tag.

optional arguments:
  -h, --help            show this help message and exit
  -t TAG, --tag TAG     The name for the container image being built (default: ansible-execution-
                        env:latest)
  -f FILENAME, --file FILENAME
                        The definition of the execution environment (default: execution-environment.yml)
  -c BUILD_CONTEXT, --context BUILD_CONTEXT
                        The directory to use for the build context (default: context)
  --container-runtime {podman,docker}
                        Specifies which container runtime to use (default: podman)
  --build-arg BUILD_ARGS
                        Build-time variables to pass to any podman or docker calls. Internally ansible-
                        builder makes use of ANSIBLE_GALAXY_CLI_COLLECTION_OPTS, ANSIBLE_RUNNER_IMAGE,
                        PYTHON_BUILDER_IMAGE.
  -v {0,1,2,3}, --verbosity {0,1,2,3}
                        Increase the output verbosity, for up to three levels of verbosity (invoked via
                        "--verbosity" or "-v" followed by an integer ranging in value from 0 to 3)
                        (default: 2)

@ansible-zuul ansible-zuul bot merged commit b400121 into ansible:devel Jan 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants