1
0
Fork 0
js-yaml-schema/.gitlab-ci.yml

116 lines
1.9 KiB
YAML

include:
- local: /config/gitlab/ci-tools.yml
- local: /config/gitlab/ci-rules.yml
stages:
- status-pre
- build
- publish
- status-post
# build jobs
build-node:
stage: build
extends:
- .build-node
script:
- make ci
artifacts:
when: always
expire_in: 1 day
paths:
- out/
cache:
key: "${CI_COMMIT_REF_SLUG}"
policy: pull-push
paths:
- node_modules/
- out/api
- out/cache
- out/tmp
# publish jobs
publish-npm:
stage: publish
extends:
- .build-node
- .deploy-tags
dependencies:
- build-node
script:
- npm publish
# commit status
climate-pending:
stage: status-pre
extends:
- .build-climate
script:
- cc-test-reporter before-build
climate-success:
stage: status-post
extends:
- .build-climate
dependencies:
- build-node
script:
- make upload-climate
codecov-success:
stage: status-post
extends:
- .build-codecov
when: on_success
dependencies:
- build-node
script:
- make upload-codecov
github-pending:
stage: status-pre
extends:
- .build-curl
script:
- ./scripts/github-status.sh pending
github-failure:
stage: status-post
extends:
- .build-curl
when: on_failure
script:
- ./scripts/github-status.sh failure
github-success:
stage: status-post
extends:
- .build-curl
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=${CI_PROJECT_NAMESPACE}_${CI_PROJECT_NAME}
-Dsonar.projectVersion=${CI_COMMIT_REF_SLUG}
-Dsonar.organization=${CI_PROJECT_NAMESPACE}-github
-Dsonar.sources=src/,test/
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.login=${SONAR_SECRET}
-Dsonar.typescript.lcov.reportPaths=out/coverage/lcov.info