Skip to content

Commit f3cef64

Browse files
authored
Merge pull request #214 from jmle/bugfix/do-not-build-parent-if-not-needed
2 parents 6b39ddd + 381e38a commit f3cef64

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

scripts/parse_matrix_config.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,10 @@ def find_and_process_matching_jobs(
296296
if matches or include:
297297
job_copy = {k: v for k, v in job.items() if k != "dependent_jobs"}
298298

299-
# Add base_image field for dependent jobs
300-
if parent_image:
299+
# Add base_image field for dependent jobs only if parent was included
300+
# If include=True, it means the parent matched and will be built
301+
# If include=False, the parent is skipped, so use nightly image instead
302+
if parent_image and include:
301303
parent_image = parent_image.replace("/", "_")
302304
if base_image_tag:
303305
job_copy["base_image"] = f"{parent_image}--{base_image_tag}"

0 commit comments

Comments
 (0)