How can I run a small command in a concourse pipeline?

Atlantic0 picture Atlantic0 · Jan 30, 2017 · Viewed 8.5k times · Source

I basically want to run the npm install and grunt build command within the newly added repo.

        inputs:
          - name: repo

          - path:
        run:
          path: repo/
          args:
          - npm install
          - grunt build

Answer

Topher Bullock picture Topher Bullock · Jan 30, 2017

path: refers to the path in the container to the binary / script to execute.

Check out this example on the Tasks documentation here : https://concourse-ci.org/running-tasks.html#section_task-anatomy

run:
  path: sh
  args:
  - -exc
  - |
    whoami
    env

sh is the program to execute, and args are passed to the sh program