假如有 开发 测试 预发 生产1 生产2服务器
.gitlab-ci.yml
stages:
- deploy
- test
- release
- master
构建开发环境:
stage: deploy
script:
- /data-ci/eatjoys-front.sh
only:
- develop
tags:
- my-erp
构建测试环境:
stage: test
script:
- /data-ci/eatjoys-front.sh
only:
- test
tags:
- my-erp
构建预发环境:
stage: release
script:
- /data-ci/eatjoys-front.sh
only:
- release
tags:
- my-erp
构建生产环境:
stage: master
script:
- /data-ci/eatjoys-front.sh
only:
- master
tags:
- my-erp
[root@sannian data-ci]# vim eatjoys-front.sh