1 Star 0 Fork 0

CheryInternational/dcs-sales-web-client

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
.gitlab-ci.yml 2.30 KB
一键复制 编辑 原始数据 按行查看 历史
sideny_cc 提交于 2020-09-28 13:58 . sales-web-init
image: node:10-alpine
variables:
DEFAULT_CACHE_KEY: "$CI_COMMIT_REF_SLUG"
cache:
key: "$DEFAULT_CACHE_KEY"
paths:
- node_modules/
stages:
- setup
- test
- build
- publish
- notify
setup:
stage: setup
script:
- npm config set always-auth true
- npm config set registry https://repo.sdtdev.net/repository/npm-public/
- npm config set //repo.sdtdev.net/repository/npm-public/:_authToken ${NPM_AUTH_TOKEN}
- "[ -f yarn.lock ] && sed -i 's$r.sdt-int.com$repo.sdtdev.net$g' yarn.lock"
- yarn --prefer-offline --no-progress --non-interactive --frozen-lockfile
lint:
stage: test
cache:
key: "$DEFAULT_CACHE_KEY"
paths:
- node_modules/
policy: pull
script:
- yarn run lint -- --quiet
intl:
stage: test
cache:
key: "$DEFAULT_CACHE_KEY"
paths:
- node_modules/
policy: pull
script:
- yarn run intl -- --test
.build: &build_template
stage: build
cache:
key: "$DEFAULT_CACHE_KEY"
paths:
- node_modules/
policy: pull
script:
- yarn run build
develop_build:
<<: *build_template
only:
- branches
except:
- master
artifacts:
expire_in: 1 day
paths:
- lib/
master_build:
<<: *build_template
only:
- master
- tags
artifacts:
expire_in: 1 month
paths:
- lib/
.yarn: &yarn_publish
stage: publish
cache: {}
before_script:
- npm config set registry https://repo.sdtdev.net/repository/npm-hosted/
- npm config set //repo.sdtdev.net/repository/npm-hosted/:_authToken ${NPM_AUTH_TOKEN}
- npm config set email $GITLAB_USER_EMAIL
develop_publish:
<<: *yarn_publish
only:
- develop
script:
- yarn publish --new-version $(node -pe "require('./package.json').version")-alpha.$CI_PIPELINE_ID --strict-semver --no-git-tag-version
master_publish:
<<: *yarn_publish
only:
- tags
script:
- "yarn publish --new-version ${CI_COMMIT_TAG#v} --strict-semver --no-git-tag-version"
web_main_pipeline:
stage: notify
only:
- develop
cache: {}
image: zerda/alpine-curl:3.6
dependencies:
- develop_publish
variables:
REF_NAME: develop
script:
- curl --silent --show-error --fail -X POST -d token=${WEB_MAIN_PIPELINE_TOKEN} -d ref=${REF_NAME} https://gitlab.sdtdev.net/api/v4/projects/${WEB_MAIN_PROJECT_ID}/trigger/pipeline
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/chery-international/dcs-sales-web-client.git
git@gitee.com:chery-international/dcs-sales-web-client.git
chery-international
dcs-sales-web-client
dcs-sales-web-client
master

搜索帮助