ci: stream workspace into quality container
All checks were successful
CI/CD Pipeline / Quality Gate (push) Successful in 20s
CI/CD Pipeline / Build and Push Images (push) Successful in 1m33s
CI/CD Pipeline / Internal Notify (push) Successful in 1s
CI/CD Pipeline / Deploy Dev in Dokploy (push) Successful in 1s

This commit is contained in:
2026-04-28 21:48:07 +02:00
parent d1edbd89cf
commit 0682398935

View File

@@ -111,13 +111,8 @@ jobs:
docker pull "${CI_GOLDEN_REF}:${GOLDEN_TAG}"
fi
QUALITY_CONTAINER=$(printf 'mostovik-quality-%s-%s' \
"${GITHUB_RUN_ID:-local}" \
"${GITHUB_RUN_NUMBER:-0}" \
| tr -c 'a-zA-Z0-9_.-' '-')
docker rm -f "${QUALITY_CONTAINER}" >/dev/null 2>&1 || true
docker create \
--name "${QUALITY_CONTAINER}" \
tar --exclude=.git -cf - . \
| docker run --rm -i \
-e DJANGO_SETTINGS_MODULE=settings.test \
-e SECRET_KEY=test-secret-key-for-ci \
-e SKIP_LINT="${SKIP_LINT}" \
@@ -125,6 +120,9 @@ jobs:
"${CI_GOLDEN_REF}:${GOLDEN_TAG}" \
bash -c '
set -euo pipefail
mkdir -p /workspace
tar -xf - -C /workspace
cd /workspace
export PATH="/app/.venv/bin:${PATH}"
export PYTHONPATH="/workspace/src:${PYTHONPATH:-}"
if [ "${SKIP_LINT}" != "true" ]; then
@@ -136,13 +134,6 @@ jobs:
/app/.venv/bin/python -m pytest tests/test_api_inventory_e2e.py -q
fi
'
docker cp . "${QUALITY_CONTAINER}:/workspace"
set +e
docker start -a "${QUALITY_CONTAINER}"
QUALITY_EXIT=$?
set -e
docker rm -f "${QUALITY_CONTAINER}" >/dev/null 2>&1 || true
exit "${QUALITY_EXIT}"
build_push:
name: Build and Push Images