|
| 1 | +--- |
| 2 | +# Code imported by infragen. DO NOT EDIT. |
| 3 | +# This is a legacy snippet imported from 'infrared/legacydrone.yaml'. To change it, update that file and then run 'make generate'. |
1 | 4 | # This file is used by the Drone CI Server and Agents to determine what
|
2 | 5 | # should happen (if anything) in response to git pushes and pull requests.
|
3 | 6 | # More info: https://reddit.atlassian.net/wiki/spaces/IO/pages/59113516/Drone+CI
|
|
29 | 32 | wavefront_token:
|
30 | 33 | from_secret: wavefront_token
|
31 | 34 | ---
|
| 35 | +# Code imported by infragen. DO NOT EDIT. |
| 36 | +# This is a legacy snippet imported from 'infrared/legacydrone.yaml'. To change it, update that file and then run 'make generate'. |
32 | 37 | kind: pipeline
|
33 | 38 | type: docker
|
34 | 39 | name: Publish
|
@@ -83,105 +88,238 @@ steps:
|
83 | 88 | - failure
|
84 | 89 | - success
|
85 | 90 | ---
|
| 91 | +# Code imported by infragen. DO NOT EDIT. |
| 92 | +# This is a legacy snippet imported from 'infrared/legacydrone.yaml'. To change it, update that file and then run 'make generate'. |
| 93 | +kind: secret |
| 94 | +name: artifactory_bearer |
| 95 | +get: |
| 96 | + path: secret/artifactory/drone/token |
| 97 | +--- |
| 98 | +# Code imported by infragen. DO NOT EDIT. |
| 99 | +# This is a legacy snippet imported from 'infrared/legacydrone.yaml'. To change it, update that file and then run 'make generate'. |
| 100 | +kind: secret |
| 101 | +name: artifactory_password |
| 102 | +get: |
| 103 | + path: secret/artifactory/drone/password |
| 104 | +--- |
| 105 | +# Code imported by infragen. DO NOT EDIT. |
| 106 | +# This is a legacy snippet imported from 'infrared/legacydrone.yaml'. To change it, update that file and then run 'make generate'. |
| 107 | +kind: secret |
| 108 | +name: slack_token |
| 109 | +get: |
| 110 | + path: secret/drone/common/slack_token |
| 111 | +--- |
| 112 | +# Code imported by infragen. DO NOT EDIT. |
| 113 | +# This is a legacy snippet imported from 'infrared/legacydrone.yaml'. To change it, update that file and then run 'make generate'. |
| 114 | +kind: secret |
| 115 | +name: slack_webhook |
| 116 | +get: |
| 117 | + path: secret/drone/common/slack_webhook |
| 118 | +--- |
| 119 | +# Code imported by infragen. DO NOT EDIT. |
| 120 | +# This is a legacy snippet imported from 'infrared/legacydrone.yaml'. To change it, update that file and then run 'make generate'. |
| 121 | +kind: secret |
| 122 | +name: gate_password |
| 123 | +get: |
| 124 | + path: secret/drone/common/gate_password |
| 125 | +--- |
| 126 | +# Code imported by infragen. DO NOT EDIT. |
| 127 | +# This is a legacy snippet imported from 'infrared/legacydrone.yaml'. To change it, update that file and then run 'make generate'. |
| 128 | +kind: secret |
| 129 | +name: wavefront_token |
| 130 | +get: |
| 131 | + path: secret/drone/build/wavefront-token |
| 132 | +--- |
| 133 | +# Code imported by infragen. DO NOT EDIT. |
| 134 | +# This is a legacy snippet imported from 'infrared/legacydrone.yaml'. To change it, update that file and then run 'make generate'. |
| 135 | +# Made by spinnaker-to-drone-pipeline migration tool |
| 136 | +kind: secret |
| 137 | +name: core-prod-usva-aws-1-postgres-exporter |
| 138 | +get: |
| 139 | + path: secret/achilles/drone/core-prod-usva-aws-1/postgres-exporter |
| 140 | +--- |
| 141 | +# Code imported by infragen. DO NOT EDIT. |
| 142 | +# This is a legacy snippet imported from 'infrared/legacydrone.yaml'. To change it, update that file and then run 'make generate'. |
| 143 | +# Made by spinnaker-to-drone-pipeline migration tool |
| 144 | +kind: secret |
| 145 | +name: drone_token |
| 146 | +get: |
| 147 | + path: secret/drone/build/drone_token |
| 148 | +--- |
| 149 | +# Code generated by infragen. DO NOT EDIT. |
| 150 | +# Originated from: |
| 151 | +# RenderFor @ github.snooguts.net/reddit-go/infrared-generator/domains/infrared/infraenv.(*Environment)/environment.go:187 |
| 152 | +# ApplyTo @ github.snooguts.net/reddit-go/infrared-domain-release-platform/releaseplatform/release.(*DroneDeployer) |
| 153 | +# build @ github.snooguts.net/reddit-go/infrared-domain-release-platform/releaseplatform/release.(*DroneDeployer) |
| 154 | +# addNotifyPipeline @ github.snooguts.net/reddit-go/infrared-domain-release-platform/releaseplatform/release.(*DroneDeployer) |
86 | 155 | kind: pipeline
|
87 | 156 | type: docker
|
88 |
| -name: Deploy |
| 157 | +name: notify deploy postgres-exporter to prod |
89 | 158 | depends_on:
|
90 | 159 | - Publish
|
91 | 160 | trigger:
|
92 |
| - event: |
93 |
| - - push |
94 | 161 | branch:
|
95 | 162 | - master_reddit
|
| 163 | + event: |
| 164 | + - push |
96 | 165 | steps:
|
97 |
| - # Made by spinnaker-to-drone-pipeline migration tool |
98 |
| - - name: Deploy to Production |
99 |
| - image: artifactory.build.ue1.snooguts.net/reddit-docker-prod/drone-plugin-deploy-notifier:latest |
| 166 | + - name: 'Notify #infra-storage-salon' |
| 167 | + image: artifactory.build.ue1.snooguts.net/reddit-docker-prod/drone-plugin-deploy-notifier:2.15.2 |
100 | 168 | pull: always
|
| 169 | + environment: |
| 170 | + PLUGIN_SLACK_TOKEN: |
| 171 | + from_secret: slack-token_e9b25e |
101 | 172 | depends_on:
|
102 | 173 | - clone
|
103 |
| - when: |
104 |
| - branch: |
105 |
| - - master_reddit |
106 | 174 | settings:
|
107 |
| - notify_targets: postgres-exporter |
| 175 | + image_tag: ${DRONE_COMMIT_SHA} |
| 176 | + notify_targets: |
| 177 | + - prod |
108 | 178 | slack_channel: infra-storage-salon
|
109 |
| - slack_token: |
110 |
| - from_secret: slack_token |
111 | 179 | ---
|
112 |
| -# Made by spinnaker-to-drone-pipeline migration tool |
| 180 | +# Code generated by infragen. DO NOT EDIT. |
| 181 | +# Originated from: |
| 182 | +# New @ github.snooguts.net/reddit-go/infrared-generator/domains/infrared/infraenv/environment.go:125 |
| 183 | +# RenderFor @ github.snooguts.net/reddit-go/infrared-generator/domains/infrared/infraenv.(*Environment) |
| 184 | +# ApplyTo @ github.snooguts.net/reddit-go/infrared-domain-release-platform/releaseplatform/release.(*DroneDeployer) |
| 185 | +# build @ github.snooguts.net/reddit-go/infrared-domain-release-platform/releaseplatform/release.(*DroneDeployer) |
113 | 186 | kind: pipeline
|
114 | 187 | type: docker
|
115 |
| -name: 'Pipeline: Deploy' |
| 188 | +name: deploy postgres-exporter to prod |
116 | 189 | node:
|
117 | 190 | deployment-pool: "true"
|
118 | 191 | trigger:
|
119 | 192 | event:
|
120 | 193 | - promote
|
121 | 194 | target:
|
122 |
| - - postgres-exporter |
| 195 | + - prod |
123 | 196 | concurrency:
|
124 | 197 | limit: 1
|
125 | 198 | steps:
|
126 |
| - - name: Deploy Manifest - prod-3-ue1d |
127 |
| - image: artifactory.build.ue1.snooguts.net/reddit-docker-prod/drone-plugin-reddit-deploy:2 |
| 199 | + - name: deploy to prod-3-d |
| 200 | + image: artifactory.build.ue1.snooguts.net/reddit-docker-prod/drone-plugin-reddit-deploy:2.15.10 |
128 | 201 | pull: always
|
| 202 | + environment: |
| 203 | + PLUGIN_SLACK_TOKEN: |
| 204 | + from_secret: common slack token_f38f59 |
| 205 | + SERVICE_ACCOUNT_TOKEN: |
| 206 | + from_secret: service account prod-3-d_postgres-exporter_f38f59 |
129 | 207 | depends_on:
|
130 | 208 | - clone
|
131 | 209 | settings:
|
132 | 210 | cluster: prod-3-d
|
133 |
| - env: production |
134 |
| - image_tag: ${IMAGE_TAG} |
135 |
| - kustomize: infrared/deploy-to-production |
| 211 | + kustomize: .reddit/postgres-exporter/prod/configs |
| 212 | + kustomize_images: |
| 213 | + - artifactory.build.ue1.snooguts.net/reddit-docker-prod/postgres_exporter |
136 | 214 | namespace: postgres-exporter
|
137 |
| - service_account_token: |
138 |
| - from_secret: core-prod-usva-aws-1-postgres-exporter |
139 | 215 | slack_channel: infra-storage-salon
|
140 |
| - slack_token: |
141 |
| - from_secret: slack_token |
142 |
| - starlark: infrared/manifest.star |
143 |
| - timeout: 600 |
144 |
| - token: |
145 |
| - from_secret: drone_token |
146 |
| ---- |
147 |
| -kind: secret |
148 |
| -name: artifactory_bearer |
149 |
| -get: |
150 |
| - path: secret/artifactory/drone/token |
| 216 | + timeout: 10m0s |
151 | 217 | ---
|
152 |
| -kind: secret |
153 |
| -name: artifactory_password |
154 |
| -get: |
155 |
| - path: secret/artifactory/drone/password |
| 218 | +# Code generated by infragen. DO NOT EDIT. |
| 219 | +# Originated from: |
| 220 | +# Generate @ github.snooguts.net/reddit/postgres_exporter/infrared/manifest.go:35 |
| 221 | +# NewConfig @ github.snooguts.net/reddit-go/infrared-domain-renovate/renovate |
| 222 | +# NewValidationPipeline @ github.snooguts.net/reddit-go/infrared-domain-renovate/renovate |
| 223 | +kind: pipeline |
| 224 | +type: docker |
| 225 | +name: 'Renovate: Validate Configuration' |
| 226 | +trigger: |
| 227 | + event: |
| 228 | + - pull_request |
| 229 | +steps: |
| 230 | + - name: Validate config files |
| 231 | + image: artifactory.build.ue1.snooguts.net/dockerhub-remote/renovate/renovate:37 |
| 232 | + pull: always |
| 233 | + depends_on: |
| 234 | + - clone |
| 235 | + commands: |
| 236 | + - renovate-config-validator ".github/renovate.json" |
156 | 237 | ---
|
157 |
| -kind: secret |
158 |
| -name: slack_token |
159 |
| -get: |
160 |
| - path: secret/drone/common/slack_token |
| 238 | +# Code generated by infragen. DO NOT EDIT. |
| 239 | +# Originated from: |
| 240 | +# Generate @ github.snooguts.net/reddit/postgres_exporter/infrared/manifest.go:41 |
| 241 | +# NewCodegenCheckPipeline @ github.snooguts.net/reddit-go/infrared-generator/domains/infrared/infraredci |
| 242 | +kind: pipeline |
| 243 | +type: docker |
| 244 | +name: Infrared v2 |
| 245 | +trigger: |
| 246 | + event: |
| 247 | + - pull_request |
| 248 | +steps: |
| 249 | + - name: Check Infrared Codegen |
| 250 | + image: artifactory.build.ue1.snooguts.net/reddit-docker-prod/go-base:1.23.5 |
| 251 | + pull: always |
| 252 | + environment: |
| 253 | + GOTOOLCHAIN: auto |
| 254 | + depends_on: |
| 255 | + - clone |
| 256 | + commands: |
| 257 | + - "" |
| 258 | + - '#************************************************************************************************#' |
| 259 | + - '# If you see a failure below, run ''make generate'' to rebuild your generated Infrared v2 configs: #' |
| 260 | + - '#************************************************************************************************#' |
| 261 | + - "" |
| 262 | + - |- |
| 263 | + if test -f "infrared/go.mod"; then |
| 264 | + go run -C infrared -mod=readonly github.snooguts.net/reddit-go/infrared-generator/cmd/infragen --dir .. |
| 265 | + elif test -f "internal/infrared/go.mod"; then |
| 266 | + go run -C internal/infrared -mod=readonly github.snooguts.net/reddit-go/infrared-generator/cmd/infragen --dir ../.. |
| 267 | + else |
| 268 | + go run -mod=readonly github.snooguts.net/reddit-go/infrared-generator/cmd/infragen |
| 269 | + fi |
| 270 | + - git status; git diff |
| 271 | + - test -z "$(git status --porcelain)" || echo "!!! Run 'make generate' to rebuild your generated Infrared v2 configs !!!" |
| 272 | + - test -z "$(git status --porcelain)" |
161 | 273 | ---
|
162 |
| -kind: secret |
163 |
| -name: slack_webhook |
164 |
| -get: |
165 |
| - path: secret/drone/common/slack_webhook |
| 274 | +# Code generated by infragen. DO NOT EDIT. |
| 275 | +# Originated from: |
| 276 | +# Generate @ github.snooguts.net/reddit/postgres_exporter/infrared/manifest.go:42 |
| 277 | +# NewDeployPipeline @ github.snooguts.net/reddit-go/infrared-domain-achilles/achilles/achillesci |
| 278 | +kind: pipeline |
| 279 | +type: docker |
| 280 | +name: Achilles Deploy |
| 281 | +trigger: |
| 282 | + branch: |
| 283 | + - master_reddit |
| 284 | + event: |
| 285 | + - push |
| 286 | +steps: |
| 287 | + - name: 'Achilles: Sync Taxonomy Resources' |
| 288 | + image: artifactory.build.ue1.snooguts.net/reddit-docker-prod/drone-plugin-achilles-deploy:v0.1.3 |
| 289 | + pull: always |
| 290 | + environment: |
| 291 | + SECRET_ORG_SERVICE_ACCOUNT_TOKEN: |
| 292 | + from_secret: org-deploy-token_6c9323 |
| 293 | + depends_on: |
| 294 | + - clone |
| 295 | + settings: |
| 296 | + cluster: orch-1 |
| 297 | + scope: repo |
166 | 298 | ---
|
| 299 | +# Code generated by infragen. DO NOT EDIT. |
167 | 300 | kind: secret
|
168 |
| -name: gate_password |
| 301 | +name: slack-token_e9b25e |
169 | 302 | get:
|
170 |
| - path: secret/drone/common/gate_password |
| 303 | + path: secret/drone/common/slack_token |
| 304 | + name: value |
171 | 305 | ---
|
| 306 | +# Code generated by infragen. DO NOT EDIT. |
172 | 307 | kind: secret
|
173 |
| -name: wavefront_token |
| 308 | +name: common slack token_f38f59 |
174 | 309 | get:
|
175 |
| - path: secret/drone/build/wavefront-token |
| 310 | + path: secret/drone/common/slack_token |
| 311 | + name: value |
176 | 312 | ---
|
177 |
| -# Made by spinnaker-to-drone-pipeline migration tool |
| 313 | +# Code generated by infragen. DO NOT EDIT. |
178 | 314 | kind: secret
|
179 |
| -name: core-prod-usva-aws-1-postgres-exporter |
| 315 | +name: service account prod-3-d_postgres-exporter_f38f59 |
180 | 316 | get:
|
181 | 317 | path: secret/achilles/drone/core-prod-usva-aws-1/postgres-exporter
|
| 318 | + name: value |
182 | 319 | ---
|
183 |
| -# Made by spinnaker-to-drone-pipeline migration tool |
| 320 | +# Code generated by infragen. DO NOT EDIT. |
184 | 321 | kind: secret
|
185 |
| -name: drone_token |
| 322 | +name: org-deploy-token_6c9323 |
186 | 323 | get:
|
187 |
| - path: secret/drone/build/drone_token |
| 324 | + path: secret/drone/achilles-drone-plugin/org-deploy-token |
| 325 | + name: orch-1 |
0 commit comments