Skip to content

Commit cc5a0fb

Browse files
committed
Fix release issue and allow testing
1 parent 9a14dba commit cc5a0fb

File tree

6 files changed

+18
-16
lines changed

6 files changed

+18
-16
lines changed

.evergreen-functions.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ variables:
4646
- workdir
4747
# temporary secret to pull community private preview image from quay.io
4848
- community_private_preview_pullsecret_dockerconfigjson
49+
- RELEASE_INITIAL_VERSION
50+
- RELEASE_INITIAL_COMMIT_SHA
51+
- OVERRIDE_OPERATOR_VERSION
4952

5053
functions:
5154

@@ -564,7 +567,7 @@ functions:
564567
working_dir: src/github.com/mongodb/mongodb-kubernetes
565568
binary: scripts/dev/run_python.sh scripts/release/pipeline_main.py --parallel ${image_name} ${all_agents} ${build_scenario}
566569

567-
release_pipeline:
570+
release_operator_pipeline:
568571
- *switch_context
569572
- command: subprocess.exec
570573
retry_on_failure: true
@@ -573,9 +576,8 @@ functions:
573576
shell: bash
574577
<<: *e2e_include_expansions_in_env
575578
working_dir: src/github.com/mongodb/mongodb-kubernetes
576-
env:
577-
git_tag: ${triggered_by_git_tag}
578-
binary: scripts/dev/run_python.sh scripts/release/pipeline_main.py ${image_name} --build-scenario release --version ${git_tag}
579+
# By default, use the git tag that triggered the task which can be overridden with OVERRIDE_OPERATOR_VERSION
580+
binary: scripts/dev/run_python.sh scripts/release/pipeline_main.py ${image_name} --build-scenario release --version ${OVERRIDE_OPERATOR_VERSION|*triggered_by_git_tag}
579581

580582
teardown_cloud_qa_all:
581583
- *switch_context

.evergreen-release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ tasks:
1010
- func: clone
1111
- func: setup_building_host
1212
- func: quay_login
13-
- func: release_pipeline
13+
- func: release_operator_pipeline
1414
vars:
1515
image_name: operator
1616

@@ -22,7 +22,7 @@ tasks:
2222
- func: clone
2323
- func: setup_building_host
2424
- func: quay_login
25-
- func: release_pipeline
25+
- func: release_operator_pipeline
2626
vars:
2727
image_name: init-appdb
2828

@@ -33,7 +33,7 @@ tasks:
3333
- func: clone
3434
- func: setup_building_host
3535
- func: quay_login
36-
- func: release_pipeline
36+
- func: release_operator_pipeline
3737
vars:
3838
image_name: init-database
3939

@@ -44,7 +44,7 @@ tasks:
4444
- func: clone
4545
- func: setup_building_host
4646
- func: quay_login
47-
- func: release_pipeline
47+
- func: release_operator_pipeline
4848
vars:
4949
image_name: init-ops-manager
5050

@@ -55,7 +55,7 @@ tasks:
5555
- func: clone
5656
- func: setup_building_host
5757
- func: quay_login
58-
- func: release_pipeline
58+
- func: release_operator_pipeline
5959
vars:
6060
image_name: database
6161

.github/workflows/preview_release_notes.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ jobs:
3131
with:
3232
python-version: ${{ env.PYTHON_VERSION }}
3333
- name: Generate Release Notes
34-
run: python -m scripts.release.release_notes -s $INITIAL_COMMIT_SHA -v $INITIAL_VERSION -o release_notes_tmp.md
34+
run: python -m scripts.release.release_notes -s $RELEASE_INITIAL_COMMIT_SHA -v $RELEASE_INITIAL_VERSION -o release_notes_tmp.md
3535
env:
3636
# We can not use environments set via GitHub UI because they will
3737
# not be available in the pull requests running from forks.
38-
INITIAL_COMMIT_SHA: ${{ env.INITIAL_COMMIT_SHA }}
39-
INITIAL_VERSION: ${{ env.INITIAL_VERSION }}
38+
RELEASE_INITIAL_COMMIT_SHA: ${{ env.RELEASE_INITIAL_COMMIT_SHA }}
39+
RELEASE_INITIAL_VERSION: ${{ env.RELEASE_INITIAL_VERSION }}
4040
- name: Add disclaimer to release notes preview
4141
run: |
4242
echo -e "_:warning: (this preview might not be accurate if the PR is not rebased on current master branch)_\n" > release_notes_preview.md

scripts/dev/contexts/root-context

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,5 +131,5 @@ fi
131131
export OPERATOR_NAME="mongodb-kubernetes-operator"
132132

133133
# Variables used for release process
134-
export INITIAL_COMMIT_SHA="9ed5f98fc70c5b3442f633d2393265fb8a2aba0c"
135-
export INITIAL_VERSION="1.3.0"
134+
export RELEASE_INITIAL_COMMIT_SHA="9ed5f98fc70c5b3442f633d2393265fb8a2aba0c"
135+
export RELEASE_INITIAL_VERSION="1.3.0"

scripts/release/atomic_pipeline.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,5 +441,6 @@ def load_release_file() -> Dict:
441441

442442

443443
def create_olm_version_tag(version: str) -> str:
444-
timestamp_suffix = "%Y%m%d%H%M%S".format(datetime.datetime.now())
444+
now = datetime.datetime.now()
445+
timestamp_suffix = now.strftime("%Y%m%d%H%M%S")
445446
return f"{version}-olm-{timestamp_suffix}"

scripts/release/build/image_build_process.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ def execute_docker_build(
116116
docker_cmd.buildx.build(
117117
context_path=path,
118118
file=dockerfile,
119-
# TODO: add tag for release builds (OLM immutable tag)
120119
tags=tags,
121120
platforms=platforms,
122121
builder=builder_name,

0 commit comments

Comments
 (0)