Possibility to specify manifest parameter values for generate command in non interactive mode (#274) #277
+53
−2
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.
User description
resolves #274
Allows to set parameters to
generate
command from command line:generate --parameter Key1=Value1 --parameter Key2=Value2
.Useful when used in non-interactive mode.
PR Type
Enhancement
Description
Added support for specifying manifest parameters in non-interactive mode.
Introduced new option
--parameter
forgenerate
command.Implemented logic to override parameter values programmatically.
Updated state and interfaces to handle parameter overrides.
Changes walkthrough 📝
PopulateInputsAction.cs
Implement parameter override handling in PopulateInputsAction
src/Aspirate.Commands/Actions/Secrets/PopulateInputsAction.cs
ApplyOverriddenValues
method for parameter assignment.GenerateCommand.cs
Add parameter option to generate command
src/Aspirate.Commands/Commands/Generate/GenerateCommand.cs
ParameterResourceValueOption
to thegenerate
command options.GenerateOptions.cs
Extend GenerateOptions with Parameters property
src/Aspirate.Commands/Commands/Generate/GenerateOptions.cs
Parameters
property to handle parameter values.ParameterResourceValueOption.cs
Add ParameterResourceValueOption for parameter input
src/Aspirate.Commands/Options/ParameterResourceValueOption.cs
ParameterResourceValueOption
for parameter value input.IGenerateOptions.cs
Update IGenerateOptions to include Parameters
src/Aspirate.Shared/Interfaces/Commands/Contracts/IGenerateOptions.cs
Parameters
property to theIGenerateOptions
interface.AspirateState.cs
Add Parameters property to AspirateState
src/Aspirate.Shared/Models/Aspirate/AspirateState.cs
Parameters
property to theAspirateState
class.Parameters
as restorable state property.