Automate with CI#
You can run Cookieplone in a continuous integration (CI) pipeline without any interactive prompts.
Use --no-input together with an answers file to provide all values up front.
Basic non-interactive run#
The --no-input flag skips all prompts and uses template defaults for any value not supplied:
cookieplone --no-input
To supply specific values, combine it with --answers-file:
cookieplone --no-input --answers-file answers.json
Example answers file#
Create answers.json in your repository:
{
"__template__": "myproject",
"project_title": "My Plone Site",
"project_slug": "my-plone-site",
"author_name": "CI Bot",
"author_email": "ci@example.com",
"plone_version": "6.1.2"
}
Example GitHub Actions workflow#
name: Generate project
on:
workflow_dispatch:
jobs:
generate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Generate project
run: |
uvx cookieplone \
--no-input \
--answers-file answers.json \
--output-dir /tmp/generated
Pin the template version#
By default, Cookieplone uses the main branch of cookieplone-templates, which changes over time.
For reproducible builds, pin a release tag.
Release tags use the YYYYMMDD.N format: replace YYYYMMDD.N in the commands below with the tag you want.
cookieplone --no-input --tag YYYYMMDD.N --answers-file answers.json
Or set the tag with an environment variable:
COOKIEPLONE_REPOSITORY_TAG=YYYYMMDD.N cookieplone --no-input --answers-file answers.json
Pin a tag that contains a cookieplone-config.json file.
The tags released before Cookieplone 2.0 use the legacy format, which Cookieplone 2.0 doesn't support.
A pinned tag also turns off the fallback to the next branch.