Skip to content
Snippets Groups Projects

pipeline multiple updates

Merged Dobromir Palushev requested to merge just-a-test into staging
1 file
+ 22
20
Compare changes
  • Side-by-side
  • Inline
+ 22
20
@@ -37,26 +37,28 @@ run-tests:
# services:
# - name: docker:${DOCKER_VERSION}-dind
script:
# - docker run -p 27017:27017 -d --name mongo-container --rm mongo:${MONGO_VERSION}
# - docker build
# --tag "${CONTAINER_TAG}-test"
# --target=test
# "./app"
- echo ‘http://dl-cdn.alpinelinux.org/alpine/v3.6/main’ >> /etc/apk/repositories
- echo ‘http://dl-cdn.alpinelinux.org/alpine/v3.6/community’ >> /etc/apk/repositories
- apk add mongodb mongodb-tools
- mongod --config "./app/server/dev.mongo.conf"
- cd "./app/client"
- npm ci --no-audit --no-fund
- npm run test
- cd "../server"
- npm ci --no-audit --no-fund
- MONGODB_URL=mongodb://localhost:27017/todo-app JWT_SECRET=a-big-secret npm run test
- jest --ci
# after_script:
# - docker stop mongo-container
# - docker images -a | grep "mongo" | awk '{print $3}' | xargs docker rmi --force
# - docker image rm --force "${CONTAINER_TAG}-test"
- docker run -p 27017:27017 -d --name mongo-container --rm --add-host=host.docker.internal:host-gateway mongo:${MONGO_VERSION}
- docker build
--tag "${CONTAINER_TAG}-test"
--target=test
"./app"
# - echo ‘http://dl-cdn.alpinelinux.org/alpine/v3.6/main’ >> /etc/apk/repositories
# - echo ‘http://dl-cdn.alpinelinux.org/alpine/v3.6/community’ >> /etc/apk/repositories
# - apk update
# - apk add mongodb mongodb-tools
# - mkdir -p /data/db/
# - mongod --config "./app/server/dev.mongo.conf"
# - cd "./app/client"
# - npm ci --no-audit --no-fund
# - npm run test
# - cd "../server"
# - npm ci --no-audit --no-fund
# - MONGODB_URL=mongodb://localhost:27017/todo-app JWT_SECRET=a-big-secret npm run test
# - jest --ci
after_script:
- docker stop mongo-container
- docker images -a | grep "mongo" | awk '{print $3}' | xargs docker rmi --force
- docker image rm --force "${CONTAINER_TAG}-test"
build-image:
stage: build
Loading