rliebz / tusk

The modern task runner
https://rliebz.github.io/tusk/
MIT License
237 stars 21 forks source link

Default values from subtask output #71

Open airtonix opened 4 years ago

airtonix commented 4 years ago

Is your feature request related to a problem? Please describe.

aws login


  aws:
    args:
      command:
        usage: command to pass to aws cli
    run:
      - command:
          - >-
            docker run --rm -it
            -w /app
            -v ${HOME}${USERPROFILE}/.aws/:/root/.aws/
            -v ${PWD}:/app/
            <repo>/awscli
            ${command}

  aws:ecr-get-login:
    run:
      task:
        name: aws
        args: >-
          aws ecr get-login-password --region <region>

  aws:ecr-login:
    options:
      login:
        private: true
        default:
          command: tusk aws:ecr-get-login
    run:
      - echo ${login} | docker login --username AWS --password-stdin <id>.dkr.ecr.<region>.amazonaws.com

Describe the solution you'd like

options[key].default currently can have command, we'd like also to have the same task signature as run

  aws:ecr-login:
    options:
      login:
        private: true
        default:
          task:
            name: aws:ecr-get-login
    run:
      - echo ${login} | docker login --username AWS --password-stdin <id>.dkr.ecr.<region>.amazonaws.com

Additional context