OPENEUROPA-372: Allow custom commands to define options #44
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.
Problem
As the README states, the runner config can be controlled either by arguments and options passed on the command line or by configuring the values in the
runner.yml.dist
andrunner.yml
files. However, passing options to the command line is true for regular annotated commands. But this library introduces the concept of dynamic commands. And for such commands there's no way to define run-time options. How to override in CI a specific config value for thedrupal:site-setup
, for instance, which is defined dynamically?Proposal
TL;DR Allow options that can be bound to config entries for custom commands.
Allow defining options for custom commands. Such options could be bound to a specific config entry to overwrite it. See the README and the test added in this PR for details.
Also, custom commands that have subsequent tasks, are exposing also their options, so that calling a custom command with options, when is executed, will pass the options to subsequent tasks.