Commit 379a984b by zhengtianbao

Add gitlab ci yaml

parent bbaa4715
Pipeline #1 failed with stage
in 19 seconds
stages:
- deploy
docker-deploy:
stage: deploy
script:
- docker build -t testweb .
# 删除已经在运行的容器
- if [ $(docker ps -aq --filter name=testweb ) ]; then docker rm -f testweb; fi
# 通过镜像启动容器,并把本机8000端口映射到容器8000端口
- docker run -d -p 5000:5000 --name testweb testweb
tags:
# 执行Job的服务器
- test
only:
# 只有在master分支才会执行
- master
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