Skip to content

Commit 2ec7587

Browse files
committed
Explicitly push to ECR with latest tag. Staging as a followup
1 parent 031dd5b commit 2ec7587

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

scripts/release/build_context.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ def get_version(self) -> str:
6969
"""Gets the version that will be used to tag the images."""
7070
if self.scenario == BuildScenario.RELEASE:
7171
return self.git_tag
72+
if self.scenario == BuildScenario.STAGING:
73+
# On master merges, always use "latest" (preserving legacy behavior)
74+
return "latest"
7275
if self.patch_id:
7376
return self.patch_id
7477
# Alternatively, we can fail here if no ID is explicitly defined
@@ -77,7 +80,10 @@ def get_version(self) -> str:
7780
def get_base_registry(self) -> str:
7881
"""Get the base registry URL for the current scenario."""
7982
# TODO CLOUDP-335471: when working on the promotion process, use the prod registry variable in RELEASE scenario
80-
if self.scenario == BuildScenario.STAGING:
81-
return os.environ.get("STAGING_REPO_URL")
82-
else:
83-
return os.environ.get("BASE_REPO_URL")
83+
# TODO CLOUDP-335471: STAGING scenario should also push to STAGING_REPO_URL with version_id tag,
84+
# in addition to the current ECR dev latest push (for backward compatibility)
85+
# This will enable proper staging environment testing before production releases
86+
87+
# For now, always use BASE_REPO_URL to preserve legacy behavior
88+
# (STAGING pushes to ECR dev with "latest" tag)
89+
return os.environ.get("BASE_REPO_URL")

0 commit comments

Comments
 (0)