img_zip/.gitlab-ci.yml
2021-01-06 22:55:14 +08:00

38 lines
552 B
YAML

stages:
- build
- clear
- deploy
build:
stage: build
image: docker:latest
services:
- name: docker:dind
tags:
- dockerbase
script:
- ls -a
- docker build -t lacus/imgzip .
clear:
stage: clear
tags:
- dockerbase
only:
- master
script:
- docker stop lacus/imgzip
- docker rm lacus/imgzip
allow_failure: true
deploy:
stage: deploy
tags:
- dockerbase
only:
- master
script:
- ls -a
- docker run -d --name imgzip -p 127.0.0.1:5004:80 lacus/imgzip
cache:
policy: pull