Skip to content

Commit cafcd48

Browse files
committed
Working patch scenario
1 parent 736f76c commit cafcd48

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

.evergreen-functions.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ variables:
4646
- RELEASE_INITIAL_VERSION
4747
- RELEASE_INITIAL_COMMIT_SHA
4848
- RELEASE_OPERATOR_VERSION
49-
- BUILD_SCENARIO
49+
- build_scenario
5050

5151
functions:
5252

@@ -556,27 +556,31 @@ functions:
556556

557557
pipeline:
558558
- *switch_context
559-
- command: subprocess.exec
559+
- command: shell.exec
560560
retry_on_failure: true
561561
type: setup
562562
params:
563563
shell: bash
564564
<<: *e2e_include_expansions_in_env
565565
working_dir: src/github.com/mongodb/mongodb-kubernetes
566-
binary: scripts/dev/run_python.sh scripts/release/pipeline_main.py ${image_name} --build-scenario ${build_scenario|*BUILD_SCENARIO} --parallel ${all_agents}
566+
script: |
567+
source .generated/context.export.env
568+
scripts/dev/run_python.sh scripts/release/pipeline_main.py ${image_name} --build-scenario $BUILD_SCENARIO --parallel ${all_agents}
567569
568570
# TODO: this function is very similar to pipeline and it will joined with it in the future
569571
release_operator_pipeline:
570572
- *switch_context
571-
- command: subprocess.exec
573+
- command: shell.exec
572574
retry_on_failure: true
573575
type: setup
574576
params:
575577
shell: bash
576578
<<: *e2e_include_expansions_in_env
577579
working_dir: src/github.com/mongodb/mongodb-kubernetes
578580
# By default, use the git tag that triggered the task which can be overridden with RELEASE_OPERATOR_VERSION
579-
binary: scripts/dev/run_python.sh scripts/release/pipeline_main.py ${image_name} --build-scenario release --version ${RELEASE_OPERATOR_VERSION|*triggered_by_git_tag}
581+
script: |
582+
source .generated/context.export.env
583+
scripts/dev/run_python.sh scripts/release/pipeline_main.py ${image_name} --build-scenario release --version ${RELEASE_OPERATOR_VERSION|*triggered_by_git_tag}
580584
581585
teardown_cloud_qa_all:
582586
- *switch_context

.evergreen.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,6 @@ tasks:
311311
- func: pipeline
312312
vars:
313313
image_name: agent
314-
#TODO: make sure this works and is not overridden by evg_private_context (it should not be)
315314
build_scenario: manual_release
316315

317316
- name: migrate_all_agents

scripts/dev/contexts/evg-private-context

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,10 @@ export MDB_UPDATE_LICENSES=true
103103
BUILD_SCENARIO_RELEASE="release" # Official release triggered by a git tag
104104
BUILD_SCENARIO_STAGING="staging" # CI build from a merge to the master
105105
BUILD_SCENARIO_PATCH="patch" # CI build for a patch/pull request
106-
if [ -n "${BUILD_SCENARIO-}" ]; then
106+
if [ -n "${build_scenario-}" ]; then
107+
echo "Build scenario has been set via pipeline function param, not overriding it"
108+
export BUILD_SCENARIO="${build_scenario}"
109+
elif [ -n "${BUILD_SCENARIO-}" ]; then
107110
echo "Build scenario has been set externally, not overriding it"
108111
elif [ "${GIT_TAG}" ]; then
109112
export BUILD_SCENARIO=$BUILD_SCENARIO_RELEASE

0 commit comments

Comments
 (0)