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
See:
By default, build steps run sequentially, but you can configure them to run concurrently.
The order of the build steps in the steps field relates to the order in which the steps are executed. Steps will run serially or concurrently based on the dependencies defined in their waitFor fields.
A step is dependent on every id in its waitFor and will not launch until each dependency has completed successfully.
So you only separate command as each step.
Like this.
steps:
- name: 'ubuntu'
args: ['bash', './scripts/install-prerequisites.sh']
id: 'bash ./scripts/install-prerequisites.sh'
- name: 'ubuntu'
args: ['composer', 'install', '-n', '-q', '--prefer-dist']
id: 'composer install -n -q --prefer-dist'
- name: 'ubuntu'
args: ['php', 'init', '--overwrite=y']
id: 'php init --overwrite=y'
- name: 'ubuntu'
args: ['php', 'tests/run']
id: 'php tests/run'
By the way, Can using ubuntu image run php and composer command?
I think that you should use or build docker image which can run php and composer command.
The composer docker image is here.
steps: - name: 'gcr.io/$PROJECT_ID/composer' args: ['install']