Facets CLI

Note: If you are using the older version of facetsctl, refer to the Facets CLI documentation.

This documentation serves as a quick reference guide for using the facetsctlv3 CLI tool. It offers an easy-to-use alternative to Facets APIs, enabling users to push new Docker artifacts to the Facets Control Plane and refresh Kubernetes credentials for a specified environment.

NPM Page

You can view and download the latest facetsctlv3 package from its NPM page.

Commands

Note: Ensure you run the login and artifact init commands before using the push, register, or upload commands.

facetsctlv3 provides the following commands for users:

facetsctl help

This command displays the help for facetsctlv3. You can use it to get information about a specific command by providing the command name as an argument.

 **ARGUMENTS**  $ facetsctl help [COMMAND...] [-n]

ARGUMENTS

COMMAND: Command to display help for.

FLAGS

FlagRequiredWhat does it do?
-n, --nested-commandsNoDefines if all nested commands should be included in the output.

facetsctl login

This command allows the user to log in to the Facets Control Plane.

$ facetsctl login -u <value> -t <value> -f <value>
$ facetsctl login --username my-user --token my-token --facets-url https://facets-control-plane.example.com

FLAGS

FlagRequiredWhat does it do?
-f, --facets-url=<value>YesDefines the URL of the Control plane.
-t, --token=<value>YesDefines the Personal token.
-u, --username=<value>YesDefines the Username.

facetsctl artifact init

This command allows you to initialize the artifact information.

$ facetsctl artifact init -p <value> -s <value> -a <value>
$ facetsctl artifact init --project my-project --service my-service --artifactory my-artifactory

FLAGS

FlagRequiredWhat does it do?
-a, --artifactory=<value>YesDefines the Artifactory name.
-p, --project=<value>YesDefines the Project name.
-s, --service=<value> = <value>YesDefines the Service name.

facetsctl artifact push

This command allows you to push a Docker image to the configured artifact repository.

$ facetsctl artifact push -d <value>
$ facetsctl artifact push --docker-image my-docker-image:latest

FLAGS

FlagRequiredWhat does it do?
-d, --docker-image=<value>YesDefines the URL of the Docker image to push.

facetsctl artifact register

This command allows you to register a Docker image with the specified type and value.

$ facetsctl artifact register -t GIT_REF|ENVIRONMENT|RELEASE_STREAM -i <value> -v <value> [-r <value>]
$ facetsctl artifact register --type GIT_REF --docker-image my-docker-image:latest --value my-git-ref

FLAGS

FlagRequiredWhat does it do?
-i, --docker-image=<value>YesDefines the Docker image to register.
-r, --runId=<value>NoUsed to corelate to your CI system.
-t, --type=<option>YesDefines the Type (GIT_REF, ENVIRONMENT, RELEASE_STREAM).
<options: GIT_REF|ENVIRONMENT|RELEASE_STREAM>
-v, --value=<value>YesDefines the value of the specified type.

facetsctl artifact upload

This command allows you to upload any type of application build file to the Facets Control Plane

$ facetsctl artifact upload -t GIT_REF|ENVIRONMENT|RELEASE_STREAM -f <value> -v <value> [-r <value>]
 $ facetsctl artifact upload --type GIT_REF --file-path file-to-upload --value my-git-ref

FLAGS

FlagRequiredWhat does it do?
-f, --file-path=<value>YesDefines the path to the application build file (e.g., WAR, JAR, ZIP) on your local system.
-r, --runId=<value>NoUsed to corelate to your CI system.
-t, --type=<option>YesDefines the Type (GIT_REF, ENVIRONMENT, RELEASE_STREAM).
<options: GIT_REF|ENVIRONMENT|RELEASE_STREAM>
-v, --value=<value>YesDefines the value of the specified type.