Merge pull request #14670 from mozilla/FXA-6476

bug(CI): Fixes the playwright install in the base image
This commit is contained in:
Dan Schomburg 2022-12-20 12:58:59 -08:00 коммит произвёл GitHub
Родитель 08b167bd21 74d474389c
Коммит 76e0b890db
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 13 добавлений и 12 удалений

Просмотреть файл

@ -411,6 +411,15 @@ jobs:
steps:
- git-checkout
- provision
- run:
name: Ensure playwright install
# The base install script always skips playwright browser installs in an attempt
# to be more efficient. When the lockfile has drifted, we may need to install
# playwright again in order to ensure the expected browser version is present. If
# the expected version is present, this should be pretty fast. If it is not it will
# take a moment to install the browsers.
command: |
if ! cmp --silent yarn.lock yarn.lock.base; then npx playwright install; fi;
- run:
name: Add localhost
command: |
@ -556,12 +565,6 @@ workflows:
executor:
name: docker-build-executor
image: cimg/node:16.13-browsers
filters:
branches:
only:
- main
tags:
ignore: /.*/
- build-and-deploy-storybooks:
requires:

Просмотреть файл

@ -5,14 +5,12 @@ FROM cimg/node:16.13-browsers
ENV FXA_AUTO_INSTALL=0
# Install playwright browsers
# One of the biggest culprits of slow install times is playwright since it downloads browser binaries
RUN yarn global add playwright; \
rm -rf /home/circleci/.cache/ms-playwright/webkit*; \
rm -rf /home/circleci/.cache/ms-playwright/chromium*;
# Copy over the installed browsers
COPY --chown=circleci:circleci ./install /usr/local/bin/.
# Copy over the source from the ci-base-latest tag.
COPY --chown=circleci:circleci --from=0 /home/circleci/project .
# Install playwright browsers
# One of the biggest culprits of slow install times is playwright since it downloads browser binaries
RUN npx playwright install firefox;