.gitlab-ci.yml
Posted 一吃三大碗
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了.gitlab-ci.yml相关的知识,希望对你有一定的参考价值。
cache: &global_cache
key: develop
paths:
- node_modules/
stages:
- init_env
- build
- deploy
init_env:
stage: init_env
script:
- npm install
allow_failure: false
only:
refs:
- develop
- crm-debug
build:
stage: build
script:
- npm run build
artifacts:
paths:
- dist/
expire_in: 1 week
allow_failure: false
only:
refs:
- develop
build-debug:
stage: build
script:
- npm run build:no-auth
artifacts:
paths:
- dist/
expire_in: 1 week
allow_failure: false
only:
refs:
- crm-debug
deploy:
stage: deploy
script:
- npm run deploy
- sudo scp dist/index.html www@168.192.1.1:/data/web/
allow_failure: false
only:
refs:
- bussess
deploy-test:
stage: deploy
script:
- npm run deploy:test
- sudo scp dist/index.html www@168.192.1.1:/data/web/
allow_failure: false
only:
refs:
- test-branch
deploy:
stage: deploy
script:
- npm run deploy
- sudo scp dist/index.html www@168.192.1.1:/data/web/
allow_failure: false
only:
refs:
- develop
deploy-debug:
stage: deploy
script:
- npm run deploy:no-auth
- sudo cp dist/index.html /home/biv-apps/crm-debug-bi-web/
allow_failure: false
only:
refs:
- crm-debug
以上是关于.gitlab-ci.yml的主要内容,如果未能解决你的问题,请参考以下文章
为啥我的 gitlab-ci.yml 在 npm run test 上一直崩溃,而它在代码编辑器中工作?