forked from gomods/athens
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.drone.yml
113 lines (104 loc) · 2.2 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
---
kind: pipeline
name: default
steps:
- name: build
image: golang:1.12
commands:
# wait for services to be ready.
- sleep 3
# build
- go build -mod=vendor cmd/proxy/*.go
# test
- ./scripts/check_gofmt.sh
- go vet -mod=vendor ./...
- go test -mod=vendor -v ./...
# end to end test
- ./main & # run the just-built athens server
- sleep 3 # wait for it to spin up
- mkdir -p ~/happy
- mkdir -p ~/emptygopath # ensure the gopath has no modules cached.
- cd ~/happy
- git clone https://github.com/athens-artifacts/happy-path.git
- cd happy-path
- GOPATH=~/emptygopath GOPROXY=http://localhost:3000 go build
environment:
GO111MODULE: on
ATHENS_MONGO_STORAGE_URL: mongodb://mongo:27017
ATHENS_MINIO_ENDPOINT: minio:9000
REDIS_TEST_ENDPOINT: redis:6379
GCS_SERVICE_ACCOUNT:
from_secret: GCS_SERVICE_ACCOUNT
when:
branch:
- master
event:
- push
- pull_request
- name: docker-latest
image: plugins/docker
settings:
username:
from_secret: DOCKER_USER
password:
from_secret: DOCKER_PASSWORD
repo: gomods/athens
tags:
- canary
dockerfile: cmd/proxy/Dockerfile
when:
branch:
- master
event:
- push
- name: docker-release
image: plugins/docker
settings:
username:
from_secret: DOCKER_USER
password:
from_secret: DOCKER_PASSWORD
repo: gomods/athens
tags:
- ${DRONE_TAG}
- latest
dockerfile: cmd/proxy/Dockerfile
when:
event:
- tag
- name: publish-helm
image: gomods/drone-helm
settings:
charts_repo: https://athens.blob.core.windows.net
environment:
AZURE_STORAGE_CONNECTION_STRING:
from_secret: AZURE_STORAGE_CONNECTION_STRING
when:
branch:
- master
event:
- push
# Here we can add any backend storage that can be tested.
services:
- name: mongo
image: mongo
ports:
- 27017
- name: minio
image: minio/minio:latest
command:
- server
- /data
ports:
- 9000
environment:
MINIO_ACCESS_KEY: minio
MINIO_SECRET_KEY: minio123
- name: redis
image: redis
ports:
- 6379
---
kind: signature
hmac: f15b6f458a1bd97950dfce43d1726958777ed22c2e3c0f1806af0e497bbbb23e
...