38 lines
530 B
YAML
38 lines
530 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 imgzip
|
|
- docker rm imgzip
|
|
allow_failure: true
|
|
|
|
deploy:
|
|
stage: deploy
|
|
tags:
|
|
- dockerbase
|
|
only:
|
|
- master
|
|
script:
|
|
- ls -a
|
|
- docker run -d --name imgzip -p 5004:80 lacus/imgzip
|
|
cache:
|
|
policy: pull |