Commit e1c36ba0 authored by lipengcheng 's avatar lipengcheng

ci: x

parent f3cf9409
stages: stages:
- stage-a - install_deps
- stage-b - build_prod
- stage-c - deploy_prod
cache:
# key: ${CI_BUILD_REF_NAME}
paths:
- node_modules/
- dist
job-a1: # 安装构建依赖
stage: stage-a install_deps_job:
stage: install_deps
# only:
# - master
script: script:
- echo '安装构建依赖阶段===>1' - echo '安装构建依赖阶段'
- npm -v - pwd
- yarn --version - yarn
tags:
- tag-project2
job-a2:
stage: stage-a
script:
- echo '安装构建依赖阶段===>2'
tags:
- tag-project2
job-a3:
stage: stage-a
script:
- echo '安装构建依赖阶段===>3'
tags: tags:
- tag-project2 - tag-project2
job-b: # 打包文件
stage: stage-b build_prod_job:
stage: build_prod
# only:
# - master
script: script:
- echo '打包新文件阶段' - echo '打包新文件阶段'
- pwd
- ls -a
- rm -rf ./dist
- yarn passports
- ls -a
tags: tags:
- tag-project2 - tag-project2
job-c: # 登录项目部署服务器,移除旧版本项目文件,最后将打包好的文件拷贝过去
stage: stage-c deploy_prod_job:
stage: deploy_prod
only:
- master
script: script:
- echo '登录项目部署服务器,移除旧版本项目文件,最后将打包好的文件拷贝过去' - echo '登录项目部署服务器,移除旧版本项目文件,最后将打包好的文件拷贝过去'
tags: tags:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment