Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli subcommand: opta help [COMMAND] #854

Merged
merged 4 commits into from
Apr 28, 2022
Merged

Conversation

nsarupr
Copy link
Contributor

@nsarupr nsarupr commented Apr 25, 2022

Description

Adding a new cli sub command:
opta help [COMMAND]

Safety checklist

  • This change is backwards compatible and safe to apply by existing users
  • This change will NOT lead to data loss
  • This change will NOT lead to downtime who already has an env/service setup

How has this change been tested, beside unit tests?

Examples:

> opta help
Usage: opta help [OPTIONS] COMMAND [ARGS]...

  Welcome to opta, runx's cli! Supercharge DevOps on any cloud

  Github: https://github.com/run-x/opta

  Documentation: https://docs.opta.dev/

Options:
  -h, --help  Show this message and exit.

Commands:
  apply               Create or update infrastructure
  config              Manage opta configurations
  configure-kubectl   Configure kubectl so you can connect to the cluster
  deploy              Deploys an image to Kubernetes
  destroy             Destroy all opta resources from the current config
  force-unlock        Release a stuck lock on the current workspace
  generate-terraform  (beta) Generate Terraform language files
  help                Get help for Opta.
  logs                Get stream of logs for a service
  output              Print TF outputs
  secret              Manage secrets for a service
  shell               Get a shell into one of the pods in a service
  ui                  Open the interactive UI
  upgrade             Upgrade Opta to the latest version available
opta help apply
Usage: opta help [OPTIONS]

  Create or update infrastructure

  Apply changes to match the Opta configuration files in the current
  directory.

  Examples:

  opta apply --auto-approve

  opta apply --auto-approve --var variable1=value1

  opta apply -c my-config.yaml --image-tag=v1

Options:
  --image-tag TEXT   If this handles a service, it's the image tag you wanna
                     deploy
  --auto-approve     Automatically approve terraform plan.
  --detailed-plan    Show full terraform plan in detail, not the opta provided
                     summary
  -c, --config TEXT  Opta config file  [default: opta.yaml]
  -e, --env TEXT     The env to use when loading the config file
  -v, --var TEXT     Add input variables to your yaml at run time (e.g. --var
                     variable1=value1)
  --local            Use the local Kubernetes cluster for development and
                     testing, irrespective of the environment specified inside
                     the opta service yaml file
  -h, --help         Show this message and exit.

Nilesh Sarupriya added 2 commits April 25, 2022 20:38
@codecov
Copy link

codecov bot commented Apr 25, 2022

Codecov Report

Merging #854 (db2e1cd) into main (7ad9474) will decrease coverage by 0.12%.
The diff coverage is 58.82%.

@@            Coverage Diff             @@
##             main     #854      +/-   ##
==========================================
- Coverage   73.86%   73.73%   -0.13%     
==========================================
  Files         120      121       +1     
  Lines        7916     7976      +60     
==========================================
+ Hits         5847     5881      +34     
- Misses       2069     2095      +26     
Flag Coverage Δ
unittests 73.73% <58.82%> (-0.13%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
opta/commands/help.py 53.33% <53.33%> (ø)
opta/cli.py 72.97% <100.00%> (+0.75%) ⬆️
opta/core/kubernetes.py 46.22% <0.00%> (-1.77%) ⬇️
opta/core/secrets.py 62.50% <0.00%> (-1.14%) ⬇️
opta/commands/secret.py 89.83% <0.00%> (+0.03%) ⬆️
opta/commands/destroy.py 57.24% <0.00%> (+0.29%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7ad9474...db2e1cd. Read the comment docs.

opta/commands/help.py Outdated Show resolved Hide resolved
opta/commands/help.py Outdated Show resolved Hide resolved
@nsarupr nsarupr requested a review from rabbitfang April 27, 2022 07:12
@juandiegopalomino juandiegopalomino merged commit 820cacc into main Apr 28, 2022
@juandiegopalomino juandiegopalomino deleted the runx-847-opta-help branch April 28, 2022 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants