-
Notifications
You must be signed in to change notification settings - Fork 229
Expand file tree
/
Copy pathDockerfile
More file actions
53 lines (47 loc) · 2.09 KB
/
Dockerfile
File metadata and controls
53 lines (47 loc) · 2.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# These builds occur in the CI. Reference .circleci/config.yml. They assume
# everything is using the circleci ramdisk. Their primary purpose is to
# help decrease spin up needed to start a CI job.
# Runs tests and common CI operations. Needs minimal install. Assumes
# workspace will be restored into the project folder.
FROM cimg/node:22.15.1 AS test-runner
RUN sudo apt-get update && sudo apt-get install -y \
python3-venv \
python3-pip
WORKDIR /home/circleci
COPY --chown=circleci:circleci project project
WORKDIR /home/circleci/project
RUN python3 -m venv .venv \
&& .venv/bin/pip install 'glean_parser~=14.5'
RUN git rev-parse HEAD > base_ref;
RUN cp yarn.lock yarn.lock.base;
# Runs initial build stage in CI. Needs full install. Responsible for
# setting up the initially workspace state. This image installs npm
# packages and builds heavily referenced workspaces.
FROM test-runner AS builder
WORKDIR /home/circleci
COPY --chown=circleci:circleci .yarn .yarn
WORKDIR /home/circleci/project
ENV YARN_CHECKSUM_BEHAVIOR=throw
ENV FXA_AUTO_INSTALL=0
RUN _scripts/l10n/clone.sh
RUN yarn install --immutable
# Acts as an intermediate stage for adding the firefox install. Note,
# that a yarn install must happen first to ensure the correct version
# of firefox is installed. Also note that the functional-test-runner
# must based on cimg/node:22.15.1-browsers, which is why this stage
# is necessary.
FROM builder AS playwright-install
RUN npx playwright install --with-deps firefox chromium webkit;
# Runs functional tests in our CI. Needs minimal install. Assumes
# workspace will be restored into the project folder.
FROM cimg/node:22.15.1-browsers AS functional-test-runner
RUN sudo apt-get update && sudo apt-get install -y \
python3-venv \
python3-pip
WORKDIR /home/circleci
COPY --chown=circleci:circleci --from=playwright-install /home/circleci/.cache/ms-playwright .cache/ms-playwright/
COPY --chown=circleci:circleci project project
WORKDIR /home/circleci/project
RUN python3 -m venv .venv \
&& .venv/bin/pip install 'glean_parser~=14.5'
COPY --chown=circleci:circleci install /usr/local/bin/