This repository has been archived by the owner on Jun 21, 2024. It is now read-only.
forked from oliver006/drone-cloud-run
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
112 lines (100 loc) · 2.4 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
kind: pipeline
name: default
workspace:
base: /go
path: src/github.com/oliver006/drone-cloud-run
steps:
- name: tests
image: "golang:1.15"
environment:
COVERALLS_TOKEN:
from_secret: coveralls-token
commands:
- 'echo " ! gofmt -d *.go 2>&1 | read " | bash'
- 'go vet ./...'
- "go build"
- "go test -v -covermode=atomic -cover -race -coverprofile=coverage.txt"
- "go get github.com/mattn/goveralls"
- "/go/bin/goveralls -v -coverprofile=coverage.txt -service=drone.io"
when:
event:
- push
- pull_request
- name: update-dummy-docker-tst-image
image: plugins/docker
settings:
username: _json_key
password:
from_secret: google_credentials
repo: gcr.io/phone-21zoo-com/drone-cloud-run-test
registry: gcr.io
tags: latest
dockerfile: tst/Dockerfile
when:
branch:
- master
event:
- push
- name: build-and-publish-new-drone-image-for-test
image: plugins/docker
settings:
repo: oliver006/drone-cloud-run
tags: test
debug: true
build_args:
- 'TAG=test'
- 'SHA1=${DRONE_COMMIT_SHA}'
username:
from_secret: docker_username
password:
from_secret: docker_password
when:
branch:
- master
event:
- push
- name: sleep-10s
image: alpine
commands:
- sleep 10
when:
branch:
- master
event:
- push
- name: deploy-using-new-test-drone-image
image: oliver006/drone-cloud-run:test
pull: always
settings:
action: deploy
service: test-drone-cloud-run-master
image: gcr.io/phone-21zoo-com/drone-cloud-run-test:latest
memory: 128Mi
region: us-central1
allow_unauthenticated: true
environment:
VAR_1: "var01"
VERSION: "${DRONE_COMMIT_SHA}"
token:
from_secret: google_credentials
when:
branch:
- master
event:
- push
- name: on-tag-build-and-publish-new-drone-image
image: plugins/docker
settings:
repo: oliver006/drone-cloud-run
tags: "latest,${DRONE_TAG}"
debug: true
build_args:
- 'TAG=${DRONE_TAG}'
- 'SHA1=${DRONE_COMMIT_SHA}'
username:
from_secret: docker_username
password:
from_secret: docker_password
when:
event:
- tag