1 Star 0 Fork 8

wmltest / odf-editor-ui

forked from Sophi / odf-editor-ui 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
.gitlab-ci.yml 1.09 KB
一键复制 编辑 原始数据 按行查看 历史
Sophi 提交于 2020-09-27 10:03 . feat(v1.0.2):2.0版本
# 因为我们Runner执行器设置为docker, 所以这里需要指定docker的版本
image: docker:stable
# 定义三个阶段
stages:
- compile
- build
- deploy
variables:
IMAGE_NAME: "odf-editor-sys-ui"
VERSION: "1.0.0"
CONTAINER_NAME: "odf-editor-sys-ui"
compile:
image: docker.io/node
stage: compile
script:
- npm install -g cnpm --registry=https://registry.npm.taobao.org
- cnpm install
- npm run build
only:
- master
tags:
- my-tag
artifacts:
expire_in: 5 min
paths:
- dist/**
#第二阶段, 打包docker 镜像
build:
image: docker:stable
stage: build
only:
- master
tags:
- my-tag
script:
- docker build -t $IMAGE_NAME:$VERSION .
#第三阶段,发布服务
deploy:
image: docker:stable
stage: deploy
tags:
- my-tag
only:
- master
script:
- docker stop $CONTAINER_NAME ||true
- docker rm $CONTAINER_NAME || true
- docker run -d -p 8080:80 --name $CONTAINER_NAME $IMAGE_NAME:$VERSION
NodeJS
1
https://gitee.com/wuml/odf-editor-ui.git
git@gitee.com:wuml/odf-editor-ui.git
wuml
odf-editor-ui
odf-editor-ui
master

搜索帮助