108 lines
2.0 KiB
YAML
108 lines
2.0 KiB
YAML
# gitzone ci_docker
|
|
image: code.foss.global/hosttoday/ht-docker-node:npmci
|
|
|
|
cache:
|
|
paths:
|
|
- .npmci-cache/
|
|
key: '$CI_BUILD_STAGE'
|
|
|
|
before_script:
|
|
- pnpm install -g pnpm
|
|
- pnpm install -g @ship.zone/npmci
|
|
- npmci npm prepare
|
|
|
|
stages:
|
|
- security
|
|
- test
|
|
- release
|
|
- metadata
|
|
- pages
|
|
|
|
# ====================
|
|
# security stage
|
|
# ====================
|
|
auditProductionDependencies:
|
|
image: code.foss.global/hosttoday/ht-docker-node:npmci
|
|
stage: security
|
|
script:
|
|
- npmci command npm config set registry https://registry.npmjs.org
|
|
- npmci command pnpm audit --audit-level=high --prod
|
|
tags:
|
|
- private
|
|
- docker
|
|
allow_failure: true
|
|
|
|
auditDevDependencies:
|
|
image: code.foss.global/hosttoday/ht-docker-node:npmci
|
|
stage: security
|
|
script:
|
|
- npmci command npm config set registry https://registry.npmjs.org
|
|
- npmci command pnpm audit --audit-level=high --dev
|
|
tags:
|
|
- private
|
|
- docker
|
|
allow_failure: true
|
|
|
|
# ====================
|
|
# test stage
|
|
# ====================
|
|
testStable:
|
|
stage: test
|
|
script:
|
|
- npmci npm prepare
|
|
- npmci node install stable
|
|
- npmci npm install
|
|
- npmci npm test
|
|
coverage: /\d+.?\d+?\%\s*coverage/
|
|
tags:
|
|
- private
|
|
- docker
|
|
|
|
testBuild:
|
|
stage: test
|
|
script:
|
|
- npmci npm prepare
|
|
- npmci node install stable
|
|
- npmci npm install
|
|
- npmci command npm run build
|
|
coverage: /\d+.?\d+?\%\s*coverage/
|
|
tags:
|
|
- private
|
|
- docker
|
|
- notprivileged
|
|
|
|
# ====================
|
|
# release stage
|
|
# ====================
|
|
|
|
release:
|
|
image: code.foss.global/hosttoday/ht-docker-dbase:npmci
|
|
services:
|
|
- docker:stable-dind
|
|
stage: release
|
|
script:
|
|
- npmci docker login
|
|
- npmci docker build
|
|
- npmci docker test
|
|
- npmci docker push registry.gitlab.com
|
|
only:
|
|
- tags
|
|
tags:
|
|
- private
|
|
- docker
|
|
- priv
|
|
|
|
# ====================
|
|
# metadata stage
|
|
# ====================
|
|
|
|
trigger:
|
|
stage: metadata
|
|
script:
|
|
- npmci trigger
|
|
only:
|
|
- tags
|
|
tags:
|
|
- private
|
|
- docker
|