Skip to content

Commit 200a6e0

Browse files
committed
try scenario override
1 parent 6075072 commit 200a6e0

File tree

4 files changed

+11
-1
lines changed

4 files changed

+11
-1
lines changed

.evergreen-functions.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ variables:
1313
- GRS_PASSWORD
1414
- GRS_USERNAME
1515
- OVERRIDE_VERSION_ID
16+
- OVERRIDE_BUILD_SCENARIO
1617
- PKCS11_URI
1718
- branch_name
1819
- build_id
@@ -538,7 +539,7 @@ functions:
538539
shell: bash
539540
<<: *e2e_include_expansions_in_env
540541
working_dir: src/github.com/mongodb/mongodb-kubernetes
541-
binary: scripts/dev/run_python.sh scripts/release/pipeline_main.py --parallel ${image_name}
542+
binary: scripts/dev/run_python.sh scripts/release/pipeline_main.py --parallel ${image_name} --build-scenario ${OVERRIDE_BUILD_SCENARIO}
542543

543544
# TODO: CLOUDP-335471 ; once all image builds are made with the new atomic pipeline, remove the following function
544545
legacy_pipeline:

.evergreen.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,10 @@ parameters:
188188
value: ""
189189
description: "Patch id to reuse images from other Evergreen build"
190190

191+
- key: OVERRIDE_BUILD_SCENARIO
192+
value: "default"
193+
description: "Override the build scenario for pipeline_main.py"
194+
191195
- key: code_snippets_teardown
192196
value: "true"
193197
description: set this to false if you would like to keep the clusters created during code snippets tests

scripts/release/build/build_scenario.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ class BuildScenario(StrEnum):
1414
PATCH = "patch" # CI build for a patch/pull request
1515
STAGING = "staging" # CI build from a merge to the master
1616
DEVELOPMENT = "development" # Local build on a developer machine
17+
DEFAULT = "default" # Use auto-detection from environment
1718

1819
@classmethod
1920
def infer_scenario_from_environment(cls) -> "BuildScenario":

scripts/release/pipeline_main.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@ def get_scenario_from_arg(args_scenario: str) -> BuildScenario | None:
128128
if not args_scenario:
129129
return None
130130

131+
# Handle "default" as a special case to trigger auto-detection
132+
if args_scenario == "default":
133+
return None
134+
131135
try:
132136
return BuildScenario(args_scenario)
133137
except ValueError as e:

0 commit comments

Comments
 (0)