Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed .github/.DS_Store
Binary file not shown.
13 changes: 11 additions & 2 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,14 @@ jobs:
name: Build Docker images
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: env && ./ci_test.py
- name: Checkout repository
uses: actions/checkout@v4
- name: Build Docker images
run: ./ci_test.py
- name: Archive production artifacts
uses: actions/upload-artifact@v4
if: always()
with:
name: docker-logs
path: |
*.log
7 changes: 4 additions & 3 deletions ci_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ def main():
sys.stdout.flush()
log_file = dockerfile.replace(docker_dir,"").replace("/", "_")
log_file = "{}.log".format(log_file)
cmd = "docker build --no-cache=true --build-arg http_proxy={} --build-arg https_proxy={} {}".format(os.environ['http_proxy'], os.environ['https_proxy'], dockerfile)
cmd = f"docker build --no-cache=true {dockerfile}"
if "buildx" in dockerfile:
# if "buildx" is part of the path, we want to use the new buildx build system and build
# for both amd64 and arm64.
cmd = "docker buildx create --use --driver-opt env.http_proxy={} --driver-opt env.https_proxy={}".format(os.environ['http_proxy'], os.environ['https_proxy'])
cmd = "docker buildx create --use"
run_command(cmd, log_file)
cmd = "docker buildx inspect --bootstrap"
run_command(cmd, log_file)
cmd = "docker buildx build --platform linux/arm64,linux/amd64 --no-cache=true --build-arg env.http_proxy={} --build-arg env.https_proxy={} {}".format(os.environ['http_proxy'], os.environ['https_proxy'], dockerfile)
cmd = f"docker buildx build --platform linux/arm64,linux/amd64 --no-cache=true {dockerfile}"
status = run_command(cmd, log_file)
results[dockerfile] = status
if status != 0:
Expand All @@ -90,6 +90,7 @@ def main():
run_command(cmd)
print("[{}] - {}".format(results[dockerfile], dockerfile))
sys.stdout.flush()
run_command("docker image prune -f")

for dockerfile in dockerfiles:
if results[dockerfile] == "FAILED":
Expand Down
Loading