From 69e07da52115476c9c73df016c375b2c24cda802 Mon Sep 17 00:00:00 2001 From: Remi Paulmier Date: Wed, 4 Jun 2025 13:31:11 -0500 Subject: [PATCH 01/13] fix --- .github/workflows/reusable-precommit.yml | 90 +++++++++++++++++++++++- 1 file changed, 87 insertions(+), 3 deletions(-) diff --git a/.github/workflows/reusable-precommit.yml b/.github/workflows/reusable-precommit.yml index dba1e1d..ffc302a 100644 --- a/.github/workflows/reusable-precommit.yml +++ b/.github/workflows/reusable-precommit.yml @@ -204,7 +204,11 @@ jobs: cp log4j2.yaml assets - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 +<<<<<<< HEAD - name: Build Batfish image +======= + - name: Build for amd64 +>>>>>>> 58f4e75 (duplicate build & upload tasks as docker type in buildx outputs is incompatible with multi-platform images) uses: docker/build-push-action@v3 with: push: false @@ -214,13 +218,61 @@ jobs: labels: | org.batfish.batfish-tag=${{ needs.bf_version.outputs.bf_sha }} org.batfish.batfish-version=${{ needs.bf_version.outputs.bf_version }} - outputs: type=docker,dest=/tmp/bf.tar + platforms: linux/amd64 + outputs: type=docker,dest=/tmp/bf-amd64.tar context: . +<<<<<<< HEAD - name: Upload docker image uses: actions/upload-artifact@v4 with: name: bf_image path: /tmp/bf.tar +======= + - name: Upload linux/amd64 docker image + uses: actions/upload-artifact@v3 + with: + name: bf_image + path: /tmp/bf-amd64.tar + - name: Build for arm64 + uses: docker/build-push-action@v3 + with: + push: false + file: batfish.dockerfile + build-args: ASSETS=./assets + tags: batfish/batfish:test-${{ needs.bf_version.outputs.bf_version }} + labels: | + org.batfish.batfish-tag=${{ needs.bf_version.outputs.bf_sha }} + org.batfish.batfish-version=${{ needs.bf_version.outputs.bf_version }} + platforms: linux/arm64 + outputs: type=docker,dest=/tmp/bf-arm64.tar + context: . + - name: Upload linux/arm64 docker image + uses: actions/upload-artifact@v3 + with: + name: bf_image + path: /tmp/bf-arm64.tar + allinone_image_build: + runs-on: ubuntu-latest + needs: + - bf_build + - pybf_build + - bf_version + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + with: + platforms: 'arm64' + - name: Download jar + uses: actions/download-artifact@v3 + with: + name: bf_jar + - name: Download questions + uses: actions/download-artifact@v3 + with: + name: bf_questions +>>>>>>> 58f4e75 (duplicate build & upload tasks as docker type in buildx outputs is incompatible with multi-platform images) - name: Download pybf whl uses: actions/download-artifact@v4 with: @@ -237,7 +289,13 @@ jobs: cp -r ${TEMP_DIR}/jupyter_notebooks/ assets/notebooks/ # Script that starts Batfish + Jupyter server cp wrapper.sh assets +<<<<<<< HEAD - name: Build allinone image +======= + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Build for linux/amd64 +>>>>>>> 58f4e75 (duplicate build & upload tasks as docker type in buildx outputs is incompatible with multi-platform images) uses: docker/build-push-action@v3 with: push: false @@ -249,10 +307,36 @@ jobs: org.batfish.batfish-tag=${{ needs.bf_version.outputs.bf_sha }} org.batfish.pybatfish-tag=${{ needs.bf_version.outputs.pybf_sha }} org.batfish.batfish-version=${{ needs.bf_version.outputs.bf_version }} - outputs: type=docker,dest=/tmp/allinone.tar + platforms: linux/amd64 + outputs: type=docker,dest=/tmp/allinone-amd64.tar context: . +<<<<<<< HEAD - name: Upload docker image uses: actions/upload-artifact@v4 +======= + - name: Upload linux/amd64 docker image + uses: actions/upload-artifact@v3 +>>>>>>> 58f4e75 (duplicate build & upload tasks as docker type in buildx outputs is incompatible with multi-platform images) + with: + name: allinone_image + path: /tmp/allinone-amd64.tar + - name: Build for linux/arm64 + uses: docker/build-push-action@v3 + with: + push: false + file: allinone.dockerfile + build-args: ASSETS=./assets + tags: batfish/allinone:test-${{ needs.bf_version.outputs.bf_version }} + labels: | + org.batfish.allinone-tag=${{ needs.bf_version.outputs.bf_sha }}_${{ needs.bf_version.outputs.pybf_sha }} + org.batfish.batfish-tag=${{ needs.bf_version.outputs.bf_sha }} + org.batfish.pybatfish-tag=${{ needs.bf_version.outputs.pybf_sha }} + org.batfish.batfish-version=${{ needs.bf_version.outputs.bf_version }} + platforms: linux/arm64 + outputs: type=docker,dest=/tmp/allinone-arm64.tar + context: . + - name: Upload linux/arm64 docker image + uses: actions/upload-artifact@v3 with: name: allinone_image - path: /tmp/allinone.tar + path: /tmp/allinone-arm64.tar From 8cf61c71c120beb7170f1ee478e985ecfe8e59e4 Mon Sep 17 00:00:00 2001 From: Remi Paulmier Date: Wed, 4 Jun 2025 13:34:10 -0500 Subject: [PATCH 02/13] fix --- .github/workflows/reusable-precommit.yml | 90 +----------------------- 1 file changed, 3 insertions(+), 87 deletions(-) diff --git a/.github/workflows/reusable-precommit.yml b/.github/workflows/reusable-precommit.yml index ffc302a..dba1e1d 100644 --- a/.github/workflows/reusable-precommit.yml +++ b/.github/workflows/reusable-precommit.yml @@ -204,11 +204,7 @@ jobs: cp log4j2.yaml assets - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 -<<<<<<< HEAD - name: Build Batfish image -======= - - name: Build for amd64 ->>>>>>> 58f4e75 (duplicate build & upload tasks as docker type in buildx outputs is incompatible with multi-platform images) uses: docker/build-push-action@v3 with: push: false @@ -218,61 +214,13 @@ jobs: labels: | org.batfish.batfish-tag=${{ needs.bf_version.outputs.bf_sha }} org.batfish.batfish-version=${{ needs.bf_version.outputs.bf_version }} - platforms: linux/amd64 - outputs: type=docker,dest=/tmp/bf-amd64.tar + outputs: type=docker,dest=/tmp/bf.tar context: . -<<<<<<< HEAD - name: Upload docker image uses: actions/upload-artifact@v4 with: name: bf_image path: /tmp/bf.tar -======= - - name: Upload linux/amd64 docker image - uses: actions/upload-artifact@v3 - with: - name: bf_image - path: /tmp/bf-amd64.tar - - name: Build for arm64 - uses: docker/build-push-action@v3 - with: - push: false - file: batfish.dockerfile - build-args: ASSETS=./assets - tags: batfish/batfish:test-${{ needs.bf_version.outputs.bf_version }} - labels: | - org.batfish.batfish-tag=${{ needs.bf_version.outputs.bf_sha }} - org.batfish.batfish-version=${{ needs.bf_version.outputs.bf_version }} - platforms: linux/arm64 - outputs: type=docker,dest=/tmp/bf-arm64.tar - context: . - - name: Upload linux/arm64 docker image - uses: actions/upload-artifact@v3 - with: - name: bf_image - path: /tmp/bf-arm64.tar - allinone_image_build: - runs-on: ubuntu-latest - needs: - - bf_build - - pybf_build - - bf_version - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - with: - platforms: 'arm64' - - name: Download jar - uses: actions/download-artifact@v3 - with: - name: bf_jar - - name: Download questions - uses: actions/download-artifact@v3 - with: - name: bf_questions ->>>>>>> 58f4e75 (duplicate build & upload tasks as docker type in buildx outputs is incompatible with multi-platform images) - name: Download pybf whl uses: actions/download-artifact@v4 with: @@ -289,13 +237,7 @@ jobs: cp -r ${TEMP_DIR}/jupyter_notebooks/ assets/notebooks/ # Script that starts Batfish + Jupyter server cp wrapper.sh assets -<<<<<<< HEAD - name: Build allinone image -======= - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build for linux/amd64 ->>>>>>> 58f4e75 (duplicate build & upload tasks as docker type in buildx outputs is incompatible with multi-platform images) uses: docker/build-push-action@v3 with: push: false @@ -307,36 +249,10 @@ jobs: org.batfish.batfish-tag=${{ needs.bf_version.outputs.bf_sha }} org.batfish.pybatfish-tag=${{ needs.bf_version.outputs.pybf_sha }} org.batfish.batfish-version=${{ needs.bf_version.outputs.bf_version }} - platforms: linux/amd64 - outputs: type=docker,dest=/tmp/allinone-amd64.tar + outputs: type=docker,dest=/tmp/allinone.tar context: . -<<<<<<< HEAD - name: Upload docker image uses: actions/upload-artifact@v4 -======= - - name: Upload linux/amd64 docker image - uses: actions/upload-artifact@v3 ->>>>>>> 58f4e75 (duplicate build & upload tasks as docker type in buildx outputs is incompatible with multi-platform images) - with: - name: allinone_image - path: /tmp/allinone-amd64.tar - - name: Build for linux/arm64 - uses: docker/build-push-action@v3 - with: - push: false - file: allinone.dockerfile - build-args: ASSETS=./assets - tags: batfish/allinone:test-${{ needs.bf_version.outputs.bf_version }} - labels: | - org.batfish.allinone-tag=${{ needs.bf_version.outputs.bf_sha }}_${{ needs.bf_version.outputs.pybf_sha }} - org.batfish.batfish-tag=${{ needs.bf_version.outputs.bf_sha }} - org.batfish.pybatfish-tag=${{ needs.bf_version.outputs.pybf_sha }} - org.batfish.batfish-version=${{ needs.bf_version.outputs.bf_version }} - platforms: linux/arm64 - outputs: type=docker,dest=/tmp/allinone-arm64.tar - context: . - - name: Upload linux/arm64 docker image - uses: actions/upload-artifact@v3 with: name: allinone_image - path: /tmp/allinone-arm64.tar + path: /tmp/allinone.tar From 2350177933bc006cd62a0b21d21716c207b85d6d Mon Sep 17 00:00:00 2001 From: Remi Paulmier Date: Wed, 4 Jun 2025 13:42:43 -0500 Subject: [PATCH 03/13] try multi-platform build --- .github/workflows/reusable-precommit.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/reusable-precommit.yml b/.github/workflows/reusable-precommit.yml index dba1e1d..386add3 100644 --- a/.github/workflows/reusable-precommit.yml +++ b/.github/workflows/reusable-precommit.yml @@ -203,9 +203,9 @@ jobs: cp allinone-bundle.jar assets cp log4j2.yaml assets - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Build Batfish image - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v6 with: push: false file: batfish.dockerfile @@ -216,6 +216,7 @@ jobs: org.batfish.batfish-version=${{ needs.bf_version.outputs.bf_version }} outputs: type=docker,dest=/tmp/bf.tar context: . + platforms: linux/amd64, linux/arm64 - name: Upload docker image uses: actions/upload-artifact@v4 with: @@ -238,7 +239,7 @@ jobs: # Script that starts Batfish + Jupyter server cp wrapper.sh assets - name: Build allinone image - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v6 with: push: false file: allinone.dockerfile @@ -251,6 +252,7 @@ jobs: org.batfish.batfish-version=${{ needs.bf_version.outputs.bf_version }} outputs: type=docker,dest=/tmp/allinone.tar context: . + platforms: linux/amd64, linux/arm64 - name: Upload docker image uses: actions/upload-artifact@v4 with: From c4f72efaacfb6487e905697fa0e71876263b8e8f Mon Sep 17 00:00:00 2001 From: Remi Paulmier Date: Wed, 4 Jun 2025 15:07:50 -0500 Subject: [PATCH 04/13] multi-platform: set JAVA_HOME based on TARGETARCH --- allinone.dockerfile | 12 +++++++++++- batfish.dockerfile | 12 +++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/allinone.dockerfile b/allinone.dockerfile index d8c78d7..097b9ee 100644 --- a/allinone.dockerfile +++ b/allinone.dockerfile @@ -4,11 +4,21 @@ FROM ubuntu:24.04 # and questions/ directory (containing question templates to be loaded by Batfish) ARG ASSETS +# multi-platform pre-defined args +ARG BUILDPLATFORM +ARG BUILDOS +ARG BUILDARCH +ARG BUILDVARIANT +ARG TARGETPLATFORM +ARG TARGETOS +ARG TARGETARCH +ARG TARGETVARIANT + # Make /data dir available to any user, so this container can be run by any user RUN mkdir -p /data RUN chmod a+rw /data COPY ${ASSETS} ./ -ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64/ +ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk-$TARGETARCH/ ENV JAVA_LIBRARY_PATH=/usr/lib ENV HOME=/data diff --git a/batfish.dockerfile b/batfish.dockerfile index 5dccbe8..4dc2294 100644 --- a/batfish.dockerfile +++ b/batfish.dockerfile @@ -4,11 +4,21 @@ FROM ubuntu:24.04 # and questions/ directory (containing question templates to be loaded by Batfish) ARG ASSETS +# multi-platform pre-defined args +ARG BUILDPLATFORM +ARG BUILDOS +ARG BUILDARCH +ARG BUILDVARIANT +ARG TARGETPLATFORM +ARG TARGETOS +ARG TARGETARCH +ARG TARGETVARIANT + # Make /data dir available to any user, so this container can be run by any user RUN mkdir -p /data RUN chmod a+rw /data COPY ${ASSETS} ./ -ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64/ +ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk-$TARGETARCH/ ENV JAVA_LIBRARY_PATH=/usr/lib ENV HOME=/data From 73aa5ccc72c6c43d350bfe8068d38172d205b7cb Mon Sep 17 00:00:00 2001 From: Remi Paulmier Date: Wed, 4 Jun 2025 15:28:37 -0500 Subject: [PATCH 05/13] do not output tarballs --- .github/workflows/reusable-precommit.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/reusable-precommit.yml b/.github/workflows/reusable-precommit.yml index 386add3..e87288e 100644 --- a/.github/workflows/reusable-precommit.yml +++ b/.github/workflows/reusable-precommit.yml @@ -214,7 +214,6 @@ jobs: labels: | org.batfish.batfish-tag=${{ needs.bf_version.outputs.bf_sha }} org.batfish.batfish-version=${{ needs.bf_version.outputs.bf_version }} - outputs: type=docker,dest=/tmp/bf.tar context: . platforms: linux/amd64, linux/arm64 - name: Upload docker image @@ -250,7 +249,6 @@ jobs: org.batfish.batfish-tag=${{ needs.bf_version.outputs.bf_sha }} org.batfish.pybatfish-tag=${{ needs.bf_version.outputs.pybf_sha }} org.batfish.batfish-version=${{ needs.bf_version.outputs.bf_version }} - outputs: type=docker,dest=/tmp/allinone.tar context: . platforms: linux/amd64, linux/arm64 - name: Upload docker image From ca4c76afa0997cbef72b7ed93d303d034da58283 Mon Sep 17 00:00:00 2001 From: Remi Paulmier Date: Wed, 4 Jun 2025 15:50:55 -0500 Subject: [PATCH 06/13] Revert "do not output tarballs" This reverts commit 73aa5ccc72c6c43d350bfe8068d38172d205b7cb. --- .github/workflows/reusable-precommit.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/reusable-precommit.yml b/.github/workflows/reusable-precommit.yml index e87288e..386add3 100644 --- a/.github/workflows/reusable-precommit.yml +++ b/.github/workflows/reusable-precommit.yml @@ -214,6 +214,7 @@ jobs: labels: | org.batfish.batfish-tag=${{ needs.bf_version.outputs.bf_sha }} org.batfish.batfish-version=${{ needs.bf_version.outputs.bf_version }} + outputs: type=docker,dest=/tmp/bf.tar context: . platforms: linux/amd64, linux/arm64 - name: Upload docker image @@ -249,6 +250,7 @@ jobs: org.batfish.batfish-tag=${{ needs.bf_version.outputs.bf_sha }} org.batfish.pybatfish-tag=${{ needs.bf_version.outputs.pybf_sha }} org.batfish.batfish-version=${{ needs.bf_version.outputs.bf_version }} + outputs: type=docker,dest=/tmp/allinone.tar context: . platforms: linux/amd64, linux/arm64 - name: Upload docker image From 17228e6c107fded6eadc9587a723d646f95167a9 Mon Sep 17 00:00:00 2001 From: Remi Paulmier Date: Wed, 4 Jun 2025 15:51:57 -0500 Subject: [PATCH 07/13] output tarballs ucing OCI format --- .github/workflows/reusable-precommit.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reusable-precommit.yml b/.github/workflows/reusable-precommit.yml index 386add3..1a90746 100644 --- a/.github/workflows/reusable-precommit.yml +++ b/.github/workflows/reusable-precommit.yml @@ -214,7 +214,7 @@ jobs: labels: | org.batfish.batfish-tag=${{ needs.bf_version.outputs.bf_sha }} org.batfish.batfish-version=${{ needs.bf_version.outputs.bf_version }} - outputs: type=docker,dest=/tmp/bf.tar + outputs: type=oci,dest=/tmp/bf.tar context: . platforms: linux/amd64, linux/arm64 - name: Upload docker image @@ -250,7 +250,7 @@ jobs: org.batfish.batfish-tag=${{ needs.bf_version.outputs.bf_sha }} org.batfish.pybatfish-tag=${{ needs.bf_version.outputs.pybf_sha }} org.batfish.batfish-version=${{ needs.bf_version.outputs.bf_version }} - outputs: type=docker,dest=/tmp/allinone.tar + outputs: type=oci,dest=/tmp/allinone.tar context: . platforms: linux/amd64, linux/arm64 - name: Upload docker image From 211f83f749d9dca195e7c63fec70ce091ee3f015 Mon Sep 17 00:00:00 2001 From: Remi Paulmier Date: Thu, 5 Jun 2025 09:30:55 -0500 Subject: [PATCH 08/13] test batfish image only; add some debug --- .../workflows/reusable-integration-tests.yml | 98 ++++++++++--------- 1 file changed, 50 insertions(+), 48 deletions(-) diff --git a/.github/workflows/reusable-integration-tests.yml b/.github/workflows/reusable-integration-tests.yml index 12699f4..f4afbca 100644 --- a/.github/workflows/reusable-integration-tests.yml +++ b/.github/workflows/reusable-integration-tests.yml @@ -180,6 +180,8 @@ jobs: name: bf_questions - name: Start bf run: | + ls -la bf.tar + tar tvf bf.tar docker load --input bf.tar docker run -d --net=host batfish/batfish:test-${{ inputs.bf_version }} - uses: actions/setup-python@v5 @@ -199,51 +201,51 @@ jobs: popd - name: Stop bf run: docker stop $(docker ps -q) - allinone_image_test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Download allinone image - uses: actions/download-artifact@v4 - with: - name: allinone_image - - name: Download pybf whl - uses: actions/download-artifact@v4 - with: - name: pybf_whl - - name: Download pybf notebooks - uses: actions/download-artifact@v4 - with: - name: pybf_notebooks - - name: Download pybf tests - uses: actions/download-artifact@v4 - with: - name: pybf_tests - - name: Download questions - uses: actions/download-artifact@v4 - with: - name: bf_questions - - uses: actions/setup-python@v5 - with: - python-version: 3.9 - - name: Setup pybf - run: pip install "$(ls pybatfish-*.whl)"[dev] - - name: Run tests inside allinone container - run: | - ABS_SOURCE_DIR="$(realpath .)" - TEMP_DIR=$(mktemp -d) - tar xzf pybatfish-tests.tgz -C ${TEMP_DIR} - tar xzf pybatfish-notebooks.tgz -C ${TEMP_DIR} - tar xzf questions.tgz -C ${TEMP_DIR} - PYBF_WHEEL="$(ls pybatfish-*.whl)" - cp ${PYBF_WHEEL} ${TEMP_DIR} - docker load --input allinone.tar - docker run \ - -v ${ABS_SOURCE_DIR}/tests/test.sh:/test.sh:ro \ - -v ${TEMP_DIR}/tests/:/pybatfish/tests/ \ - -v ${TEMP_DIR}/jupyter_notebooks/:/pybatfish/jupyter_notebooks/ \ - -v ${TEMP_DIR}/questions/:/pybatfish/questions/ \ - -v ${TEMP_DIR}/${PYBF_WHEEL}:/pybatfish/dist/${PYBF_WHEEL} \ - --entrypoint /bin/bash \ - batfish/allinone:test-${{ inputs.bf_version }} \ - test.sh +# allinone_image_test: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# - name: Download allinone image +# uses: actions/download-artifact@v4 +# with: +# name: allinone_image +# - name: Download pybf whl +# uses: actions/download-artifact@v4 +# with: +# name: pybf_whl +# - name: Download pybf notebooks +# uses: actions/download-artifact@v4 +# with: +# name: pybf_notebooks +# - name: Download pybf tests +# uses: actions/download-artifact@v4 +# with: +# name: pybf_tests +# - name: Download questions +# uses: actions/download-artifact@v4 +# with: +# name: bf_questions +# - uses: actions/setup-python@v5 +# with: +# python-version: 3.9 +# - name: Setup pybf +# run: pip install "$(ls pybatfish-*.whl)"[dev] +# - name: Run tests inside allinone container +# run: | +# ABS_SOURCE_DIR="$(realpath .)" +# TEMP_DIR=$(mktemp -d) +# tar xzf pybatfish-tests.tgz -C ${TEMP_DIR} +# tar xzf pybatfish-notebooks.tgz -C ${TEMP_DIR} +# tar xzf questions.tgz -C ${TEMP_DIR} +# PYBF_WHEEL="$(ls pybatfish-*.whl)" +# cp ${PYBF_WHEEL} ${TEMP_DIR} +# docker load --input allinone.tar +# docker run \ +# -v ${ABS_SOURCE_DIR}/tests/test.sh:/test.sh:ro \ +# -v ${TEMP_DIR}/tests/:/pybatfish/tests/ \ +# -v ${TEMP_DIR}/jupyter_notebooks/:/pybatfish/jupyter_notebooks/ \ +# -v ${TEMP_DIR}/questions/:/pybatfish/questions/ \ +# -v ${TEMP_DIR}/${PYBF_WHEEL}:/pybatfish/dist/${PYBF_WHEEL} \ +# --entrypoint /bin/bash \ +# batfish/allinone:test-${{ inputs.bf_version }} \ +# test.sh From 33761f28a632e8010ec22bc4a54b35a09e220498 Mon Sep 17 00:00:00 2001 From: Remi Paulmier Date: Fri, 13 Jun 2025 16:40:48 +0200 Subject: [PATCH 09/13] do not built allinone image --- .github/workflows/reusable-precommit.yml | 72 ++++++++++++------------ 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/.github/workflows/reusable-precommit.yml b/.github/workflows/reusable-precommit.yml index 1a90746..c3f8b79 100644 --- a/.github/workflows/reusable-precommit.yml +++ b/.github/workflows/reusable-precommit.yml @@ -222,39 +222,39 @@ jobs: with: name: bf_image path: /tmp/bf.tar - - name: Download pybf whl - uses: actions/download-artifact@v4 - with: - name: pybf_whl - - name: Download pybf notebooks - uses: actions/download-artifact@v4 - with: - name: pybf_notebooks - - name: Setup Allinone image assets - run: | - cp pybatfish-*.whl assets - TEMP_DIR=$(mktemp -d) - tar xzf pybatfish-notebooks.tgz -C ${TEMP_DIR} - cp -r ${TEMP_DIR}/jupyter_notebooks/ assets/notebooks/ - # Script that starts Batfish + Jupyter server - cp wrapper.sh assets - - name: Build allinone image - uses: docker/build-push-action@v6 - with: - push: false - file: allinone.dockerfile - build-args: ASSETS=./assets - tags: batfish/allinone:test-${{ needs.bf_version.outputs.bf_version }} - labels: | - org.batfish.allinone-tag=${{ needs.bf_version.outputs.bf_sha }}_${{ needs.bf_version.outputs.pybf_sha }} - org.batfish.batfish-tag=${{ needs.bf_version.outputs.bf_sha }} - org.batfish.pybatfish-tag=${{ needs.bf_version.outputs.pybf_sha }} - org.batfish.batfish-version=${{ needs.bf_version.outputs.bf_version }} - outputs: type=oci,dest=/tmp/allinone.tar - context: . - platforms: linux/amd64, linux/arm64 - - name: Upload docker image - uses: actions/upload-artifact@v4 - with: - name: allinone_image - path: /tmp/allinone.tar +# - name: Download pybf whl +# uses: actions/download-artifact@v4 +# with: +# name: pybf_whl +# - name: Download pybf notebooks +# uses: actions/download-artifact@v4 +# with: +# name: pybf_notebooks +# - name: Setup Allinone image assets +# run: | +# cp pybatfish-*.whl assets +# TEMP_DIR=$(mktemp -d) +# tar xzf pybatfish-notebooks.tgz -C ${TEMP_DIR} +# cp -r ${TEMP_DIR}/jupyter_notebooks/ assets/notebooks/ +# # Script that starts Batfish + Jupyter server +# cp wrapper.sh assets +# - name: Build allinone image +# uses: docker/build-push-action@v6 +# with: +# push: false +# file: allinone.dockerfile +# build-args: ASSETS=./assets +# tags: batfish/allinone:test-${{ needs.bf_version.outputs.bf_version }} +# labels: | +# org.batfish.allinone-tag=${{ needs.bf_version.outputs.bf_sha }}_${{ needs.bf_version.outputs.pybf_sha }} +# org.batfish.batfish-tag=${{ needs.bf_version.outputs.bf_sha }} +# org.batfish.pybatfish-tag=${{ needs.bf_version.outputs.pybf_sha }} +# org.batfish.batfish-version=${{ needs.bf_version.outputs.bf_version }} +# outputs: type=oci,dest=/tmp/allinone.tar +# context: . +# platforms: linux/amd64, linux/arm64 +# - name: Upload docker image +# uses: actions/upload-artifact@v4 +# with: +# name: allinone_image +# path: /tmp/allinone.tar From 810d9212b89420118fe9e37af132ddc963fc8168 Mon Sep 17 00:00:00 2001 From: Remi Paulmier Date: Fri, 13 Jun 2025 23:13:53 +0200 Subject: [PATCH 10/13] add debug --- .github/workflows/reusable-integration-tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/reusable-integration-tests.yml b/.github/workflows/reusable-integration-tests.yml index f4afbca..3042d0a 100644 --- a/.github/workflows/reusable-integration-tests.yml +++ b/.github/workflows/reusable-integration-tests.yml @@ -182,6 +182,9 @@ jobs: run: | ls -la bf.tar tar tvf bf.tar + dpkg -l |grep docker + docker --version + cat /etc/lsb-release docker load --input bf.tar docker run -d --net=host batfish/batfish:test-${{ inputs.bf_version }} - uses: actions/setup-python@v5 From 87455decb79f7b11f2e40378c193369c7270a904 Mon Sep 17 00:00:00 2001 From: Remi Paulmier Date: Fri, 13 Jun 2025 23:42:57 +0200 Subject: [PATCH 11/13] ensure docker-ce is installed --- .github/workflows/reusable-integration-tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/reusable-integration-tests.yml b/.github/workflows/reusable-integration-tests.yml index 3042d0a..ca84c26 100644 --- a/.github/workflows/reusable-integration-tests.yml +++ b/.github/workflows/reusable-integration-tests.yml @@ -178,6 +178,8 @@ jobs: uses: actions/download-artifact@v4 with: name: bf_questions + - name: Set up docker-ce + uses: docker/setup-docker-action@v4 - name: Start bf run: | ls -la bf.tar From b761713b420b63fdd96d01fef6427a6ff7c5f1fa Mon Sep 17 00:00:00 2001 From: Remi Paulmier Date: Fri, 13 Jun 2025 23:43:30 +0200 Subject: [PATCH 12/13] debug --- .github/workflows/reusable-integration-tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/reusable-integration-tests.yml b/.github/workflows/reusable-integration-tests.yml index ca84c26..ed1379e 100644 --- a/.github/workflows/reusable-integration-tests.yml +++ b/.github/workflows/reusable-integration-tests.yml @@ -186,6 +186,7 @@ jobs: tar tvf bf.tar dpkg -l |grep docker docker --version + docker image load --help cat /etc/lsb-release docker load --input bf.tar docker run -d --net=host batfish/batfish:test-${{ inputs.bf_version }} From 6f4c94aabe57e25adcf8373a38b2c575220e85aa Mon Sep 17 00:00:00 2001 From: Remi Paulmier Date: Sat, 14 Jun 2025 00:14:32 +0200 Subject: [PATCH 13/13] explictly load the amd64 platform --- .github/workflows/reusable-integration-tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable-integration-tests.yml b/.github/workflows/reusable-integration-tests.yml index ed1379e..acb915f 100644 --- a/.github/workflows/reusable-integration-tests.yml +++ b/.github/workflows/reusable-integration-tests.yml @@ -188,7 +188,8 @@ jobs: docker --version docker image load --help cat /etc/lsb-release - docker load --input bf.tar + docker image load --input bf.tar --platform linux/amd64 + docker images docker run -d --net=host batfish/batfish:test-${{ inputs.bf_version }} - uses: actions/setup-python@v5 with: