Skip to content

Commit 9d9c3c3

Browse files
authored
Restoring changes. (#63)
1 parent 095ab5e commit 9d9c3c3

File tree

2 files changed

+24
-9
lines changed

2 files changed

+24
-9
lines changed

files/bin/deploy-iqe-cji.py

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -228,16 +228,22 @@ def check_cji_jobs(self) -> None:
228228
print(f"\nAll jobs succeeded: {job_map}", flush=True)
229229

230230
def run(self) -> None:
231-
if not self.pr_labels:
231+
if self.pr_labels:
232+
if "run-jenkins-tests" in self.pr_labels:
233+
display("PR labeled to run Jenkins tests instead of Konflux")
234+
return
235+
236+
if "ok-to-skip-smokes" in self.pr_labels:
237+
display("PR labeled to skip smoke tests")
238+
return
239+
240+
if "smokes-required" in self.pr_labels and not any(label.endswith("smoke-tests") for label in self.pr_labels):
241+
sys.exit("Missing smoke tests labels.")
242+
else:
243+
# Labels are empty (nightly/manual snapshot scenario)
232244
display("[INFO] No PR labels found. Assuming this is a scheduled or manual test run.")
233245
display("[INFO] Proceeding with full smoke tests...")
234246

235-
if "ok-to-skip-smokes" in self.pr_labels:
236-
display("[INFO] PR labeled with 'ok-to-skip-smokes'. Skipping smoke tests.")
237-
return
238-
239-
display("[INFO] Starting deploy. Label validation was already handled by Tekton.")
240-
241247
self.run_pod()
242248

243249
try:

files/bin/deploy.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,18 +135,27 @@ def main() -> None:
135135
components_arg = chain.from_iterable(("--component", component) for component in components)
136136
components_with_resources = os.environ.get("COMPONENTS_W_RESOURCES", "").split()
137137
components_with_resources_arg = chain.from_iterable(("--no-remove-resources", component) for component in components_with_resources)
138+
snapshot_components = {component.name for component in snapshot.components}
138139
deploy_frontends = os.environ.get("DEPLOY_FRONTENDS") or "false"
139140
deploy_timeout = get_timeout("DEPLOY_TIMEOUT", labels)
140141
extra_deploy_args = os.environ.get("EXTRA_DEPLOY_ARGS", "")
141142
optional_deps_method = os.environ.get("OPTIONAL_DEPS_METHOD", "hybrid")
142143
ref_env = os.environ.get("REF_ENV", "insights-production")
143144

144145
if pr_number:
146+
if "run-jenkins-tests" in labels:
147+
display("PR labeled to run Jenkins tests instead of Konflux")
148+
return
149+
145150
if "ok-to-skip-smokes" in labels:
146-
display("[INFO] PR labeled with 'ok-to-skip-smokes'. Skipping deploy.")
151+
display("PR labeled to skip smoke tests")
147152
return
153+
154+
if "koku" in snapshot_components and "smokes-required" in labels and not any(label.endswith("smoke-tests") for label in labels):
155+
sys.exit("Missing smoke tests labels.")
156+
148157
else:
149-
display("[INFO] No PR number found. Assuming this is a scheduled or manual test run.")
158+
display("[INFO] No PR number found. Assuming nightly/manual test run.")
150159
display("[INFO] Proceeding with full smoke tests...")
151160

152161
for secret in ["koku-aws", "koku-gcp"]:

0 commit comments

Comments
 (0)