Skip to content

feat(cli): allow setting default values for Control Plane and CAS - #109

Merged
danlishka merged 3 commits into
chainloop-dev:mainfrom
danlishka:default_values
May 8, 2023
Merged

feat(cli): allow setting default values for Control Plane and CAS#109
danlishka merged 3 commits into
chainloop-dev:mainfrom
danlishka:default_values

Conversation

@danlishka

Copy link
Copy Markdown
Member

allow setting default values for Control Plane and CAS enpoints endpoints at the CLI build time

closes #96

@danlishka
danlishka requested a review from migmartri May 8, 2023 08:50
@migmartri

Copy link
Copy Markdown
Member

Awesome!

As a follow up it could be good to update the upstream docs to link to this alternate method of configuring the CLI https://docs.chainloop.dev/getting-started/installation#configure-cli-optional

Comment thread app/cli/cmd/root.go Outdated
Comment thread devel/README.md Outdated
…points endpoints at the CLI build time

Signed-off-by: Daniel Liszka <daniel@chainloop.dev>
Signed-off-by: Daniel Liszka <daniel@chainloop.dev>
Comment thread app/cli/cmd/root.go Outdated
flagOutputFormat string
actionOpts *action.ActionsOpts
logger zerolog.Logger
defaultCpAPI = "api.cp.chainloop.dev:443"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since CAS and CP are acronyms, I'd update them.

defaultCpAPI => defaultCPAPI
defaultCasAPI => defaultCASAPI

Comment thread app/cli/README.md

By default CLI uses the following values for the Control Plane and Artifacts CAS API endpoints:

- Artifacts CAS: api.cas.chainloop.dev:443

@migmartri migmartri May 8, 2023

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note for another pull request (no need to block this one). To make it clear, I'd indicate that this is optional, that these values can be overridden "at runtime" on a need-to-need basis. https://github.com/chainloop-dev/chainloop#configure-cli-optional

Signed-off-by: Daniel Liszka <daniel@chainloop.dev>

@migmartri migmartri left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Congrats and welcome!! 🎉

@danlishka
danlishka merged commit e4b5356 into chainloop-dev:main May 8, 2023
@danlishka
danlishka deleted the default_values branch May 8, 2023 09:58
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.

CLI: rewrite defaults

2 participants