chore(ci): centralize runtime and image version constants
Some checks failed
CICD / Build CICD Image Failure Postmortem (push) Has been cancelled
CICD / Source Checks (push) Has been cancelled
CICD / Dependency Audits (Informational) (push) Has been cancelled
CICD / CICD Tests Complete (push) Has been cancelled
CICD / Build Release Images (push) Has been cancelled
CICD / Build Tester Images (push) Has been cancelled
CICD / Production Images Complete (push) Has been cancelled
CICD / Production Image Failures Postmortem (push) Has been cancelled
CICD / Source Lanes Failure Postmortem (push) Has been cancelled
CICD / Runtime Black-Box Integration Tests (push) Has been cancelled
CICD / Integration Tests Failure Postmortem (push) Has been cancelled
CICD / End-to-End Tests (push) Has been cancelled
CICD / E2E Tests Failure Postmortem (push) Has been cancelled
CICD / Promote Staging Images To Release (push) Has been cancelled
CICD / Build and Push CICD Images (push) Has been cancelled

This commit is contained in:
copilotcoder
2026-07-22 17:38:34 -04:00
parent cd19d06680
commit 3db1b0676f
7 changed files with 150 additions and 36 deletions

View File

@@ -1,8 +1,20 @@
# CICD Base Setup - System dependencies and language runtimes only
ARG PLAYWRIGHT_BROWSERS_IMAGE=mcr.microsoft.com/playwright:v1.61.1-jammy
ARG PLAYWRIGHT_VERSION=1.61.1
ARG PLAYWRIGHT_DISTRO=jammy
ARG PLAYWRIGHT_BROWSERS_IMAGE=mcr.microsoft.com/playwright:v${PLAYWRIGHT_VERSION}-${PLAYWRIGHT_DISTRO}
FROM ${PLAYWRIGHT_BROWSERS_IMAGE} AS playwright-browsers
FROM ubuntu:26.04
ARG UBUNTU_VERSION=26.04
FROM ubuntu:${UBUNTU_VERSION}
ARG PLAYWRIGHT_VERSION
ARG PYTHON_VERSION=3.14
ARG NODE_MAJOR=24
ARG TYPESCRIPT_VERSION=5.3.3
ARG ESLINT_VERSION=9.33.0
ARG PRETTIER_VERSION=3.6.2
ARG VITE_VERSION=7.1.10
ARG NODE_TYPES_VERSION=20.16.0
# Build args for cache busting (base dependencies change rarely)
ARG BASE_IMAGE_VERSION=v1.0.0
@@ -88,9 +100,9 @@ RUN set -eux; \
wget \
&& rm -rf /var/lib/apt/lists/*
# Install Python 3.14 with retry and fallback mechanisms
# Install Python with retry and fallback mechanisms
RUN for i in 1 2 3; do \
echo "Attempt $i: Adding deadsnakes PPA..." && \
echo "Attempt $i: Adding deadsnakes PPA..." && \
add-apt-repository -y ppa:deadsnakes/ppa && \
find /etc/apt -type f \( -name 'sources.list' -o -name '*.sources' -o -name '*.list' \) -print0 | xargs -0 sed -i 's|http://|https://|g' && \
apt-get update && \
@@ -99,21 +111,21 @@ RUN for i in 1 2 3; do \
done
RUN for i in 1 2 3; do \
echo "Attempt $i: Installing Python 3.14..." && \
echo "Attempt $i: Installing Python ${PYTHON_VERSION}..." && \
timeout 300 apt-get install -y --no-install-recommends \
python3.14 \
python3.14-venv \
python3.14-dev && \
python${PYTHON_VERSION} \
python${PYTHON_VERSION}-venv \
python${PYTHON_VERSION}-dev && \
break || \
(echo "Attempt $i failed, retrying in 15s..." && sleep 15); \
done && \
rm -rf /var/lib/apt/lists/*
# Install Node.js 24 with retry mechanism
# Install Node.js with retry mechanism
RUN for i in 1 2 3; do \
echo "Attempt $i: Installing Node.js 24..." && \
echo "Attempt $i: Installing Node.js ${NODE_MAJOR}..." && \
curl -fsSL --connect-timeout 30 --max-time 300 \
https://deb.nodesource.com/setup_24.x | bash - && \
https://deb.nodesource.com/setup_${NODE_MAJOR}.x | bash - && \
find /etc/apt -type f \( -name 'sources.list' -o -name '*.sources' -o -name '*.list' \) -print0 | xargs -0 sed -i 's|http://|https://|g' && \
apt-get update && \
timeout 300 apt-get install -y --no-install-recommends nodejs && \
@@ -146,12 +158,12 @@ RUN set -eu && \
RUN echo "=== Installing Global Development Tools ===" && \
# Use npm for global installations (works better than yarn global in Berry)
npm install -g \
@playwright/test@1.56.1 \
typescript@5.3.3 \
eslint@9.33.0 \
prettier@3.6.2 \
vite@7.1.10 \
@types/node@20.16.0 && \
@playwright/test@${PLAYWRIGHT_VERSION} \
typescript@${TYPESCRIPT_VERSION} \
eslint@${ESLINT_VERSION} \
prettier@${PRETTIER_VERSION} \
vite@${VITE_VERSION} \
@types/node@${NODE_TYPES_VERSION} && \
# Verify global tools are available
which playwright && \
which tsc && \
@@ -212,7 +224,7 @@ RUN echo '#!/bin/bash' > /usr/local/bin/setup-ssh && \
# Verify that all base tools are working
RUN echo "=== Base System Verification ===" && \
python3.14 --version && \
python${PYTHON_VERSION} --version && \
node --version && \
yarn --version && \
uv --version && \