File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3838 - -c
3939 - |
4040 set -e
41- for env in crash; do
41+ for env in crash sandbox ; do
4242 config_file="release/clouddeploy/${env}-config.yaml"
4343 if [ -f "$config_file" ]; then
4444 echo "Extracting checks from $config_file..."
5252 ' "$config_file" > checks.tmp
5353
5454 # Insert the checks where the placeholder is located and remove the placeholder
55- sed -i '/stableDeploymentAlertPolicyChecks /r checks.tmp' release/clouddeploy/delivery-pipeline.yaml
56- sed -i '/stableDeploymentAlertPolicyChecks/d' release/clouddeploy/delivery-pipeline.yaml
55+ sed -i "/${env}StableDeploymentAlertPolicyChecks /r checks.tmp" release/clouddeploy/delivery-pipeline.yaml
56+ sed -i "/${env}StableDeploymentAlertPolicyChecks/d" release/clouddeploy/delivery-pipeline.yaml
5757 rm -f checks.tmp
5858
5959 # Extract only the indented block under partialDeploymentAlertPolicyChecks.
6868 ' "$config_file" > partial_checks.tmp
6969
7070 # Insert the checks where the placeholder is located and remove the placeholder
71- sed -i '/partialDeploymentAlertPolicyChecks /r partial_checks.tmp' release/clouddeploy/delivery-pipeline.yaml
72- sed -i '/partialDeploymentAlertPolicyChecks/d' release/clouddeploy/delivery-pipeline.yaml
71+ sed -i "/${env}PartialDeploymentAlertPolicyChecks /r partial_checks.tmp" release/clouddeploy/delivery-pipeline.yaml
72+ sed -i "/${env}PartialDeploymentAlertPolicyChecks/d" release/clouddeploy/delivery-pipeline.yaml
7373 rm -f partial_checks.tmp
7474 fi
7575
9595 - -c
9696 - |
9797 set -e
98- for env in crash; do
98+ for env in crash sandbox ; do
9999 target_file="release/clouddeploy/${env}-target.yaml"
100100 if [ -f "$target_file" ]; then
101101 echo "Applying target $target_file..."
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ serialPipeline:
1919 duration : 600s
2020 googleCloud :
2121 alertPolicyChecks :
22- partialDeploymentAlertPolicyChecks
22+ crashPartialDeploymentAlertPolicyChecks
2323 - phaseId : " canary-5"
2424 profiles : ["crash-partial-phase-5"]
2525 percentage : 50
@@ -28,7 +28,7 @@ serialPipeline:
2828 duration : 600s
2929 googleCloud :
3030 alertPolicyChecks :
31- partialDeploymentAlertPolicyChecks
31+ crashPartialDeploymentAlertPolicyChecks
3232 - phaseId : " stable"
3333 profiles : ["crash"]
3434 percentage : 100
@@ -51,4 +51,50 @@ serialPipeline:
5151 duration : 600s
5252 googleCloud :
5353 alertPolicyChecks :
54- stableDeploymentAlertPolicyChecks
54+ crashStableDeploymentAlertPolicyChecks
55+ - targetId : sandbox
56+ strategy :
57+ canary :
58+ customCanaryDeployment :
59+ phaseConfigs :
60+ - phaseId : " canary-1"
61+ profiles : ["sandbox-partial-phase-1"]
62+ percentage : 10
63+ analysis :
64+ # 10 minutes.
65+ duration : 600s
66+ googleCloud :
67+ alertPolicyChecks :
68+ sandboxPartialDeploymentAlertPolicyChecks
69+ - phaseId : " canary-5"
70+ profiles : ["sandbox-partial-phase-5"]
71+ percentage : 50
72+ analysis :
73+ # 10 minutes.
74+ duration : 600s
75+ googleCloud :
76+ alertPolicyChecks :
77+ sandboxPartialDeploymentAlertPolicyChecks
78+ - phaseId : " stable"
79+ profiles : ["sandbox"]
80+ percentage : 100
81+ postdeploy :
82+ tasks :
83+ - type : container
84+ image : gcr.io/google.com/cloudsdktool/google-cloud-cli:stable
85+ env :
86+ DEPLOYED_IMAGE : ${{ deploy_params['deployed_image'] }}
87+ BASE_IMAGE : ${{ deploy_params['base_image'] }}
88+ TARGET_ID : ${{ target.id }}
89+ command : ["/bin/bash"]
90+ args :
91+ - " -c"
92+ - |
93+ gcloud artifacts docker tags add $DEPLOYED_IMAGE \
94+ ${BASE_IMAGE}:live-cd-${TARGET_ID}
95+ analysis :
96+ # 10 minutes.
97+ duration : 600s
98+ googleCloud :
99+ alertPolicyChecks :
100+ sandboxStableDeploymentAlertPolicyChecks
Original file line number Diff line number Diff line change @@ -29,5 +29,32 @@ profiles:
2929 - ../jetty/kubernetes/nomulus-crash-console-partial-phase-5.yaml
3030 - ../jetty/kubernetes/nomulus-crash-frontend-partial-phase-5.yaml
3131 - ../jetty/kubernetes/nomulus-crash-pubapi-partial-phase-5.yaml
32+ deploy :
33+ kubectl : { }
34+ - name : sandbox
35+ manifests :
36+ rawYaml :
37+ - ../jetty/kubernetes/nomulus-sandbox-backend.yaml
38+ - ../jetty/kubernetes/nomulus-sandbox-console.yaml
39+ - ../jetty/kubernetes/nomulus-sandbox-frontend.yaml
40+ - ../jetty/kubernetes/nomulus-sandbox-pubapi.yaml
41+ deploy :
42+ kubectl : { }
43+ - name : sandbox-partial-phase-1
44+ manifests :
45+ rawYaml :
46+ - ../jetty/kubernetes/nomulus-sandbox-backend-partial-phase-1.yaml
47+ - ../jetty/kubernetes/nomulus-sandbox-console-partial-phase-1.yaml
48+ - ../jetty/kubernetes/nomulus-sandbox-frontend-partial-phase-1.yaml
49+ - ../jetty/kubernetes/nomulus-sandbox-pubapi-partial-phase-1.yaml
50+ deploy :
51+ kubectl : { }
52+ - name : sandbox-partial-phase-5
53+ manifests :
54+ rawYaml :
55+ - ../jetty/kubernetes/nomulus-sandbox-backend-partial-phase-5.yaml
56+ - ../jetty/kubernetes/nomulus-sandbox-console-partial-phase-5.yaml
57+ - ../jetty/kubernetes/nomulus-sandbox-frontend-partial-phase-5.yaml
58+ - ../jetty/kubernetes/nomulus-sandbox-pubapi-partial-phase-5.yaml
3259 deploy :
3360 kubectl : { }
You can’t perform that action at this time.
0 commit comments