Skip to content

Ability to pass varying number of parameters to a command #205

@agentmilindu

Description

@agentmilindu

Is your feature request related to a problem? Please describe.
Tools like Maven, Yarn, etc need the ability to pass varying number of multiple parameters. For example,

mvn clean build
mvn package 
mvn clean dependency:copy-dependencies package
mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.4 -DinteractiveMode=false

but currently, in Dunner, we have to define how many params we are expecting in .dunner.yaml like,

...
  mvn:
    steps:
      - image: 'maven'
        commands:
          # This uses args passed to the task, `$1` means first arg
          - ['mvn', ' $1']
...

With the above definition we can only pass one parameter. like dunner do mvn package and commands as mvn clean build would fail.

Describe the solution you'd like
We need a way to hint Dunner to let users pass as many params as they wish, like in Java ellipsis.

Proposing syntax is as below
...
  mvn:
    steps:
      - image: 'maven'
        commands:
          # This uses args passed to the task, `$1` means first arg
          - ['mvn', ' $...']
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions