forked from sorenmat/k8s-rds
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
70 lines (63 loc) · 1.47 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
workspace:
base: /go
path: src/github.com/cloud104/kube-db
pipeline:
# test:
# image: golang:alpine
# group: build
# environment:
# - CGO_ENABLED=0
# - GOOS=linux
# - GOARCH=amd64
# - GO111MODULE=on
# commands:
# - go test ./...
build:
image: golang
group: build
environment:
- CGO_ENABLED=0
- GOOS=linux
- GOARCH=amd64
- GO111MODULE=on
commands:
- go build -a -o entrypoint cmd/*.go
publish-feature:
image: plugins/docker
group: deploy
repo: quay.io/cloud104/${DRONE_REPO_NAME}
secrets: [ docker_username, docker_password ]
environment:
- DOCKER_REGISTRY=quay.io
tags:
- "latest"
- ${DRONE_BRANCH/\//-}-${DRONE_BUILD_NUMBER}
when:
branch:
include: [ feature/*, hotfix/* ]
tag:
image: cloud104/drone-github-tag
group: build
secrets: [ plugin_github_token ]
when:
branch:
include: [ develop ]
publish:
image: plugins/docker
group: deploy
repo: quay.io/cloud104/${DRONE_REPO_NAME}
secrets: [ docker_username, docker_password ]
environment:
- DOCKER_REGISTRY=quay.io
auto_tag: true
when:
event: tag
chart:
image: cloud104/drone-chartmuseum
group: deploy
chart_path: hack/helm
secrets: [ plugin_repo_username, plugin_repo_password, plugin_repo_url ]
slack:
image: plugins/slack
username: ${DRONE_REPO_NAME}
secrets: [ plugin_webhook ]