101 lines
2.9 KiB
YAML
101 lines
2.9 KiB
YAML
when:
|
|
- event: manual
|
|
- event: tag
|
|
|
|
depends_on:
|
|
- test
|
|
|
|
steps:
|
|
build_and_release_and_push:
|
|
image: maltegrosse/woodpecker-buildah:0.0.12
|
|
settings:
|
|
registry: code.philo.ydns.eu
|
|
repository: philorg/test-woodpecker
|
|
tags: ${CI_COMMIT_SHA}
|
|
architectures: amd64
|
|
context: Containerfile
|
|
username:
|
|
from_secret: registry_username
|
|
password:
|
|
from_secret: registry_password
|
|
|
|
|
|
# publish:
|
|
# image: docker.io/taywee/woodpecker-buildah:latest
|
|
# settings:
|
|
# tag: code.philo.ydns.eu/test-woodpecker
|
|
# registry: code.philo.ydns.eu
|
|
# username:
|
|
# from_secret: registry_username
|
|
# password:
|
|
# from_secret: registry_password
|
|
# env-files:
|
|
# DOCKER_HUB_AUTH: /home/build/.config/containers/auth.json
|
|
|
|
# settings:
|
|
# registry: code.philo.ydns.eu
|
|
# repo: code.philo.ydns.eu/test-woodpecker
|
|
# tags: ${CI_COMMIT_SHA}
|
|
# cache: true
|
|
# skip_tls_verify: false # set to true for testing registries ONLY with self-signed certs
|
|
# build_args:
|
|
# - COMMIT_SHA=${CI_COMMIT_SHA}
|
|
# - COMMIT_AUTHOR_EMAIL=${CI_COMMIT_AUTHOR_EMAIL}
|
|
# username:
|
|
# from_secret: docker-username
|
|
# password:
|
|
# from_secret: docker-password
|
|
# build_container:
|
|
# image: code.philo.ydns.eu/philorg/podman
|
|
# environment:
|
|
# REGISTRY_URL: https://code.philo.ydns.eu
|
|
# OWNER: philorg
|
|
# CONTAINERFILE: Containerfile
|
|
# commands:
|
|
# - podman build -t code.philo.ydns.eu/philorg/test-woodpecker -f $CONTAINERFILE
|
|
#
|
|
#
|
|
# publish_container:
|
|
# image: code.philo.ydns.eu/philorg/podman
|
|
# commands:
|
|
# - echo $REGISTRY_LOGIN_TOKEN | podman login -u <username> --password-stdin registry.gitlab.com
|
|
|
|
sync:
|
|
image: ghcr.io/astral-sh/uv:python3.13-alpine
|
|
volumes:
|
|
- uv-cache:/uv-cache
|
|
environment:
|
|
UV_CACHE_DIR: /uv-cache
|
|
UV_LINK_MODE: copy
|
|
commands:
|
|
- uv sync
|
|
|
|
build:
|
|
image: ghcr.io/astral-sh/uv:python3.13-alpine
|
|
volumes:
|
|
- uv-cache:/uv-cache
|
|
environment:
|
|
UV_CACHE_DIR: /uv-cache
|
|
UV_LINK_MODE: copy
|
|
commands:
|
|
- uv build --wheel
|
|
- uv cache prune --ci
|
|
|
|
push_python:
|
|
image: ghcr.io/astral-sh/uv:python3.13-alpine
|
|
environment:
|
|
OWNER: philorg
|
|
REGISTRY_URL: https://code.philo.ydns.eu
|
|
REGISTRY_TOKEN:
|
|
from_secret: registry_token
|
|
commands:
|
|
- 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
|