diff --git a/README.md b/README.md index 92dd54f..664aaae 100644 --- a/README.md +++ b/README.md @@ -71,6 +71,7 @@ Options: URL from known CI environment variables or git CLI. Supports Buildkite, Circle CI, Travis CI, GitHub Actions, Jenkins, Hudson, AppVeyor, GitLab, CodeShip, Bitbucket and Azure DevOps. + # Default: false -t, [--tag=TAG] # Tag name for consumer version. Can be specified multiple times. @@ -78,13 +79,15 @@ Options: # Tag consumer version with the name of the current git branch. Supports Buildkite, Circle CI, Travis CI, GitHub Actions, Jenkins, Hudson, AppVeyor, GitLab, CodeShip, Bitbucket and - Azure DevOps. Default: false + Azure DevOps. + # Default: false [--build-url=BUILD_URL] # The build URL that created the pact [--merge], [--no-merge] # If a pact already exists for this consumer version and provider, merge the contents. Useful when running Pact tests concurrently on different build nodes. + # Default: false -o, [--output=OUTPUT] # json or text # Default: text @@ -97,7 +100,8 @@ Options: -k, [--broker-token=BROKER_TOKEN] # Pact Broker bearer token -v, [--verbose], [--no-verbose] - # Verbose output. Default: false + # Verbose output. + # Default: false ``` Publish pacts to a Pact Broker. @@ -118,7 +122,8 @@ Options: -k, [--broker-token=BROKER_TOKEN] # Pact Broker bearer token -v, [--verbose], [--no-verbose] - # Verbose output. Default: false + # Verbose output. + # Default: false -o, [--output=OUTPUT] # json or table # Default: table @@ -142,7 +147,8 @@ Options: # The display name of the environment [--production], [--no-production] # Whether or not this environment is a production environment. - This is currently informational only. Default: false + This is currently informational only. + # Default: false [--contact-name=CONTACT_NAME] # The name of the team/person responsible for this environment [--contact-email-address=CONTACT_EMAIL_ADDRESS] @@ -160,7 +166,8 @@ Options: -k, [--broker-token=BROKER_TOKEN] # Pact Broker bearer token -v, [--verbose], [--no-verbose] - # Verbose output. Default: false + # Verbose output. + # Default: false ``` Create an environment resource in the Pact Broker to represent a real world deployment or release environment. @@ -181,7 +188,8 @@ Options: # The display name of the environment [--production], [--no-production] # Whether or not this environment is a production environment. - This is currently informational only. Default: false + This is currently informational only. + # Default: false [--contact-name=CONTACT_NAME] # The name of the team/person responsible for this environment [--contact-email-address=CONTACT_EMAIL_ADDRESS] @@ -199,7 +207,8 @@ Options: -k, [--broker-token=BROKER_TOKEN] # Pact Broker bearer token -v, [--verbose], [--no-verbose] - # Verbose output. Default: false + # Verbose output. + # Default: false ``` Update an environment resource in the Pact Broker. @@ -225,7 +234,8 @@ Options: -k, [--broker-token=BROKER_TOKEN] # Pact Broker bearer token -v, [--verbose], [--no-verbose] - # Verbose output. Default: false + # Verbose output. + # Default: false ``` Describe an environment @@ -251,7 +261,8 @@ Options: -k, [--broker-token=BROKER_TOKEN] # Pact Broker bearer token -v, [--verbose], [--no-verbose] - # Verbose output. Default: false + # Verbose output. + # Default: false ``` Delete an environment @@ -275,7 +286,8 @@ Options: -k, [--broker-token=BROKER_TOKEN] # Pact Broker bearer token -v, [--verbose], [--no-verbose] - # Verbose output. Default: false + # Verbose output. + # Default: false ``` List environments @@ -316,7 +328,8 @@ Options: -k, [--broker-token=BROKER_TOKEN] # Pact Broker bearer token -v, [--verbose], [--no-verbose] - # Verbose output. Default: false + # Verbose output. + # Default: false ``` Record deployment of a pacticipant version to an environment. See https://docs.pact.io/record-deployment for more information. @@ -356,7 +369,8 @@ Options: -k, [--broker-token=BROKER_TOKEN] # Pact Broker bearer token -v, [--verbose], [--no-verbose] - # Verbose output. Default: false + # Verbose output. + # Default: false ``` Description: @@ -392,7 +406,8 @@ Options: -k, [--broker-token=BROKER_TOKEN] # Pact Broker bearer token -v, [--verbose], [--no-verbose] - # Verbose output. Default: false + # Verbose output. + # Default: false ``` Record release of a pacticipant version to an environment. See See https://docs.pact.io/record-release for more information. @@ -422,7 +437,8 @@ Options: -k, [--broker-token=BROKER_TOKEN] # Pact Broker bearer token -v, [--verbose], [--no-verbose] - # Verbose output. Default: false + # Verbose output. + # Default: false ``` Record the end of support for a pacticipant version in an environment. See https://docs.pact.io/record-support-ended for more information. @@ -459,6 +475,7 @@ Options: # Use the latest version of the configured main branch of the pacticipant as the version for which you want to check the verification results + # Default: false [--to-environment=ENVIRONMENT] # The environment into which the pacticipant(s) are to be deployed @@ -488,6 +505,7 @@ Options: is recommended to use the environment variable and just set it for the build required to deploy that particular version, so you don't accidentally leave the dry run mode enabled. + # Default: false -b, --broker-base-url=BROKER_BASE_URL # The base URL of the Pact Broker -u, [--broker-username=BROKER_USERNAME] @@ -497,7 +515,8 @@ Options: -k, [--broker-token=BROKER_TOKEN] # Pact Broker bearer token -v, [--verbose], [--no-verbose] - # Verbose output. Default: false + # Verbose output. + # Default: false ``` Description: @@ -575,6 +594,7 @@ Options: is recommended to use the environment variable and just set it for the build required to deploy that particular version, so you don't accidentally leave the dry run mode enabled. + # Default: false -b, --broker-base-url=BROKER_BASE_URL # The base URL of the Pact Broker -u, [--broker-username=BROKER_USERNAME] @@ -584,7 +604,8 @@ Options: -k, [--broker-token=BROKER_TOKEN] # Pact Broker bearer token -v, [--verbose], [--no-verbose] - # Verbose output. Default: false + # Verbose output. + # Default: false ``` Description: @@ -619,7 +640,8 @@ Options: -k, [--broker-token=BROKER_TOKEN] # Pact Broker bearer token -v, [--verbose], [--no-verbose] - # Verbose output. Default: false + # Verbose output. + # Default: false ``` Create or update pacticipant by name @@ -645,7 +667,8 @@ Options: -k, [--broker-token=BROKER_TOKEN] # Pact Broker bearer token -v, [--verbose], [--no-verbose] - # Verbose output. Default: false + # Verbose output. + # Default: false ``` Describe a pacticipant @@ -669,7 +692,8 @@ Options: -k, [--broker-token=BROKER_TOKEN] # Pact Broker bearer token -v, [--verbose], [--no-verbose] - # Verbose output. Default: false + # Verbose output. + # Default: false ``` List pacticipants @@ -731,7 +755,8 @@ Options: -k, [--broker-token=BROKER_TOKEN] # Pact Broker bearer token -v, [--verbose], [--no-verbose] - # Verbose output. Default: false + # Verbose output. + # Default: false ``` Description: @@ -796,7 +821,8 @@ Options: -k, [--broker-token=BROKER_TOKEN] # Pact Broker bearer token -v, [--verbose], [--no-verbose] - # Verbose output. Default: false + # Verbose output. + # Default: false --uuid=UUID # Specify the uuid for the webhook ``` @@ -827,7 +853,8 @@ Options: -k, [--broker-token=BROKER_TOKEN] # Pact Broker bearer token -v, [--verbose], [--no-verbose] - # Verbose output. Default: false + # Verbose output. + # Default: false ``` Test the execution of a webhook @@ -850,10 +877,12 @@ Options: times. [--auto-create-version], [--no-auto-create-version] # Automatically create the pacticipant version if it does not - exist. Default: false + exist. + # Default: false -g, [--tag-with-git-branch], [--no-tag-with-git-branch] # Tag pacticipant version with the name of the current git - branch. Default: false + branch. + # Default: false -b, --broker-base-url=BROKER_BASE_URL # The base URL of the Pact Broker -u, [--broker-username=BROKER_USERNAME] @@ -863,7 +892,8 @@ Options: -k, [--broker-token=BROKER_TOKEN] # Pact Broker bearer token -v, [--verbose], [--no-verbose] - # Verbose output. Default: false + # Verbose output. + # Default: false ``` Add a tag to a pacticipant version @@ -896,7 +926,8 @@ Options: -k, [--broker-token=BROKER_TOKEN] # Pact Broker bearer token -v, [--verbose], [--no-verbose] - # Verbose output. Default: false + # Verbose output. + # Default: false ``` Describes a pacticipant version. If no version or tag is specified, the latest version is described. @@ -926,7 +957,8 @@ Options: -k, [--broker-token=BROKER_TOKEN] # Pact Broker bearer token -v, [--verbose], [--no-verbose] - # Verbose output. Default: false + # Verbose output. + # Default: false -o, [--output=OUTPUT] # json or text # Default: text @@ -1002,7 +1034,8 @@ Options: -k, [--broker-token=BROKER_TOKEN] # Pact Broker bearer token -v, [--verbose], [--no-verbose] - # Verbose output. Default: false + # Verbose output. + # Default: false ``` Publish provider contract to PactFlow diff --git a/lib/pact_broker/client/cli/custom_thor.rb b/lib/pact_broker/client/cli/custom_thor.rb index 2b0d38e..9226bc4 100644 --- a/lib/pact_broker/client/cli/custom_thor.rb +++ b/lib/pact_broker/client/cli/custom_thor.rb @@ -126,11 +126,11 @@ def self.shared_authentication_options method_option :broker_username, aliases: "-u", desc: "Pact Broker basic auth username" method_option :broker_password, aliases: "-p", desc: "Pact Broker basic auth password" method_option :broker_token, aliases: "-k", desc: "Pact Broker bearer token" - method_option :verbose, aliases: "-v", type: :boolean, default: false, required: false, desc: "Verbose output. Default: false" + method_option :verbose, aliases: "-v", type: :boolean, default: false, required: false, desc: "Verbose output." end def self.verbose_option - method_option :verbose, aliases: "-v", type: :boolean, default: false, required: false, desc: "Verbose output. Default: false" + method_option :verbose, aliases: "-v", type: :boolean, default: false, required: false, desc: "Verbose output." end def self.output_option_json_or_text diff --git a/lib/pact_broker/client/cli/environment_commands.rb b/lib/pact_broker/client/cli/environment_commands.rb index b534023..69aea79 100644 --- a/lib/pact_broker/client/cli/environment_commands.rb +++ b/lib/pact_broker/client/cli/environment_commands.rb @@ -9,7 +9,7 @@ def self.included(thor) def self.shared_environment_options(name_required: false) method_option :name, required: name_required, desc: "The uniquely identifying name of the environment as used in deployment code" method_option :display_name, desc: "The display name of the environment" - method_option :production, type: :boolean, default: false, desc: "Whether or not this environment is a production environment. This is currently informational only. Default: false" + method_option :production, type: :boolean, default: false, desc: "Whether or not this environment is a production environment. This is currently informational only." method_option :contact_name, required: false, desc: "The name of the team/person responsible for this environment" method_option :contact_email_address, required: false, desc: "The email address of the team/person responsible for this environment" output_option_json_or_text diff --git a/lib/pact_broker/client/cli/pact_commands.rb b/lib/pact_broker/client/cli/pact_commands.rb index 18d2a34..73954d8 100644 --- a/lib/pact_broker/client/cli/pact_commands.rb +++ b/lib/pact_broker/client/cli/pact_commands.rb @@ -18,7 +18,7 @@ def self.included(thor) method_option :branch, aliases: "-h", desc: "Repository branch of the consumer version" method_option :auto_detect_version_properties, aliases: "-r", type: :boolean, default: false, desc: "Automatically detect the repository commit, branch and build URL from known CI environment variables or git CLI. Supports Buildkite, Circle CI, Travis CI, GitHub Actions, Jenkins, Hudson, AppVeyor, GitLab, CodeShip, Bitbucket and Azure DevOps." method_option :tag, aliases: "-t", type: :array, banner: "TAG", desc: "Tag name for consumer version. Can be specified multiple times." - method_option :tag_with_git_branch, aliases: "-g", type: :boolean, default: false, required: false, desc: "Tag consumer version with the name of the current git branch. Supports Buildkite, Circle CI, Travis CI, GitHub Actions, Jenkins, Hudson, AppVeyor, GitLab, CodeShip, Bitbucket and Azure DevOps. Default: false" + method_option :tag_with_git_branch, aliases: "-g", type: :boolean, default: false, required: false, desc: "Tag consumer version with the name of the current git branch. Supports Buildkite, Circle CI, Travis CI, GitHub Actions, Jenkins, Hudson, AppVeyor, GitLab, CodeShip, Bitbucket and Azure DevOps." method_option :build_url, desc: "The build URL that created the pact" method_option :merge, type: :boolean, default: false, require: false, desc: "If a pact already exists for this consumer version and provider, merge the contents. Useful when running Pact tests concurrently on different build nodes." output_option_json_or_text diff --git a/lib/pact_broker/client/cli/version_commands.rb b/lib/pact_broker/client/cli/version_commands.rb index 1981bb6..b30e449 100644 --- a/lib/pact_broker/client/cli/version_commands.rb +++ b/lib/pact_broker/client/cli/version_commands.rb @@ -59,8 +59,8 @@ def create_or_update_version(*required_but_ignored) method_option :pacticipant, required: true, aliases: "-a", desc: "The pacticipant name" method_option :version, required: true, aliases: "-e", desc: "The pacticipant version" method_option :tag, aliases: "-t", type: :array, banner: "TAG", desc: "Tag name for pacticipant version. Can be specified multiple times." - method_option :auto_create_version, type: :boolean, default: false, desc: "Automatically create the pacticipant version if it does not exist. Default: false" - method_option :tag_with_git_branch, aliases: "-g", type: :boolean, default: false, required: false, desc: "Tag pacticipant version with the name of the current git branch. Default: false" + method_option :auto_create_version, type: :boolean, default: false, desc: "Automatically create the pacticipant version if it does not exist." + method_option :tag_with_git_branch, aliases: "-g", type: :boolean, default: false, required: false, desc: "Tag pacticipant version with the name of the current git branch." shared_authentication_options def create_version_tag diff --git a/lib/pactflow/client/cli/provider_contract_commands.rb b/lib/pactflow/client/cli/provider_contract_commands.rb index aa666bb..28d747e 100644 --- a/lib/pactflow/client/cli/provider_contract_commands.rb +++ b/lib/pactflow/client/cli/provider_contract_commands.rb @@ -16,7 +16,7 @@ def self.included(thor) method_option :branch, aliases: "-h", desc: "Repository branch of the provider version" #method_option :auto_detect_version_properties, hidden: true, type: :boolean, default: false, desc: "Automatically detect the repository branch from known CI environment variables or git CLI." method_option :tag, aliases: "-t", type: :array, banner: "TAG", desc: "Tag name for provider version. Can be specified multiple times." - #method_option :tag_with_git_branch, aliases: "-g", type: :boolean, default: false, required: false, desc: "Tag consumer version with the name of the current git branch. Default: false" + #method_option :tag_with_git_branch, aliases: "-g", type: :boolean, default: false, required: false, desc: "Tag consumer version with the name of the current git branch." method_option :specification, default: "oas", desc: "The contract specification" method_option :content_type, desc: "The content type. eg. application/yml" method_option :verification_success, type: :boolean, desc: "Whether or not the self verification passed successfully."