Podman build container
This commit is contained in:
parent
04edafde2c
commit
fe4e3428c0
1 changed files with 26 additions and 17 deletions
|
@ -6,21 +6,7 @@ depends_on:
|
||||||
- test
|
- test
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
container_build_release_push:
|
python_sync:
|
||||||
#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:
|
|
||||||
image: code.philo.ydns.eu/philorg/uv
|
image: code.philo.ydns.eu/philorg/uv
|
||||||
volumes:
|
volumes:
|
||||||
- uv-cache:/uv-cache
|
- uv-cache:/uv-cache
|
||||||
|
@ -30,7 +16,7 @@ steps:
|
||||||
commands:
|
commands:
|
||||||
- uv sync
|
- uv sync
|
||||||
|
|
||||||
build:
|
python_build:
|
||||||
image: code.philo.ydns.eu/philorg/uv
|
image: code.philo.ydns.eu/philorg/uv
|
||||||
volumes:
|
volumes:
|
||||||
- uv-cache:/uv-cache
|
- uv-cache:/uv-cache
|
||||||
|
@ -41,7 +27,7 @@ steps:
|
||||||
- uv build --wheel
|
- uv build --wheel
|
||||||
- uv cache prune --ci
|
- uv cache prune --ci
|
||||||
|
|
||||||
push_python:
|
python_publish:
|
||||||
image: code.philo.ydns.eu/philorg/uv
|
image: code.philo.ydns.eu/philorg/uv
|
||||||
environment:
|
environment:
|
||||||
OWNER: philorg
|
OWNER: philorg
|
||||||
|
@ -51,3 +37,26 @@ steps:
|
||||||
commands:
|
commands:
|
||||||
- uv publish --publish-url $REGISTRY_URL/api/packages/$OWNER/pypi --token $REGISTRY_TOKEN dist/*.whl
|
- uv publish --publish-url $REGISTRY_URL/api/packages/$OWNER/pypi --token $REGISTRY_TOKEN dist/*.whl
|
||||||
failure: ignore
|
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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue