|
|
4 månader sedan | |
|---|---|---|
| .. | ||
| CUSTOM_MANAGERS.md | 4 månader sedan | |
| README.md | 4 månader sedan | |
| sync-template-version.sh | 4 månader sedan | |
This directory contains helper scripts and configuration for Renovate bot automation.
The sync-template-version.sh script automatically syncs Docker image versions from compose.yaml.j2 files to their corresponding template.yaml metadata files.
renovate.json detects Docker image versions in .j2 template filescompose.yaml.j2sync-template-version.sh script runs automaticallycompose.yaml.j2 and updates the version field in the corresponding template.yamlIn renovate.json, the following configuration enables this feature:
{
"customManagers": [
{
"customType": "regex",
"description": "Update Docker images in Jinja2 compose templates",
"managerFilePatterns": [
"/^library/compose/.+/compose\\.ya?ml\\.j2$/"
],
"matchStrings": [
"image:\\s*(?<depName>[^:\\s]+):(?<currentValue>[^\\s\\n{]+)"
],
"datasourceTemplate": "docker"
}
],
"postUpgradeTasks": {
"commands": [
".renovate/sync-template-version.sh"
],
"fileFilters": [
"library/compose/**/template.yaml"
],
"executionMode": "update"
}
}
You can run the script manually at any time:
./.renovate/sync-template-version.sh
This will scan all compose templates and update their metadata versions to match the Docker image versions.
image: name:1.2.3)image: name:{{ version }})compose.yaml.j2 file (typically the main application image)template.yaml files are skippedExpected directory structure for each template:
library/compose/<template-name>/
├── compose.yaml.j2 # Jinja2 template with Docker Compose config
├── template.yaml # Template metadata (includes version field)
└── ... (other files)
The template.yaml should have a version field in the metadata section:
---
kind: compose
metadata:
name: Application Name
description: Description
version: 0.1.0 # This will be auto-updated
author: Christian Lempa
date: '2025-10-02'