Search code examples
continuous-integrationconcourse

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


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

Solution

  • 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/tasks.html#task-environment

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

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