Added new flag for status and service-versions command to accept hab license #8267
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.
🔩 Description: What code changed, and why?
In some environment they are not allowing to set the env variable.
For
chef-automate status
andchef-automate service-versions
command internally we are using env variable in a commandsudo HAB_LICENSE=accept-no-persist hab svc status
so to accept hab license we are making use of a new flag which will accept the licenseIn automate installation setting the HAB_LICENSE is required and it is mandatory, with out setting this env flag we can not install the standalone automate and automate-HA.
By doing this ticket we are just adding the support for the flag --accept-hab-licence for chef-automate status command.
⛓️ Related Resources
https://chefio.atlassian.net/browse/CHEF-6574
👍 Definition of Done
Tested with
chef-automate status
andchef-automate service-versions
backend flags👟 How to Build and Test the Change
build automate-cli
✅ Checklist
All PRs must tick these:
With occasional exceptions, all PRs from Progress employees must tick these:
make spell
in any component directory)All PRs from Progress employees should tick these if appropriate:
Please add a note next to any checkbox above if you are NOT ticking it.
📷 Screenshots, if applicable
video
chef-automate status --accept-hab-license
chef-automate service-versions --accept-hab-license
Here's how the output looks if its accepting license via flag
accept-hab-license
same behaviour for both status and service-versions commandchef-automate status --pg --accept-hab-license