From fe4e3428c03ba7730232ea57d938e02b402d5b27 Mon Sep 17 00:00:00 2001 From: phil Date: Thu, 26 Jun 2025 15:40:30 +0200 Subject: [PATCH] Podman build container --- .woodpecker/build.yaml | 43 +++++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/.woodpecker/build.yaml b/.woodpecker/build.yaml index 4bbec49..9119933 100644 --- a/.woodpecker/build.yaml +++ b/.woodpecker/build.yaml @@ -6,21 +6,7 @@ depends_on: - test steps: - 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} latest - architectures: amd64 - context: Containerfile - username: - from_secret: registry_username - password: - from_secret: registry_password - - sync: + python_sync: image: code.philo.ydns.eu/philorg/uv volumes: - uv-cache:/uv-cache @@ -30,7 +16,7 @@ steps: commands: - uv sync - build: + python_build: image: code.philo.ydns.eu/philorg/uv volumes: - uv-cache:/uv-cache @@ -41,7 +27,7 @@ steps: - uv build --wheel - uv cache prune --ci - push_python: + python_publish: image: code.philo.ydns.eu/philorg/uv environment: OWNER: philorg @@ -51,3 +37,26 @@ steps: commands: - uv publish --publish-url $REGISTRY_URL/api/packages/$OWNER/pypi --token $REGISTRY_TOKEN dist/*.whl failure: ignore + + container_build_publish: + image: quay.io/podman/stable:latest + # Caution: This image is built daily. It might fill up your image store quickly. + #pull: true + volumes: + - containers:/var/lib/containers + # Fill in the trusted checkbox in Woodpecker's settings as well + privileged: true + environment: + registry: code.philo.ydns.eu + org: philorg + container_name: test-woodpecker-python + registry_token: + from_secret: registry_token + commands: + # Login at the registry + - podman login -u __token__ --password $registry_token $registry + # Build the container image + - podman build --volume=/var/lib/containers:/var/lib/containers --tag $registry/$org/$container_name:latest --tag $registry/$org/$container_name:$CI_COMMIT_TAG . + # Push the image + - podman push $registry/$org/$container_name:latest + - podman push $registry/$org/$container_name:$CI_COMMIT_TAG