Skip to content

RED-158291 - unstable packaging #447

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 54 additions & 10 deletions .github/actions/build-and-tag-locally/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ runs:
password: ${{ inputs.registry_password }}

- name: Build
id: build
uses: docker/build-push-action@v6
with:
context: ${{ inputs.distribution }}
Expand All @@ -97,6 +98,59 @@ runs:
tags: ${{ github.sha }}:${{ steps.platform.outputs.display_name }}
cache-from: type=gha
cache-to: type=gha,mode=max
env:
BUILDKIT_PROGRESS: plain

- name: Capture build logs on failure
shell: bash
if: failure() && steps.build.outcome == 'failure'
run: |
mkdir -p /tmp/build-logs

echo "Build failed for ${{ inputs.distribution }} on ${{ inputs.platform }}"
echo "Capturing detailed logs for troubleshooting..."

# Get docker history for the built image (might not exist if build failed early)
docker history ${{ github.sha }}:${{ steps.platform.outputs.display_name }} > /tmp/build-logs/image-history.log 2>&1 || echo "Failed to get image history"

# Get docker inspect output (might not exist if build failed early)
docker inspect ${{ github.sha }}:${{ steps.platform.outputs.display_name }} > /tmp/build-logs/image-inspect.json 2>&1 || echo "Failed to inspect image"

# Get docker build cache info
docker buildx du > /tmp/build-logs/buildx-du.log 2>&1 || echo "Failed to get build cache info"

# Get system info
uname -a > /tmp/build-logs/system-info.log 2>&1
docker info > /tmp/build-logs/docker-info.log 2>&1

# Create a summary file
{
echo "Build failure summary for ${{ inputs.distribution }} on ${{ inputs.platform }}"
echo "Date: $(date)"
echo "GitHub SHA: ${{ github.sha }}"
echo "Platform: ${{ steps.platform.outputs.display_name }}"
echo "Distribution: ${{ inputs.distribution }}"
} > /tmp/build-logs/failure-summary.txt

# Try to extract error information from the build logs
echo "Analyzing build failure..."

# Check for common error patterns
if docker buildx build --no-cache ${{ inputs.distribution }} --platform=${{ inputs.platform }} 2>&1 | tee /tmp/build-logs/build-error.log | grep -q "ERROR"; then
echo "Found ERROR in build output"
grep -A 10 -B 5 "ERROR" /tmp/build-logs/build-error.log > /tmp/build-logs/error-context.log || true
fi

echo "Log capture complete"

- name: Upload build failure logs
if: failure() && steps.build.outcome == 'failure'
uses: actions/upload-artifact@v4
with:
name: build-failure-${{ steps.platform.outputs.display_name }}-${{ inputs.distribution }}
path: /tmp/build-logs/
retention-days: 30
if-no-files-found: warn

- name: Save image
shell: bash
Expand Down Expand Up @@ -203,13 +257,3 @@ runs:
echo "ReJSON test failed: expected 'allkeys-lru', got $result"
exit 1
fi

- name: Push image
uses: docker/build-push-action@v6
if: ${{ inputs.publish_image == 'true' && contains(fromJSON('["amd64"]'), steps.platform.outputs.display_name) }}
with:
context: ${{ inputs.distribution }}
push: true
tags: ${{ inputs.registry_repository }}:${{ github.sha }}-${{ inputs.distribution }}
cache-from: type=gha
cache-to: type=gha,mode=max
10 changes: 5 additions & 5 deletions .github/workflows/pre-merge.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name: Build and Test
name: Build and Test Unstable
on:
pull_request:
branches:
- master
- release/*
- unstable
workflow_call:

jobs:
build-and-test:
runs-on: ${{ contains(matrix.platform, 'arm64') && 'ubuntu24-arm64-2-8' || 'ubuntu-latest' }}
runs-on: 'ubuntu-latest'
strategy:
fail-fast: false
matrix:
distribution:
- debian
Expand All @@ -23,7 +23,7 @@ jobs:
- linux/mips64le
- linux/ppc64le
- linux/s390x
- linux/arm64
# - linux/arm64 # Currently the unstable isn't running on arm64
- linux/riscv64
exclude:
- distribution: alpine
Expand Down
12 changes: 9 additions & 3 deletions alpine/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 9 additions & 3 deletions debian/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.