Optimizing the docker builds for cicd.
Some checks failed
Tests / Build and Push CICD Base Image (push) Failing after 12m32s
Tests / Build and Push CICD Complete Image (push) Has been skipped
Tests / Trailing Whitespace Check (push) Has been skipped
Tests / End of File Check (push) Has been skipped
Tests / YAML Syntax Check (push) Has been skipped
Tests / TOML Syntax Check (push) Has been skipped
Tests / Mixed Line Ending Check (push) Has been skipped
Tests / TOML Formatting Check (push) Has been skipped
Tests / Ruff Linting (push) Has been skipped
Tests / Ruff Format Check (push) Has been skipped
Tests / Pyright Type Check (push) Has been skipped
Tests / Darglint Docstring Check (push) Has been skipped
Tests / No Docstring Types Check (push) Has been skipped
Tests / TypeScript Type Check (push) Has been skipped
Tests / TSDoc Lint Check (push) Has been skipped
Tests / Backend Tests (push) Has been skipped
Tests / Frontend Tests (push) Has been skipped
Tests / ESLint Check (push) Has been skipped
Tests / Prettier Format Check (push) Has been skipped
Tests / Backend Doctests (push) Has been skipped
Tests / Integration Tests (push) Has been skipped
Tests / End-to-End Tests (push) Has been skipped

Signed-off-by: Cliff Hill <xlorep@darkhelm.org>
This commit is contained in:
2025-10-31 11:25:34 -04:00
parent 0399446a7e
commit 9bbb362e5b
5 changed files with 219 additions and 57 deletions

View File

@@ -97,7 +97,8 @@ check_requirements() {
}
build_base_image() {
log_info "Building CICD base image..."
log_info "Building CICD base image (includes Playwright browsers - may take longer)..."
log_warning "This will download ~400MB+ of browser binaries on first build"
local cache_flag=""
if [[ "$NO_CACHE" == "true" ]]; then
@@ -111,6 +112,7 @@ build_base_image() {
log_info "Base Dockerfile hash: $base_hash"
# Build base image
log_info "Building base image with system dependencies and Playwright browsers..."
docker build -f "$PROJECT_DIR/Dockerfile.cicd-base" \
$cache_flag \
--build-arg BASE_IMAGE_VERSION="v1.0.0-local-$base_hash" \
@@ -126,10 +128,8 @@ build_base_image() {
# Show image size
local image_size=$(docker images --format "table {{.Repository}}:{{.Tag}}\t{{.Size}}" | grep "$BASE_IMAGE_TAG" | awk '{print $2}')
log_info "Base image size: $image_size"
}
build_complete_image() {
log_info "Base image size: $image_size (includes Playwright browsers)"
}build_complete_image() {
log_info "Building CICD complete image..."
# Check if base image exists
@@ -197,8 +197,15 @@ test_images() {
if docker run --rm "$BASE_IMAGE_TAG" python3.13 --version && \
docker run --rm "$BASE_IMAGE_TAG" node --version && \
docker run --rm "$BASE_IMAGE_TAG" yarn --version && \
docker run --rm "$BASE_IMAGE_TAG" uv --version; then
log_success "Base image tests passed"
docker run --rm "$BASE_IMAGE_TAG" uv --version && \
docker run --rm "$BASE_IMAGE_TAG" yarn playwright --version; then
log_success "Base image tests passed (includes Playwright)"
# Test that browsers are installed
if docker run --rm "$BASE_IMAGE_TAG" yarn playwright install --dry-run chromium >/dev/null 2>&1; then
log_success "Playwright browsers verified in base image"
else
log_warning "Playwright browsers may not be fully installed in base image"
fi
else
log_error "Base image tests failed"
fi