Skip to content

Commit

Permalink
build: bump nodejs version to 18
Browse files Browse the repository at this point in the history
As builds on 16 produces warnings:
```
npm install
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@testing-library/[email protected]',
npm WARN EBADENGINE   required: { node: '>=18' },
npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
npm WARN EBADENGINE }
```

Signed-off-by: Petr Vobornik <[email protected]>
  • Loading branch information
pvoborni committed May 14, 2024
1 parent 7d52ae5 commit f461d6f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
submodules: true
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: 'npm'
- run: make lint
- run: make test
2 changes: 1 addition & 1 deletion .rhcicd/build_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export IMAGE="${IMAGE:-quay.io/cloudservices/${COMPONENT}-frontend}"
export WORKSPACE=${WORKSPACE:-$APP_ROOT} # if running in jenkins, use the build's workspace
export APP_ROOT="$(pwd)"
#16 is the default Node version. Change this to override it.
export NODE_BUILD_VERSION=16
export NODE_BUILD_VERSION=18
COMMON_BUILDER="https://raw.githubusercontent.com/RedHatInsights/insights-frontend-builder-common/master"

set -exv
Expand Down
4 changes: 3 additions & 1 deletion build/package/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM registry.redhat.io/rhel9/nodejs-16:1-110 AS builder
# https://catalog.redhat.com/software/containers/ubi9/nodejs-18/62e8e7ed22d1d3c2dfe2ca01
FROM registry.redhat.io/rhel9/nodejs-18:1-108.1714669798 AS builder
# https://github.com/cypress-io/cypress/issues/25236
# TODO Set env variable indicated into the URL
USER root
Expand All @@ -23,6 +24,7 @@ ENV APP_NAME=${APP_NAME}
RUN ./gen.app.info.sh


# https://quay.io/repository/cloudservices/caddy-ubi?tab=tags
FROM quay.io/cloudservices/caddy-ubi:11145b1
WORKDIR /opt/app-root/src

Expand Down
3 changes: 2 additions & 1 deletion scripts/mk/container.mk
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ registry-login:
.PHONY: container-build
container-build: ## Build image CONTAINER_IMAGE from CONTAINERFILE using the CONTAINER_CONTEXT_DIR
$(CONTAINER_ENGINE) build \
--ulimit nofile=65535:65535 \
--label "quay.expires-after=$(QUAY_EXPIRATION)" \
$(CONTAINER_BUILD_OPTS) \
-t "$(CONTAINER_IMAGE)" \
Expand All @@ -54,7 +55,7 @@ container-shell: ## Open a terminal to check build steps
-v $(PROJECT_DIR):/opt/app-root/src:rw,z \
--tmpfs /opt/app-root/src/node_modules:rw \
--tmpfs /opt/app-root/src/.npm:rw \
registry.redhat.io/rhel9/nodejs-16:1-138.1699550438 \
registry.redhat.io/rhel9/nodejs-18:1-108.1714669798 \
/bin/bash

.PHONY: container-push
Expand Down

0 comments on commit f461d6f

Please sign in to comment.