Repository navigation
Expand file tree
/
Copy path.drone.yml
More file actions
70 lines (63 loc) · 1.67 KB
/
Copy path.drone.yml
File metadata and controls
70 lines (63 loc) · 1.67 KB
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/go-training/training
clone:
git:
image: plugins/git:1
depth: 50
tags: true
pipeline:
build:
image: golang:1.11
pull: true
environment:
TAGS: sqlite
GO111MODULE: "on"
commands:
- cd example23-deploy-go-application-with-up && GOOS=linux GOARCH=amd64 go build -o server *.go
up:
image: appleboy/drone-apex-up
pull: true
secrets: [aws_secret_access_key, aws_access_key_id]
stage:
- staging
directory: ./example23-deploy-go-application-with-up
when:
event: push
branch: master
up:
image: appleboy/drone-apex-up
pull: true
secrets: [aws_secret_access_key, aws_access_key_id]
stage:
- production
directory: ./example23-deploy-go-application-with-up
when:
event: tag
# prepare:
# image: golang:1.10
# group: build
# commands:
# - cd example19-deploy-with-kubernetes && make prepare
# build_linux_amd64:
# image: golang:1.10
# group: build
# environment:
# - GOOS=linux
# - GOARCH=amd64
# - CGO_ENABLED=0
# commands:
# - cd example19-deploy-with-kubernetes && make build
# docker_golang:
# image: plugins/docker:17.12
# secrets: [ docker_username, docker_password ]
# repo: appleboy/golang-http
# dockerfile: example19-deploy-with-kubernetes/Dockerfile
# default_tags: true
# when:
# event: [ push, tag ]
# deploy:
# image: sh4d1/drone-kubernetes
# kubernetes_template: example19-deploy-with-kubernetes/deployment.yml
# kubernetes_namespace: default
# secrets: [ kubernetes_server, kubernetes_cert, kubernetes_token ]