diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index bf9aa2c..9db40b5 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -32,7 +32,8 @@ env: jobs: build: - runs-on: ["self-hosted"] + runs-on: + - ubuntu-22.04 strategy: matrix: build_type: [debug, release] @@ -57,6 +58,8 @@ jobs: registry: ${{ env.REGISTRY }} username: ${{ secrets.QUAY_USER_ID }} password: ${{ secrets.QUAY_TOKEN }} + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 - name: Checkout uses: actions/checkout@v2 with: @@ -84,7 +87,8 @@ jobs: path: image-dev-${{ matrix.build_type }}.txt checkstyle: - runs-on: ["self-hosted"] + runs-on: + - ubuntu-22.04 steps: - name: Clean the workspace uses: docker://alpine @@ -104,7 +108,8 @@ jobs: clang-format-version: '11' integration: - runs-on: ["self-hosted", "hugepages"] + runs-on: + - ubuntu-22.04 strategy: fail-fast: false matrix: @@ -138,7 +143,9 @@ jobs: make retest DEV_IMAGE="${dev_image}" e2e: - runs-on: ["self-hosted", "hugepages"] + runs-on: + - self-hosted + - hugepages strategy: fail-fast: false matrix: @@ -194,7 +201,8 @@ jobs: # dummy job for release.yaml to wait on conclude: - runs-on: ["self-hosted"] + runs-on: + - ubuntu-latest needs: - checkstyle - integration @@ -207,7 +215,8 @@ jobs: slack: needs: - conclude - runs-on: ["self-hosted"] + runs-on: + - ubuntu-22.04 if: always() steps: - name: Set status diff --git a/hack/ci-build.sh b/hack/ci-build.sh index 222c320..d854009 100755 --- a/hack/ci-build.sh +++ b/hack/ci-build.sh @@ -19,17 +19,14 @@ function do_build { # --export-cache type=inline \ # --import-cache type=registry,ref="${IMAGE_BASE_NAME}" \ set -x - buildctl build \ - --frontend dockerfile.v0 \ - --progress=plain \ - --local context=. \ - --local dockerfile=. \ - --opt filename="${DOCKERFILE}" \ - --opt build-arg:BUILD_TYPE=${BUILD_TYPE} \ - --opt build-arg:BASE=${VPP_IMAGE_BASE}_${BUILD_TYPE} \ - --opt build-arg:DEVBASE=${VPP_IMAGE_BASE}_dev_${BUILD_TYPE} \ - --opt label:quay.expires-after="${IMAGE_EXPIRES_AFTER}" \ - "$@" + docker buildx build \ + --progress plain \ + --file "${DOCKERFILE}" \ + --build-arg BUILD_TYPE=${BUILD_TYPE} \ + --build-arg BASE=${VPP_IMAGE_BASE}_${BUILD_TYPE} \ + --build-arg DEVBASE=${VPP_IMAGE_BASE}_dev_${BUILD_TYPE} \ + --label "quay.expires-after=${IMAGE_EXPIRES_AFTER}" \ + . "$@" set +x } @@ -42,18 +39,18 @@ FINAL_IMAGE_NAME="${IMAGE_BASE_NAME}:${IMAGE_BASE_TAG}_${BUILD_TYPE}" echo >&2 "Building VPP and extracting the artifacts ..." rm -rf /tmp/_out mkdir /tmp/_out -do_build --opt target=artifacts --output type=local,dest=/tmp/_out +do_build --target=artifacts --output type=local,dest=/tmp/_out echo >&2 "Building the dev image from ${DOCKERFILE} ..." push=",push=true" if [[ ${NO_PUSH} ]]; then push="" fi -do_build --opt target=dev-stage \ +do_build --target=dev-stage \ --output type="image,\"name=${DEV_IMAGE_NAME}\"${push}" echo >&2 "Building the final image from ${DOCKERFILE} ..." -do_build --opt target=final-stage \ +do_build --target=final-stage \ --output type="image,\"name=${FINAL_IMAGE_NAME}\"${push}" echo "${DEV_IMAGE_NAME}" > "image-dev-${BUILD_TYPE}.txt"