This documentation is for an older Keptn release. Please consider the newest one when working with the latest Keptn.

keptn add-resource

keptn add-resource

Adds a local resource to a service within your project in the specified stage

Synopsis

Adds a local resource to a service within your project in the specified stage. The resource is then stored within the Git Repo.

This command allows adding, for example, test files to a service, which will then be used by a test service (e.g., jmeter-service) during the continuous delivery.

To specify a unique resource identifier (URI) for this resource, the optional flag –resourceUri can be set to a file path. By default, the URI is set to the file path specified at the –resource flag. From a technical perspective, the file provided via the –resource flag is stored with the path and name specified within –resourceUri flag.

The target location of the resource:

  • –project - is mandatory. The resource will be added to the root folder in the master branch.
  • –stage - is optional (when the –service flag is not used). The resource will be added to the root folder in the stage branch.
  • –service - is optional. The resource will be added to the service folder in the stage branch.
keptn add-resource --project=PROJECT --stage=STAGE --service=SERVICE --resource=FILEPATH --resourceUri=FILEPATH [flags]

Examples

keptn add-resource --project=musicshop --stage=hardening --service=catalogue --resource=slo.yaml
keptn add-resource --project=musicshop --stage=hardening --service=catalogue --resource=slo-quality-gates.yaml --resourceUri=slo.yaml
keptn add-resource --project=sockshop --stage=dev --service=carts --resource=./jmeter.jmx --resourceUri=jmeter/functional.jmx
keptn add-resource --project=rockshop --stage=production --service=shop --resource=./basiccheck.jmx --resourceUri=jmeter/basiccheck.jmx

Options

  -h, --help                 help for add-resource
  -p, --project string       The name of the project
  -r, --resource string      Path pointing to the resource on your local file system
      --resourceUri string   Optional: Location where the resource should be stored within the config repo. If empty, The name of the resource will be the same as on your local file system
      --service string       The name of the service within the project
  -s, --stage string         The name of the stage

Options inherited from parent commands

      --mock                 mocking of server communication - ATTENTION: your commands will not be sent to the keptn server
  -q, --quiet                suppress debug and info output
      --suppress-websocket   disables websocket communication - use the ID of Keptn context (if provided) for checking the result of your command
  -v, --verbose              verbose logging

SEE ALSO

  • keptn - This is a CLI for using keptn
Auto generated by spf13/cobra on 29-Apr-2020