Skip to content

Commit

Permalink
⬆️(front) upgrade to node 16
Browse files Browse the repository at this point in the history
We need node 16 to use node-sass
  • Loading branch information
lunika committed Nov 25, 2024
1 parent 6098c3d commit f6b6b3b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 18 deletions.
30 changes: 14 additions & 16 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,7 @@ jobs:
# Generate a version.json file describing app release
- <<: *generate-version-file
# Activate docker-in-docker
- setup_remote_docker:
version: 19.03.13
- setup_remote_docker
# Each image is tagged with the current git commit sha1 to avoid collisions in parallel builds.
- run:
name: Build production image
Expand Down Expand Up @@ -266,8 +265,7 @@ jobs:
# Generate a version.json file describing app release
- <<: *generate-version-file
# Activate docker-in-docker
- setup_remote_docker:
version: 19.03.13
- setup_remote_docker
- run:
name: Build production image
command: docker build -t ashley:${CIRCLE_SHA1} --target production .
Expand Down Expand Up @@ -328,15 +326,15 @@ jobs:
# ---- Front-end jobs ----
build-front:
docker:
- image: circleci/node:14
- image: circleci/node:16
working_directory: ~/fun/src/frontend
steps:
- checkout:
path: ~/fun
- restore_cache:
keys:
- v3-front-dependencies-{{ checksum "yarn.lock" }}
- v3-front-dependencies
- v4-front-dependencies-{{ checksum "yarn.lock" }}
- v4-front-dependencies
# If the yarn.lock file is not up-to-date with the package.json file,
# using the --frozen-lockfile should fail.
- run:
Expand All @@ -358,19 +356,19 @@ jobs:
- save_cache:
paths:
- ./node_modules
key: v3-front-dependencies-{{ checksum "yarn.lock" }}
key: v4-front-dependencies-{{ checksum "yarn.lock" }}

build-front-production:
docker:
- image: circleci/node:14
- image: circleci/node:16
working_directory: ~/fun/src/frontend
steps:
- checkout:
path: ~/fun
- restore_cache:
keys:
- v3-front-dependencies-{{ checksum "yarn.lock" }}
- v3-front-dependencies-
- v4-front-dependencies-{{ checksum "yarn.lock" }}
- v4-front-dependencies-
- run:
name: Build front-end application in production mode
command: yarn build-production
Expand All @@ -397,14 +395,14 @@ jobs:
- src/ashley/static/ashley/font/*
lint-front:
docker:
- image: circleci/node:14
- image: circleci/node:16
working_directory: ~/fun/src/frontend
steps:
- checkout:
path: ~/fun
- restore_cache:
keys:
- v3-front-dependencies-{{ checksum "yarn.lock" }}
- v4-front-dependencies-{{ checksum "yarn.lock" }}
- run:
name: Lint code with tslint
command: yarn lint
Expand All @@ -414,14 +412,14 @@ jobs:

test-front:
docker:
- image: circleci/node:14
- image: circleci/node:16
working_directory: ~/fun/src/frontend
steps:
- checkout:
path: ~/fun
- restore_cache:
keys:
- v3-front-dependencies-{{ checksum "yarn.lock" }}
- v4-front-dependencies-{{ checksum "yarn.lock" }}
- run:
name: Run tests
# Circle CI needs the tests to be run sequentially, otherwise it hangs. See Jest docs below:
Expand All @@ -430,7 +428,7 @@ jobs:

test-front-package:
docker:
- image: circleci/node:14
- image: circleci/node:16
working_directory: ~/wrk
steps:
- checkout:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ FROM python:3.8-slim AS base
RUN pip install --upgrade pip

# ---- Front-end builder image ----
FROM node:14 AS front-builder
FROM node:16 AS front-builder

# Copy frontend app sources
COPY ./src/frontend /builder/src/frontend
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ services:
working_dir: /app

node:
image: node:14
image: node:16
working_dir: /app/src/frontend
user: "${DOCKER_USER:-1000}"
volumes:
Expand Down

0 comments on commit f6b6b3b

Please sign in to comment.