|
1 | 1 | { |
| 2 | + /** |
| 3 | + * Renovate Configuration |
| 4 | + * |
| 5 | + * This configuration file defines how Renovate handles dependency updates for repositories. |
| 6 | + * Renovate is a bot that automatically creates pull requests to update dependencies. |
| 7 | + * |
| 8 | + * Documentation: https://docs.renovatebot.com/configuration-options/ |
| 9 | + */ |
2 | 10 | $schema: "https://docs.renovatebot.com/renovate-schema.json", |
3 | | - branchPrefix: "renovate-pr/", |
| 11 | + |
| 12 | + // # keep-sorted start block=yes |
| 13 | + branchPrefix: "chore/renovate-pr/", |
4 | 14 | customDatasources: { |
5 | 15 | "grafana-dashboards": { |
6 | 16 | defaultRegistryUrlTemplate: "https://grafana.com/api/dashboards/{{packageName}}", |
7 | 17 | format: "json", |
8 | 18 | transformTemplates: ['{"releases":[{"version": $string(revision)}]}'], |
9 | 19 | }, |
10 | 20 | }, |
11 | | - customManagers: [ |
| 21 | + // Keep the extends started with ":" at the end of the list to allow overriding |
| 22 | + extends: [ |
| 23 | + "config:recommended", // Renovate's recommended configuration preset |
| 24 | + "docker:pinDigests", // Pin Docker image digests for security |
| 25 | + "helpers:pinGitHubActionDigestsToSemver", // Pin GitHub Actions to specific versions with semantic versioning |
| 26 | + "security:openssf-scorecard", // Add OpenSSF Scorecard security insights |
| 27 | + ":disableDependencyDashboard", // Don't create dependency dashboard issues |
| 28 | + ":disableRateLimiting", // Disable rate limiting for faster updates |
| 29 | + ":docker", // Enable Docker container updates |
| 30 | + ":enableVulnerabilityAlertsWithLabel(security)", // Add security label to vulnerability alerts |
| 31 | + ":pinSkipCi", // Pin dependencies and skip CI for pin-only updates |
| 32 | + ], |
| 33 | + packageRules: [ |
12 | 34 | { |
13 | | - customType: "regex", |
| 35 | + automerge: true, |
| 36 | + commitBody: "[skip ci]", |
| 37 | + description: "Automerge all without running any tests", |
| 38 | + ignoreTests: true, |
| 39 | + matchPackagePatterns: ["*"], |
| 40 | + }, |
| 41 | + ], |
| 42 | + prCommitsPerRunLimit: 500, |
| 43 | + prConcurrentLimit: 500, |
| 44 | + prHourlyLimit: 500, |
| 45 | + // This allows Renovate to detect and update dependencies that aren't in standard package files |
| 46 | + regexManagers: [ |
| 47 | + { |
| 48 | + // Template for extracting version numbers from custom patterns |
14 | 49 | extractVersionTemplate: "{{#if extractVersion}}{{{extractVersion}}}{{else}}^v?(?<version>.+)${{/if}}", |
| 50 | + |
| 51 | + // File types to scan for custom dependency patterns |
15 | 52 | fileMatch: ["\\.ya?ml$", "\\.md$", "^Dockerfile$", "^entrypoint\\.sh$"], |
| 53 | + |
| 54 | + // Regex pattern to match custom dependency declarations |
| 55 | + // Format: # renovate: datasource=<source> depName=<name> [versioning=<type>] [extractVersion=<regex>] [registryUrl=<url>] |
| 56 | + // Example: # renovate: datasource=github-releases depName=helm/helm versioning=semver |
16 | 57 | matchStrings: [ |
17 | 58 | '# renovate: datasource=(?<datasource>.+?) depName=(?<depName>.+?)( versioning=(?<versioning>.+?))?( extractVersion=(?<extractVersion>.+?))?( registryUrl=(?<registryUrl>.+?))?\\s.*[=:]\\s*"?(?<currentValue>.+?)"?\\s', |
18 | 59 | ], |
| 60 | + |
| 61 | + // Default to semantic versioning unless specified otherwise |
19 | 62 | versioningTemplate: "{{#if versioning}}{{{versioning}}}{{else}}semver{{/if}}", |
20 | 63 | }, |
21 | 64 | { |
22 | | - customType: "regex", |
23 | 65 | datasourceTemplate: "custom.grafana-dashboards", |
| 66 | + customType: "regex", |
24 | 67 | fileMatch: ["\\.md$"], |
25 | 68 | matchStrings: [ |
26 | 69 | '# renovate: depName="(?<depName>.*)"\\n\\s+gnetId:\\s+(?<packageName>.*?)\\n\\s+revision:\\s+(?<currentValue>.*)', |
|
38 | 81 | ], |
39 | 82 | }, |
40 | 83 | ], |
41 | | - // Keep the extends started with ":" at the end of the list to allow overriding |
42 | | - extends: [ |
43 | | - "config:recommended", |
44 | | - "docker:pinDigests", |
45 | | - "helpers:pinGitHubActionDigestsToSemver", |
46 | | - "security:openssf-scorecard", |
47 | | - ":disableDependencyDashboard", |
48 | | - ":disableRateLimiting", |
49 | | - ":docker", |
50 | | - ":enableVulnerabilityAlertsWithLabel(security)", |
51 | | - ":pinSkipCi", |
52 | | - ], |
53 | | - packageRules: [ |
54 | | - { |
55 | | - automerge: true, |
56 | | - commitBody: "[skip ci]", |
57 | | - description: "Automerge all without running any tests", |
58 | | - ignoreTests: true, |
59 | | - matchPackagePatterns: ["*"], |
60 | | - }, |
61 | | - ], |
62 | | - prConcurrentLimit: 500, |
63 | | - prHourlyLimit: 500, |
64 | | - prCommitsPerRunLimit: 500, |
65 | | - branchConcurrentLimit: 500, |
| 84 | + // # keep-sorted end |
66 | 85 | } |
0 commit comments