-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.drone.yml
48 lines (46 loc) · 1.41 KB
/
.drone.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
kind: pipeline
name: default
workspace:
base: /go
path: src/github.com/rushteam/micro-service
steps:
- name: build
image: golang:1.11-alpine
commands:
- go build -v -o ./dist/pay-srv -gcflags '-N -l' ./service/pay-srv/*.go
- go build -v -o ./dist/pay-api -gcflags '-N -l' ./service/pay-api/*.go
# - go build -v -o ./dist/pay-notify-web -gcflags '-N -l' ./service/pay-notify-web/*.go
when:
event:
- push
- tag
- name: docker_pay-srv
image: plugins/docker
settings:
auto_tag: true
username: #415235169
from_secret: hub_username
password: #maliang1224
from_secret: hub_password
# dockerfile: dockerfile.d/pay-srv/Dockerfile
dockerfile: service/pay-srv/Dockerfile
repo: hub.tencentyun.com/micro/pay-srv
registry: hub.tencentyun.com
- name: docker_pay-api
image: plugins/docker
settings:
auto_tag: true
username:
from_secret: hub_username
password:
from_secret: hub_password
dockerfile: service/pay-api/Dockerfile
repo: hub.tencentyun.com/micro/pay-api
registry: hub.tencentyun.com
# - name: docker_swarm
# image: docker:dind
# commands:
# # - cd /data/micro-service
# - docker pull hub.tencentyun.com/micro/pay-api
# - docker pull hub.tencentyun.com/micro/pay-srv
# - docker stack deploy -c docker-compose.yml micro