A Copier template for generating tinuous configuration files with automatic CI system detection and smart defaults.
- Auto-detects CI systems - Automatically finds GitHub Actions, Travis CI, Appveyor, and CircleCI configurations
- Smart defaults - Provides sensible defaults based on detected CI systems and project structure
- DataLad integration - Optional DataLad/git-annex support with configurable subdataset boundaries
- Flexible path organization - Multiple path organization strategies (by-date, by-CI, by-type, flat, custom)
- Secret sanitization - Configurable regex patterns for automatic secret sanitization
- Complete setup - Generates
tinuous.yaml,.env, andREADME.md
- Copier >= 8.0
- Python >= 3.7
# Install copier
pip install copier
# Generate configuration in current directory
copier copy gh:con/tinuous-template .
# Generate in a specific directory
copier copy gh:con/tinuous-template /path/to/destinationProvide answers via command-line flags:
copier copy gh:con/tinuous-template . \
--data repository=con/tinuous \
--data is_standalone=true \
--data enable_datalad=true \
--data subdataset_boundary=by-monthAccept all default values:
copier copy gh:con/tinuous-template . --defaultsThe template will ask you:
- target_repo_path: Path to target repository (auto-detected if empty)
- repository: GitHub repository in OWNER/NAME format (auto-detected from git)
- is_standalone: Whether this is a standalone repository or embedded in a project
- log_root: Root directory for logs (defaults based on standalone mode)
- detect_github_actions: Enable GitHub Actions (auto-detected)
- github_workflows: Specific workflows to include (empty = all)
- detect_travis: Enable Travis CI (auto-detected)
- detect_appveyor: Enable Appveyor (auto-detected)
- appveyor_account: Appveyor account name (required if enabled)
- appveyor_project_slug: Project slug (optional)
- detect_circleci: Enable CircleCI (auto-detected)
- path_organization: Choose from:
by-date-ci: Year/Month/Day/CI/Type (recommended)by-ci-date: CI/Year/Month/Day/Typeby-type: Type/Year/Monthflat: Year/Month (flat structure)custom: Define your own
- custom_path_prefix: Custom path template (if custom selected)
- enable_datalad: Enable DataLad integration
- datalad_cfg_proc: Config procedure (text2git, yoda, none)
- subdataset_boundary: Where to create subdatasets (none, by-year, by-month, by-day)
- since_date: Start date for fetching logs (ISO 8601)
- max_days_back: Maximum days to look back
- event_types: Event types to fetch (cron, push, pr, manual)
- fetch_artifacts: Fetch build artifacts (GitHub Actions, CircleCI)
- fetch_releases: Fetch GitHub release assets
- enable_secret_sanitization: Enable automatic secret sanitization
- secret_patterns: Regex patterns for secrets (YAML mapping)
mkdir tinuous-myproject
cd tinuous-myproject
git init
copier copy gh:con/tinuous-template .The template will:
- Auto-detect repository from parent directory if available
- Detect all CI systems in the target repo
- Create configuration for a standalone log repository
- Enable DataLad with monthly subdatasets (if chosen)
cd ~/projects/myproject
copier copy gh:con/tinuous-template .Answer prompts:
- Is this standalone? No
- Log root: logs/tinuous
The template will:
- Auto-detect repository from
.git/config - Detect CI systems in current project
- Create configuration with logs in
logs/tinuous/
copier copy gh:con/tinuous-template . \
--data repository=myorg/myrepo \
--data is_standalone=false \
--data log_root=ci-logs \
--data path_organization=custom \
--data custom_path_prefix='builds/{ci}/{year}/{month}/{build_commit[:7]}'The template generates:
- tinuous.yaml - Main configuration file for tinuous
- .env - Template for environment variables (tokens)
- README.md - Documentation for the generated configuration
- Review
tinuous.yaml- Check and adjust settings as needed - Set up authentication - Add tokens to
.env(copy from.envif needed) - Add to
.gitignore- Ensure.envis in.gitignore - Test configuration - Run
tinuous fetchto test
tinuous-template/
├── copier.yml # Template configuration
├── extensions/
│ └── copier_extensions.py # Custom Jinja filters
└── template/
├── tinuous.yaml.jinja # Main configuration template
├── .env.jinja # Environment variables template
└── README.md.jinja # Documentation template
# Create test directory
mkdir test-output
cd test-output
# Run template
copier copy /path/to/tinuous-template .
# Or test with a real repository
cd /path/to/your/project
copier copy /path/to/tinuous-template .The template detects CI systems by looking for:
- GitHub Actions:
.github/workflows/*.ymlor.github/workflows/*.yaml - Travis CI:
.travis.yml - Appveyor:
.appveyor.ymlorappveyor.yml - CircleCI:
.circleci/config.yml
Custom Jinja filters in extensions/copier_extensions.py:
repo_from_git: Extract repo from.git/confighas_github_actions: Check for GitHub Actionshas_travis: Check for Travis CIhas_appveyor: Check for Appveyorhas_circleci: Check for CircleCIis_iso8601: Validate ISO 8601 date formatget_github_workflows: List workflow filenamescurrent_year: Get current yearparse_bool: Parse boolean values
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Test your changes
- Submit a pull request
MIT License - see LICENSE file for details
- tinuous - The main tinuous tool
- tinuous-inception - Example tinuous setup
- Copier - Template engine