I'm having trouble installing google chrome that will be shareable across steps. My cloudbuild.yaml looks like so:
- name: 'ubuntu'
args: ['bash', 'tools/download-chrome.sh']
volumes:
- name: 'bin'
path: '/usr/bin'
- name: 'gcr.io/cloud-builders/npm'
args: ['run', 'install-all-ci']
- name: 'gcr.io/cloud-builders/npm'
args: ['test']
volumes:
- name: 'bin'
path: '/usr/bin'
Where the first step downloads chrome, and calling which google-chrome
returns /usr/bin/google-chrome
. Doing the same in the last step returns nothing.
I also tried adding the volume to the step in between and moving that step up (because putting it in the install step broke git for some reason. I'm thinking /usr/bin
is not a good dir to share since volumes get deleted?
Attempt 3 was doing something like:
apt-get download -y google-chrome-stable \
--no-install-recommends \
&& dpkg -i --force-all --root=/workspace/chrome /workspace/google-chrome-stable*.deb \
But I get the following error: dpkg: error: unable to access dpkg status area: No such file or directory
. I tried doing mkdir /workspace/chrome
but that doesn't solve the issue.