Skip to content

Commit d6ad19f

Browse files
committed
Merge remote-tracking branch 'origin/search/public-preview' into fealebenpae/enterprise-search
# Conflicts: # .evergreen-tasks.yml # controllers/operator/mongodbsearch_controller.go # controllers/search_controller/mongodbsearch_reconcile_helper.go # controllers/search_controller/mongodbsearch_reconcile_helper_test.go # controllers/search_controller/search_construction.go # mongodb-community-operator/controllers/replica_set_controller.go
2 parents 7dedfee + bf7a25e commit d6ad19f

File tree

220 files changed

+7005
-2390
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

220 files changed

+7005
-2390
lines changed

.evergreen-functions.yml

Lines changed: 71 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,22 @@ functions:
5151

5252
### Setup Functions ###
5353

54+
setup_jq: &setup_jq
55+
command: subprocess.exec
56+
type: setup
57+
params:
58+
<<: *e2e_include_expansions_in_env
59+
add_to_path:
60+
- ${workdir}/bin
61+
working_dir: src/github.com/mongodb/mongodb-kubernetes
62+
binary: scripts/evergreen/setup_jq.sh
63+
5464
setup_context: &setup_context # Running the first switch is important to fill the workdir and other important initial env vars
5565
command: shell.exec
5666
type: setup
5767
params:
68+
add_to_path:
69+
- ${workdir}/bin
5870
shell: bash
5971
working_dir: src/github.com/mongodb/mongodb-kubernetes
6072
<<: *e2e_include_expansions_in_env
@@ -103,6 +115,7 @@ functions:
103115
type: setup
104116
params:
105117
command: "git config --global user.email '[email protected]'"
118+
- *setup_jq # we need jq in the context
106119
- *setup_context
107120

108121
setup_kubectl: &setup_kubectl
@@ -112,13 +125,6 @@ functions:
112125
working_dir: src/github.com/mongodb/mongodb-kubernetes
113126
binary: scripts/evergreen/setup_kubectl.sh
114127

115-
setup_jq: &setup_jq
116-
command: subprocess.exec
117-
type: setup
118-
params:
119-
working_dir: src/github.com/mongodb/mongodb-kubernetes
120-
binary: scripts/evergreen/setup_jq.sh
121-
122128
setup_shellcheck:
123129
command: subprocess.exec
124130
type: setup
@@ -225,7 +231,7 @@ functions:
225231
working_dir: src/github.com/mongodb/mongodb-kubernetes
226232
add_to_path:
227233
- ${workdir}/bin
228-
binary: scripts/dev/configure_docker_auth.sh
234+
binary: scripts/dev/configure_container_auth.sh
229235

230236
setup_evg_host: &setup_evg_host
231237
command: subprocess.exec
@@ -256,16 +262,35 @@ functions:
256262
# Configures docker authentication to ECR and RH registries.
257263
setup_building_host:
258264
- *switch_context
265+
- *python_venv
259266
- *setup_aws
260-
- *configure_docker_auth
261267
- *setup_evg_host
262-
- *python_venv
268+
- *configure_docker_auth
263269

264-
prune_docker_resources:
270+
# This differs for normal evg_host as we require minikube instead of kind for
271+
# IBM machines also install aws cli via pip instead and use podman
272+
setup_building_host_minikube:
273+
- *switch_context
265274
- command: subprocess.exec
266275
type: setup
267276
params:
268-
command: "docker system prune -a -f"
277+
working_dir: src/github.com/mongodb/mongodb-kubernetes
278+
add_to_path:
279+
- ${workdir}/bin
280+
command: scripts/evergreen/setup_minikube_host.sh
281+
282+
prune_docker_resources:
283+
- command: shell.exec
284+
type: setup
285+
params:
286+
shell: bash
287+
script: |
288+
if command -v docker >/dev/null 2>&1; then
289+
echo "Docker found, pruning docker resources..."
290+
docker system prune -a -f
291+
else
292+
echo "Docker not found, skipping docker resource pruning"
293+
fi
269294
270295
# the task configures the set of tools necessary for any task working with K8 cluster:
271296
# installs kubectl, jq, kind (if necessary), configures docker authentication
@@ -327,20 +352,19 @@ functions:
327352
shell: bash
328353
working_dir: src/github.com/mongodb/mongodb-kubernetes
329354
script: |
330-
source .generated/context.export.env
331-
scripts/evergreen/e2e/setup_cloud_qa.py create
355+
scripts/dev/run_python.sh scripts/evergreen/e2e/setup_cloud_qa.py create
332356
# The additional switch is needed, since we now have created the needed OM exports.
333357
- *switch_context
334358

