Continuous integration 如何在大厅管道中运行小命令?

Continuous integration 如何在大厅管道中运行小命令?,continuous-integration,concourse,Continuous Integration,Concourse,我基本上希望在新添加的repo中运行npm install和grunt build命令 inputs: - name: repo - path: run: path: repo/ args: - npm install - grunt build path:指容器中要执行的二进制/脚本的路径 在任务文档中查看此示例: sh是要执行的程序,ar

我基本上希望在新添加的repo中运行npm install和grunt build命令

        inputs:
          - name: repo

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

path:
指容器中要执行的二进制/脚本的路径

任务文档中查看此示例:


sh
是要执行的程序,
args
被传递给
sh
程序

托弗·布洛克的答案略有变化

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

如果
whoami
没有返回错误,那么它将运行
env

这将运行
env
,即使
whoami
失败

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

您的意思是“只有当
whoami
失败时,才会运行
env
”?
run:
  path: sh
  args:
  - -exc
  - whoami || env