-
Notifications
You must be signed in to change notification settings - Fork 197
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
Add support for Prepending args in the File Provisioner #508
base: main
Are you sure you want to change the base?
Conversation
If you're new to commit signing, there are different ways to set it up: Sign commits with
|
- some commands (like `age`) have positional argument which require to be placed after all flag arguments - change allows prepending of args to after the command itself instead of just appending to the end and potentially causing issues Signed-off-by: James Neill <[email protected]>
Signed-off-by: James Neill <[email protected]>
Signed-off-by: James Neill <[email protected]>
77d8961
to
f45830f
Compare
- accidenally changed at some point during development
Overview
Enhanced the
sdk.ProvisionOutput
to support flexible argument placement with new methods:AddArgsAtIndex
,PrependArgs
, andAppendArgs
.Subsequently then used these functions in the
sdk.Provision
module to replaceAddArgs
withPrependArgs
andAppendArgs
in the file provisioner for better control of argument placement.Subsequently updated the following modules where
AddArgs
was used to useAppendArgs
to maintain existing functionality.Type of change
Related Issue(s)
How To Test
Pass either of the new provision.FileOption implementations (PrependArgs or AppendArgs) to a provision.FileProvisioner instance. Both the akamai and mysql plugins currently utilise this provisioner and can be updated with minimal changes to verify the behaviour.
For example, test the mysql plugin’s DatabaseCredentials provisioner as follows:
To test different behaviors, modify the FileOption used in the plugin’s default provisioner:
Changelog
Introduce
PrependArgs
andAppendArgs
for precise command-line argument placement in file provisioners.