Skip to content

Commit ab27431

Browse files
authored
Merge pull request #162 from shanejbrown/source-image-fix
Create unique source image layer
2 parents d636fdd + 8feacaa commit ab27431

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

buildrunner/SourceDockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ FROM $DOCKER_REGISTRY/busybox:latest
33
ADD source.tar /source/
44
VOLUME /source
55

6+
# Adding unique layers to avoid image conflicts with parallel buildrunner executions
7+
ARG BUILDRUNNER_DISTRO
8+
RUN echo "Building on $BUILDRUNNER_DISTRO (random number: $((RANDOM)))" > /build_info.txt

buildrunner/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,9 @@ def get_source_image(self):
307307
inject=inject,
308308
cache=False,
309309
pull=False,
310+
build_args={
311+
"BUILDRUNNER_DISTRO": os.environ.get("BUILDRUNNER_DISTRO")
312+
},
310313
)
311314
)
312315
if len(built_images_info.built_images) != 1:

0 commit comments

Comments
 (0)