335359
teardown_cloud_qa:
336360
- command: shell.exec
337361
type: setup
338362
params:
363+
continue_on_err: true
339364
shell: bash
340365
working_dir: src/github.com/mongodb/mongodb-kubernetes
341366
script: |
342-
source .generated/context.export.env
343-
scripts/evergreen/e2e/setup_cloud_qa.py delete
367+
scripts/dev/run_python.sh scripts/evergreen/e2e/setup_cloud_qa.py delete
344368
345369
dump_diagnostic_information_from_all_namespaces:
346370
- command: subprocess.exec
@@ -392,7 +416,7 @@ functions:
392416
add_to_path:
393417
- ${workdir}/bin
394418
working_dir: src/github.com/mongodb/mongodb-kubernetes
395-
binary: scripts/evergreen/run_python.sh scripts/update_supported_dockerfiles.py
419+
binary: scripts/dev/run_python.sh scripts/update_supported_dockerfiles.py
396420
- command: subprocess.exec
397421
type: setup
398422
params:
@@ -420,6 +444,7 @@ functions:
420444
upload_e2e_logs:
421445
- command: s3.put
422446
params:
447+
continue_on_err: true
423448
aws_key: ${enterprise_aws_access_key_id}
424449
aws_secret: ${enterprise_aws_secret_access_key}
425450
local_files_include_filter:
@@ -486,7 +511,7 @@ functions:
486511
include_expansions_in_env:
487512
- image_version
488513
- rh_pyxis
489-
binary: scripts/evergreen/run_python.sh scripts/preflight_images.py --image ${image_name} --submit "${preflight_submit}"
514+
binary: scripts/dev/run_python.sh scripts/preflight_images.py --image ${image_name} --submit "${preflight_submit}"
490515

491516
build_multi_cluster_binary:
492517
- command: subprocess.exec
@@ -504,7 +529,31 @@ functions:
504529
- ${workdir}/bin
505530
- ${workdir}
506531

532+
build_test_image_ibm:
533+
- *switch_context
534+
- command: subprocess.exec
535+
params:
536+
shell: bash
537+
working_dir: src/github.com/mongodb/mongodb-kubernetes
538+
include_expansions_in_env:
539+
- version_id
540+
add_to_path:
541+
- ${workdir}/bin
542+
binary: scripts/evergreen/e2e/build_tests_image_ibm.sh
543+
507544
pipeline:
545+
- *switch_context
546+
- command: subprocess.exec
547+
retry_on_failure: true
548+
type: setup
549+
params:
550+
shell: bash
551+
<<: *e2e_include_expansions_in_env
552+
working_dir: src/github.com/mongodb/mongodb-kubernetes
553+
binary: scripts/dev/run_python.sh scripts/release/pipeline_main.py --parallel ${image_name} ${all_agents} ${build_scenario}
554+
555+
# TODO: CLOUDP-335471 ; once all image builds are made with the new atomic pipeline, remove the following function
556+
legacy_pipeline:
508557
- *switch_context
509558
- command: shell.exec
510559
type: setup
@@ -538,7 +587,7 @@ functions:
538587
shell: bash
539588
<<: *e2e_include_expansions_in_env
540589
working_dir: src/github.com/mongodb/mongodb-kubernetes
541-
binary: scripts/evergreen/run_python.sh pipeline.py --include ${image_name} --parallel --sign
590+
binary: scripts/dev/run_python.sh pipeline.py --include ${image_name} --parallel --sign
542591

543592
teardown_cloud_qa_all:
544593
- *switch_context
@@ -549,7 +598,7 @@ functions:
549598
working_dir: src/github.com/mongodb/mongodb-kubernetes
550599
script: |
551600
source .generated/context.export.env
552-
scripts/evergreen/run_python.sh scripts/evergreen/e2e/setup_cloud_qa.py delete_all
601+
scripts/dev/run_python.sh scripts/evergreen/e2e/setup_cloud_qa.py delete_all
553602
554603
# Updates current expansions with variables from release.json file.
555604
# Use e.g. ${mongoDbOperator} afterwards.
@@ -596,7 +645,7 @@ functions:
596645
add_to_path:
597646
- ${workdir}/bin
598647
# Below script deletes agent images created for an Evergreen patch older than 1 day
599-
command: scripts/evergreen/run_python.sh scripts/evergreen/periodic-cleanup-aws.py
648+
command: scripts/dev/run_python.sh scripts/evergreen/periodic-cleanup-aws.py
600649

601650
### Test Functions ###
602651

@@ -695,7 +744,7 @@ functions:
695744
working_dir: src/github.com/mongodb/mongodb-kubernetes
696745
script: |
697746
source .generated/context.export.env
698-
scripts/evergreen/run_python.sh scripts/evergreen/e2e/performance/create_variants.py ${variant} ${size}> evergreen_tasks.json
747+
scripts/dev/run_python.sh scripts/evergreen/e2e/performance/create_variants.py ${variant} ${size}> evergreen_tasks.json
699748
echo "tasks to run:"
700749
cat evergreen_tasks.json
701750
- command: generate.tasks

.evergreen-periodic-builds.yaml

Lines changed: 0 additions & 152 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,6 @@ variables:
1919
- func: switch_context
2020

2121
tasks:
22-
- name: periodic_build_operator
23-
commands:
24-
- func: pipeline
25-
vars:
26-
image_name: operator-daily
27-
2822
- name: periodic_teardown_aws
2923
commands:
3024
- func: cleanup_aws
@@ -33,134 +27,7 @@ tasks:
3327
commands:
3428
- func: teardown_cloud_qa_all
3529

