File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 1
1
# This file is the new Sonar
2
2
import base64
3
- import fcntl
4
- import os
5
- import time
6
3
from typing import Dict
7
4
8
5
import boto3
@@ -118,10 +115,7 @@ def execute_docker_build(
118
115
if len (platforms ) > 1 :
119
116
logger .info (f"Multi-platform build for { len (platforms )} architectures" )
120
117
121
- # Ensure buildx builder exists (safe for concurrent execution)
122
- ensure_buildx_builder (builder_name )
123
-
124
- # Build the image using buildx
118
+ # Build the image using buildx, builder must be already initialized
125
119
docker .buildx .build (
126
120
context_path = path ,
127
121
file = dockerfile ,
Original file line number Diff line number Diff line change 34
34
BuildContext ,
35
35
BuildScenario ,
36
36
)
37
+ from scripts .release .build_images import DEFAULT_BUILDER_NAME , ensure_buildx_builder
37
38
38
39
"""
39
40
The goal of main.py, build_configuration.py and build_context.py is to provide a single source of truth for the build
@@ -145,6 +146,10 @@ def main():
145
146
logger .info (f"Building image: { args .image } " )
146
147
logger .info (f"Build configuration: { build_config } " )
147
148
149
+ # Create buildx builder
150
+ # It must be initialized here as opposed to in build_images.py so that parallel calls (such as agent builds) can access it
151
+ # and not face race conditions
152
+ ensure_buildx_builder (DEFAULT_BUILDER_NAME )
148
153
build_image (args .image , build_config )
149
154
150
155
You can’t perform that action at this time.
0 commit comments