Harbormaster Resource Commands

Table of Contents

List

Display a list of resources

harbormaster resource_list  [scope][options]

Synopsis

List available resources, includes owned resources and publicly available resources.

scope: public, private, community Empty returns all.
options: -t, --type: GENERIC [default], DOCKERFILE, CI_CONFIG, TERRAFORM, PROJECT_AS_CODE

To display all public resources using pretty print:

harbormaster resource_list public --output pretty

To display all public and private resources as JSON [default]:

harbormaster resource_list

To display all Dockerfile type resources as JSON

harbormaster resource_list -f DOCKERFILE

Publish

Publish a resource

harbormaster resource_publish [cost] [scope]

Synopsis

Publish a resource file.

resource_file: Absolute or relative path to the resource as file
name: name to associate with the resource
type: DOCKERFILE, CI_CONFIG, TERRAFORM, PROJEC_AS_CODE, or GENERIC 

cost: defaults to $0.00 USD
scope: public or private[default]

To publish a CircleCI YAML config file as public at no cost:

harbormaster resource_publish ./some_path/config.yml myCircleCIConfigYAML CI_CONFIG 0.00 public

Download

Download a resource

harbormaster resource_download

Synopsis

Download a resource file in the format as when published. Only owned or public tech stack packages can be downloaded.

name: the unique name of the resource used when published
output_file_path: where to download the resource file to

To download a resource:

harbormaster resource_download myCircleCIConfigYAML  ./tmp/yaml/myCircleCIConfig.yaml

Promotion

harbormaster resource_promote

Promotes a resource

Synopsis

Any owned private resource can be promoted to public. Making it public allows it to be accessed by the others.

Promote an owned resource from private scope to public. Promotion cannot be undone. Confirmation is required.

name: the unique name of the resource used when published

To promote a resource from being private to public, referenced by name myResource:

harbormaster resource_promote myResource

Demotion

harbormaster resource_demote

Demotes a resource

Synopsis

Any owned private resource can be demoted to private.

Demote an owned resource from public scope to private. Confirmation is required.

name: the unique name of the resource used when published

To demote a resource from being public to private, referenced by name myResource:

harbormaster resource_demote myResource

Deletion

harbormaster resource_delete

Delete a resource.

Synopsis

Can only delete an owned private tech stack. Deletion cannot be undone.

name: the unique name of the resource used when published

To delete a resource referenced by name myResource, prompted to confirm:

harbormaster resource_delete myResource