diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 66f636e82..9e8eb70d9 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -62,4 +62,5 @@ and we will add you. **All** contributors belong here. 💯 * [Mahendra Bishnoi](https://github.com/mahendrabishnoi2) * [Yingrong Zhao](https://github.com/VinozzZ) * [Saksham Sharma](https://github.com/sakkshm26) -* [Jeremy Goss](https://github.com/Jemgoss) \ No newline at end of file +* [Jeremy Goss](https://github.com/Jemgoss) +* [Chioma Onyekpere](https://github.com/Simpcyclassy) \ No newline at end of file diff --git a/cmd/porter/bundle.go b/cmd/porter/bundle.go index 2ad1c6b10..1f0de086a 100644 --- a/cmd/porter/bundle.go +++ b/cmd/porter/bundle.go @@ -166,9 +166,9 @@ For example, the 'debug' driver may be specified, which simply logs the info giv "Path to the porter manifest file. Defaults to the bundle in the current directory.") f.StringVar(&opts.CNABFile, "cnab-file", "", "Path to the CNAB bundle.json file.") - f.StringSliceVarP(&opts.ParameterSets, "parameter-set", "p", nil, + f.StringArrayVarP(&opts.ParameterSets, "parameter-set", "p", nil, "Name of a parameter set for the bundle. It should be a named set of parameters and may be specified multiple times.") - f.StringSliceVar(&opts.Params, "param", nil, + f.StringArrayVar(&opts.Params, "param", nil, "Define an individual parameter in the form NAME=VALUE. Overrides parameters otherwise set via --parameter-set. May be specified multiple times.") f.StringSliceVarP(&opts.CredentialIdentifiers, "cred", "c", nil, "Credential to use when installing the bundle. It should be a named set of credentials and may be specified multiple times.") @@ -223,9 +223,9 @@ For example, the 'debug' driver may be specified, which simply logs the info giv "Path to the porter manifest file. Defaults to the bundle in the current directory.") f.StringVar(&opts.CNABFile, "cnab-file", "", "Path to the CNAB bundle.json file.") - f.StringSliceVarP(&opts.ParameterSets, "parameter-set", "p", nil, + f.StringArrayVarP(&opts.ParameterSets, "parameter-set", "p", nil, "Name of a parameter set file for the bundle. May be either a named set of parameters or a filepath, and specified multiple times.") - f.StringSliceVar(&opts.Params, "param", nil, + f.StringArrayVar(&opts.Params, "param", nil, "Define an individual parameter in the form NAME=VALUE. Overrides parameters otherwise set via --parameter-set. May be specified multiple times.") f.StringSliceVarP(&opts.CredentialIdentifiers, "cred", "c", nil, "Credential to use when installing the bundle. It should be a named set of credentials and may be specified multiple times.") @@ -282,9 +282,9 @@ For example, the 'debug' driver may be specified, which simply logs the info giv "Path to the porter manifest file. Defaults to the bundle in the current directory.") f.StringVar(&opts.CNABFile, "cnab-file", "", "Path to the CNAB bundle.json file.") - f.StringSliceVarP(&opts.ParameterSets, "parameter-set", "p", nil, + f.StringArrayVarP(&opts.ParameterSets, "parameter-set", "p", nil, "Name of a parameter set file for the bundle. May be either a named set of parameters or a filepath, and specified multiple times.") - f.StringSliceVar(&opts.Params, "param", nil, + f.StringArrayVar(&opts.Params, "param", nil, "Define an individual parameter in the form NAME=VALUE. Overrides parameters otherwise set via --parameter-set. May be specified multiple times.") f.StringSliceVarP(&opts.CredentialIdentifiers, "cred", "c", nil, "Credential to use when installing the bundle. May be either a named set of credentials or a filepath, and specified multiple times.") @@ -339,9 +339,9 @@ For example, the 'debug' driver may be specified, which simply logs the info giv "Path to the porter manifest file. Defaults to the bundle in the current directory. Optional unless a newer version of the bundle should be used to uninstall the bundle.") f.StringVar(&opts.CNABFile, "cnab-file", "", "Path to the CNAB bundle.json file.") - f.StringSliceVarP(&opts.ParameterSets, "parameter-set", "p", nil, + f.StringArrayVarP(&opts.ParameterSets, "parameter-set", "p", nil, "Name of a parameter set file for the bundle. May be either a named set of parameters or a filepath, and specified multiple times.") - f.StringSliceVar(&opts.Params, "param", nil, + f.StringArrayVar(&opts.Params, "param", nil, "Define an individual parameter in the form NAME=VALUE. Overrides parameters otherwise set via --parameter-set. May be specified multiple times.") f.StringSliceVarP(&opts.CredentialIdentifiers, "cred", "c", nil, "Credential to use when uninstalling the bundle. May be either a named set of credentials or a filepath, and specified multiple times.") diff --git a/docs/content/cli/bundles_install.md b/docs/content/cli/bundles_install.md index 9a1efd992..05c9e215a 100644 --- a/docs/content/cli/bundles_install.md +++ b/docs/content/cli/bundles_install.md @@ -39,20 +39,20 @@ porter bundles install [INSTALLATION] [flags] ### Options ``` - --allow-docker-host-access Controls if the bundle should have access to the host's Docker daemon with elevated privileges. See https://porter.sh/configuration/#allow-docker-host-access for the full implications of this flag. - --cnab-file string Path to the CNAB bundle.json file. - -c, --cred strings Credential to use when installing the bundle. It should be a named set of credentials and may be specified multiple times. - -d, --driver string Specify a driver to use. Allowed values: docker, debug (default "docker") - -f, --file string Path to the porter manifest file. Defaults to the bundle in the current directory. - --force Force a fresh pull of the bundle - -h, --help help for install - --insecure-registry Don't require TLS for the registry - -l, --label strings Associate the specified labels with the installation. May be specified multiple times. - -n, --namespace string Create the installation in the specified namespace. Defaults to the global namespace. - --no-logs Do not persist the bundle execution logs - --param strings Define an individual parameter in the form NAME=VALUE. Overrides parameters otherwise set via --parameter-set. May be specified multiple times. - -p, --parameter-set strings Name of a parameter set for the bundle. It should be a named set of parameters and may be specified multiple times. - -r, --reference string Use a bundle in an OCI registry specified by the given reference. + --allow-docker-host-access Controls if the bundle should have access to the host's Docker daemon with elevated privileges. See https://porter.sh/configuration/#allow-docker-host-access for the full implications of this flag. + --cnab-file string Path to the CNAB bundle.json file. + -c, --cred strings Credential to use when installing the bundle. It should be a named set of credentials and may be specified multiple times. + -d, --driver string Specify a driver to use. Allowed values: docker, debug (default "docker") + -f, --file string Path to the porter manifest file. Defaults to the bundle in the current directory. + --force Force a fresh pull of the bundle + -h, --help help for install + --insecure-registry Don't require TLS for the registry + -l, --label strings Associate the specified labels with the installation. May be specified multiple times. + -n, --namespace string Create the installation in the specified namespace. Defaults to the global namespace. + --no-logs Do not persist the bundle execution logs + --param stringArray Define an individual parameter in the form NAME=VALUE. Overrides parameters otherwise set via --parameter-set. May be specified multiple times. + -p, --parameter-set stringArray Name of a parameter set for the bundle. It should be a named set of parameters and may be specified multiple times. + -r, --reference string Use a bundle in an OCI registry specified by the given reference. ``` ### Options inherited from parent commands diff --git a/docs/content/cli/bundles_invoke.md b/docs/content/cli/bundles_invoke.md index e884d533d..80e72d2a7 100644 --- a/docs/content/cli/bundles_invoke.md +++ b/docs/content/cli/bundles_invoke.md @@ -36,20 +36,20 @@ porter bundles invoke [INSTALLATION] --action ACTION [flags] ### Options ``` - --action string Custom action name to invoke. - --allow-docker-host-access Controls if the bundle should have access to the host's Docker daemon with elevated privileges. See https://porter.sh/configuration/#allow-docker-host-access for the full implications of this flag. - --cnab-file string Path to the CNAB bundle.json file. - -c, --cred strings Credential to use when installing the bundle. May be either a named set of credentials or a filepath, and specified multiple times. - -d, --driver string Specify a driver to use. Allowed values: docker, debug (default "docker") - -f, --file string Path to the porter manifest file. Defaults to the bundle in the current directory. - --force Force a fresh pull of the bundle - -h, --help help for invoke - --insecure-registry Don't require TLS for the registry - -n, --namespace string Namespace of the specified installation. Defaults to the global namespace. - --no-logs Do not persist the bundle execution logs - --param strings Define an individual parameter in the form NAME=VALUE. Overrides parameters otherwise set via --parameter-set. May be specified multiple times. - -p, --parameter-set strings Name of a parameter set file for the bundle. May be either a named set of parameters or a filepath, and specified multiple times. - -r, --reference string Use a bundle in an OCI registry specified by the given reference. + --action string Custom action name to invoke. + --allow-docker-host-access Controls if the bundle should have access to the host's Docker daemon with elevated privileges. See https://porter.sh/configuration/#allow-docker-host-access for the full implications of this flag. + --cnab-file string Path to the CNAB bundle.json file. + -c, --cred strings Credential to use when installing the bundle. May be either a named set of credentials or a filepath, and specified multiple times. + -d, --driver string Specify a driver to use. Allowed values: docker, debug (default "docker") + -f, --file string Path to the porter manifest file. Defaults to the bundle in the current directory. + --force Force a fresh pull of the bundle + -h, --help help for invoke + --insecure-registry Don't require TLS for the registry + -n, --namespace string Namespace of the specified installation. Defaults to the global namespace. + --no-logs Do not persist the bundle execution logs + --param stringArray Define an individual parameter in the form NAME=VALUE. Overrides parameters otherwise set via --parameter-set. May be specified multiple times. + -p, --parameter-set stringArray Name of a parameter set file for the bundle. May be either a named set of parameters or a filepath, and specified multiple times. + -r, --reference string Use a bundle in an OCI registry specified by the given reference. ``` ### Options inherited from parent commands diff --git a/docs/content/cli/bundles_uninstall.md b/docs/content/cli/bundles_uninstall.md index 8de87d0fc..39323b9a1 100644 --- a/docs/content/cli/bundles_uninstall.md +++ b/docs/content/cli/bundles_uninstall.md @@ -38,21 +38,21 @@ porter bundles uninstall [INSTALLATION] [flags] ### Options ``` - --allow-docker-host-access Controls if the bundle should have access to the host's Docker daemon with elevated privileges. See https://porter.sh/configuration/#allow-docker-host-access for the full implications of this flag. - --cnab-file string Path to the CNAB bundle.json file. - -c, --cred strings Credential to use when uninstalling the bundle. May be either a named set of credentials or a filepath, and specified multiple times. - --delete Delete all records associated with the installation, assuming the uninstall action succeeds - -d, --driver string Specify a driver to use. Allowed values: docker, debug (default "docker") - -f, --file string Path to the porter manifest file. Defaults to the bundle in the current directory. Optional unless a newer version of the bundle should be used to uninstall the bundle. - --force Force a fresh pull of the bundle - --force-delete UNSAFE. Delete all records associated with the installation, even if uninstall fails. This is intended for cleaning up test data and is not recommended for production environments. - -h, --help help for uninstall - --insecure-registry Don't require TLS for the registry - -n, --namespace string Namespace of the specified installation. Defaults to the global namespace. - --no-logs Do not persist the bundle execution logs - --param strings Define an individual parameter in the form NAME=VALUE. Overrides parameters otherwise set via --parameter-set. May be specified multiple times. - -p, --parameter-set strings Name of a parameter set file for the bundle. May be either a named set of parameters or a filepath, and specified multiple times. - -r, --reference string Use a bundle in an OCI registry specified by the given reference. + --allow-docker-host-access Controls if the bundle should have access to the host's Docker daemon with elevated privileges. See https://porter.sh/configuration/#allow-docker-host-access for the full implications of this flag. + --cnab-file string Path to the CNAB bundle.json file. + -c, --cred strings Credential to use when uninstalling the bundle. May be either a named set of credentials or a filepath, and specified multiple times. + --delete Delete all records associated with the installation, assuming the uninstall action succeeds + -d, --driver string Specify a driver to use. Allowed values: docker, debug (default "docker") + -f, --file string Path to the porter manifest file. Defaults to the bundle in the current directory. Optional unless a newer version of the bundle should be used to uninstall the bundle. + --force Force a fresh pull of the bundle + --force-delete UNSAFE. Delete all records associated with the installation, even if uninstall fails. This is intended for cleaning up test data and is not recommended for production environments. + -h, --help help for uninstall + --insecure-registry Don't require TLS for the registry + -n, --namespace string Namespace of the specified installation. Defaults to the global namespace. + --no-logs Do not persist the bundle execution logs + --param stringArray Define an individual parameter in the form NAME=VALUE. Overrides parameters otherwise set via --parameter-set. May be specified multiple times. + -p, --parameter-set stringArray Name of a parameter set file for the bundle. May be either a named set of parameters or a filepath, and specified multiple times. + -r, --reference string Use a bundle in an OCI registry specified by the given reference. ``` ### Options inherited from parent commands diff --git a/docs/content/cli/bundles_upgrade.md b/docs/content/cli/bundles_upgrade.md index 3f0141100..9ae09bb45 100644 --- a/docs/content/cli/bundles_upgrade.md +++ b/docs/content/cli/bundles_upgrade.md @@ -36,20 +36,20 @@ porter bundles upgrade [INSTALLATION] [flags] ### Options ``` - --allow-docker-host-access Controls if the bundle should have access to the host's Docker daemon with elevated privileges. See https://porter.sh/configuration/#allow-docker-host-access for the full implications of this flag. - --cnab-file string Path to the CNAB bundle.json file. - -c, --cred strings Credential to use when installing the bundle. It should be a named set of credentials and may be specified multiple times. - -d, --driver string Specify a driver to use. Allowed values: docker, debug (default "docker") - -f, --file string Path to the porter manifest file. Defaults to the bundle in the current directory. - --force Force a fresh pull of the bundle - -h, --help help for upgrade - --insecure-registry Don't require TLS for the registry - -n, --namespace string Namespace of the specified installation. Defaults to the global namespace. - --no-logs Do not persist the bundle execution logs - --param strings Define an individual parameter in the form NAME=VALUE. Overrides parameters otherwise set via --parameter-set. May be specified multiple times. - -p, --parameter-set strings Name of a parameter set file for the bundle. May be either a named set of parameters or a filepath, and specified multiple times. - -r, --reference string Use a bundle in an OCI registry specified by the given reference. - --version string Version to which the installation should be upgraded. This represents the version of the bundle, which assumes the convention of setting the bundle tag to its version. + --allow-docker-host-access Controls if the bundle should have access to the host's Docker daemon with elevated privileges. See https://porter.sh/configuration/#allow-docker-host-access for the full implications of this flag. + --cnab-file string Path to the CNAB bundle.json file. + -c, --cred strings Credential to use when installing the bundle. It should be a named set of credentials and may be specified multiple times. + -d, --driver string Specify a driver to use. Allowed values: docker, debug (default "docker") + -f, --file string Path to the porter manifest file. Defaults to the bundle in the current directory. + --force Force a fresh pull of the bundle + -h, --help help for upgrade + --insecure-registry Don't require TLS for the registry + -n, --namespace string Namespace of the specified installation. Defaults to the global namespace. + --no-logs Do not persist the bundle execution logs + --param stringArray Define an individual parameter in the form NAME=VALUE. Overrides parameters otherwise set via --parameter-set. May be specified multiple times. + -p, --parameter-set stringArray Name of a parameter set file for the bundle. May be either a named set of parameters or a filepath, and specified multiple times. + -r, --reference string Use a bundle in an OCI registry specified by the given reference. + --version string Version to which the installation should be upgraded. This represents the version of the bundle, which assumes the convention of setting the bundle tag to its version. ``` ### Options inherited from parent commands diff --git a/docs/content/cli/install.md b/docs/content/cli/install.md index 3beb3e6cc..0b2a99732 100644 --- a/docs/content/cli/install.md +++ b/docs/content/cli/install.md @@ -39,20 +39,20 @@ porter install [INSTALLATION] [flags] ### Options ``` - --allow-docker-host-access Controls if the bundle should have access to the host's Docker daemon with elevated privileges. See https://porter.sh/configuration/#allow-docker-host-access for the full implications of this flag. - --cnab-file string Path to the CNAB bundle.json file. - -c, --cred strings Credential to use when installing the bundle. It should be a named set of credentials and may be specified multiple times. - -d, --driver string Specify a driver to use. Allowed values: docker, debug (default "docker") - -f, --file string Path to the porter manifest file. Defaults to the bundle in the current directory. - --force Force a fresh pull of the bundle - -h, --help help for install - --insecure-registry Don't require TLS for the registry - -l, --label strings Associate the specified labels with the installation. May be specified multiple times. - -n, --namespace string Create the installation in the specified namespace. Defaults to the global namespace. - --no-logs Do not persist the bundle execution logs - --param strings Define an individual parameter in the form NAME=VALUE. Overrides parameters otherwise set via --parameter-set. May be specified multiple times. - -p, --parameter-set strings Name of a parameter set for the bundle. It should be a named set of parameters and may be specified multiple times. - -r, --reference string Use a bundle in an OCI registry specified by the given reference. + --allow-docker-host-access Controls if the bundle should have access to the host's Docker daemon with elevated privileges. See https://porter.sh/configuration/#allow-docker-host-access for the full implications of this flag. + --cnab-file string Path to the CNAB bundle.json file. + -c, --cred strings Credential to use when installing the bundle. It should be a named set of credentials and may be specified multiple times. + -d, --driver string Specify a driver to use. Allowed values: docker, debug (default "docker") + -f, --file string Path to the porter manifest file. Defaults to the bundle in the current directory. + --force Force a fresh pull of the bundle + -h, --help help for install + --insecure-registry Don't require TLS for the registry + -l, --label strings Associate the specified labels with the installation. May be specified multiple times. + -n, --namespace string Create the installation in the specified namespace. Defaults to the global namespace. + --no-logs Do not persist the bundle execution logs + --param stringArray Define an individual parameter in the form NAME=VALUE. Overrides parameters otherwise set via --parameter-set. May be specified multiple times. + -p, --parameter-set stringArray Name of a parameter set for the bundle. It should be a named set of parameters and may be specified multiple times. + -r, --reference string Use a bundle in an OCI registry specified by the given reference. ``` ### Options inherited from parent commands diff --git a/docs/content/cli/invoke.md b/docs/content/cli/invoke.md index 594a44b00..1339906e9 100644 --- a/docs/content/cli/invoke.md +++ b/docs/content/cli/invoke.md @@ -36,20 +36,20 @@ porter invoke [INSTALLATION] --action ACTION [flags] ### Options ``` - --action string Custom action name to invoke. - --allow-docker-host-access Controls if the bundle should have access to the host's Docker daemon with elevated privileges. See https://porter.sh/configuration/#allow-docker-host-access for the full implications of this flag. - --cnab-file string Path to the CNAB bundle.json file. - -c, --cred strings Credential to use when installing the bundle. May be either a named set of credentials or a filepath, and specified multiple times. - -d, --driver string Specify a driver to use. Allowed values: docker, debug (default "docker") - -f, --file string Path to the porter manifest file. Defaults to the bundle in the current directory. - --force Force a fresh pull of the bundle - -h, --help help for invoke - --insecure-registry Don't require TLS for the registry - -n, --namespace string Namespace of the specified installation. Defaults to the global namespace. - --no-logs Do not persist the bundle execution logs - --param strings Define an individual parameter in the form NAME=VALUE. Overrides parameters otherwise set via --parameter-set. May be specified multiple times. - -p, --parameter-set strings Name of a parameter set file for the bundle. May be either a named set of parameters or a filepath, and specified multiple times. - -r, --reference string Use a bundle in an OCI registry specified by the given reference. + --action string Custom action name to invoke. + --allow-docker-host-access Controls if the bundle should have access to the host's Docker daemon with elevated privileges. See https://porter.sh/configuration/#allow-docker-host-access for the full implications of this flag. + --cnab-file string Path to the CNAB bundle.json file. + -c, --cred strings Credential to use when installing the bundle. May be either a named set of credentials or a filepath, and specified multiple times. + -d, --driver string Specify a driver to use. Allowed values: docker, debug (default "docker") + -f, --file string Path to the porter manifest file. Defaults to the bundle in the current directory. + --force Force a fresh pull of the bundle + -h, --help help for invoke + --insecure-registry Don't require TLS for the registry + -n, --namespace string Namespace of the specified installation. Defaults to the global namespace. + --no-logs Do not persist the bundle execution logs + --param stringArray Define an individual parameter in the form NAME=VALUE. Overrides parameters otherwise set via --parameter-set. May be specified multiple times. + -p, --parameter-set stringArray Name of a parameter set file for the bundle. May be either a named set of parameters or a filepath, and specified multiple times. + -r, --reference string Use a bundle in an OCI registry specified by the given reference. ``` ### Options inherited from parent commands diff --git a/docs/content/cli/uninstall.md b/docs/content/cli/uninstall.md index 6c6d564e5..e55491c96 100644 --- a/docs/content/cli/uninstall.md +++ b/docs/content/cli/uninstall.md @@ -38,21 +38,21 @@ porter uninstall [INSTALLATION] [flags] ### Options ``` - --allow-docker-host-access Controls if the bundle should have access to the host's Docker daemon with elevated privileges. See https://porter.sh/configuration/#allow-docker-host-access for the full implications of this flag. - --cnab-file string Path to the CNAB bundle.json file. - -c, --cred strings Credential to use when uninstalling the bundle. May be either a named set of credentials or a filepath, and specified multiple times. - --delete Delete all records associated with the installation, assuming the uninstall action succeeds - -d, --driver string Specify a driver to use. Allowed values: docker, debug (default "docker") - -f, --file string Path to the porter manifest file. Defaults to the bundle in the current directory. Optional unless a newer version of the bundle should be used to uninstall the bundle. - --force Force a fresh pull of the bundle - --force-delete UNSAFE. Delete all records associated with the installation, even if uninstall fails. This is intended for cleaning up test data and is not recommended for production environments. - -h, --help help for uninstall - --insecure-registry Don't require TLS for the registry - -n, --namespace string Namespace of the specified installation. Defaults to the global namespace. - --no-logs Do not persist the bundle execution logs - --param strings Define an individual parameter in the form NAME=VALUE. Overrides parameters otherwise set via --parameter-set. May be specified multiple times. - -p, --parameter-set strings Name of a parameter set file for the bundle. May be either a named set of parameters or a filepath, and specified multiple times. - -r, --reference string Use a bundle in an OCI registry specified by the given reference. + --allow-docker-host-access Controls if the bundle should have access to the host's Docker daemon with elevated privileges. See https://porter.sh/configuration/#allow-docker-host-access for the full implications of this flag. + --cnab-file string Path to the CNAB bundle.json file. + -c, --cred strings Credential to use when uninstalling the bundle. May be either a named set of credentials or a filepath, and specified multiple times. + --delete Delete all records associated with the installation, assuming the uninstall action succeeds + -d, --driver string Specify a driver to use. Allowed values: docker, debug (default "docker") + -f, --file string Path to the porter manifest file. Defaults to the bundle in the current directory. Optional unless a newer version of the bundle should be used to uninstall the bundle. + --force Force a fresh pull of the bundle + --force-delete UNSAFE. Delete all records associated with the installation, even if uninstall fails. This is intended for cleaning up test data and is not recommended for production environments. + -h, --help help for uninstall + --insecure-registry Don't require TLS for the registry + -n, --namespace string Namespace of the specified installation. Defaults to the global namespace. + --no-logs Do not persist the bundle execution logs + --param stringArray Define an individual parameter in the form NAME=VALUE. Overrides parameters otherwise set via --parameter-set. May be specified multiple times. + -p, --parameter-set stringArray Name of a parameter set file for the bundle. May be either a named set of parameters or a filepath, and specified multiple times. + -r, --reference string Use a bundle in an OCI registry specified by the given reference. ``` ### Options inherited from parent commands diff --git a/docs/content/cli/upgrade.md b/docs/content/cli/upgrade.md index 84a951016..635d97e59 100644 --- a/docs/content/cli/upgrade.md +++ b/docs/content/cli/upgrade.md @@ -36,20 +36,20 @@ porter upgrade [INSTALLATION] [flags] ### Options ``` - --allow-docker-host-access Controls if the bundle should have access to the host's Docker daemon with elevated privileges. See https://porter.sh/configuration/#allow-docker-host-access for the full implications of this flag. - --cnab-file string Path to the CNAB bundle.json file. - -c, --cred strings Credential to use when installing the bundle. It should be a named set of credentials and may be specified multiple times. - -d, --driver string Specify a driver to use. Allowed values: docker, debug (default "docker") - -f, --file string Path to the porter manifest file. Defaults to the bundle in the current directory. - --force Force a fresh pull of the bundle - -h, --help help for upgrade - --insecure-registry Don't require TLS for the registry - -n, --namespace string Namespace of the specified installation. Defaults to the global namespace. - --no-logs Do not persist the bundle execution logs - --param strings Define an individual parameter in the form NAME=VALUE. Overrides parameters otherwise set via --parameter-set. May be specified multiple times. - -p, --parameter-set strings Name of a parameter set file for the bundle. May be either a named set of parameters or a filepath, and specified multiple times. - -r, --reference string Use a bundle in an OCI registry specified by the given reference. - --version string Version to which the installation should be upgraded. This represents the version of the bundle, which assumes the convention of setting the bundle tag to its version. + --allow-docker-host-access Controls if the bundle should have access to the host's Docker daemon with elevated privileges. See https://porter.sh/configuration/#allow-docker-host-access for the full implications of this flag. + --cnab-file string Path to the CNAB bundle.json file. + -c, --cred strings Credential to use when installing the bundle. It should be a named set of credentials and may be specified multiple times. + -d, --driver string Specify a driver to use. Allowed values: docker, debug (default "docker") + -f, --file string Path to the porter manifest file. Defaults to the bundle in the current directory. + --force Force a fresh pull of the bundle + -h, --help help for upgrade + --insecure-registry Don't require TLS for the registry + -n, --namespace string Namespace of the specified installation. Defaults to the global namespace. + --no-logs Do not persist the bundle execution logs + --param stringArray Define an individual parameter in the form NAME=VALUE. Overrides parameters otherwise set via --parameter-set. May be specified multiple times. + -p, --parameter-set stringArray Name of a parameter set file for the bundle. May be either a named set of parameters or a filepath, and specified multiple times. + -r, --reference string Use a bundle in an OCI registry specified by the given reference. + --version string Version to which the installation should be upgraded. This represents the version of the bundle, which assumes the convention of setting the bundle tag to its version. ``` ### Options inherited from parent commands diff --git a/tests/integration/install_test.go b/tests/integration/install_test.go index 361f59f1a..dd3035496 100644 --- a/tests/integration/install_test.go +++ b/tests/integration/install_test.go @@ -112,3 +112,27 @@ func TestInstall_withDockerignore(t *testing.T) { // We should check this once https://github.com/cnabio/cnab-go/issues/78 is closed require.EqualError(t, err, "1 error occurred:\n\t* container exit code: 1, message: \n\n") } + +func TestInstall_stringParam(t *testing.T) { + // Remove this skip when #1862 is fixed + t.Skip("This is a failing test for https://github.com/getporter/porter/issues/1862") + + p := porter.NewTestPorter(t) + defer p.Close() + p.SetupIntegrationTest() + p.Debug = false + + p.AddTestBundleDir("testdata/bundles/bundle-with-string-params", false) + + installOpts := porter.NewInstallOptions() + installOpts.Params = []string{"name=Demo Time"} + + err := installOpts.Validate(context.Background(), []string{}, p.Porter) + require.NoError(t, err) + + err = p.InstallBundle(context.Background(), installOpts) + require.NoError(t, err) + + output := p.TestConfig.TestContext.GetOutput() + require.Contains(t, output, "Hello, Demo Time", "expected action output to contain provided file contents") +} diff --git a/tests/integration/testdata/bundles/bundle-with-string-params/helpers.sh b/tests/integration/testdata/bundles/bundle-with-string-params/helpers.sh new file mode 100755 index 000000000..f23bfd932 --- /dev/null +++ b/tests/integration/testdata/bundles/bundle-with-string-params/helpers.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +set -euo pipefail + +install() { + echo Hello, $1 +} + +upgrade() { + echo $1 2.0 +} + +uninstall() { + echo Goodbye, $1 +} + +# Call the requested function and pass the arguments as-is +"$@" \ No newline at end of file diff --git a/tests/integration/testdata/bundles/bundle-with-string-params/porter.yaml b/tests/integration/testdata/bundles/bundle-with-string-params/porter.yaml new file mode 100644 index 000000000..1f064df9e --- /dev/null +++ b/tests/integration/testdata/bundles/bundle-with-string-params/porter.yaml @@ -0,0 +1,37 @@ +schemaVersion: 1.0.0-alpha.1 +name: porter-hello +version: 0.1.0 +description: "An example Porter configuration" +registry: getporter + +mixins: + - exec + +parameters: + - name: name + description: Name for our hello bundle + type: string + default: porter-hello + +install: + - exec: + description: "Install Hello World" + command: ./helpers.sh + arguments: + - install + - "{{ bundle.parameters.name }}" + +upgrade: + - exec: + description: "World 2.0" + command: ./helpers.sh + arguments: + - upgrade + +uninstall: + - exec: + description: "Uninstall Hello World" + command: ./helpers.sh + arguments: + - uninstall +