@tegrus/cli
v3.10.1
Published
[](https://www.npmjs.org/package/@tegrus/cli) [](https://github.com/xojs/xo) [
--dry-run Dry run deployment (default: false)
--sleep <miliseconds> Time between statuses check in ms (default: 5000)
--timeout <seconds> Script timeout in seconds (default: 30)
--verbose Log aditional info and errors (default: false)
-h, --help display help for command
S3
Utility commands for interacting with any S3-compatible object storage, such as AWS S3, Digital Ocean Spaces, etc.
Sync command
❯ tegrus s3 sync --help
Usage: tegrus s3 sync [options]
Sync source and destination folder. Local and S3 paths can be used
Options:
-s, --source <string> Source path
-t, --target <string> Destination path
-e, --spaces-key <string> Digital ocean spaces key
-r, --spaces-secret <string> Digital ocean spaces secret
-d, --del To delete non-existing files on destination (default: false)
-a, --acl Set objects ACL <string>
--dry-run Dry run deployment (default: false)
--verbose Log aditional info and errors (default: false)
-h, --help display help for command
Usage via npx
npx @tegrus/cli [command] [options]
The cli can be used directly via npx, like in the following gitlab-ci.yml snippet:
deploy:
stage: deploy
image: node:18-alpine
only:
- tags
when: manual
needs:
- build
script:
- >
npx @tegrus/cli@3 s3 sync
--source ./dist
--target s3://cdn-isc.tegrus.io
--spaces-key $SPACES_KEY
--spaces-secret $SPACES_SECRET
Or
.deploy_kubernetes:
stage: deploy
image: node:18-alpine
script:
- >
npx @tegrus/cli@3 kubernetes deploy
--namespace $DEPLOY_NAMESPACE
--resource $DEPLOY_RESOURCE
--type deployment
--image $CI_REGISTRY_IMAGE:$CONTAINER_TAG
--host $KUBERNETES_PROD_HOST
--access-token $KUBERNETES_PROD_ACCESS_TOKEN