Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ on:

jobs:
common:
uses: City-of-Helsinki/.github/.github/workflows/ci-node.yml@main
secrets: inherit
uses: City-of-Helsinki/.github/.github/workflows/ci-pnpm-node.yml@main
Comment thread
Riippi marked this conversation as resolved.
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
node-version: 22
node-version: 24.x
22 changes: 11 additions & 11 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ jobs:
build-stable:
needs: release-please
if: ${{ needs.release-please.outputs.release_created }}
uses: City-of-Helsinki/.github/.github/workflows/ci-node.yml@main
uses: City-of-Helsinki/.github/.github/workflows/ci-pnpm-node.yml@main
Comment thread
Riippi marked this conversation as resolved.
secrets: inherit
with:
node-version: '22'
upload_artifacts: true
skip_sonar: true
node-version: '24'
upload-artifacts: true
skip-sonar: true

publish:
needs: build-stable
secrets: inherit
uses: City-of-Helsinki/.github/.github/workflows/ci-npm-publish.yml@main
with:
node-version: '22'
node-version: '24'
use-ci-build: true

# 3. CANARY RELEASE FLOW (Runs on every push to main, EXCLUDING schedule)
Expand All @@ -48,12 +48,12 @@ jobs:
build-canary:
# This conditional ensures it runs ONLY when the workflow was triggered by a commit push.
if: github.event_name == 'push'
uses: City-of-Helsinki/.github/.github/workflows/ci-node.yml@main
uses: City-of-Helsinki/.github/.github/workflows/ci-pnpm-node.yml@main
secrets: inherit
with:
node-version: '22'
upload_artifacts: true
skip_sonar: true
node-version: '24'
upload-artifacts: true
skip-sonar: true

publish-npm-canary:
# This conditional is redundant but good practice; it will only run if its dependency runs.
Expand All @@ -62,6 +62,6 @@ jobs:
secrets: inherit
uses: City-of-Helsinki/.github/.github/workflows/ci-npm-publish.yml@main
with:
node-version: '22'
node-version: '24'
use-ci-build: true
canary: true
4 changes: 2 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
yarn doctoc . -u
yarn lint-staged --relative
pnpm exec doctoc . -u
pnpm exec lint-staged --relative
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v22.14.0
v24.0.0
34 changes: 12 additions & 22 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,42 +1,32 @@
# ===============================================
FROM registry.access.redhat.com/ubi9/nodejs-22 AS appbase
FROM helsinki.azurecr.io/ubi9/nodejs-24-pnpm-builder-base AS appbase
Comment thread
Riippi marked this conversation as resolved.
# ===============================================

# Set environment
ARG PORT=3000
ENV PORT $PORT
ENV PORT=$PORT

WORKDIR /app

# Install yarn
USER root
RUN curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | tee /etc/yum.repos.d/yarn.repo && \
yum -y install yarn

# Yarn version
ENV YARN_VERSION 1.22.22
RUN yarn policies set-version ${YARN_VERSION}


# Set npm log verbosity level
ENV NPM_CONFIG_LOGLEVEL warn
ENV NPM_CONFIG_LOGLEVEL=warn

# Global npm dependencies in a non-root user directory
ENV NPM_CONFIG_PREFIX=/app/.npm-global
ENV PATH=$PATH:/app/.npm-global/bin

# Set NODE_ENV to development in the development container
ARG NODE_ENV=development
ENV NODE_ENV $NODE_ENV
ENV NODE_ENV=$NODE_ENV

# Copy package.json and yarn.lock files
COPY --chown=default:root package*.json *yarn* ./
# Copy package.json and pnpm-lock.yaml files
COPY --chown=default:root package*.json pnpm-lock.yaml ./

# Make scripts in dependencies available through path
ENV PATH /app/node_modules/.bin:$PATH
ENV PATH=/app/node_modules/.bin:$PATH

# Install dependencies including storybook addons
RUN yarn && yarn cache clean
RUN pnpm install --frozen-lockfile --ignore-scripts && pnpm store prune

# =============================
FROM appbase AS development
Expand All @@ -46,29 +36,29 @@ FROM appbase AS development
COPY --chown=default:root . .

# Start command for development
CMD ["yarn", "dev:no-open"]
CMD ["pnpm", "run", "dev:no-open"]

# =============================
FROM appbase AS staticbuilder
# =============================

# Set NODE_ENV to production for build
ARG NODE_ENV=production
ENV NODE_ENV $NODE_ENV
ENV NODE_ENV=$NODE_ENV

# Copy all files, including .mdx stories
COPY --chown=default:root . .

# Build Storybook
RUN yarn build-storybook --loglevel error
RUN pnpm run build-storybook --loglevel error

# =============================
FROM appbase AS production
# =============================

# Set NODE_ENV to production in the production container
ARG NODE_ENV=production
ENV NODE_ENV $NODE_ENV
ENV NODE_ENV=$NODE_ENV

# Copy build folder
COPY --from=staticbuilder --chown=default:root /app/storybook-static/ /app/storybook-static/
Expand Down
Loading
Loading