smartopen/.gitlab-ci.yml

118 lines
1.8 KiB
YAML
Raw Normal View History

2019-06-04 09:25:51 +00:00
# gitzone ci_default
2017-03-12 20:13:09 +00:00
image: hosttoday/ht-docker-node:npmci
cache:
paths:
2019-04-16 06:26:16 +00:00
- .npmci_cache/
2017-03-12 20:13:09 +00:00
key: "$CI_BUILD_STAGE"
stages:
- security
2017-03-12 20:13:09 +00:00
- test
- release
- metadata
2017-03-12 20:13:09 +00:00
# ====================
# security stage
# ====================
mirror:
stage: security
script:
- npmci git mirror
tags:
- docker
- notpriv
snyk:
stage: security
script:
2019-04-16 06:26:16 +00:00
- npmci npm prepare
- npmci command npm install -g snyk
- npmci command npm install --ignore-scripts
- npmci command snyk test
tags:
- docker
- notpriv
# ====================
# test stage
# ====================
2017-03-12 20:13:09 +00:00
testLTS:
stage: test
script:
2019-04-16 06:26:16 +00:00
- npmci npm prepare
- npmci node install lts
- npmci npm install
- npmci npm test
2017-03-12 20:13:09 +00:00
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
- notpriv
2017-03-12 20:13:09 +00:00
testSTABLE:
stage: test
script:
2019-04-16 06:26:16 +00:00
- npmci npm prepare
- npmci node install stable
- npmci npm install
- npmci npm test
2017-03-12 20:13:09 +00:00
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
- notpriv
2017-03-12 20:13:09 +00:00
release:
stage: release
script:
- npmci node install stable
- npmci npm publish
2017-03-12 20:13:09 +00:00
only:
- tags
2017-03-12 20:13:09 +00:00
tags:
- docker
- notpriv
# ====================
# metadata stage
# ====================
codequality:
stage: metadata
allow_failure: true
script:
2019-06-04 11:55:56 +00:00
- npmci command npm install -g tslint typescript
- npmci npm install
- npmci command tslint -c tslint.json ./ts/**/*.ts
tags:
- docker
- priv
2017-03-12 20:13:09 +00:00
trigger:
stage: metadata
2017-03-12 20:13:09 +00:00
script:
- npmci trigger
2017-03-12 20:13:09 +00:00
only:
- tags
2017-03-12 20:13:09 +00:00
tags:
- docker
- notpriv
2017-03-12 20:13:09 +00:00
pages:
image: hosttoday/ht-docker-node:npmci
stage: metadata
2017-03-12 20:13:09 +00:00
script:
2019-05-23 13:52:30 +00:00
- npmci command npm install -g @gitzone/tsdoc
2019-04-16 06:26:16 +00:00
- npmci npm prepare
- npmci npm install
2019-05-23 13:52:30 +00:00
- npmci command tsdoc
2017-03-12 20:13:09 +00:00
tags:
- docker
- notpriv
2017-03-12 20:13:09 +00:00
only:
- tags
artifacts:
expire_in: 1 week
paths:
- public
2019-04-16 06:26:16 +00:00
allow_failure: true