-
Notifications
You must be signed in to change notification settings - Fork 14
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
Feature/interactively invoke custom tasks #264
Open
bomoko
wants to merge
17
commits into
main
Choose a base branch
from
feature/interactively_invoke_custom_tasks
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…voke_custom_tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Currently working with custom tasks from the cli is difficult. It's not necessarily clear to the user, when running a custom task, which task they need to run (i.e. its name) or what arguments to pass it.
PR #262 addresses the case where name and argument lists are known, and could be used in scripts, CI/CD pipelines, etc. BUT for the standard user of Lagoon who just wants to run a custom task from the cli, it doesn't help.
What this PR does is introduce an interactive task run mode that is analogous to the UIs task list.
When running
lagoon run task interactive -p projectname -e environmentname
the CLI will get a list of all custom tasks registered to the environment and display it as a select prompt.Once the user selects which task they would like to run, if there are any arguments, the user is presented with either a select prompt (for arguments with ranges of values to select from) or are given the opportunity to type in text.
Finally, the user will be presented with an opportunity to confirm or cancel whether they want to run the command against the target.
Checklist
Changelog Entry
Feature - Adds interactive set of prompts to run custom tasks.