@@ -134,10 +134,8 @@ def image_builder(buildspec, image_types=[], device_types=[]):
134
134
ARTIFACTS .update (image_config ["context" ])
135
135
136
136
if build_context == "PR" :
137
- cache_from_tag = tag_image_with_pr_number (image_config ["tag" ])
138
137
image_tag = tag_image_with_pr_number (image_config ["tag" ])
139
138
else :
140
- cache_from_tag = image_config ["tag" ]
141
139
image_tag = image_config ["tag" ]
142
140
143
141
if is_autopatch_build_enabled (buildspec_path = buildspec ):
@@ -361,7 +359,6 @@ def image_builder(buildspec, image_types=[], device_types=[]):
361
359
tag = append_tag (image_tag , "pre-push" ),
362
360
to_build = image_config ["build" ],
363
361
stage = constants .PRE_PUSH_STAGE ,
364
- cache_from_tag = cache_from_tag ,
365
362
context = context ,
366
363
additional_tags = additional_image_tags ,
367
364
target = target ,
@@ -373,7 +370,7 @@ def image_builder(buildspec, image_types=[], device_types=[]):
373
370
# inside function get_common_stage_image_object we make pre_push_stage_image_object non pushable.
374
371
if image_config .get ("enable_common_stage_build" , True ):
375
372
common_stage_image_object = generate_common_stage_image_object (
376
- pre_push_stage_image_object , image_tag , cache_from_tag
373
+ pre_push_stage_image_object , image_tag
377
374
)
378
375
COMMON_STAGE_IMAGES .append (common_stage_image_object )
379
376
@@ -477,7 +474,7 @@ def process_images(pre_push_image_list, pre_push_image_type="Pre-push", buildspe
477
474
return images_to_push
478
475
479
476
480
- def generate_common_stage_image_object (pre_push_stage_image_object , image_tag , cache_from_tag ):
477
+ def generate_common_stage_image_object (pre_push_stage_image_object , image_tag ):
481
478
"""
482
479
Creates a common stage image object for a pre_push stage image. If for a pre_push stage image we create a common
483
480
stage image, then we do not push the pre_push stage image to the repository. Instead, we just push its common stage
@@ -499,7 +496,6 @@ def generate_common_stage_image_object(pre_push_stage_image_object, image_tag, c
499
496
tag = append_tag (image_tag , "multistage-common" ),
500
497
to_build = pre_push_stage_image_object .to_build ,
501
498
stage = constants .COMMON_STAGE ,
502
- cache_from_tag = cache_from_tag ,
503
499
additional_tags = pre_push_stage_image_object .additional_tags ,
504
500
)
505
501
pre_push_stage_image_object .to_push = False
0 commit comments