Commands ​Commands

yaml
type: "io.kestra.plugin.scripts.groovy.commands"
yaml
id: groovy_commands
namespace: company.team

tasks:
  - id: commands
    type: io.kestra.plugin.scripts.groovy.Commands
    commands:
      - groovy --version

yaml
id: groovy_commands_with_dependencies
namespace: company.team

tasks:
  - id: groovy_commands
    type: io.kestra.plugin.scripts.groovy.Commands
    commands:
      - |
        groovy -e '
          @Grab("info.picocli:picocli:4.7.5")
          import picocli.CommandLine
          @CommandLine.Command(name = "hello")
          class HelloWorld implements Runnable {
            @CommandLine.Parameters(paramLabel = "NAME", defaultValue = "Kestra")
            String name
            void run() {
               println "Hello, $name!"
            }
          }

          new CommandLine(new HelloWorld()).execute("Kestra")
        '
Properties
SubType string
SubType string
Default groovy
SubType string
Default true
SubType string
Default ["/bin/sh","-c"]
SubType string
Default AUTO
Possible Values
LINUXWINDOWSAUTO
Default 0
SubType string
Default busybox
Default true
SubType string
Default false
Default OVERWRITE
Possible Values
OVERWRITEFAILWARNIGNORE
SubType string
SubType string
Default ["{{flow.namespace}}"]
Default true
Default { "image": "busybox" }
Default default
Default ALWAYS
Possible Values
IF_NOT_PRESENTALWAYSNEVER
Default true
Validation RegExp \d+\.\d+\.\d+(-[a-zA-Z0-9-]+)?|([a-zA-Z0-9]+)
Default PT5S
Format duration
Default PT1H
Format duration
Default PT10M
Format duration
Default PT5S
Format duration
Default true
Default true
Default false
Validation RegExp \d+\.\d+\.\d+(-[a-zA-Z0-9-]+)?|([a-zA-Z0-9]+)
Default PT1H
Format duration
SubType integer
Default PT5S
Format duration
Default true
Default true
SubType string
Default ["https://www.googleapis.com/auth/cloud-platform"]
Validation RegExp \d+\.\d+\.\d+(-[a-zA-Z0-9-]+)?|([a-zA-Z0-9]+)
Default PT5S
Format duration
Default PT1H
Format duration
Possible Values
ACTION_UNSPECIFIEDRETRY_TASKFAIL_TASKUNRECOGNIZED
Default v1
Default RSA
Default https://kubernetes.default.svc
Validation RegExp \d+\.\d+\.\d+(-[a-zA-Z0-9-]+)?|([a-zA-Z0-9]+)
Default PT5S
Format duration
Default true
SubType string
Default e2-medium
Default 2
Minimum >= 0
Maximum <= 10
Default true
SubType string
Default ["https://www.googleapis.com/auth/cloud-platform"]
Validation RegExp \d+\.\d+\.\d+(-[a-zA-Z0-9-]+)?|([a-zA-Z0-9]+)
Default PT5S
Format duration
Default PT1H
Format duration
Min length 1
SubType
SubType string
SubType string
Default IF_NOT_PRESENT
Possible Values
IF_NOT_PRESENTALWAYSNEVER
SubType string
Default true
SubType
SubType string
Default [ "" ]
SubType string
Default VOLUME
Possible Values
MOUNTVOLUME
Default PT0S
Format duration
SubType string
Default IF_NOT_PRESENT
Possible Values
IF_NOT_PRESENTALWAYSNEVER
Validation RegExp \d+\.\d+\.\d+(-[a-zA-Z0-9-]+)?|([a-zA-Z0-9]+)
SubType string
Default true
SubType array
SubType string
SubType string
Default PT5S
Format duration
Default true
Default { "request": { "memory": "2048", "cpu": "1" } }
Default true
Default PT15M
Format duration
Validation RegExp \d+\.\d+\.\d+(-[a-zA-Z0-9-]+)?|([a-zA-Z0-9]+)
Default PT1H
Format duration