Skip to content

feat: support adding advanced task definitions to environments#494

Draft
jackwrfuller wants to merge 2 commits into
uselagoon:mainfrom
jackwrfuller:feat-add-tasks
Draft

feat: support adding advanced task definitions to environments#494
jackwrfuller wants to merge 2 commits into
uselagoon:mainfrom
jackwrfuller:feat-add-tasks

Conversation

@jackwrfuller
Copy link
Copy Markdown
Contributor

@jackwrfuller jackwrfuller commented May 15, 2026

Description

This PR introduces support for adding COMMAND-type advanced task definitions to lagoon environments via the command

lagoon add task-definition -p project -e main [-f filepath | -S service -c command -d description -C confirmation]

Simple definitions (i.e those with only a command, description, and confirmation text) can be done directly via cli arguments. Otherwise, if the user specifies a file path via the -f option, then the cli will read in a task definition defined in a YAML file. The file method is more full-featured, and supports most of the advanced task definition functionality available. For example:

name: "example task"
description: "example task"
confirmationText: "Are you sure?"
service: cli
command: "echo $MY_VAR"
permission: DEVELOPER
deployTokenInjection: true
projectKeyInjection: true
adminOnlyView: false
arguments:
  - name: MY_VAR
    displayName: "My Variable"
    type: NUMERIC
    optional: false
    defaultValue: "1122"

Limitations

  • Doesn't yet support the IMAGE task definition type
  • At this point in time, only supports defining a task definition on an environment (not project)

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.

Add arguments to invoke task Add a "lagoon add task ..." command

1 participant