# One-time pipeline to build the custom Python CI image
# Trigger manually, then delete this file
#
# This builds the breakpilot/python-ci:3.12 image on the CI runner

when:
  - event: manual

clone:
  git:
    image: woodpeckerci/plugin-git
    settings:
      depth: 1
    extra_hosts:
      - macmini:192.168.178.100

steps:
  build-python-ci-image:
    image: docker:27-cli
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    commands:
      - |
        echo "=== Building breakpilot/python-ci:3.12 ==="

        docker build \
          -t breakpilot/python-ci:3.12 \
          -t breakpilot/python-ci:latest \
          -f .docker/python-ci.Dockerfile \
          .

        echo ""
        echo "=== Build complete ==="
        docker images | grep breakpilot/python-ci

        echo ""
        echo "Image is now available for CI pipelines!"
