.gitlab-ci.yml

stages:
- build
- test
- deploy
variables:
before_script:
- export ROOT_PATH=$(pwd)
- echo 'root path:' $ROOT_PATH
#- mkdir $PROJECT_REPO_NAME
#- cd $PROJECT_REPO_NAME
#- <some git manipulation here>
- echo 'date:' $DATE
#cache:
# paths:
# - .m2/repository
test_stage:
stage: test
script:
- echo "test starts..."
#- <test related command here>
artifacts:
paths:
- index.html
when: always
allow_failure: false
tags:
- we
build_stage:
stage: build
script:
- echo "build starts..."
- pwd
- cp -rf $(pwd) /usr/local/we
- cd /usr/local/we/we/user
- node -v
- npm config set registry https://registry.yarnpkg.com
- yarn install
- yarn run build
- echo "user build ends..."
- cd /usr/local/we/we/admin
- node -v
- npm config set registry https://registry.yarnpkg.com
- yarn install
- yarn run build
- echo "admin build ends..."
when: manual
allow_failure: false
tags:
- we
only:
- master
deploy:
stage: deploy
script:
- echo "deploy starts..."
#- <deploy related command here>
allow_failure: false
tags:
- we
only:
- master


作者:ChenLuLouis
出处:http://www.cnblogs.com/chenlulouis/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
该文章也同时发布在我的独立博客中-chenlulouisBlog

原文地址:https://www.cnblogs.com/chenlulouis/p/15515774.html