File konfigurasi Cloud Deploy atau file-file menentukan pipeline pengiriman, target untuk di-deploy, dan progresi target tersebut.
File konfigurasi pipeline pengiriman dapat menyertakan
definisi target, atau definisi tersebut dapat berada dalam file atau
file terpisah. Berdasarkan konvensi, file yang berisi konfigurasi pipeline pengiriman dan
konfigurasi target disebut clouddeploy.yaml, dan konfigurasi pipeline tanpa
target disebut delivery-pipeline.yaml. Namun, Anda dapat memberi nama file ini sesuai keinginan. Definisi resource lainnya, seperti
otomatisasi dan
kebijakan deployment, juga dapat berada dalam file yang sama dengan
pipeline pengiriman atau definisi target.
Apa yang harus diletakkan di mana
Cloud Deploy menggunakan dua file konfigurasi utama:
- Definisi pipeline pengiriman
- Definisi target
File ini dapat berupa file terpisah, atau pipeline dan target pengiriman dapat dikonfigurasi dalam file yang sama.
Struktur file konfigurasi pipeline pengiriman
Berikut adalah struktur konfigurasi pipeline pengiriman, termasuk properti untuk definisi target. Beberapa properti target tidak disertakan di sini. Lihat Definisi target untuk semua properti konfigurasi target.
# Delivery pipeline config
apiVersion: deploy.cloud.google.com/v1
kind: DeliveryPipeline
metadata:
name:
annotations:
labels:
description:
suspended:
serialPipeline:
stages:
- targetId:
profiles: []
# Deployment strategies
# One of:
# standard:
# canary:
# See the strategy section in this document for details.
strategy:
standard:
predeploy:
tasks: []
verify:
tasks: []
analysis:
postdeploy:
tasks: []
deployParameters:
- values:
matchTargetLabels:
- targetId:
profiles: []
strategy:
deployParameters:
---
# Target config
apiVersion: deploy.cloud.google.com/v1
kind: Target
metadata:
name:
annotations:
labels:
description:
multiTarget:
targetIds: []
deployParameters:
requireApproval:
#
# Runtimes
# one of the following runtimes:
gke:
cluster:
dnsEndpoint:
internalIp:
proxyUrl:
#
# or:
anthosCluster:
membership:
#
# or:
run:
location:
#
# or:
customTarget:
customTargetType:
#
# (End runtimes. See documentation in this article for more details.)
#
executionConfigs:
- usages:
- [RENDER | PREDEPLOY | DEPLOY | VERIFY | POSTDEPLOY | ANALYSIS]
workerPool:
serviceAccount:
artifactStorage