Skip to content
Snippets Groups Projects
Commit 18d8aadd authored by Dobromir Palushev's avatar Dobromir Palushev
Browse files

pipeline and docker updates

parent 218216f9
No related branches found
No related tags found
21 merge requests!71A pipeline Job rename,!69Workflow updates,!68Workflow updates,!67Workflow updates,!65updated logic of the test-job,!63updated logic of the test-job,!61updated logic of the test-job,!59updated logic of the test-job,!57updated logic of the test-job,!55added "create-release-tag" job,!54updated logic of the test-job,!53Workflow updates,!51updated logic of the test-job,!49updated logic of the test-job,!48updated logic of the test-job,!46updated logic of the test-job,!44updated logic of the test-job,!43updated logic of the test-job,!42updated logic of the test-job,!41updated logic of the test-job,!40updated logic of the test-job
......@@ -49,7 +49,8 @@ run-tests:
--network=host
--build-arg MONGODB_URL_TEST=mongodb://localhost:27017/todo-app
--build-arg JWT_SECRET_TEST=my-very-secret-jwt
--add-host=host.docker.internal:localhost
--add-host=host.docker.internal:host-gateway
--file Dockerfile.test
"./app"
after_script:
- docker stop mongo-container
......
......@@ -14,35 +14,6 @@ ENV \
MONGODB_URL=<dynamically-set-from-k8s> \
JWT_SECRET=<dynamically-set-from-k8s>
# ------------------------------------------------------------------
# # Test stage
# FROM base AS test
# # client tests
# WORKDIR /client
# COPY ./client .
# RUN npm ci --no-audit --no-fund
# RUN npm run test
# # server tests
# WORKDIR /server
# COPY ./server/src ./src/
# COPY ./server/package*.json ./
# RUN npm ci --no-audit --no-fund
# ARG MONGODB_URL_TEST
# ARG JWT_SECRET_TEST
# # MONGODB_URL and JWT_SECRET are available as env variables
# RUN MONGODB_URL=$MONGODB_URL_TEST JWT_SECRET=$JWT_SECRET_TEST npm run test
# ------------------------------------------------------------------
# Build stage
FROM base AS build
......
ARG NODEJS_VERSION='16.17.0'
# Test stage
FROM node:$NODEJS_VERSION-alpine
# client tests
WORKDIR /client
COPY ./client .
RUN npm ci --no-audit --no-fund
RUN npm run test
# server tests
WORKDIR /server
COPY ./server/src ./src/
COPY ./server/package*.json ./
RUN npm ci --no-audit --no-fund
ARG \
MONGODB_URL_TEST=mongodb://host.docker.internal:27017/todo-app \
JWT_SECRET_TEST=<my-very-secret-jwt>
# MONGODB_URL and JWT_SECRET are available as env variables
RUN MONGODB_URL=$MONGODB_URL_TEST JWT_SECRET=$JWT_SECRET_TEST npm run test
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