Commit c2702ff2 authored by François Agneray's avatar François Agneray
Browse files

Add coverage (gitlab-ci)

parent 3e86540e
Pipeline #1603 failed with stages
in 19 minutes and 22 seconds
......@@ -2,13 +2,16 @@ stages:
- install
- test
- sonar
- build-coverage
- build
- deploy
- deploy-coverage
variables:
VERSION: "3.0"
SONARQUBE_URL: https://sonarqube.lam.fr
CONTAINER_IMAGE: portus.lam.fr/anis/anis-client
COVERAGE_IMAGE: portus.lam.fr/anis/anis-client-coverage
install:
image: node:11
......@@ -62,6 +65,24 @@ sonar_scanner:
refs:
- develop
build-coverage:
image: docker:stable
stage: build-coverage
script:
- echo "FROM nginx" > var/Dockerfile
- echo "COPY coverage /usr/share/nginx/html" >> var/Dockerfile
- docker login -u fagneray -p $PORTUS_TOKEN portus.lam.fr
- docker pull $COVERAGE_IMAGE:latest || true
- docker build --cache-from $COVERAGE_IMAGE:latest -t $COVERAGE_IMAGE:latest var
- docker push $COVERAGE_IMAGE:latest
cache:
paths:
- coverage
policy: pull
only:
refs:
- develop
build:
image: docker:stable
stage: build
......@@ -84,6 +105,16 @@ deploy:
script:
- apk add --update curl
- curl -XPOST $DEV_WEBHOOK
only:
refs:
- develop
deploy-coverage:
image: alpine
stage: deploy-coverage
script:
- apk add --update curl
- curl -XPOST $COVERAGE_WEBHOOK
only:
refs:
- develop
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment