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

Feature/interactively invoke custom tasks #264

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

bomoko
Copy link
Contributor

@bomoko bomoko commented Feb 20, 2023

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.

image

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

  • Affected Issues have been mentioned in the Closing issues section
  • Documentation has been written/updated.
  • Changelog entry has been written

Changelog Entry

Feature - Adds interactive set of prompts to run custom tasks.

@bomoko bomoko marked this pull request as ready for review February 20, 2023 19:57
@bomoko bomoko requested a review from shreddedbacon February 20, 2023 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant