vendor: update buildkit to v0.11.2
- replaces, closes #44529
.github/workflows/buildkit.yml
name: buildkit

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

on:
  workflow_dispatch:
  push:
    branches:
      - 'master'
      - '[0-9]+.[0-9]{2}'
  pull_request:

env:
  DESTDIR: ./build

jobs:
  validate-dco:
    uses: ./.github/workflows/.dco.yml

  build:
    runs-on: ubuntu-20.04
    needs:
      - validate-dco
    steps:
      -
        name: Checkout
        uses: actions/checkout@v3
      -
        name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v2
      -
        name: Build
        uses: docker/bake-action@v2
        with:
          targets: binary
      -
        name: Upload artifacts
        uses: actions/upload-artifact@v3
        with:
          name: binary
          path: ${{ env.DESTDIR }}
          if-no-files-found: error
          retention-days: 1

  test:
    runs-on: ubuntu-20.04
    timeout-minutes: 120
    needs:
      - build
    strategy:
      fail-fast: false
      matrix:
        pkg:
          - client
          - cmd/buildctl
          - solver
          - frontend
          - frontend/dockerfile
        typ:
          - integration
    steps:
      -
        name: Checkout
        uses: actions/checkout@v3
        with:
          path: moby
      -
        name: BuildKit ref
        run: |
          # FIXME(thaJeztah) temporarily overriding version to use for tests; remove with the next release of buildkit
          # echo "BUILDKIT_REF=$(./hack/buildkit-ref)" >> $GITHUB_ENV
          echo "BUILDKIT_REF=3a391492c9d0b7428b6dcaa18c5aa3b5951fdacd" >> $GITHUB_ENV
        working-directory: moby
      -
        name: Checkout BuildKit ${{ env.BUILDKIT_REF }}
        uses: actions/checkout@v3
        with:
          repository: "moby/buildkit"
          ref: ${{ env.BUILDKIT_REF }}
          path: buildkit
      -
        name: Set up QEMU
        uses: docker/setup-qemu-action@v2
      -
        name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v2
      -
        name: Download binary artifacts
        uses: actions/download-artifact@v3
        with:
          name: binary
          path: ./buildkit/build/moby/
      -
        name: Update daemon.json
        run: |
          sudo rm /etc/docker/daemon.json
          sudo service docker restart
          docker version
          docker info
      -
        name: Test
        run: |
          ./hack/test ${{ matrix.typ }}
        env:
          CONTEXT: "."
          TEST_DOCKERD: "1"
          TEST_DOCKERD_BINARY: "./build/moby/dockerd"
          TESTPKGS: "./${{ matrix.pkg }}"
          TESTFLAGS: "-v --parallel=1 --timeout=30m --run=//worker=dockerd$"
        working-directory: buildkit

name: buildkit

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

on:
  workflow_dispatch:
  push:
    branches:
      - 'master'
      - '[0-9]+.[0-9]{2}'
  pull_request:

env:
  DESTDIR: ./build

jobs:
  validate-dco:
    uses: ./.github/workflows/.dco.yml

  build:
    runs-on: ubuntu-20.04
    needs:
      - validate-dco
    steps:
      -
        name: Checkout
        uses: actions/checkout@v3
      -
        name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v2
      -
        name: Build
        uses: docker/bake-action@v2
        with:
          targets: binary
      -
        name: Upload artifacts
        uses: actions/upload-artifact@v3
        with:
          name: binary
          path: ${{ env.DESTDIR }}
          if-no-files-found: error
          retention-days: 1

  test:
    runs-on: ubuntu-20.04
    timeout-minutes: 120
    needs:
      - build
    strategy:
      fail-fast: false
      matrix:
        pkg:
          - client
          - cmd/buildctl
          - solver
          - frontend
          - frontend/dockerfile
        typ:
          - integration
    steps:
      -
        name: Checkout
        uses: actions/checkout@v3
        with:
          path: moby
      -
        name: BuildKit ref
        run: |
          # FIXME(tonistiigi) test suite needs patch moby/buildkit#3567
          # echo "BUILDKIT_REPO=moby/buildkit" >> $GITHUB_ENV
          # echo "BUILDKIT_REF=$(./hack/buildkit-ref)" >> $GITHUB_ENV
          echo "BUILDKIT_REPO=tonistiigi/buildkit" >> $GITHUB_ENV
          echo "BUILDKIT_REF=db67180a1a439efb1547ecf5decd4003ec8f621b" >> $GITHUB_ENV
        working-directory: moby
      -
        name: Checkout BuildKit ${{ env.BUILDKIT_REF }}
        uses: actions/checkout@v3
        with:
          repository: ${{ env.BUILDKIT_REPO }}
          ref: ${{ env.BUILDKIT_REF }}
          path: buildkit
      -
        name: Set up QEMU
        uses: docker/setup-qemu-action@v2
      -
        name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v2
      -
        name: Download binary artifacts
        uses: actions/download-artifact@v3
        with:
          name: binary
          path: ./buildkit/build/moby/
      -
        name: Update daemon.json
        run: |
          sudo rm /etc/docker/daemon.json
          sudo service docker restart
          docker version
          docker info
      -
        name: Test
        run: |
          ./hack/test ${{ matrix.typ }}
        env:
          CONTEXT: "."
          TEST_DOCKERD: "1"
          TEST_DOCKERD_BINARY: "./build/moby/dockerd"
          TESTPKGS: "./${{ matrix.pkg }}"
          TESTFLAGS: "-v --parallel=1 --timeout=30m --run=//worker=dockerd$"
        working-directory: buildkit

Note to self; we can remove this once https://github.com/moby/buildkit/pull/3567 is merged and cherry-picked in the 0.11 branch