36
.drone.yml
Normal file
36
.drone.yml
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: build-goedge
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
- tag
|
||||||
|
|
||||||
|
steps:
|
||||||
|
# 第一步:編譯 EdgeAdmin
|
||||||
|
- name: build-admin
|
||||||
|
image: docker:dind
|
||||||
|
volumes:
|
||||||
|
- name: docker
|
||||||
|
path: /var/run/docker.sock
|
||||||
|
commands:
|
||||||
|
- docker build -f docker/Dockerfile -t localhost:5700/goedge-admin:${DRONE_COMMIT_SHA:0:7} .
|
||||||
|
- docker tag localhost:5700/goedge-admin:${DRONE_COMMIT_SHA:0:7} localhost:5700/goedge-admin:latest
|
||||||
|
|
||||||
|
# 第二步:推送到你的 Registry
|
||||||
|
- name: push-admin
|
||||||
|
image: docker:dind
|
||||||
|
volumes:
|
||||||
|
- name: docker
|
||||||
|
path: /var/run/docker.sock
|
||||||
|
commands:
|
||||||
|
- docker push localhost:5700/goedge-admin:${DRONE_COMMIT_SHA:0:7}
|
||||||
|
- docker push localhost:5700/goedge-admin:latest
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: docker
|
||||||
|
host:
|
||||||
|
path: /var/run/docker.sock
|
||||||
Reference in New Issue
Block a user