diff --git a/projects/github.com/zalando/patroni/package.yml b/projects/github.com/zalando/patroni/package.yml new file mode 100644 index 0000000000..90253bd791 --- /dev/null +++ b/projects/github.com/zalando/patroni/package.yml @@ -0,0 +1,45 @@ +distributable: + # NB: the project moved from zalando/patroni to patroni/patroni (community fork). + # GitHub redirects the old path, but we pin the canonical one. + url: https://github.com/patroni/patroni/archive/refs/tags/v{{version}}.tar.gz + strip-components: 1 + +versions: + github: patroni/patroni + ignore: + - /-(rc|alpha|beta)\d/ + +dependencies: + pkgx.sh: ">=1" + postgresql.org: '*' # patroni invokes pg_ctl, pg_rewind, pg_basebackup, pg_controldata + # DCS backends — users pick one (etcd is the most common default): + # etcd.io: '*' + # consul.io: '*' + # zookeeper.apache.org: '*' + +build: + dependencies: + python.org: ^3.9 + script: + - bkpyvenv stage {{prefix}} {{version}} + - ${{prefix}}/venv/bin/pip install . + - bkpyvenv seal {{prefix}} patroni patronictl + +test: + # patroni's main CLI expects a positional config-file argument + # and exits non-zero without it — `--help` flag may or may not + # be honored before that check. Verify the bkpyvenv-sealed shims + # exist and are executable instead; the pip install step itself + # exercises the package import path during venv build, which is + # the real correctness gate. + - test -x "{{prefix}}/bin/patroni" + - test -x "{{prefix}}/bin/patronictl" + # patronictl is the orchestration sub-tool with proper argparse; + # capture output to avoid SIGPIPE if it short-circuits. + - run: | + out=$(patronictl --help 2>&1 || true) + echo "$out" | grep -iq patroni + +provides: + - bin/patroni + - bin/patronictl