Compare commits

...

35 commits
v0.1.2 ... main

Author SHA1 Message Date
763e9aa70b Rename container
All checks were successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/tag/test Pipeline was successful
ci/woodpecker/tag/build Pipeline was successful
2025-06-25 15:37:29 +02:00
d1c9bc1c01 Ficx
All checks were successful
ci/woodpecker/tag/test Pipeline was successful
ci/woodpecker/tag/build Pipeline was successful
2025-06-25 15:33:43 +02:00
9a948fde8e Fix
Some checks failed
ci/woodpecker/tag/test Pipeline was successful
ci/woodpecker/tag/build Pipeline failed
2025-06-25 15:00:40 +02:00
e5e6c029fa AAdd access to git in Containerfile
Some checks failed
ci/woodpecker/tag/test Pipeline was successful
ci/woodpecker/tag/build Pipeline failed
2025-06-25 14:57:16 +02:00
1190718e98 Use local images
Some checks failed
ci/woodpecker/tag/test Pipeline was successful
ci/woodpecker/tag/build Pipeline failed
2025-06-25 14:47:11 +02:00
9dd00e3deb Use local images
Some checks failed
ci/woodpecker/tag/test Pipeline was successful
ci/woodpecker/tag/build Pipeline failed
2025-06-25 14:25:33 +02:00
caedb1fe52 Use dynamic version
Some checks failed
ci/woodpecker/tag/test Pipeline failed
ci/woodpecker/tag/build unknown status
2025-06-25 13:49:47 +02:00
d4dcbac8d9 Use dynamic version
Some checks failed
ci/woodpecker/tag/test Pipeline failed
ci/woodpecker/tag/build unknown status
2025-06-25 13:48:06 +02:00
a5518752fe Use dynamic version
Some checks failed
ci/woodpecker/tag/test Pipeline failed
ci/woodpecker/tag/build unknown status
2025-06-25 13:44:12 +02:00
5fd6681571 Merge branch 'main' of ssh://tiptop:2222/philorg/test-woodpecker-python
All checks were successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/tag/test Pipeline was successful
ci/woodpecker/tag/build Pipeline was successful
2025-06-25 13:38:43 +02:00
0dfccc3392 t
Some checks failed
ci/woodpecker/tag/test Pipeline failed
ci/woodpecker/tag/build unknown status
2025-06-25 13:13:06 +02:00
feff5a08b6 Use local woodpecker-buildah image
Some checks failed
ci/woodpecker/tag/test Pipeline was successful
ci/woodpecker/tag/build Pipeline failed
2025-06-25 12:29:51 +02:00
8916c5e6b0 Update README.md
All checks were successful
ci/woodpecker/push/test Pipeline was successful
2025-06-25 02:58:36 +00:00
9498ae680c Cleanup
All checks were successful
ci/woodpecker/tag/test Pipeline was successful
ci/woodpecker/tag/build Pipeline was successful
2025-06-25 03:24:46 +02:00
5fb9b992fa Cleanup
All checks were successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/tag/test Pipeline was successful
ci/woodpecker/tag/build Pipeline was successful
2025-06-25 02:38:09 +02:00
01bc102185 All python + container OK
All checks were successful
ci/woodpecker/tag/test Pipeline was successful
ci/woodpecker/tag/build Pipeline was successful
2025-06-25 02:36:33 +02:00
79850e9f0a g
All checks were successful
ci/woodpecker/tag/test Pipeline was successful
ci/woodpecker/tag/build Pipeline was successful
2025-06-25 02:17:57 +02:00
4685127011 m
Some checks failed
ci/woodpecker/tag/test Pipeline was successful
ci/woodpecker/tag/build Pipeline failed
2025-06-24 15:48:24 +02:00
8b334f1e6d p 2025-06-24 15:46:14 +02:00
7b3089ada1 c
Some checks failed
ci/woodpecker/tag/test Pipeline was successful
ci/woodpecker/tag/build Pipeline failed
2025-06-24 15:07:56 +02:00
5747745304 c
Some checks failed
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/tag/test Pipeline was successful
ci/woodpecker/tag/build Pipeline failed
2025-06-24 15:03:34 +02:00
47c5182a99 g
All checks were successful
ci/woodpecker/tag/test Pipeline was successful
ci/woodpecker/tag/build Pipeline was successful
2025-06-24 13:31:47 +02:00
772c4a94fb g
All checks were successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/tag/test Pipeline was successful
ci/woodpecker/tag/build Pipeline was successful
2025-06-24 13:30:19 +02:00
2bf168476a q
All checks were successful
ci/woodpecker/tag/test Pipeline was successful
ci/woodpecker/tag/build Pipeline was successful
2025-06-24 13:26:32 +02:00
deccea8809 w
Some checks failed
ci/woodpecker/tag/test Pipeline failed
ci/woodpecker/tag/build unknown status
2025-06-24 13:25:32 +02:00
caa5362397 b
Some checks failed
ci/woodpecker/push/test Pipeline failed
ci/woodpecker/tag/test Pipeline failed
ci/woodpecker/tag/build unknown status
2025-06-24 12:43:29 +02:00
b0af67e0c5 o
Some checks failed
ci/woodpecker/push/test Pipeline failed
ci/woodpecker/tag/test Pipeline failed
ci/woodpecker/tag/build unknown status
2025-06-24 11:21:38 +02:00
8308fe65f3 fail
All checks were successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/tag/test Pipeline was successful
ci/woodpecker/tag/build Pipeline was successful
2025-06-24 11:19:39 +02:00
8b55743176 e
All checks were successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/tag/test Pipeline was successful
ci/woodpecker/tag/build Pipeline was successful
2025-06-24 11:18:06 +02:00
9ce037aab8 f
All checks were successful
ci/woodpecker/push/test Pipeline was successful
2025-06-24 11:16:28 +02:00
bcea6cfdc3 s 2025-06-24 11:14:41 +02:00
48cb2419f1 f
All checks were successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/tag/build Pipeline was successful
2025-06-24 11:05:59 +02:00
7ab05d6ca7 C
All checks were successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/tag/build Pipeline was successful
2025-06-24 11:02:46 +02:00
c85707cf77 f 2025-06-24 11:01:31 +02:00
f4a58fe1fb a
All checks were successful
ci/woodpecker/push/build Pipeline was successful
2025-06-24 11:00:01 +02:00
8 changed files with 101 additions and 55 deletions

