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

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

Open
agentmilindu opened this issue Mar 22, 2020 · 0 comments
Open

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

agentmilindu opened this issue Mar 22, 2020 · 0 comments
Milestone

Comments

@agentmilindu
Copy link
Contributor

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', ' $...']
...
@agentmilindu agentmilindu added this to the v3.0.0 milestone Mar 22, 2020
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

No branches or pull requests

1 participant