-
Notifications
You must be signed in to change notification settings - Fork 2
/
.drone.yml
94 lines (94 loc) · 2.25 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#---
#kind: pipeline
#type: docker
#name: default
#
#platform:
# os: linux
# arch: arm64
#
#steps:
## - name: linter
## image: golangci/golangci-lint:v1.42.1
## environment:
## GO111MODULE: on
## GOPROXY: https://goproxy.cn,direct
## GOPATH: /tmp/gopath
## volumes:
## - name: gopath
## path: /tmp/gopath
## commands:
## - cd src
## - go get
## - golangci-lint run --timeout=10m
##
# - name: test
# image: golang:1.16-alpine3.15
# environment:
# GO111MODULE: on
# GOPROXY: https://goproxy.cn,direct
# CGO_ENABLED: 1
# CONFIG: prod
# commands:
# - apk add build-base
# - cd src
# - go get
# - go build -o ../app
# - chmod +x ../app
##
## - name: build_prod
## image: plugins/docker
## when:
## event:
## - push
## settings:
## username:
## from_secret: docker_user
## password:
## from_secret: docker_pass
## dockerfile: ./Dockerfile
## repo: ${DRONE_REPO_OWNER}/${DRONE_REPO_NAME}
## tags:
## - ${DRONE_TAG}-${DRONE_COMMIT_SHA:0:8}
## - latest
##
### - name: scp_files
### image: appleboy/drone-scp
### when:
### event:
### - push
### settings:
### host:
### from_secret: tencent_host
### username:
### from_secret: tencent_username
### password:
### from_secret: tencent_secret
### port: 22
### target: /mnt/var/www/drone/${DRONE_REPO_OWNER}/${DRONE_REPO_NAME}
### source: ./
##
## - name: deploy_dev
## image: appleboy/drone-ssh
## when:
## event:
## - push
## settings:
## host:
## from_secret: tencent_host
## username:
## from_secret: tencent_username
## password:
## from_secret: tencent_secret
## port: 22
## script:
### - cd /mnt/var/www/drone/${DRONE_REPO_OWNER}/${DRONE_REPO_NAME}
### - docker pull ${DRONE_REPO_OWNER}/${DRONE_REPO_NAME}:${DRONE_TAG}-${DRONE_COMMIT_SHA:0:8}
## - docker stop bug-carrot
## - docker container rm bug-carrot
## - docker run -d --network host --name bug-carrot ${DRONE_REPO_OWNER}/${DRONE_REPO_NAME}:${DRONE_TAG}-${DRONE_COMMIT_SHA:0:8}
#
#volumes:
# - name: gopath
# host:
# path: /home/ubuntu/go