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
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:
@@ -104,6 +104,50 @@ RUN yarn config set httpTimeout 60000 && \
|
||||
# Install uv package manager globally
|
||||
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
|
||||
|
||||
# Install common development tools globally to improve CI performance
|
||||
RUN echo "=== Installing Global Development Tools ===" && \
|
||||
# Install common Node.js development tools globally
|
||||
yarn global add \
|
||||
@playwright/test \
|
||||
typescript@5.3.3 \
|
||||
eslint@9.33.0 \
|
||||
prettier@3.3.3 \
|
||||
vite@7.1.10 \
|
||||
@types/node@20.16.0 && \
|
||||
echo "✓ Global Node.js development tools installed"
|
||||
|
||||
# Install Playwright browsers for E2E testing
|
||||
# This downloads ~400MB+ of browser binaries that will be cached
|
||||
RUN echo "=== Installing Playwright Browsers ===" && \
|
||||
# Verify Playwright CLI is available
|
||||
yarn playwright --version && \
|
||||
# Install browsers with system dependencies (non-interactive)
|
||||
export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=0 && \
|
||||
yarn playwright install --with-deps chromium firefox webkit && \
|
||||
# Verify browsers are installed
|
||||
yarn playwright install-deps && \
|
||||
echo "✓ Playwright browsers installed and cached in base image"
|
||||
|
||||
# Pre-install common Python development dependencies globally
|
||||
# These are stable tools that rarely change and take time to compile
|
||||
RUN echo "=== Pre-installing Common Python Dev Tools ===" && \
|
||||
# Create a global uv environment with common dev tools
|
||||
uv venv /opt/python-dev-tools && \
|
||||
/opt/python-dev-tools/bin/uv pip install \
|
||||
ruff>=0.6.0 \
|
||||
pyright>=1.1.380 \
|
||||
pytest>=7.4.0 \
|
||||
pytest-asyncio>=0.21.0 \
|
||||
pytest-cov>=4.1.0 \
|
||||
pytest-mock>=3.12.0 \
|
||||
pre-commit>=3.0.0 \
|
||||
pyyaml>=6.0 \
|
||||
yamllint>=1.35.0 \
|
||||
toml-sort>=0.23.0 \
|
||||
xdoctest>=1.1.0 \
|
||||
language-formatters-pre-commit-hooks>=2.14.0 && \
|
||||
echo "✓ Common Python dev tools pre-installed in /opt/python-dev-tools"
|
||||
|
||||
# Create a script to set up SSH for git operations (using secrets mount)
|
||||
RUN echo '#!/bin/bash' > /usr/local/bin/setup-ssh && \
|
||||
echo 'if [ -f /run/secrets/ssh_private_key ]; then' >> /usr/local/bin/setup-ssh && \
|
||||
@@ -124,7 +168,16 @@ RUN echo "=== Base System Verification ===" && \
|
||||
yarn --version && \
|
||||
uv --version && \
|
||||
git --version && \
|
||||
echo "✓ All base system tools installed successfully"
|
||||
echo "=== Global Development Tools Verification ===" && \
|
||||
yarn playwright --version && \
|
||||
yarn tsc --version && \
|
||||
yarn eslint --version && \
|
||||
yarn prettier --version && \
|
||||
/opt/python-dev-tools/bin/ruff --version && \
|
||||
/opt/python-dev-tools/bin/pyright --version && \
|
||||
/opt/python-dev-tools/bin/pytest --version && \
|
||||
/opt/python-dev-tools/bin/pre-commit --version && \
|
||||
echo "✓ All base system and development tools verified successfully"
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /workspace
|
||||
|
||||
Reference in New Issue
Block a user