3cbefef773
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / PR Build Worker Image (push) Has been skipped
CI/CD Pipeline / PR Build Web Image (push) Has been skipped
CI/CD Pipeline / PR Build API Image (push) Has been skipped
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / Validate - Migration (alembic) (push) Successful in 1m0s
CI/CD Pipeline / Validate - Type Check (mypy) (push) Successful in 1m24s
CI/CD Pipeline / Build Staging Web Image (push) Successful in 2m19s
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 3m6s
CI/CD Pipeline / Validate - Code Quality (push) Successful in 4m42s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 5m8s
CI/CD Pipeline / Integration Tests (push) Successful in 1m33s
CI/CD Pipeline / Unit Tests (push) Successful in 8m22s
CI/CD Pipeline / Build Production API Image (push) Has been skipped
CI/CD Pipeline / Build Production Web Image (push) Has been skipped
CI/CD Pipeline / Build Production Worker Image (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / CI Gate (push) Has been skipped
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Build Staging API Image (push) Successful in 13m23s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 32s
CI/CD Pipeline / ACR Image Cleanup (push) Successful in 31s
CI/CD Pipeline / Staging E2E Tests (push) Failing after 2m1s
CI/CD Pipeline / Staging API Integration Tests (push) Successful in 4m27s
CI/CD Pipeline / Canary Release to Production (push) Has been skipped
49 lines
1.8 KiB
Docker
49 lines
1.8 KiB
Docker
FROM git.xiaoxiajianji.com/xiaoxia/base/python:3.12-slim
|
|
|
|
ENV PIP_DISABLE_PIP_VERSION_CHECK=1 \
|
|
PIP_NO_CACHE_DIR=0 \
|
|
PIP_INDEX_URL=https://mirrors.aliyun.com/pypi/simple/ \
|
|
PIP_TRUSTED_HOST=mirrors.aliyun.com \
|
|
VIRTUAL_ENV=/opt/xiaoxia-ci-venv \
|
|
PATH=/opt/xiaoxia-ci-venv/bin:$PATH
|
|
|
|
WORKDIR /workspace
|
|
|
|
# Change Debian mirrors to Aliyun for faster download
|
|
RUN sed -i 's|deb.debian.org|mirrors.aliyun.com|g' /etc/apt/sources.list.d/debian.sources 2>/dev/null || true
|
|
|
|
# System deps + Docker CLI
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends \
|
|
curl \
|
|
git \
|
|
libpq-dev \
|
|
nodejs \
|
|
npm \
|
|
ca-certificates \
|
|
gnupg \
|
|
&& install -m 0755 -d /etc/apt/keyrings \
|
|
&& curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/debian/gpg -o /etc/apt/keyrings/docker.asc \
|
|
&& chmod a+r /etc/apt/keyrings/docker.asc \
|
|
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://mirrors.aliyun.com/docker-ce/linux/debian $(. /etc/os-release && echo $VERSION_CODENAME) stable" > /etc/apt/sources.list.d/docker.list \
|
|
&& apt-get update \
|
|
&& apt-get install -y --no-install-recommends docker-ce-cli docker-buildx-plugin \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Pre-install base deps (layer cache)
|
|
COPY requirements-base.txt ./
|
|
RUN python -m venv "$VIRTUAL_ENV" \
|
|
&& python -m pip install --retries 10 --timeout 120 -r requirements-base.txt
|
|
|
|
# Install dev/CI deps
|
|
COPY requirements-dev.txt ./
|
|
RUN python -m pip install --retries 10 --timeout 120 -r requirements-dev.txt \
|
|
&& python -m black --version \
|
|
&& python -m isort --version-number \
|
|
&& ruff --version \
|
|
&& bandit --version \
|
|
&& pytest --version
|
|
|
|
# Verify npm and docker work
|
|
RUN npm --version && docker --version
|