File tree Expand file tree Collapse file tree 6 files changed +18
-16
lines changed Expand file tree Collapse file tree 6 files changed +18
-16
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,9 @@ variables:
46
46
- workdir
47
47
# temporary secret to pull community private preview image from quay.io
48
48
- community_private_preview_pullsecret_dockerconfigjson
49
+ - RELEASE_INITIAL_VERSION
50
+ - RELEASE_INITIAL_COMMIT_SHA
51
+ - OVERRIDE_OPERATOR_VERSION
49
52
50
53
functions :
51
54
@@ -564,7 +567,7 @@ functions:
564
567
working_dir : src/github.com/mongodb/mongodb-kubernetes
565
568
binary : scripts/dev/run_python.sh scripts/release/pipeline_main.py --parallel ${image_name} ${all_agents} ${build_scenario}
566
569
567
- release_pipeline :
570
+ release_operator_pipeline :
568
571
- *switch_context
569
572
- command : subprocess.exec
570
573
retry_on_failure : true
@@ -573,9 +576,8 @@ functions:
573
576
shell : bash
574
577
<< : *e2e_include_expansions_in_env
575
578
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}
579
581
580
582
teardown_cloud_qa_all :
581
583
- *switch_context
Original file line number Diff line number Diff line change 10
10
- func : clone
11
11
- func : setup_building_host
12
12
- func : quay_login
13
- - func : release_pipeline
13
+ - func : release_operator_pipeline
14
14
vars :
15
15
image_name : operator
16
16
22
22
- func : clone
23
23
- func : setup_building_host
24
24
- func : quay_login
25
- - func : release_pipeline
25
+ - func : release_operator_pipeline
26
26
vars :
27
27
image_name : init-appdb
28
28
33
33
- func : clone
34
34
- func : setup_building_host
35
35
- func : quay_login
36
- - func : release_pipeline
36
+ - func : release_operator_pipeline
37
37
vars :
38
38
image_name : init-database
39
39
44
44
- func : clone
45
45
- func : setup_building_host
46
46
- func : quay_login
47
- - func : release_pipeline
47
+ - func : release_operator_pipeline
48
48
vars :
49
49
image_name : init-ops-manager
50
50
55
55
- func : clone
56
56
- func : setup_building_host
57
57
- func : quay_login
58
- - func : release_pipeline
58
+ - func : release_operator_pipeline
59
59
vars :
60
60
image_name : database
61
61
Original file line number Diff line number Diff line change @@ -31,12 +31,12 @@ jobs:
31
31
with :
32
32
python-version : ${{ env.PYTHON_VERSION }}
33
33
- 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
35
35
env :
36
36
# We can not use environments set via GitHub UI because they will
37
37
# 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 }}
40
40
- name : Add disclaimer to release notes preview
41
41
run : |
42
42
echo -e "_:warning: (this preview might not be accurate if the PR is not rebased on current master branch)_\n" > release_notes_preview.md
Original file line number Diff line number Diff line change 131
131
export OPERATOR_NAME=" mongodb-kubernetes-operator"
132
132
133
133
# 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"
Original file line number Diff line number Diff line change @@ -441,5 +441,6 @@ def load_release_file() -> Dict:
441
441
442
442
443
443
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" )
445
446
return f"{ version } -olm-{ timestamp_suffix } "
Original file line number Diff line number Diff line change @@ -116,7 +116,6 @@ def execute_docker_build(
116
116
docker_cmd .buildx .build (
117
117
context_path = path ,
118
118
file = dockerfile ,
119
- # TODO: add tag for release builds (OLM immutable tag)
120
119
tags = tags ,
121
120
platforms = platforms ,
122
121
builder = builder_name ,
You can’t perform that action at this time.
0 commit comments