View file

@ -1,23 +1,27 @@
when:
- event: push
branch: main
- event: manual
- event: tag
depends_on:
- test
steps:
get_tag:
image: ghcr.io/astral-sh/uv:python3.13-alpine
commands:
- echo $CI_COMMIT_TAG
isitatag:
image: ghcr.io/astral-sh/uv:python3.13-alpine
when:
evaluate: 'CI_COMMIT_TAG == true'
commands:
- echo "It's a tag!"
container_build_release_push:
#image: docker.io/maltegrosse/woodpecker-buildah:0.0.12
image: code.philo.ydns.eu/philorg/woodpecker-buildah
settings:
registry: code.philo.ydns.eu
repository: philorg/test-woodpecker-python
tags: ${CI_COMMIT_SHA}
architectures: amd64
context: Containerfile
username:
from_secret: registry_username
password:
from_secret: registry_password
sync:
image: ghcr.io/astral-sh/uv:python3.13-alpine
image: code.philo.ydns.eu/philorg/uv
volumes:
- uv-cache:/uv-cache
environment:
@ -25,13 +29,9 @@ steps:
UV_LINK_MODE: copy
commands:
- uv sync
test:
#image: ghcr.io/astral-sh/uv:alpine
image: ghcr.io/astral-sh/uv:python3.13-alpine
commands:
- .venv/bin/pytest -s tests/basic.py
build:
image: ghcr.io/astral-sh/uv:python3.13-alpine
image: code.philo.ydns.eu/philorg/uv
volumes:
- uv-cache:/uv-cache
environment:
@ -41,27 +41,13 @@ steps:
- uv build --wheel
- uv cache prune --ci
push_python:
# TODO: when git tag
image: code.philo.ydns.eu/philorg/twine
image: code.philo.ydns.eu/philorg/uv
environment:
OWNER: philorg
REGISTRY_URL: https://code.philo.ydns.eu
USERNAME:
from_secret: forgejo_username
PASSWORD:
from_secret: forgejo_password
REGISTRY_TOKEN:
from_secret: registry_token
commands:
- twine upload --repository-url $REGISTRY_URL/api/packages/$OWNER/pypi -u $USERNAME -p $PASSWORD --non-interactive dist/*.whl
- uv publish --publish-url $REGISTRY_URL/api/packages/$OWNER/pypi --token $REGISTRY_TOKEN dist/*.whl
failure: ignore
# TODO: container
# For podman build: see https://woodpecker-ci.org/blog/podman-image-build-sigstore
# podman-privileged-test:
# image: quay.io/podman/stable
# commands:
# - echo From https://docs.gitlab.com/runner/executors/kubernetes/use_podman_with_kubernetes/
# - podman build . -t playground-bis:testing

21
.woodpecker/test.yaml Normal file
View file

@ -0,0 +1,21 @@
when:
- event: push
branch: main
- event: manual
- event: tag
steps:
sync:
image: code.philo.ydns.eu/philorg/uv
volumes:
- uv-cache:/uv-cache
environment:
UV_CACHE_DIR: /uv-cache
UV_LINK_MODE: copy
commands:
- uv sync
test:
image: ghcr.io/astral-sh/uv:python3.13-alpine
commands:
- .venv/bin/pytest -s tests/basic.py

View file

@ -1,15 +1,16 @@
# Build: podman build -t code.philo.ydns.eu/k-net/knoc -f Containerfile
# Build: podman build -t code.philo.ydns.eu/philorg/test-woodpecker -f Containerfile
FROM docker.io/python:3.13-slim
#RUN apk add --no-cache git
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/
COPY --from=docker.io/python:3.13 /usr/bin/git /usr/local/bin/git
FROM docker.io/python:alpine
COPY . /app
# Sync the project into a new environment, using the frozen lockfile
WORKDIR /app
RUN uv pip install --system .
# Sync the project into a new environment, using the frozen lockfile
RUN \
--mount=from=code.philo.ydns.eu/philorg/uv,source=/usr/local/bin/uv,target=/bin/uv \
--mount=from=code.philo.ydns.eu/philorg/uv,source=/usr/lib/libpcre2-8.so.0,target=/usr/lib/libpcre2-8.so.0 \
--mount=from=code.philo.ydns.eu/philorg/uv,source=/usr/bin/git,target=/usr/bin/git \
uv pip install --system .
ENTRYPOINT ["knoc"]
ENTRYPOINT ["foo"]

View file

@ -1,3 +1,5 @@
# test-woodpecker-ci
Yo
[![status-badge](https://code.philo.ydns.eu/woodpecker/api/badges/5/status.svg)](https://code.philo.ydns.eu/woodpecker/repos/5)
This is a sandbox for building packages (pypi and container) with Woodpecker CI.

View file

@ -1,22 +1,31 @@
[project]
name = "test-woodpecker-ci"
version = "0.1.0"
description = "Add your description here"
dynamic = ["version"]
description = "Sandbox for Woodpecker CI"
readme = "README.md"
requires-python = ">=3.13"
dependencies = []
[project.scripts]
foo = "test_woodpecker_ci.main:main"
[build-system]
requires = ["hatchling"]
requires = ["hatchling", "uv-dynamic-versioning"]
build-backend = "hatchling.build"
[tool.hatch.version]
source = "uv-dynamic-versioning"
[tool.hatch.build.targets.wheel]
packages = ["src/test_woodpecker_ci"]
[dependency-groups]
dev = [
"httpx>=0.28.1",
"pytest>=8.4.1",
dev = ["dunamai>=1.24.1", "httpx>=0.28.1", "pytest>=8.4.1"]
[tool.uv-dynamic-versioning]
style = "semver"
[tool.uv]
extra-index-url = [
"https://code.philo.ydns.eu/api/packages/philorg/pypi/simple/",
]

View file

@ -0,0 +1,10 @@
import importlib.metadata
try:
from dunamai import Version, Style
__version__ = Version.from_git().serialize(style=Style.SemVer, dirty=True)
except ImportError:
# __name__ can be used if the package name is the same
# as the directory. Otherwise, specify it explicitely.
__version__ = importlib.metadata.version(__name__)

View file

@ -1,2 +1,6 @@
def test_foo():
def test_ok():
assert True
def no_test_fail():
assert False

15
uv.lock generated
View file

@ -33,6 +33,18 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" },
]
[[package]]
name = "dunamai"
version = "1.24.1"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "packaging" },
]
sdist = { url = "https://files.pythonhosted.org/packages/54/22/7f46b0146ef614cd6f80e4bcb188dabe33e90b4e0af028e16f597f5826ad/dunamai-1.24.1.tar.gz", hash = "sha256:3aa3348f77242da8628b23f11e89569343440f0f912bcef32a1fa891cf8e7215", size = 45616, upload-time = "2025-05-09T13:48:46.417Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/1d/d6/6ed8b439906ca2e88d65bddf002e21239678aca6001d8fb82e8e2b196245/dunamai-1.24.1-py3-none-any.whl", hash = "sha256:4370e406d8ce195fc4b066b5c326bfa9adb269c4b8719b4e4fd90b63a2144bf7", size = 26654, upload-time = "2025-05-09T13:48:45.442Z" },
]
[[package]]
name = "h11"
version = "0.16.0"
@ -142,11 +154,11 @@ wheels = [
[[package]]
name = "test-woodpecker-ci"
version = "0.1.0"
source = { editable = "." }
[package.dev-dependencies]
dev = [
{ name = "dunamai" },
{ name = "httpx" },
{ name = "pytest" },
]
@ -155,6 +167,7 @@ dev = [
[package.metadata.requires-dev]
dev = [
{ name = "dunamai", specifier = ">=1.24.1" },
{ name = "httpx", specifier = ">=0.28.1" },
{ name = "pytest", specifier = ">=8.4.1" },
]