Skip to content
Snippets Groups Projects
Verified Commit 9cb8aac6 authored by Timm Fitschen's avatar Timm Fitschen
Browse files

PIPELINE: custom docker image for testing

parent 58166812
No related branches found
No related tags found
No related merge requests found
Pipeline #47161 passed
variables:
CI_REGISTRY_IMAGE_ENV: $CI_REGISTRY/fdo/fdo-manager-webui/testenv:$CI_COMMIT_REF_NAME
default:
image: node:lts-alpine
image: docker:22.06-rc
tags:
- docker
......@@ -9,10 +11,39 @@ workflow:
- if: $CI_PIPELINE_SOURCE != "merge_request_event" && $CI_COMMIT_REF_NAME != $CI_COMMIT_TAG
stages:
- setup
- test
webui:build-test:
stage: test
webui:setup:
stage: setup
rules:
- if: $RUN_SETUP_STAGE == "false"
when: never
- if: $CI_PIPELINE_SOURCE == "schedule"
- if: $CI_PIPELINE_SOURCE == "web"
- if: $CI_PIPELINE_SOURCE != "schedule"
changes:
- .test/Dockerfile
- package.json
- package-lock.json
- .gitlab-ci.yml
script:
- echo "registry $CI_REGISTRY"
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker build --pull -t $CI_REGISTRY_IMAGE_ENV -f .test/Dockerfile .
- docker push $CI_REGISTRY_IMAGE_ENV
.webui:job: &webui-job
image: $CI_REGISTRY_IMAGE_ENV
stage: test
needs:
- job: "webui:setup"
optional: true
before_script:
- cp -r -t ./ /webui/node_modules
- npm install
webui:build-test:
<<: *webui-job
script:
- npm run build
FROM node:lts-alpine
COPY ./package.json /webui/package.json
COPY ./package-lock.json /webui/package-lock.json
WORKDIR /webui
RUN npm install
ENTRYPOINT [""]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment