Skip to content

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.

2 participants