Skip to content

Commit 7f7d0e9

Browse files
committed
Working patch scenario
1 parent a9096c3 commit 7f7d0e9

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

.evergreen-functions.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ variables:
4949
- RELEASE_INITIAL_VERSION
5050
- RELEASE_INITIAL_COMMIT_SHA
5151
- RELEASE_OPERATOR_VERSION
52-
- BUILD_SCENARIO
52+
- build_scenario
5353

5454
functions:
5555

@@ -559,27 +559,31 @@ functions:
559559

560560
pipeline:
561561
- *switch_context
562-
- command: subprocess.exec
562+
- command: shell.exec
563563
retry_on_failure: true
564564
type: setup
565565
params:
566566
shell: bash
567567
<<: *e2e_include_expansions_in_env
568568
working_dir: src/github.com/mongodb/mongodb-kubernetes
569-
binary: scripts/dev/run_python.sh scripts/release/pipeline_main.py ${image_name} --build-scenario ${build_scenario|*BUILD_SCENARIO} --parallel ${all_agents}
569+
script: |
570+
source .generated/context.export.env
571+
scripts/dev/run_python.sh scripts/release/pipeline_main.py ${image_name} --build-scenario $BUILD_SCENARIO --parallel ${all_agents}
570572
571573
# TODO: this function is very similar to pipeline and it will joined with it in the future
572574
release_operator_pipeline:
573575
- *switch_context
574-
- command: subprocess.exec
576+
- command: shell.exec
575577
retry_on_failure: true
576578
type: setup
577579
params:
578580
shell: bash
579581
<<: *e2e_include_expansions_in_env
580582
working_dir: src/github.com/mongodb/mongodb-kubernetes
581583
# By default, use the git tag that triggered the task which can be overridden with RELEASE_OPERATOR_VERSION
582-
binary: scripts/dev/run_python.sh scripts/release/pipeline_main.py ${image_name} --build-scenario release --version ${RELEASE_OPERATOR_VERSION|*triggered_by_git_tag}
584+
script: |
585+
source .generated/context.export.env
586+
scripts/dev/run_python.sh scripts/release/pipeline_main.py ${image_name} --build-scenario release --version ${RELEASE_OPERATOR_VERSION|*triggered_by_git_tag}
583587
584588
teardown_cloud_qa_all:
585589
- *switch_context

.evergreen.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,6 @@ parameters:
215215
value: "false"
216216
description: set this to true if you would like the pipeline to automatically push a branch with updated snippets outputs
217217

218-
219218
# Triggered manually or by PCT.
220219
patch_aliases:
221220
- alias: "periodic_builds"
@@ -307,7 +306,6 @@ tasks:
307306
- func: pipeline
308307
vars:
309308
image_name: agent
310-
#TODO: make sure this works and is not overridden by evg_private_context (it should not be)
311309
build_scenario: manual_release
312310

313311
- 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)