Skip to content

Commit a50d0e9

Browse files
pass base repo as context to docker build
1 parent 3689c48 commit a50d0e9

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

ci_test.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ def get_dockerfiles():
4545
filename = file_info['filename']
4646
print(filename)
4747
if "Dockerfile" in filename and not "windows" in filename:
48-
file_dir = filename.replace("Dockerfile", "")
49-
dockerfiles.append(file_dir)
48+
dockerfiles.append(filename)
5049
return dockerfiles
5150

5251

@@ -69,15 +68,15 @@ def main():
6968
sys.stdout.flush()
7069
log_file = dockerfile.replace(docker_dir,"").replace("/", "_")
7170
log_file = "{}.log".format(log_file)
72-
cmd = f"docker build --no-cache=true {dockerfile}"
71+
cmd = "docker build --no-cache=true -f {dockerfile} .".format(dockerfile=dockerfile)
7372
if "buildx" in dockerfile:
7473
# if "buildx" is part of the path, we want to use the new buildx build system and build
7574
# for both amd64 and arm64.
7675
cmd = "docker buildx create --use"
7776
run_command(cmd, log_file)
7877
cmd = "docker buildx inspect --bootstrap"
7978
run_command(cmd, log_file)
80-
cmd = f"docker buildx build --platform linux/arm64,linux/amd64 --no-cache=true {dockerfile}"
79+
cmd = "docker buildx build --platform linux/arm64,linux/amd64 --no-cache=true -f {dockerfile} .".format(dockerfile=dockerfile)
8180
status = run_command(cmd, log_file)
8281
results[dockerfile] = status
8382
if status != 0:

swift-ci/main/ubuntu/23.10/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ RUN apt-get -y update && apt-get -y install \
3232
zip
3333

3434
COPY swift-ci/dependencies/requirements.txt /dependencies/
35-
RUN pip3 install -r /dependencies/requirements.txt
35+
RUN pip3 install -r /dependencies/requirements.txt --break-system-packages
3636

3737
ARG SWIFT_PLATFORM=ubuntu23.10
3838
ARG SWIFT_VERSION=5.10.1

swift-ci/main/ubuntu/24.04/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ RUN apt-get -y update && apt-get -y install \
3333
zip
3434

3535
COPY swift-ci/dependencies/requirements.txt /dependencies/
36-
RUN pip3 install -r /dependencies/requirements.txt
36+
RUN pip3 install -r /dependencies/requirements.txt --break-system-packages
3737

3838
ARG SWIFT_PLATFORM=ubuntu24.04
3939
ARG SWIFT_VERSION=5.10.1

0 commit comments

Comments
 (0)