feature:pipeline-support
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:
- Configure the VTEX_API_KEY and VTEX_API_TOKEN environment variables with your VTEX credentials.
- Run the login command with the -p or --pipeline flag to verify automatic login.
- Use the release, publish, deprecate commands with the -p or --pipeline flag to confirm that no manual confirmations are requested and that the commands execute as expected in a pipeline scenario.
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
- [ ] Refactor (non-breaking change that only makes the code better)
- [ ] Bug fix (non-breaking change which fixes an issue)
- [X] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Requires change to documentation, which has been updated accordingly.
Chores checklist
- [] Update
CHANGELOG.md