-
Notifications
You must be signed in to change notification settings - Fork 55
Expand file tree
/
Copy path.evergreen-snippets.yml
More file actions
207 lines (188 loc) · 6.88 KB
/
Copy path.evergreen-snippets.yml
File metadata and controls
207 lines (188 loc) · 6.88 KB
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
variables:
- &setup_and_teardown_group_gke_code_snippets
setup_task_can_fail_task: true
setup_group:
- func: clone
- func: setup_gcloud_cli
- func: setup_mongosh
- func: download_kube_tools
- func: switch_context
- func: python_venv
- func: download_multi_cluster_binary
vars:
platform: linux/amd64
teardown_task:
- func: upload_e2e_logs
- func: upload_code_snippets_logs
- func: upload_code_snippets_outputs
- &setup_and_teardown_group_kind_code_snippets
setup_task_can_fail_task: true
setup_group_can_fail_task: true
setup_group:
- func: clone
- func: cleanup_exec_environment
- func: download_kube_tools
- func: configure_docker_auth
- func: switch_context
- func: setup_kubernetes_environment
- func: python_venv
- func: setup_cloud_qa
teardown_task:
- func: upload_e2e_logs
- func: upload_code_snippets_logs
- func: upload_code_snippets_outputs
- func: teardown_kubernetes_environment
- func: teardown_cloud_qa
# This variable is copied over from .evergreen.yml because anchors don't work for included files
- &base_om8_dependency
depends_on:
- name: build_om_images
variant: build_om80_images
- name: build_operator_ubi
variant: init_test_run
- name: build_init_database_image_ubi
variant: init_test_run
- name: build_database_image_ubi
variant: init_test_run
- name: build_test_image
variant: init_test_run
- name: build_init_om_images_ubi
variant: init_test_run
- name: build_agent_images_ubi
variant: init_test_run
# Wait for OM images to be published to quay.io on commit builds (staging).
# On patch builds, this dependency is skipped (task doesn't exist).
- name: release_om_and_agents
variant: release_om_and_agents
patch_optional: true
functions:
upload_code_snippets_logs:
- command: s3.put
params:
aws_key: ${enterprise_aws_access_key_id}
aws_secret: ${enterprise_aws_secret_access_key}
local_files_include_filter:
- src/github.com/mongodb/mongodb-kubernetes/public/architectures/**/*.log
- src/github.com/mongodb/mongodb-kubernetes/docs/**/*.log
remote_file: logs/${task_id}/${execution}/
bucket: operator-e2e-artifacts
permissions: private
visibility: signed
content_type: text/plain
upload_code_snippets_outputs:
- command: s3.put
params:
aws_key: ${enterprise_aws_access_key_id}
aws_secret: ${enterprise_aws_secret_access_key}
local_files_include_filter:
- snippets_outputs*.tgz
remote_file: snippets_outputs/${version_id}
bucket: operator-e2e-artifacts
permissions: private
visibility: signed
content_type: ${content_type|application/x-gzip}
tasks:
# Code snippets tasks
# Each scripts/code_snippets/tests/test_*.sh should have its task defined here.
# TODO: it should be autogenerated
# Each task executes test_code_snippets functon executes scripts/code_snippets/tests/${task_name} by task name convention
- name: test_gke_multi_cluster_snippets.sh
tags: [ "code_snippets" ]
commands:
- func: test_code_snippets
- func: archive_snippets_output
- name: test_gke_multi_cluster_no_mesh_snippets.sh
tags: [ "code_snippets" ]
commands:
- func: test_code_snippets
- func: archive_snippets_output
- name: test_kind_search_community_snippets.sh
tags: [ "code_snippets", "patch-run" ]
commands:
- func: test_code_snippets
- func: archive_snippets_output
- name: test_kind_search_enterprise_snippets.sh
tags: [ "code_snippets", "patch-run" ]
commands:
- func: test_code_snippets
- func: archive_snippets_output
- name: test_kind_search_external_mongod_snippets.sh
tags: [ "code_snippets", "patch-run" ]
commands:
- func: test_code_snippets
- func: archive_snippets_output
- name: test_kind_search_external_sharded_managed_lb_snippets.sh
tags: [ "code_snippets", "patch-run" ]
commands:
- func: test_code_snippets
- func: archive_snippets_output
- name: test_kind_search_sharded_managed_lb_snippets.sh
tags: [ "code_snippets", "patch-run" ]
commands:
- func: test_code_snippets
- func: archive_snippets_output
- name: test_kind_search_external_rs_managed_lb_snippets.sh
tags: [ "code_snippets", "patch-run" ]
commands:
- func: test_code_snippets
- func: archive_snippets_output
- name: test_kind_search_rs_managed_lb_snippets.sh
tags: [ "code_snippets", "patch-run" ]
commands:
- func: test_code_snippets
- func: archive_snippets_output
task_groups:
- name: gke_code_snippets_task_group
<<: *setup_and_teardown_group_gke_code_snippets
max_hosts: -1
tasks:
- test_gke_multi_cluster_snippets.sh
- test_gke_multi_cluster_no_mesh_snippets.sh
- name: kind_code_snippets_task_group
<<: *setup_and_teardown_group_kind_code_snippets
max_hosts: -1
tasks:
- test_kind_search_community_snippets.sh
- test_kind_search_enterprise_snippets.sh
- test_kind_search_external_mongod_snippets.sh
- test_kind_search_external_sharded_managed_lb_snippets.sh
- test_kind_search_sharded_managed_lb_snippets.sh
- test_kind_search_external_rs_managed_lb_snippets.sh
- test_kind_search_rs_managed_lb_snippets.sh
buildvariants:
# These variants are used to test the code snippets and each one can be used in patches
# More details in the TD: https://docs.google.com/document/d/1fuTxfRtP8QPtn7sKYxQM_AGcD6xycTZH8svngGxyKhc/edit?tab=t.0#bookmark=id.e8uva0393mbe
- name: public_gke_code_snippets
display_name: public_gke_code_snippets
tags: [ "manual_patch" ]
allowed_requesters: [ "patch" ]
run_on:
- ubuntu2404-small
tasks:
- name: gke_code_snippets_task_group
- name: public_kind_code_snippets
display_name: public_kind_code_snippets
tags: [ "manual_patch" ]
allowed_requesters: [ "patch" ]
run_on:
- ubuntu2404-large
tasks:
- name: kind_code_snippets_task_group
#TODO: re-enabled for staging (master merge) to gate promote; was disabled due to GKE resource issues https://jira.mongodb.org/browse/CLOUDP-345083
- name: private_gke_code_snippets
display_name: private_gke_code_snippets
tags: [ "manual_patch", "staging", "e2e_test_suite" ]
allowed_requesters: [ "patch", "commit" ]
run_on:
- ubuntu2404-small
<<: *base_om8_dependency
tasks:
- name: gke_code_snippets_task_group
- name: private_kind_code_snippets
display_name: private_kind_code_snippets
tags: [ "pr_patch", "staging", "e2e_test_suite" ]
run_on:
- ubuntu2404-large
<<: *base_om8_dependency
tasks:
- name: kind_code_snippets_task_group