diff --git a/.github/workflows/buildkit.yml b/.github/workflows/buildkit.yml index baa27a77577a0ba86081b17081fe0632c3c4ed1e..d131d9c9ba8bc855f42fb23bc49d3898867238c1 100644 --- a/.github/workflows/buildkit.yml +++ b/.github/workflows/buildkit.yml @@ -13,7 +13,7 @@ on: pull_request: env: - BUNDLES_OUTPUT: ./bundles + DESTDIR: ./build jobs: validate-dco: @@ -40,7 +40,7 @@ jobs: uses: actions/upload-artifact@v3 with: name: binary - path: ${{ env.BUNDLES_OUTPUT }} + path: ${{ env.DESTDIR }} if-no-files-found: error retention-days: 1 @@ -106,7 +106,7 @@ jobs: env: CONTEXT: "." TEST_DOCKERD: "1" - TEST_DOCKERD_BINARY: "./build/moby/binary-daemon/dockerd" + TEST_DOCKERD_BINARY: "./build/moby/dockerd" TESTPKGS: "./${{ matrix.pkg }}" TESTFLAGS: "-v --parallel=1 --timeout=30m --run=//worker=dockerd$" working-directory: buildkit diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a34abc2425c040298fe0c25274ef3aca2de2a0db..97ee4e73b398924476580588c0678b5206abf6cf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ on: pull_request: env: - BUNDLES_OUTPUT: ./bundles + DESTDIR: ./build jobs: validate-dco: @@ -50,7 +50,7 @@ jobs: uses: actions/upload-artifact@v3 with: name: ${{ matrix.target }} - path: ${{ env.BUNDLES_OUTPUT }} + path: ${{ env.DESTDIR }} if-no-files-found: error retention-days: 7 @@ -110,6 +110,6 @@ jobs: uses: actions/upload-artifact@v3 with: name: cross-${{ env.PLATFORM_PAIR }} - path: ${{ env.BUNDLES_OUTPUT }} + path: ${{ env.DESTDIR }} if-no-files-found: error retention-days: 7 diff --git a/docker-bake.hcl b/docker-bake.hcl index e46a64a9a643cb53a4db27a3ced2ee799fb5955f..4cfc01ecedb65733b2822a7def035afd21b381ba 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -1,10 +1,16 @@ -variable "BUNDLES_OUTPUT" { - default = "./bundles" -} variable "DOCKER_STATIC" { default = "1" } +# Defines the output folder +variable "DESTDIR" { + default = "" +} +function "bindir" { + params = [defaultdir] + result = DESTDIR != "" ? DESTDIR : "./bundles/${defaultdir}" +} + target "_common" { args = { BUILDKIT_CONTEXT_KEEP_GIT_DIR = 1 @@ -37,11 +43,12 @@ target "_platforms" { target "binary" { inherits = ["_common"] target = "binary" - output = [BUNDLES_OUTPUT] + output = [bindir(DOCKER_STATIC == "1" ? "binary" : "dynbinary")] } target "dynbinary" { inherits = ["binary"] + output = [bindir("dynbinary")] args = { DOCKER_STATIC = "0" }