diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f6703c4..9b0d86f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -40,10 +40,12 @@ build: script: - | buildah build \ + --build-arg NPM_REGISTRY=https://deps.global.bsf.tools/artifactory/api/npm/registry.npmjs.org/ \ --tag ${IMAGE_NAME}:${CI_COMMIT_SHORT_SHA} \ --label org.opencontainers.image.source=${CI_PROJECT_URL} \ --label org.opencontainers.image.revision=${CI_COMMIT_SHA} \ - --label org.opencontainers.image.created=$(date -u +%Y-%m-%dT%H:%M:%SZ) . + --label org.opencontainers.image.created=$(date -u +%Y-%m-%dT%H:%M:%SZ) \ + . rules: - if: $CI_PIPELINE_SOURCE == "merge_request_event" diff --git a/Dockerfile b/Dockerfile index e9e96c6..45af76f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,13 @@ # Frontend build stage FROM node:20-alpine AS frontend-builder +ARG NPM_REGISTRY + WORKDIR /app/frontend +# Configure npm registry if provided +RUN if [ -n "$NPM_REGISTRY" ]; then npm config set registry "$NPM_REGISTRY"; fi + # Copy package files COPY frontend/package*.json ./ RUN npm install