chore(_dev): Fix annotation warnings

Because:
- Docker job in github complained about this (e.g. https://github.com/mozilla/fxa/actions/runs/11060387844)

This Commit:
- changes as to AS, which is stylistically better
This commit is contained in:
dschom 2024-09-26 16:05:08 -07:00
Родитель a8156e5fd9
Коммит 507be1c8a8
Не найден ключ, соответствующий данной подписи
2 изменённых файлов: 8 добавлений и 8 удалений

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

@ -4,7 +4,7 @@
# Runs tests and common CI operations. Needs minimal install. Assumes # Runs tests and common CI operations. Needs minimal install. Assumes
# workspace will be restored into the project folder. # workspace will be restored into the project folder.
FROM cimg/node:20.11 as test-runner FROM cimg/node:20.11 AS test-runner
RUN sudo apt-get update && sudo apt-get install -y \ RUN sudo apt-get update && sudo apt-get install -y \
python3-venv python3-venv
WORKDIR /home/circleci WORKDIR /home/circleci
@ -17,7 +17,7 @@ RUN cp yarn.lock yarn.lock.base;
# Runs initial build stage in CI. Needs full install. Responsible for # Runs initial build stage in CI. Needs full install. Responsible for
# setting up the initially workspace state. This image installs npm # setting up the initially workspace state. This image installs npm
# packages and builds heavily referenced workspaces. # packages and builds heavily referenced workspaces.
FROM test-runner as builder FROM test-runner AS builder
WORKDIR /home/circleci WORKDIR /home/circleci
COPY --chown=circleci:circleci .yarn .yarn COPY --chown=circleci:circleci .yarn .yarn
WORKDIR /home/circleci/project WORKDIR /home/circleci/project
@ -31,13 +31,13 @@ RUN yarn install --immutable;
# of firefox is installed. Also note that the functional-test-runner # of firefox is installed. Also note that the functional-test-runner
# must based on cimg/node:20.11-browsers, which is why this stage # must based on cimg/node:20.11-browsers, which is why this stage
# is necessary. # is necessary.
FROM builder as playwright-install FROM builder AS playwright-install
RUN npx playwright install --with-deps firefox chromium webkit; RUN npx playwright install --with-deps firefox chromium webkit;
# Runs functional tests in our CI. Needs minimal install. Assumes # Runs functional tests in our CI. Needs minimal install. Assumes
# workspace will be restored into the project folder. # workspace will be restored into the project folder.
FROM cimg/node:20.11-browsers as functional-test-runner FROM cimg/node:20.11-browsers AS functional-test-runner
WORKDIR /home/circleci WORKDIR /home/circleci
COPY --chown=circleci:circleci --from=playwright-install /home/circleci/.cache/ms-playwright .cache/ms-playwright/ COPY --chown=circleci:circleci --from=playwright-install /home/circleci/.cache/ms-playwright .cache/ms-playwright/
COPY --chown=circleci:circleci project project COPY --chown=circleci:circleci project project

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

@ -12,7 +12,7 @@ RUN set -x \
app app
# Utilities for fxa build # Utilities for fxa build
FROM fxa-base as fxa-build-utils FROM fxa-base AS fxa-build-utils
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
git-core \ git-core \
python3-setuptools \ python3-setuptools \
@ -25,7 +25,7 @@ RUN apt-get update && apt-get install -y \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
# Utilities for fxa services # Utilities for fxa services
FROM fxa-base as fxa-utils FROM fxa-base AS fxa-utils
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
netcat-traditional \ netcat-traditional \
openssl \ openssl \
@ -35,14 +35,14 @@ RUN apt-get update && apt-get install -y \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
# Build mono repo # Build mono repo
FROM fxa-build-utils as fxa-build FROM fxa-build-utils AS fxa-build
COPY --chown=app:app . /fxa COPY --chown=app:app . /fxa
USER app USER app
WORKDIR /fxa WORKDIR /fxa
RUN _dev/docker/mono/build.sh $(cat packages/version.json | jq -r '.version.version') RUN _dev/docker/mono/build.sh $(cat packages/version.json | jq -r '.version.version')
# Final image # Final image
FROM fxa-utils as fxa-mono FROM fxa-utils AS fxa-mono
COPY --from=fxa-build --chown=app:app /fxa /fxa COPY --from=fxa-build --chown=app:app /fxa /fxa
COPY --from=fxa-build --chown=app:app /fxa/packages/version.json /app/version.json COPY --from=fxa-build --chown=app:app /fxa/packages/version.json /app/version.json
USER app USER app