Skip to content

Commit bdbd7f3

Browse files
authored
CLOUDP-295785 - add evg aliases used for variants used in each build scenario (#420)
# Summary This PR groups all evergreen variants in four categories: - `pr_patch`: for patches created by GitHub PRs - `staging`: for builds triggered when merging to master or release branch - `release`: for builds triggered on git tags - `manual_patch`: for builds that are **only** triggered manually (patch) or by PCT. Examples: `migrate_all_agents`, `e2e_operator_perf` or `publish_om80_images`. This configuration allows us to run all the associated tasks for each scenario from evergreen command line. This is especially helpful when making changes to `staging` or `release` variants and testing them using Evergreen command line patches. For example there is no other way to trigger tasks that are run on merges to master other than combining them together using aliases. The same applies for tasks being run on git tags. This change additionally fixes: - release variants were missing some of the tasks, because of the evg [bug](https://mongodb.slack.com/archives/C0V896UV8/p1757071183767219) - added missing `prerelease_kind_code_snippets` to release task - merges to master were missing `e2e_om_ops_manager_backup` (multiple variants), `task_gke_multi_cluster_snippets` and `task_gke_multi_cluster_no_mesh_snippets` due to wrong configuration of `allowed_requesters: [ "patch", "github_pr" ]` ## Proof of Work ### Pull Request scenario `pr_patch` triggered by evg cmd line: [727](https://spruce.mongodb.com/version/68bf33356671b00007c237d0/tasks?sorts=STATUS%3AASC%3BBASE_STATUS%3ADESC) tasks (two more, because `build_readiness_probe_image` and `build_upgrade_hook_image` were previously missing) ``` evergreen patch -p mongodb-kubernetes -a pr_patch -d "Test PR patch" -f -y -u --browse --path .evergreen.yml ``` Example PR patch: [725](https://spruce.mongodb.com/version/68baea296698b70007246fea/tasks?sorts=STATUS%3AASC%3BBASE_STATUS%3ADESC) tasks ### Staging scenario `staging` triggered by evg cmd line: [753](https://spruce.mongodb.com/version/68bf37b692e52b0008acd87d/tasks?sorts=STATUS%3AASC%3BBASE_STATUS%3ADESC) tasks (this is more because `e2e_om_ops_manager_backup` (multiple variants), `task_gke_multi_cluster_snippets` and `task_gke_multi_cluster_no_mesh_snippets` was missing by mistake in regular merge to master and now it is fixed) ``` evergreen patch -p mongodb-kubernetes -a staging -d "Test staging" -f -y -u --browse --path .evergreen.yml ``` Example merge to master: [746](https://spruce.mongodb.com/version/mongodb_kubernetes_6c65673d870adb76b898365051ed8b01667403a9/tasks?sorts=STATUS%3AASC%3BBASE_STATUS%3ADESC) tasks ### Release scenario `release` triggered by evg cmd line: [17](https://spruce.mongodb.com/version/68bf387276bbd5000744f633/tasks?sorts=STATUS%3AASC%3BBASE_STATUS%3ADESC) tasks (added missing `e2e_smoke`, `e2e_static_smoke` and `code_snippets` tests) ``` evergreen patch -p mongodb-kubernetes -a release -d "Test release" -f -y -u --browse --path .evergreen.yml ``` Example git tag job: [12](https://spruce.mongodb.com/version/mongodb_kubernetes_1.3.0_68baae22f7d2690007feb541/tasks?sorts=STATUS%3AASC%3BBASE_STATUS%3ADESC) tasks ## Checklist - [ ] Have you linked a jira ticket and/or is the ticket in the title? - [ ] Have you checked whether your jira ticket required DOCSP changes? - [ ] Have you added changelog file? - use `skip-changelog` label if not needed - refer to [Changelog files and Release Notes](https://github.com/mongodb/mongodb-kubernetes/blob/master/CONTRIBUTING.md#changelog-files-and-release-notes) section in CONTRIBUTING.md for more details
1 parent aa1f57b commit bdbd7f3

File tree

5 files changed

+127
-101
lines changed

5 files changed

+127
-101
lines changed

.evergreen-release.yml

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,35 @@ buildvariants:
151151
tasks:
152152
- name: run_conditionally_prepare_and_upload_openshift_bundles
153153

154+
- name: prerelease_kind_code_snippets
155+
display_name: prerelease_kind_code_snippets
156+
tags: [ "release", "prerelease_code_snippets" ]
157+
allowed_requesters: [ "patch", "github_tag" ]
158+
depends_on:
159+
- name: "*"
160+
variant: release_images
161+
patch_optional: true
162+
run_on:
163+
- ubuntu2404-large
164+
tasks:
165+
- name: kind_code_snippets_task_group
166+
167+
- name: prerelease_gke_code_snippets
168+
display_name: prerelease_gke_code_snippets
169+
tags: [ "release", "prerelease_code_snippets" ]
170+
allowed_requesters: ["patch", "github_tag"]
171+
depends_on:
172+
- variant: release_images
173+
name: '*'
174+
patch_optional: true
175+
run_on:
176+
- ubuntu2404-small
177+
tasks:
178+
- name: gke_code_snippets_task_group
179+
154180
- name: init_smoke_tests
155181
display_name: init_smoke_tests
156-
tags: [ "e2e_smoke_release_test_suite" ]
182+
tags: [ "release", "e2e_smoke_release_test_suite" ]
157183
allowed_requesters: [ "patch", "github_tag" ]
158184
run_on:
159185
- release-ubuntu2404-small # This is required for CISA attestation https://jira.mongodb.org/browse/DEVPROD-17780
@@ -162,7 +188,7 @@ buildvariants:
162188

163189
- name: e2e_smoke
164190
display_name: e2e_smoke
165-
tags: [ "e2e_smoke_release_test_suite" ]
191+
tags: [ "release", "e2e_smoke_release_test_suite" ]
166192
run_on:
167193
- ubuntu2404-large
168194
allowed_requesters: [ "patch", "github_tag" ]
@@ -176,7 +202,7 @@ buildvariants:
176202

177203
- name: e2e_static_smoke
178204
display_name: e2e_static_smoke
179-
tags: [ "e2e_smoke_release_test_suite" ]
205+
tags: [ "release", "e2e_smoke_release_test_suite" ]
180206
run_on:
181207
- ubuntu2404-large
182208
allowed_requesters: [ "patch", "github_tag" ]

.evergreen-snippets.yml

Lines changed: 12 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -126,60 +126,41 @@ task_groups:
126126

127127
buildvariants:
128128
# These variants are used to test the code snippets and each one can be used in patches
129-
# Prerelease is especially used when the repo is tagged
130129
# More details in the TD: https://docs.google.com/document/d/1fuTxfRtP8QPtn7sKYxQM_AGcD6xycTZH8svngGxyKhc/edit?tab=t.0#bookmark=id.e8uva0393mbe
131130
- name: public_gke_code_snippets
132131
display_name: public_gke_code_snippets
132+
tags: [ "manual_patch" ]
133133
allowed_requesters: [ "patch" ]
134134
run_on:
135-
- ubuntu2204-small
135+
- ubuntu2404-small
136136
tasks:
137137
- name: gke_code_snippets_task_group
138138

139-
- name: prerelease_gke_code_snippets
140-
display_name: prerelease_gke_code_snippets
141-
tags: [ "release" ]
142-
allowed_requesters: [ "patch", "github_tag" ]
143-
depends_on:
144-
- variant: release_images
145-
name: '*'
146-
patch_optional: true
139+
- name: public_kind_code_snippets
140+
display_name: public_kind_code_snippets
141+
tags: [ "manual_patch" ]
142+
allowed_requesters: [ "patch" ]
147143
run_on:
148-
- ubuntu2204-small
144+
- ubuntu2404-large
149145
tasks:
150-
- name: gke_code_snippets_task_group
146+
- name: kind_code_snippets_task_group
151147

152148
- name: private_gke_code_snippets
153149
display_name: private_gke_code_snippets
150+
tags: [ "staging", "e2e_test_suite" ]
154151
allowed_requesters: [ "patch" ]
155152
run_on:
156-
- ubuntu2204-small
153+
- ubuntu2404-small
157154
<<: *base_om8_dependency
158155
tasks:
159156
- name: gke_code_snippets_task_group
160157

161158
- name: private_kind_code_snippets
162159
display_name: private_kind_code_snippets
163-
tags: [ "e2e_test_suite" ]
160+
tags: [ "pr_patch", "staging", "e2e_test_suite" ]
164161
allowed_requesters: [ "patch", "github_pr" ]
165162
run_on:
166-
- ubuntu2204-large
163+
- ubuntu2404-large
167164
<<: *base_om8_dependency
168165
tasks:
169166
- name: kind_code_snippets_task_group
170-
171-
- name: prerelease_kind_code_snippets
172-
display_name: prerelease_kind_code_snippets
173-
allowed_requesters: [ "patch" ]
174-
run_on:
175-
- ubuntu2204-large
176-
tasks:
177-
- name: kind_code_snippets_task_group
178-
179-
- name: public_kind_code_snippets
180-
display_name: public_kind_code_snippets
181-
allowed_requesters: [ "patch" ]
182-
run_on:
183-
- ubuntu2204-large
184-
tasks:
185-
- name: kind_code_snippets_task_group

.evergreen-tasks.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,12 @@ tasks:
7474
# Each task is selected by convention by running scripts/code_snippets/${task_name}_test.sh
7575
- name: task_gke_multi_cluster_snippets
7676
tags: [ "code_snippets" ]
77-
allowed_requesters: [ "patch", "github_tag" ]
7877
commands:
7978
- func: test_code_snippets
8079
- func: sample_commit_output
8180

8281
- name: task_gke_multi_cluster_no_mesh_snippets
8382
tags: [ "code_snippets" ]
84-
allowed_requesters: [ "patch", "github_tag" ]
8583
commands:
8684
- func: test_code_snippets
8785
- func: sample_commit_output
@@ -791,7 +789,6 @@ tasks:
791789

792790
- name: e2e_om_ops_manager_backup
793791
tags: [ "patch-run" ]
794-
allowed_requesters: [ "github_tag", "patch" ]
795792
commands:
796793
- func: "e2e_test"
797794

0 commit comments

Comments
 (0)