mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 23:45:44 +07:00
[IMP] runbot: allow to install Chrome from google
When choosing to install Chrome in a Dockerfile, the chrome version is downloaded from Odoo nightly server. This make it difficult to test with different versions of Chrome. With this commit, we allow to install from Google in Docker files. By default, the install remains from Odoo Nightly server but if the key `custom_values['chrome_source']` is set to 'google' in a Dockerfile, the specified version will be downloaded from Google servers when the Docker image is built.
This commit is contained in:
parent
50f803ec31
commit
6bd74c07c4
@ -19,12 +19,21 @@ RUN set -x ; \
|
||||
<template id="runbot.docker_install_chrome">
|
||||
<t t-set="chrome_distrib" t-value="values['chrome_distrib']"/>
|
||||
<t t-set="chrome_version" t-value="values['chrome_version']"/>
|
||||
<t t-set="chrome_source" t-value="values.get('chrome_source')"/>
|
||||
# Install Google Chrome
|
||||
<t t-if="chrome_source == 'google'">
|
||||
RUN curl -sSL https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_<t t-esc="chrome_version"/>_amd64.deb -o /tmp/chrome.deb \
|
||||
&& apt-get update \
|
||||
&& apt-get -y install --no-install-recommends /tmp/chrome.deb \
|
||||
&& rm /tmp/chrome.deb
|
||||
</t>
|
||||
<t t-else="">
|
||||
RUN curl -sSL http://nightly.odoo.com/odoo.key | apt-key add - \
|
||||
&& echo "deb http://nightly.odoo.com/deb/<t t-esc="chrome_distrib"/> ./" > /etc/apt/sources.list.d/google-chrome.list \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y -qq google-chrome-stable=<t t-esc="chrome_version"/> \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
</t>
|
||||
</template>
|
||||
|
||||
<template id="runbot.docker_install_phantomjs">
|
||||
|
Loading…
Reference in New Issue
Block a user