Skip to content

Commit 07ca0e0

Browse files
lukmajercak-redditGitHub Enterprise
authored andcommitted
Deploy to spinnaker from Drone (prometheus-community#2)
* Deploy to spinnaker from Drone
1 parent f4c44e2 commit 07ca0e0

File tree

2 files changed

+93
-2
lines changed

2 files changed

+93
-2
lines changed

.drone.yml

Lines changed: 92 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,45 @@
1+
---
2+
# This file is used by the Drone CI Server and Agents to determine what
3+
# should happen (if anything) in response to git pushes and pull requests.
4+
# More info: https://reddit.atlassian.net/wiki/spaces/IO/pages/59113516/Drone+CI
5+
kind: pipeline
6+
type: docker
7+
name: Lint
8+
9+
steps:
10+
# https://pages.github.snooguts.net/reddit/infrared/guide/spinnaker.html
11+
- name: Lint Spinnaker Pipelines
12+
image: artifactory.build.ue1.snooguts.net/reddit-docker-prod/drone-plugin-infrared-pipeline:0.1
13+
pull: always
14+
settings:
15+
lint: true
16+
pipelines:
17+
- infrared/pipeline.star
18+
19+
# https://pages.github.snooguts.net/reddit/infrared/guide/k8s.html
20+
- name: Lint Kubernetes Manifests
21+
image: artifactory.build.ue1.snooguts.net/reddit-docker-prod/drone-plugin-infrared-deploy:0.1
22+
pull: always
23+
settings:
24+
lint: true
25+
starlark:
26+
- infrared/manifest.star
27+
28+
# https://github.snooguts.net/reddit/terraform-plugin-reddit-service/
29+
- name: Lint Reddit Service Manifests
30+
image: artifactory.build.ue1.snooguts.net/reddit-docker-prod/drone-plugin-terraform-reddit-service:0.6
31+
pull: always
32+
settings:
33+
directory: infrared/
34+
lint: true
35+
wavefront_address: longboard.wavefront.com
36+
wavefront_token:
37+
from_secret: wavefront_token
38+
39+
---
140
kind: pipeline
241
type: docker
3-
name: Publish Dev
42+
name: Publish
443

544
clone:
645
disable: true
@@ -57,6 +96,44 @@ steps:
5796
- failure
5897
- success
5998

99+
---
100+
kind: pipeline
101+
type: docker
102+
name: Deploy
103+
104+
depends_on:
105+
- Publish
106+
107+
trigger:
108+
event:
109+
- push
110+
branch:
111+
- master_reddit
112+
113+
steps:
114+
- name: Update Spinnaker Pipelines
115+
image: artifactory.build.ue1.snooguts.net/reddit-docker-prod/drone-plugin-infrared-pipeline:0.1
116+
pull: always
117+
settings:
118+
pipelines:
119+
- infrared/pipeline.star
120+
environment:
121+
GATE_PASSWORD:
122+
from_secret: gate_password
123+
124+
- name: Deploy to Production
125+
image: artifactory.build.ue1.snooguts.net/reddit-docker-prod/drone-plugin-infrared-deploy:0.1
126+
pull: always
127+
settings:
128+
namespace: postgres_exporter
129+
starlark:
130+
- infrared/manifest.star
131+
webhook: postgres_exporter
132+
yaml:
133+
- infrared/alert-rules.yaml
134+
depends_on:
135+
- Update Spinnaker Pipelines
136+
60137
---
61138
kind: secret
62139
name: artifactory_bearer
@@ -83,3 +160,17 @@ name: slack_webhook
83160

84161
get:
85162
path: secret/drone/common/slack_webhook
163+
164+
---
165+
kind: secret
166+
name: gate_password
167+
168+
get:
169+
path: secret/drone/common/gate_password
170+
171+
---
172+
kind: secret
173+
name: wavefront_token
174+
175+
get:
176+
path: secret/drone/build/wavefront-token

infrared/pipeline.star

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ prod = spin.pipeline(
1616
name = "Deploy",
1717
application = fullname,
1818
namespace = fullname,
19-
webhook = shortname,
19+
webhook = fullname,
2020
autodeploy = False,
2121
slack_channels = [salon],
2222
)

0 commit comments

Comments
 (0)