1
0
Fork 0

feat(build): add sonar job

This commit is contained in:
ssube 2019-11-10 10:00:53 -06:00
parent b10bca38f9
commit 6d8f716dce
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
1 changed files with 25 additions and 9 deletions

View File

@ -11,9 +11,9 @@ stages:
# build jobs
build-node:
stage: build
extends:
- .build-node
stage: build
script:
- make ci
@ -56,8 +56,8 @@ build-image-alpine-tag:
IMAGE_ARCH: alpine
build-image-stretch-branch:
extends: [.build-docker]
stage: image
extends: [.build-docker]
except:
- tags
script:
@ -66,9 +66,9 @@ build-image-stretch-branch:
IMAGE_ARCH: stretch
build-image-stretch-tag:
stage: image
extends:
- .build-docker
stage: image
only:
- tags
script:
@ -78,11 +78,10 @@ build-image-stretch-tag:
# publish jobs
publish-npm:
stage: publish
extends:
- .build-node
stage: publish
only:
- tags
- .deploy-tags
dependencies:
- build-node
@ -120,24 +119,41 @@ codecov-success:
- make upload-codecov
github-pending:
stage: status-pre
extends:
- .build-curl
stage: status-pre
script:
- ./scripts/github-status.sh pending
github-failure:
stage: status-post
extends:
- .build-curl
stage: status-post
when: on_failure
script:
- ./scripts/github-status.sh failure
github-success:
stage: status-post
extends:
- .build-curl
stage: status-post
when: on_success
script:
- ./scripts/github-status.sh success
sonar-success:
stage: status-post
extends:
- .build-sonar
when: on_success
script:
- make node_modules
- sonar-scanner
-Dsonar.projectKey=ssube_rollup-template
-Dsonar.projectVersion=${CI_COMMIT_REF_SLUG}
-Dsonar.organization=ssube-github
-Dsonar.sources=src/,test/
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.login=${SONAR_SECRET}
-Dsonar.typescript.lcov.reportPaths=out/coverage/lcov.info