File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
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
3
6
from typing import Dict
4
7
5
8
import boto3
@@ -123,7 +126,10 @@ def execute_docker_build(
123
126
if len (platforms ) > 1 :
124
127
logger .info (f"Multi-platform build for { len (platforms )} architectures" )
125
128
126
- # Build the image using buildx, builder must be already initialized
129
+ # Ensure buildx builder exists (safe for concurrent execution)
130
+ ensure_buildx_builder (builder_name )
131
+
132
+ # Build the image using buildx
127
133
docker .buildx .build (
128
134
context_path = path ,
129
135
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
38
37
39
38
"""
40
39
The goal of main.py, build_configuration.py and build_context.py is to provide a single source of truth for the build
@@ -146,10 +145,6 @@ def main():
146
145
logger .info (f"Building image: { args .image } " )
147
146
logger .info (f"Build configuration: { build_config } " )
148
147
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 )
153
148
build_image (args .image , build_config )
154
149
155
150
You can’t perform that action at this time.
0 commit comments