From 3b1512e8fd8e44eb3847ac370acf1644531ff140 Mon Sep 17 00:00:00 2001 From: Leonid Makarov Date: Fri, 17 May 2024 16:20:59 +0200 Subject: [PATCH] Debug --- .github/workflows/default.yaml | 173 +++++++++++++++++---------------- 1 file changed, 88 insertions(+), 85 deletions(-) diff --git a/.github/workflows/default.yaml b/.github/workflows/default.yaml index 2167aba..f2d81b4 100644 --- a/.github/workflows/default.yaml +++ b/.github/workflows/default.yaml @@ -94,7 +94,7 @@ jobs: - # Build and cache image in the registry name: Build image - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: ${{ env.BUILD_DIR }} file: ${{ env.BUILD_DIR }}/Dockerfile @@ -105,101 +105,104 @@ jobs: # Push intermediate arch-specific build tag to repo tags: ${{ env.BUILD_IMAGE_TAG }}-${{ env.GIT_SHA7 }}-${{ env.ARCH }} push: ${{ github.event_name != 'pull_request' }} # Don't push for PRs + sbom: false + provenance: false # BUILD_IMAGE_TAG - persistent multi-arch tag, updated at the end of the build (success or failure) - cache-from: type=registry,ref=${{ env.BUILD_IMAGE_TAG }} - cache-to: type=inline # Write the cache metadata into the image configuration + # cache-from: type=registry,ref=${{ env.BUILD_IMAGE_TAG }} + # cache-to: type=inline # Write the cache metadata into the image configuration - test: - name: "Test: ${{ matrix.version }}/${{ matrix.arch }}" - runs-on: ubuntu-22.04 - needs: build +# test: +# name: "Test: ${{ matrix.version }}/${{ matrix.arch }}" +# runs-on: ubuntu-22.04 +# needs: build - strategy: - fail-fast: false # Don't cancel other jobs if one fails - matrix: - include: - # Disabled arm64 tests. - # TODO: Refactor tests to be compatible with a remote host test runner. - # TODO: Remember to re-enabled the test results check in "push". - - - arch: amd64 - version: "10.4" -# - -# arch: arm64 -# version: "10.4" - - - arch: amd64 - version: "10.5" -# - -# arch: arm64 -# version: "10.5" - - - arch: amd64 - version: "10.6" -# - -# arch: arm64 -# version: "10.6" - - - arch: amd64 - version: "10.11" -# - -# arch: arm64 -# version: "10.11" +# strategy: +# fail-fast: false # Don't cancel other jobs if one fails +# matrix: +# include: +# # Disabled arm64 tests. +# # TODO: Refactor tests to be compatible with a remote host test runner. +# # TODO: Remember to re-enabled the test results check in "push". +# - +# arch: amd64 +# version: "10.4" +# # - +# # arch: arm64 +# # version: "10.4" +# - +# arch: amd64 +# version: "10.5" +# # - +# # arch: arm64 +# # version: "10.5" +# - +# arch: amd64 +# version: "10.6" +# # - +# # arch: arm64 +# # version: "10.6" +# - +# arch: amd64 +# version: "10.11" +# # - +# # arch: arm64 +# # version: "10.11" - env: - ARCH: ${{ matrix.arch }} - VERSION_PREFIX: "" - VERSION: ${{ matrix.version }} +# env: +# ARCH: ${{ matrix.arch }} +# VERSION_PREFIX: "" +# VERSION: ${{ matrix.version }} - steps: - - - name: Setup Bats - uses: bats-core/bats-action@2.0.0 - - - name: Checkout - uses: actions/checkout@v4 - - - name: Environment variables - run: | - # Export variables for further steps - echo GIT_SHA7="${GITHUB_SHA:0:7}" | tee -a ${GITHUB_ENV} - echo BUILD_IMAGE_TAG="${IMAGE}:${VERSION_PREFIX}${VERSION}-build" | tee -a ${GITHUB_ENV} - # Pull the host public SSH key at runtime instead of relying on a static value stored in secrets. - echo ARM64_HOST_SSH_CERT="$(ssh-keyscan -t rsa ${{ secrets.ARM64_HOST }} 2>/dev/null)" | tee -a ${GITHUB_ENV} - - - name: Check Docker - run: | - docker version - docker info - - - # Run tests - name: Test - id: tests - working-directory: ${{ env.BUILD_DIR }} - env: - BUILD_IMAGE_TAG: ${{ env.BUILD_IMAGE_TAG }}-${{ env.GIT_SHA7 }}-${{ env.ARCH }} - VERSION: ${{ env.VERSION }} - run: | - make test - ([[ $? == 0 ]] && echo "pass" || echo "fail") | tee ${{ github.workspace }}/test-results-${VERSION_PREFIX}${VERSION}-${ARCH}.txt - # Store tests results as an artifact (used by downstream jobs) - # Note: Cannot use "::set-output name=var_name::var_value" as var_name would need to be dynamic here. - # Dynamic variable names cannot be used when mapping step outputs to job outputs. - # Step outputs cannot be accessed directly from other jobs. Dead end. - - name: Store test results - uses: actions/upload-artifact@v4 - with: - name: test-results-${{ env.GIT_SHA7 }}-${{ env.VERSION_PREFIX }}${{ env.VERSION }}-${{ env.ARCH }} - path: ${{ github.workspace }}/test-results-*.txt - if-no-files-found: error - overwrite: true +# steps: +# - +# name: Setup Bats +# uses: bats-core/bats-action@2.0.0 +# - +# name: Checkout +# uses: actions/checkout@v4 +# - +# name: Environment variables +# run: | +# # Export variables for further steps +# echo GIT_SHA7="${GITHUB_SHA:0:7}" | tee -a ${GITHUB_ENV} +# echo BUILD_IMAGE_TAG="${IMAGE}:${VERSION_PREFIX}${VERSION}-build" | tee -a ${GITHUB_ENV} +# # Pull the host public SSH key at runtime instead of relying on a static value stored in secrets. +# echo ARM64_HOST_SSH_CERT="$(ssh-keyscan -t rsa ${{ secrets.ARM64_HOST }} 2>/dev/null)" | tee -a ${GITHUB_ENV} +# - +# name: Check Docker +# run: | +# docker version +# docker info +# - +# # Run tests +# name: Test +# id: tests +# working-directory: ${{ env.BUILD_DIR }} +# env: +# BUILD_IMAGE_TAG: ${{ env.BUILD_IMAGE_TAG }}-${{ env.GIT_SHA7 }}-${{ env.ARCH }} +# VERSION: ${{ env.VERSION }} +# run: | +# make test +# ([[ $? == 0 ]] && echo "pass" || echo "fail") | tee ${{ github.workspace }}/test-results-${VERSION_PREFIX}${VERSION}-${ARCH}.txt +# # Store tests results as an artifact (used by downstream jobs) +# # Note: Cannot use "::set-output name=var_name::var_value" as var_name would need to be dynamic here. +# # Dynamic variable names cannot be used when mapping step outputs to job outputs. +# # Step outputs cannot be accessed directly from other jobs. Dead end. +# - name: Store test results +# uses: actions/upload-artifact@v4 +# with: +# name: test-results-${{ env.GIT_SHA7 }}-${{ env.VERSION_PREFIX }}${{ env.VERSION }}-${{ env.ARCH }} +# path: ${{ github.workspace }}/test-results-*.txt +# if-no-files-found: error +# overwrite: true push: name: "Push: ${{ matrix.version }}/multi" runs-on: ubuntu-22.04 # Wait for test to either succeed or fail - needs: test + # needs: test + needs: build if: always() strategy: