Newer
Older
SONARQUBE_URL: https://sonarqube.lam.fr
COVERAGE_IMAGE: portus.lam.fr/anis/anis-client-coverage
stage: install
script:
- yarn global add @angular/cli
- yarn install
- ng build --prod
cache:
paths:
- dist
image: portus.lam.fr/ci-tools/angular-testing:latest
- ng test --no-watch
cache:
paths:
- dist
- node_modules
policy: pull-push
only:
refs:
- develop
sonar_scanner:
image: portus.lam.fr/ci-tools/sonar-scanner:latest
stage: sonar
script:
- sonar-scanner
-Dsonar.projectKey=anis-client
-Dsonar.sources=src
-Dsonar.projectVersion=$VERSION
-Dsonar.host.url=$SONARQUBE_URL
-Dsonar.login=$SONAR_TOKEN
-Dsonar.exclusions=**.spec.ts
-Dsonar.typescript.lcov.reportPaths=./var/coverage/lcov.info
cache:
paths:
- node_modules
build:
image: docker:stable
stage: build
script:
- docker login -u fagneray -p $PORTUS_TOKEN portus.lam.fr
- docker pull $CONTAINER_IMAGE:latest || true
- docker build --cache-from $CONTAINER_IMAGE:latest -t $CONTAINER_IMAGE:latest .
- docker push $CONTAINER_IMAGE:latest
cache:
paths:
- dist
policy: pull
only:
refs:
deploy:
image: alpine
stage: deploy
script:
- apk add --update curl
- curl -XPOST $DEV_WEBHOOK
only:
refs: