@wpe-tkpd/kratos
v1.0.7
Published
Kratos CLI for WPE at Tokopedia
Downloads
16
Keywords
Readme
kratos-cli
Kratos CLI by WPE Tokopedia
Installation
Install Kratos-CLI
$ pnpm i -g @wpe-tkpd/kratos
Install GH-CLI
# Install gh cli
$ brew install gh
# Login in GH-CLI
$ gh auth login
Usage
Login
$ kratos login -c=YOUR_CONNECT_SID_COOKIE
Login Status Check
$ kratos status
Create Kratos Tag
$ kratos create [tag_name] --service=[service] --env=[env] --branch=[branch/pr]
# OR
$ kratos create [tag_name] -s=[service] -e=[env] -b=[branch/pr]
Example:
$ kratos create some-tag-name --service=atreus --env=staging --branch=pr/123
| Argument | Desc |
| ------------- | --------------------------------- |
| tag_name
| Kratos tag name |
| Param | Alias | Desc |
| ----------- | ----- | --------------------------------- |
| --service
| -s
| Your service name |
| --env
| -e
| Environment: beta
or staging
|
| --branch
| -b
| Branch name or PR number pr/123
|
Auto create PR
$ kratos pull-request [title]
Example:
$ kratos pull-request "feat(atreus): something"
Deploy Tag with Auto Deploy
$ kratos pull-request [title] -s=[service] -e=[environment]
Example:
$ kratos pull-request "feat(atreus): something" -s=atreus -e=staging
Deploy Tag
$ kratos deploy [tag_name] [env]
Test Tag
$ kratos test [branch] [options]
| Argument | Desc |
| ------------- | --------------------------------- |
| branch
| Branch name / PR number (pr/1234) |
| Option | Desc |
| ------------ | -------------------------------- |
| --coverage
| Trigger code coverage collection |
Example:
$ kratos test -b=branchname
# OR with options
$ kratos test pr/1234 --coverage
Release Tag
$ kratos release [tag_name]
Example:
$ kratos release feature-thor-production
Changelog
Copyright © 2020 by WPE Tokopedia