Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is the purpose of this pull request?
The purpose of this pull request is to introduce pipeline support in the VTEX TOOLBELT CLI, aiming to optimize the workflow in CI/CD pipelines. This is achieved by adding a -p or --pipeline flag to the login command, allowing automatic login using VTEX_API_KEY and VTEX_API_TOKEN environment variables, and also adding this flag to the release, publish, deprecate commands to remove unnecessary confirmations in these automated contexts.
What problem is this solving?
This change addresses the issue of having to manually confirm actions or perform logins, which is impractical in continuous integration and delivery environments, where automatic and interaction-free processes are essential for efficiency and scalability.
How should this be manually tested?
To manually test this feature, you can follow these steps:
Screenshots or example usage
Below are examples of how the commands can be executed with the new -p or --pipeline flag, illustrating the practical use of this new feature:
this examples is using unix/linux environment
Login with pipeline:
export VTEX_API_KEY=vtexappkey-store-key
export VTEX_API_TOKEN={{token}}
USING CLI:
vtex login -p
or
vtex login --pipeline
Release
vtex release -p [type] [tagname]
or
vtex release --pipeline
publish
vtex publish -p
or
vtex publish --pipeline
deprecate
vtex deprecate -p
or
vtex deprecate --pipeline
Types of changes
Chores checklist
CHANGELOG.md