36-
- name: periodic_build_init_appdb
37-
commands:
38-
- func: pipeline
39-
vars:
40-
image_name: init-appdb-daily
41-
42-
- name: periodic_build_init_database
43-
commands:
44-
- func: pipeline
45-
vars:
46-
image_name: init-database-daily
47-
48-
- name: periodic_build_init_opsmanager
49-
commands:
50-
- func: pipeline
51-
vars:
52-
image_name: init-ops-manager-daily
53-
54-
- name: periodic_build_database
55-
commands:
56-
- func: pipeline
57-
vars:
58-
image_name: database-daily
59-
60-
- name: periodic_build_sbom_cli
61-
commands:
62-
- func: pipeline
63-
vars:
64-
image_name: cli
65-
66-
- name: periodic_build_ops_manager_6
67-
commands:
68-
- func: pipeline
69-
vars:
70-
image_name: ops-manager-6-daily
71-
72-
- name: periodic_build_ops_manager_7
73-
commands:
74-
- func: pipeline
75-
vars:
76-
image_name: ops-manager-7-daily
77-
78-
- name: periodic_build_ops_manager_8
79-
commands:
80-
- func: pipeline
81-
vars:
82-
image_name: ops-manager-8-daily
83-
84-
# the periodic agent builds are more commented in the pipeline.py file.
85-
# The gist is - we want to split up the periodic build on as many machines as possible
86-
# To speed up the builds as we have too many agents due to the matrix build.
87-
# For now its one without operator suffix and the last 3. This only works as long as we
88-
# only have operator versions we support (minor version), as soon as we have multiple patch versions -
89-
# this won't work anymore and we will need a dynamic solution.
90-
- name: periodic_build_agent
91-
exec_timeout_secs: 43200
92-
commands:
93-
- func: enable_QEMU
94-
- func: pipeline
95-
vars:
96-
image_name: mongodb-agent-daily
97-
98-
- name: periodic_build_agent_1
99-
exec_timeout_secs: 43200
100-
commands:
101-
- func: enable_QEMU
102-
- func: pipeline
103-
vars:
104-
image_name: mongodb-agent-1-daily
105-
106-
- name: periodic_build_agent_2
107-
exec_timeout_secs: 43200
108-
commands:
109-
- func: enable_QEMU
110-
- func: pipeline
111-
vars:
112-
image_name: mongodb-agent-2-daily
113-
114-
- name: periodic_build_agent_3
115-
exec_timeout_secs: 43200
116-
commands:
117-
- func: enable_QEMU
118-
- func: pipeline
119-
vars:
120-
image_name: mongodb-agent-3-daily
121-
122-
#TODO should we still build the community operator?
123-
- name: periodic_build_community_operator
124-
commands:
125-
- func: enable_QEMU
126-
- func: pipeline
127-
vars:
128-
image_name: mongodb-kubernetes-operator-daily
129-
130-
- name: periodic_build_readiness_probe
131-
commands:
132-
- func: pipeline
133-
vars:
134-
image_name: readinessprobe-daily
135-
136-
- name: periodic_build_version_upgrade_post_start_hook
137-
commands:
138-
- func: pipeline
139-
vars:
140-
image_name: operator-version-upgrade-post-start-hook-daily
141-
14230
task_groups:
143-
- name: periodic_build_task_group
144-
max_hosts: -1
145-
<<: *setup_group
146-
tasks:
147-
- periodic_build_operator
148-
- periodic_build_readiness_probe
149-
- periodic_build_version_upgrade_post_start_hook
150-
- periodic_build_init_appdb
151-
- periodic_build_init_database
152-
- periodic_build_init_opsmanager
153-
- periodic_build_ops_manager_6
154-
- periodic_build_ops_manager_7
155-
- periodic_build_ops_manager_8
156-
- periodic_build_database
157-
- periodic_build_community_operator
158-
- periodic_build_sbom_cli
159-
- periodic_build_agent
160-
- periodic_build_agent_1
161-
- periodic_build_agent_2
162-
- periodic_build_agent_3
163-
16431
- name: periodic_teardown_task_group
16532
<<: *setup_group
16633
tasks:
@@ -175,22 +42,3 @@ buildvariants:
17542
- ubuntu2204-small
17643
tasks:
17744
- name: periodic_teardown_task_group
178-
179-
- name: periodic_build
180-
display_name: periodic_build
181-
tags: [ "periodic_build" ]
182-
run_on:
183-
- release-ubuntu2204-large # This is required for CISA attestation https://jira.mongodb.org/browse/DEVPROD-17780
184-
tasks:
185-
- name: periodic_build_task_group
186-
187-
- name: preflight_release_images_check_only
188-
display_name: preflight_release_images_check_only
189-
tags: [ "periodic_build" ]
190-
depends_on:
191-
- name: "*"
192-
variant: periodic_build
193-
run_on:
194-
- rhel90-large
195-
tasks:
196-
- name: preflight_images_task_group

0 commit comments

Comments
 (0)