Patrick de Ruiter 9cee473d1e
Some checks failed
Code Quality & Security Scan / TFLint (push) Successful in 22s
Code Quality & Security Scan / Terraform Destroy (push) Has been skipped
Code Quality & Security Scan / Tfsec Security Scan (push) Successful in 36s
Code Quality & Security Scan / Checkov Security Scan (push) Successful in 54s
Code Quality & Security Scan / Terraform Validate (push) Failing after 25s
Code Quality & Security Scan / SonarQube Scan (push) Has been skipped
Code Quality & Security Scan / Terraform Plan (push) Has been skipped
Code Quality & Security Scan / Terraform Apply (push) Has been skipped
feat: Schedule Renovate to run only between 2-4 AM
Add schedule configuration to reduce resource usage by limiting
Renovate runs to a nightly maintenance window.

- schedule: 'after 2am and before 4am'
- timezone: Europe/Amsterdam

Renovate will now only check for updates during this window instead
of running continuously.
2025-11-29 12:08:51 +01:00

76 lines
2.5 KiB
Smarty

// Renovate configuration file
// This file is generated by Terraform and uploaded to the container
module.exports = {
// Platform configuration
platform: '${platform}',
endpoint: '${endpoint}',
// Bot identity
gitAuthor: '${git_author}',
username: '${username}',
// Repository discovery
autodiscover: ${autodiscover},
// Onboarding configuration for new repositories
onboardingConfig: ${onboarding_config},
// Recommended: Use persistent cache directory
cacheDir: '/tmp/renovate/cache',
// Logging
logContext: 'renovate-bot',
// Additional recommended settings for Gitea
requireConfig: 'optional',
// Schedule configuration - only run during specified time window
// This reduces resource usage by limiting when Renovate checks for updates
schedule: ['after 2am and before 4am'],
timezone: 'Europe/Amsterdam',
// Regex managers for custom version detection
// This enables Renovate to detect Docker image versions in Terraform files
// when annotated with: # renovate: datasource=docker
regexManagers: [
{
// Match Docker image versions in Terraform files (.tf and .tfvars)
// Requires annotation comment above the image line
// Example:
// # renovate: datasource=docker
// image = "nginx:1.25.0"
fileMatch: ['\\.tf$', '\\.tfvars$'],
matchStrings: [
'#\\s*renovate:\\s*datasource=docker\\s*\\n\\s*image\\s*=\\s*"(?<depName>[^:"]+):(?<currentValue>[^"]+)"'
],
datasourceTemplate: 'docker'
},
{
// Match Docker image versions with explicit versioning scheme
// Example:
// # renovate: datasource=docker versioning=semver
// image = "hashicorp/vault:1.17.3"
fileMatch: ['\\.tf$', '\\.tfvars$'],
matchStrings: [
'#\\s*renovate:\\s*datasource=docker\\s+versioning=(?<versioning>\\S+)\\s*\\n\\s*image\\s*=\\s*"(?<depName>[^:"]+):(?<currentValue>[^"]+)"'
],
datasourceTemplate: 'docker',
versioningTemplate: '{{versioning}}'
},
{
// Match separate image and version/tag variables
// Example:
// # renovate: datasource=docker depName=redis
// version = "8.0.0"
fileMatch: ['\\.tf$', '\\.tfvars$'],
matchStrings: [
'#\\s*renovate:\\s*datasource=(?<datasource>\\S+)\\s+depName=(?<depName>\\S+)\\s*\\n.*?(?:version|tag)\\s*=\\s*"(?<currentValue>[^"]+)"'
],
datasourceTemplate: '{{datasource}}'
}
],
// Repository-level settings can be overridden in renovate.json files
};