Skip to content

Commit

Permalink
mrc-4125: Update to Node 20.
Browse files Browse the repository at this point in the history
This is a mostly straightforward upgrade. Just a few notes:
- The lockfile format has changed so gets rewritten entirely.
- webpack is bumped to the next dot release. This adds a workaround
  caused by Node switching to OpenSSL 3, which drops md4 as a hash
  function (webpack/webpack#17628).
- node-sass did not build on the new node so had to be updated.
- I've updated playwright to take advantage of its added support for
  installing dependencies on Debian, removing the hardcoded list of
  packages we had to install.

There's a whole bunch of updates we could do to our NodeJS dependencies,
but I've left that for a later point since they aren't urgent or
necessarily trivial.
  • Loading branch information
plietar committed Dec 12, 2023
1 parent ea20d8f commit 225b104
Show file tree
Hide file tree
Showing 6 changed files with 18,819 additions and 14,049 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ docker run --rm -p 8080:8080 mrcide/mint
### Developing
Requirements:
* Docker
* npm
* NodeJS 20 with npm
* openjdk 21
* coreutils or realpath (Mac users only)

Expand Down
6 changes: 3 additions & 3 deletions buildkite/shared-build-env.dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Setup a combined nodejs and openjdk image
# Eventually this should be extracted into something we can publish and cache
FROM node:12-bullseye
FROM node:20-bookworm
RUN curl -fsSL -o /usr/share/keyrings/docker.asc https://download.docker.com/linux/debian/gpg && \
curl -fsSL -o /usr/share/keyrings/adoptium.asc https://packages.adoptium.net/artifactory/api/gpg/key/public
RUN echo "deb [arch=amd64, signed-by=/usr/share/keyrings/docker.asc] https://download.docker.com/linux/debian bullseye stable" > /etc/apt/sources.list.d/docker.list
RUN echo "deb [arch=amd64, signed-by=/usr/share/keyrings/adoptium.asc] https://packages.adoptium.net/artifactory/deb bullseye main" > /etc/apt/sources.list.d/adoptium.list
RUN echo "deb [arch=amd64, signed-by=/usr/share/keyrings/docker.asc] https://download.docker.com/linux/debian bookworm stable" > /etc/apt/sources.list.d/docker.list
RUN echo "deb [arch=amd64, signed-by=/usr/share/keyrings/adoptium.asc] https://packages.adoptium.net/artifactory/deb bookworm main" > /etc/apt/sources.list.d/adoptium.list
RUN apt-get update && apt-get install -y temurin-17-jdk docker-ce

# Setup gradle
Expand Down
10 changes: 1 addition & 9 deletions buildkite/test-e2e.dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
ARG GIT_ID="UNKNOWN"
FROM mrcide/mint-shared-build-env:$GIT_ID

RUN cd app/static && npx playwright install chromium

# Playwright has a `install-deps` command we could use instead of this, except
# we use an old version of playwright which doesn't support Debian. We can't
# update playwright because our node version is too old.
RUN apt-get install -y \
libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 libxkbcommon0 \
libx11-xcb1 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 libgbm1 \
libxshmfence1
RUN cd app/static && npx playwright install --with-deps chromium

CMD ./gradlew app:bootRun & sleep 90 && \
npm run e2e-test --prefix=app/static
Loading

0 comments on commit 225b104

Please sign in to comment.