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

implement component choice groups #488

Merged
merged 4 commits into from
May 24, 2022
Merged

implement component choice groups #488

merged 4 commits into from
May 24, 2022

Conversation

jeff-mccoy
Copy link
Contributor

@jeff-mccoy jeff-mccoy commented May 23, 2022

This PR provides a new deployment flow for components where the package author needs the ability to group a set of components and only allow a single one in the group to be deployed. Enforcement for CLI flags also exists to prevent a CLI flag from deploying multiple components from the same group. This PR also cleans up the business logic used to validate and select components to hopefully be more readable. An example was added and Big Bang Core was moved to packages with a demonstration of this usage as well. Finally small pterm improvements were made for readability/improved flow including only showing credentials on init for components that were actually deployed.

Fixes #487

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist before merging

  • Tests have been added/updated as necessary (add the needs-tests label)
  • Documentation has been updated as necessary (add the needs-docs label)

@jeff-mccoy jeff-mccoy added enhancement ✨ New feature or request packager labels May 23, 2022
@jeff-mccoy
Copy link
Contributor Author

Prompt for choosing which component to deploy:
Screen Shot 2022-05-22 at 5 09 53 PM

After selection:
Screen Shot 2022-05-22 at 5 10 16 PM

Error message if attempting to specify more than one component from a choice group:
Screen Shot 2022-05-23 at 2 59 56 AM

@jeff-mccoy
Copy link
Contributor Author

Updated zarf init credential examples:

zarf init --confirm
Screen Shot 2022-05-23 at 3 43 28 AM

zarf init --confirm --components=logging
Screen Shot 2022-05-23 at 3 46 10 AM

zarf init --confirm --components=git-server
Screen Shot 2022-05-22 at 5 28 40 PM

src/types/types.go Outdated Show resolved Hide resolved
src/test/e2e/e2e_component_choice_test.go Show resolved Hide resolved
src/internal/packager/deploy.go Show resolved Hide resolved
packages/big-bang-core/zarf.yaml Outdated Show resolved Hide resolved
packages/big-bang-core/README.md Outdated Show resolved Hide resolved
src/internal/packager/components.go Outdated Show resolved Hide resolved
src/internal/packager/components.go Show resolved Hide resolved
@jeff-mccoy jeff-mccoy requested a review from YrrepNoj May 24, 2022 06:58
@jeff-mccoy
Copy link
Contributor Author

Unique component name enforcement

Screen Shot 2022-05-24 at 1 41 18 AM

@jeff-mccoy jeff-mccoy enabled auto-merge (squash) May 24, 2022 07:14
@jeff-mccoy jeff-mccoy merged commit 4683bd0 into master May 24, 2022
@jeff-mccoy jeff-mccoy deleted the component-choice branch May 24, 2022 14:48
Noxsios pushed a commit that referenced this pull request Mar 8, 2023
* implement component choice groups
* fix test & handle default values w/--confirm again
* add test case to ensure second component was not created when first is chosen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ✨ New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Configurable Way to Combine Component Deployment Prompts
2 participants