Now dockerized workflow with all jobs added.
Some checks failed
Tests / TypeScript Type Check (push) Has been cancelled
Tests / ESLint Check (push) Has been cancelled
Tests / Prettier Format Check (push) Has been cancelled
Tests / Trailing Whitespace Check (push) Has been cancelled
Tests / End of File Check (push) Has been cancelled
Tests / YAML Syntax Check (push) Has been cancelled
Tests / TOML Syntax Check (push) Has been cancelled
Tests / Mixed Line Ending Check (push) Has been cancelled
Tests / TOML Formatting Check (push) Has been cancelled
Tests / Ruff Linting (push) Has been cancelled
Tests / Ruff Format Check (push) Has been cancelled
Tests / Pyright Type Check (push) Has been cancelled
Tests / Darglint Docstring Check (push) Has been cancelled
Tests / No Docstring Types Check (push) Has been cancelled
Tests / TSDoc Lint Check (push) Has been cancelled
Tests / Backend Tests (push) Has been cancelled
Tests / Frontend Tests (push) Has been cancelled
Tests / Backend Doctests (push) Has been cancelled
Tests / Integration Tests (push) Has been cancelled
Tests / End-to-End Tests (push) Has been cancelled
Tests / Build and Push CICD Image (push) Has started running
Some checks failed
Tests / TypeScript Type Check (push) Has been cancelled
Tests / ESLint Check (push) Has been cancelled
Tests / Prettier Format Check (push) Has been cancelled
Tests / Trailing Whitespace Check (push) Has been cancelled
Tests / End of File Check (push) Has been cancelled
Tests / YAML Syntax Check (push) Has been cancelled
Tests / TOML Syntax Check (push) Has been cancelled
Tests / Mixed Line Ending Check (push) Has been cancelled
Tests / TOML Formatting Check (push) Has been cancelled
Tests / Ruff Linting (push) Has been cancelled
Tests / Ruff Format Check (push) Has been cancelled
Tests / Pyright Type Check (push) Has been cancelled
Tests / Darglint Docstring Check (push) Has been cancelled
Tests / No Docstring Types Check (push) Has been cancelled
Tests / TSDoc Lint Check (push) Has been cancelled
Tests / Backend Tests (push) Has been cancelled
Tests / Frontend Tests (push) Has been cancelled
Tests / Backend Doctests (push) Has been cancelled
Tests / Integration Tests (push) Has been cancelled
Tests / End-to-End Tests (push) Has been cancelled
Tests / Build and Push CICD Image (push) Has started running
Signed-off-by: Cliff Hill <xlorep@darkhelm.org>
This commit is contained in:
92
Dockerfile.cicd
Normal file
92
Dockerfile.cicd
Normal file
@@ -0,0 +1,92 @@
|
||||
# CICD Setup - Clean base image with development tools only
|
||||
FROM ubuntu:22.04
|
||||
|
||||
# Install system dependencies
|
||||
RUN apt-get update && apt-get install -y \
|
||||
git \
|
||||
curl \
|
||||
ca-certificates \
|
||||
software-properties-common \
|
||||
build-essential \
|
||||
openssh-client \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install Python 3.13
|
||||
RUN add-apt-repository ppa:deadsnakes/ppa \
|
||||
&& apt-get update && apt-get install -y \
|
||||
python3.13 \
|
||||
python3.13-venv \
|
||||
python3.13-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install Node.js 24
|
||||
RUN curl -fsSL https://deb.nodesource.com/setup_24.x | bash - \
|
||||
&& apt-get install -y nodejs \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Enable corepack for yarn and set up Yarn Berry
|
||||
RUN corepack enable \
|
||||
&& corepack prepare yarn@stable --activate \
|
||||
&& yarn set version berry
|
||||
|
||||
# Install uv package manager globally
|
||||
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /workspace
|
||||
|
||||
# Copy the entire project
|
||||
COPY . .
|
||||
|
||||
# Set up Python environment for backend
|
||||
WORKDIR /workspace/backend
|
||||
ENV VIRTUAL_ENV=/workspace/backend/.venv
|
||||
RUN uv venv $VIRTUAL_ENV
|
||||
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
|
||||
|
||||
# Install backend dev dependencies
|
||||
RUN uv sync --dev
|
||||
|
||||
# Install backend package in development mode
|
||||
RUN uv pip install -e .
|
||||
|
||||
# Set up frontend dependencies
|
||||
WORKDIR /workspace/frontend
|
||||
RUN yarn install --immutable
|
||||
|
||||
# Verify all tools are working with the project
|
||||
RUN cd /workspace/backend && \
|
||||
echo "=== Backend Tools Verification ===" && \
|
||||
uv run ruff --version && \
|
||||
uv run pyright --version && \
|
||||
uv run darglint --version && \
|
||||
uv run pytest --version && \
|
||||
uv run yamllint --version && \
|
||||
uv run toml-sort --version && \
|
||||
uv run xdoctest --version
|
||||
|
||||
RUN cd /workspace/frontend && \
|
||||
echo "=== Frontend Tools Verification ===" && \
|
||||
yarn eslint --version && \
|
||||
yarn prettier --version && \
|
||||
yarn tsc --version && \
|
||||
yarn vitest --version
|
||||
|
||||
# Create a script to set up SSH for git operations (if needed for updates)
|
||||
RUN echo '#!/bin/bash' > /usr/local/bin/setup-ssh && \
|
||||
echo 'mkdir -p ~/.ssh' >> /usr/local/bin/setup-ssh && \
|
||||
echo 'echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa' >> /usr/local/bin/setup-ssh && \
|
||||
echo 'chmod 600 ~/.ssh/id_rsa' >> /usr/local/bin/setup-ssh && \
|
||||
echo 'ssh-keyscan -H github.com >> ~/.ssh/known_hosts 2>/dev/null' >> /usr/local/bin/setup-ssh && \
|
||||
echo 'ssh-keyscan -H dogar.darkhelm.org >> ~/.ssh/known_hosts 2>/dev/null' >> /usr/local/bin/setup-ssh && \
|
||||
chmod +x /usr/local/bin/setup-ssh
|
||||
|
||||
# Set Python path for backend
|
||||
ENV PYTHONPATH=/workspace/backend/src:/workspace/backend
|
||||
|
||||
# Set working directory back to root
|
||||
WORKDIR /workspace
|
||||
|
||||
# Default to bash
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
CMD ["/bin/bash"]
|
||||
Reference in New Issue
Block a user