diff --git a/.gitea/workflows/install-ci-tools.sh b/.gitea/workflows/install-ci-tools.sh index 091778b..04873bc 100755 --- a/.gitea/workflows/install-ci-tools.sh +++ b/.gitea/workflows/install-ci-tools.sh @@ -93,6 +93,20 @@ install_shellcheck() { rm -rf "$tmp" } +install_uv() { + if at_version uv "${UV_VERSION}"; then + return 0 + fi + local tmp + tmp="$(mktemp -d)" + # uv release tags carry no leading v, unlike every other tool installed here. + fetch "https://github.com/astral-sh/uv/releases/download/${UV_VERSION}/uv-${sharch}-unknown-linux-gnu.tar.gz" \ + "$tmp/uv.tar.gz" + tar -xzf "$tmp/uv.tar.gz" -C "$tmp" --strip-components=1 "uv-${sharch}-unknown-linux-gnu/uv" + install -m 0755 "$tmp/uv" "$BIN_DIR/uv" + rm -rf "$tmp" +} + install_actionlint() { if at_version actionlint "${ACTIONLINT_VERSION}"; then return 0 @@ -116,6 +130,7 @@ for tool in "${wanted[@]}"; do kubeconform) install_kubeconform ;; shellcheck) install_shellcheck ;; actionlint) install_actionlint ;; + uv) install_uv ;; *) echo "install-ci-tools: unknown tool: $tool" >&2 exit 1 diff --git a/.gitea/workflows/tool-versions.env b/.gitea/workflows/tool-versions.env index ade7ec2..ecc9926 100644 --- a/.gitea/workflows/tool-versions.env +++ b/.gitea/workflows/tool-versions.env @@ -7,3 +7,5 @@ ACTIONLINT_VERSION="1.7.7" SHELLCHECK_VERSION="0.11.0" KUBECONFORM_VERSION="0.8.0" +# uv builds the throwaway venv the pytest job runs in. +UV_VERSION="0.12.17" diff --git a/renovate/k8s/configmap.yaml b/renovate/k8s/configmap.yaml index a77b0aa..a30d0c5 100644 --- a/renovate/k8s/configmap.yaml +++ b/renovate/k8s/configmap.yaml @@ -93,6 +93,14 @@ data: "datasourceTemplate": "github-tags", "depNameTemplate": "yannh/kubeconform" }, + { + "customType": "regex", + "description": "uv version used to build the pytest venv", + "managerFilePatterns": ["^\\.gitea/workflows/tool-versions\\.env$"], + "matchStrings": ["(?:^|\\n)UV_VERSION=\"(?[0-9.]+)\""], + "datasourceTemplate": "github-tags", + "depNameTemplate": "astral-sh/uv" + }, { "customType": "regex", "description": "stakater/reloader chart version pinned in the deploy workflow", diff --git a/renovate/renovate.json b/renovate/renovate.json index cd30501..9c7e490 100644 --- a/renovate/renovate.json +++ b/renovate/renovate.json @@ -82,6 +82,14 @@ "datasourceTemplate": "github-tags", "depNameTemplate": "yannh/kubeconform" }, + { + "customType": "regex", + "description": "uv version used to build the pytest venv", + "managerFilePatterns": ["^\\.gitea/workflows/tool-versions\\.env$"], + "matchStrings": ["(?:^|\\n)UV_VERSION=\"(?[0-9.]+)\""], + "datasourceTemplate": "github-tags", + "depNameTemplate": "astral-sh/uv" + }, { "customType": "regex", "description": "stakater/reloader chart version pinned in the deploy workflow",