Compare commits

..
1 Commits
Author SHA1 Message Date
Brian Bjarke JensenandCursor aebddb60a2 Migrate Python workflows to python-repositories-ci runner label.
PR Title Check / check-title (pull_request) Successful in 6s
Test Python Package / unit-tests (pull_request) Successful in 59s
Code Quality Pipeline / code-quality (pull_request) Successful in 24s
Test Python Package / integration-tests (pull_request) Successful in 1m47s
Test Python Package / coverage-report (pull_request) Successful in 16s
Co-authored-by: Cursor <[email protected]>
2026-07-09 22:56:38 +02:00
4 changed files with 12 additions and 12 deletions
+2 -2
View File
@@ -17,7 +17,7 @@ on:
env: env:
REGISTRY: gitea.lille-vemmelund.dk REGISTRY: gitea.lille-vemmelund.dk
REGISTRY_USER: ci-bot REGISTRY_USER: ci-bot
IMAGE: gitea.lille-vemmelund.dk/lillevemmelund/python-repositories-ci IMAGE: gitea.lille-vemmelund.dk/brian/python-repositories-ci
jobs: jobs:
build-and-push: build-and-push:
@@ -37,7 +37,7 @@ jobs:
CI_RUNNER_TOKEN: ${{ secrets.CI_RUNNER_TOKEN }} CI_RUNNER_TOKEN: ${{ secrets.CI_RUNNER_TOKEN }}
run: | run: |
echo "$CI_RUNNER_TOKEN" > /tmp/uv_token echo "$CI_RUNNER_TOKEN" > /tmp/uv_token
docker build --network=host -f docker/ci/Dockerfile \ docker build -f docker/ci/Dockerfile \
--secret id=uv_token,src=/tmp/uv_token \ --secret id=uv_token,src=/tmp/uv_token \
-t "${IMAGE}:latest" \ -t "${IMAGE}:latest" \
. .
+1 -1
View File
@@ -5,10 +5,10 @@ RUN apt-get update \
&& apt-get install -y --no-install-recommends \ && apt-get install -y --no-install-recommends \
ca-certificates \ ca-certificates \
curl \ curl \
docker.io \
git \ git \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
COPY --from=docker:27-cli /usr/local/bin/docker /usr/local/bin/docker
COPY --from=ghcr.io/astral-sh/uv:0.7.0 /uv /usr/local/bin/uv COPY --from=ghcr.io/astral-sh/uv:0.7.0 /uv /usr/local/bin/uv
ENV UV_PYTHON_INSTALL_DIR=/opt/uv-python \ ENV UV_PYTHON_INSTALL_DIR=/opt/uv-python \
+5 -5
View File
@@ -14,10 +14,10 @@ Built from [`docker/ci/Dockerfile`](../docker/ci/Dockerfile):
- Docker CLI (integration tests via testcontainers) - Docker CLI (integration tests via testcontainers)
- Dev dependencies from `uv.lock` (`uv sync --all-extras --no-install-project`) - Dev dependencies from `uv.lock` (`uv sync --all-extras --no-install-project`)
Published to the Gitea container registry (owner segment must be lowercase for Docker): Published to the Gitea container registry:
- `gitea.lille-vemmelund.dk/lillevemmelund/python-repositories-ci:latest` - `gitea.lille-vemmelund.dk/brian/python-repositories-ci:latest`
- `gitea.lille-vemmelund.dk/lillevemmelund/python-repositories-ci:YYYYMMDDHHmm` (timestamped rollback tag) - `gitea.lille-vemmelund.dk/brian/python-repositories-ci:YYYYMMDDHHmm` (timestamped rollback tag)
## Rebuild triggers ## Rebuild triggers
@@ -108,7 +108,7 @@ homelab-platform
[`platform/gitea-runners/values.yaml`](https://gitea.lille-vemmelund.dk/LilleVemmelund/homelab-platform/src/branch/main/platform/gitea-runners/values.yaml): [`platform/gitea-runners/values.yaml`](https://gitea.lille-vemmelund.dk/LilleVemmelund/homelab-platform/src/branch/main/platform/gitea-runners/values.yaml):
```yaml ```yaml
python-repositories-ci:docker://gitea.lille-vemmelund.dk/lillevemmelund/python-repositories-ci:latest python-repositories-ci:docker://gitea.lille-vemmelund.dk/brian/python-repositories-ci:latest
``` ```
After label changes, roll runner pods so they re-register with Gitea. After label changes, roll runner pods so they re-register with Gitea.
@@ -137,7 +137,7 @@ bash scripts/ci/build-ci-image.sh --push
``` ```
Run from the repo root on the branch you want to test. Runners pull Run from the repo root on the branch you want to test. Runners pull
`gitea.lille-vemmelund.dk/lillevemmelund/python-repositories-ci:latest` from the registry; `gitea.lille-vemmelund.dk/brian/python-repositories-ci:latest` from the registry;
they do not care which git branch built it. they do not care which git branch built it.
Override registry settings if needed: Override registry settings if needed:
+4 -4
View File
@@ -15,7 +15,7 @@
# Optional overrides: # Optional overrides:
# REGISTRY=gitea.lille-vemmelund.dk # REGISTRY=gitea.lille-vemmelund.dk
# REGISTRY_USER=ci-bot # REGISTRY_USER=ci-bot
# IMAGE_OWNER=lillevemmelund # IMAGE_OWNER=brian
# IMAGE_NAME=python-repositories-ci # IMAGE_NAME=python-repositories-ci
set -euo pipefail set -euo pipefail
@@ -24,7 +24,7 @@ REPO_ROOT="$(cd "${SCRIPT_DIR}/../.." && pwd)"
REGISTRY="${REGISTRY:-gitea.lille-vemmelund.dk}" REGISTRY="${REGISTRY:-gitea.lille-vemmelund.dk}"
REGISTRY_USER="${REGISTRY_USER:-ci-bot}" REGISTRY_USER="${REGISTRY_USER:-ci-bot}"
IMAGE_OWNER="${IMAGE_OWNER:-lillevemmelund}" IMAGE_OWNER="${IMAGE_OWNER:-brian}"
IMAGE_NAME="${IMAGE_NAME:-python-repositories-ci}" IMAGE_NAME="${IMAGE_NAME:-python-repositories-ci}"
IMAGE="${IMAGE:-${REGISTRY}/${IMAGE_OWNER}/${IMAGE_NAME}}" IMAGE="${IMAGE:-${REGISTRY}/${IMAGE_OWNER}/${IMAGE_NAME}}"
@@ -52,7 +52,7 @@ cd "$REPO_ROOT"
if [[ "$MODE" == "local" ]]; then if [[ "$MODE" == "local" ]]; then
echo "=== Building local CI image (no push): python-repositories-ci:local ===" echo "=== Building local CI image (no push): python-repositories-ci:local ==="
docker build --network=host -f docker/ci/Dockerfile \ docker build -f docker/ci/Dockerfile \
--secret "id=uv_token,src=${TOKEN_FILE}" \ --secret "id=uv_token,src=${TOKEN_FILE}" \
-t python-repositories-ci:local \ -t python-repositories-ci:local \
. .
@@ -64,7 +64,7 @@ echo "=== Logging in to ${REGISTRY} as ${REGISTRY_USER} ==="
echo "$CI_RUNNER_TOKEN" | docker login "$REGISTRY" -u "$REGISTRY_USER" --password-stdin echo "$CI_RUNNER_TOKEN" | docker login "$REGISTRY" -u "$REGISTRY_USER" --password-stdin
echo "=== Building ${IMAGE}:latest ===" echo "=== Building ${IMAGE}:latest ==="
docker build --network=host -f docker/ci/Dockerfile \ docker build -f docker/ci/Dockerfile \
--secret "id=uv_token,src=${TOKEN_FILE}" \ --secret "id=uv_token,src=${TOKEN_FILE}" \
-t "${IMAGE}:latest" \ -t "${IMAGE}:latest" \
. .