Multiple commands in the same build step in Google Cloud Builder

后端 未结 3 1414
礼貌的吻别
礼貌的吻别 2021-01-11 19:31

I want to run our automated backend test suite on Google Cloud Builder environment. However, naturally, I bumped into the need to install various dependencies and prerequisi

3条回答
  •  Happy的楠姐
    2021-01-11 20:08

    A more readable way to run the script could be to use breakout syntax (source: mastering cloud build syntax)

    steps:
    - name: 'ubuntu'
      entrypoint: 'bash'
      args:
      - '-c'
      - |
        ./scripts/install-prerequisites.sh \
        && composer install -n -q --prefer-dist \
        && php init --overwrite=y \
        && php tests/run
    
    

    However, this only works if your build step image has the appropriate deps installed (php, composer).

提交回复
热议问题