1
0
Fork 0

feat(build): add sonar job

This commit is contained in:
ssube 2019-11-10 09:59:58 -06:00
parent 28cb080eb8
commit 1fa6bada47
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 jobs
build-node: build-node:
stage: build
extends: extends:
- .build-node - .build-node
stage: build
script: script:
- make ci - make ci
@ -56,8 +56,8 @@ build-image-alpine-tag:
IMAGE_ARCH: alpine IMAGE_ARCH: alpine
build-image-stretch-branch: build-image-stretch-branch:
extends: [.build-docker]
stage: image stage: image
extends: [.build-docker]
except: except:
- tags - tags
script: script:
@ -66,9 +66,9 @@ build-image-stretch-branch:
IMAGE_ARCH: stretch IMAGE_ARCH: stretch
build-image-stretch-tag: build-image-stretch-tag:
stage: image
extends: extends:
- .build-docker - .build-docker
stage: image
only: only:
- tags - tags
script: script:
@ -78,11 +78,10 @@ build-image-stretch-tag:
# publish jobs # publish jobs
publish-npm: publish-npm:
stage: publish
extends: extends:
- .build-node - .build-node
stage: publish - .deploy-tags
only:
- tags
dependencies: dependencies:
- build-node - build-node
@ -120,24 +119,41 @@ codecov-success:
- make upload-codecov - make upload-codecov
github-pending: github-pending:
stage: status-pre
extends: extends:
- .build-curl - .build-curl
stage: status-pre
script: script:
- ./scripts/github-status.sh pending - ./scripts/github-status.sh pending
github-failure: github-failure:
stage: status-post
extends: extends:
- .build-curl - .build-curl
stage: status-post
when: on_failure when: on_failure
script: script:
- ./scripts/github-status.sh failure - ./scripts/github-status.sh failure
github-success: github-success:
stage: status-post
extends: extends:
- .build-curl - .build-curl
stage: status-post
when: on_success when: on_success
script: script:
- ./scripts/github-status.sh success - ./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_salty-dog
-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