admin管理员组文章数量:1383590
We're trying to use renovate bot in order to update the terraform version in the provider.tf file. We're using the terraform release site (/) for the custom data source. The manager itself is working fine but we're trying to use a filter which filters out the Alpha, Beta and RC versions but we're not getting there just yet. It either picks up the 1.12.0-alphaXXXXX version and places it as 1.12.0 in our provider.tf or it won't work at all and it closes the branch.
I've tried using the AllowedVersions function in Renovate in order to properly filter out versions I don't want but it's not picking up even though a regex editor is showing that it should work.
Here's my code which we built upon:
{
"$schema": ".json",
"forkProcessing": "enabled",
"dependencyDashboard": true,
"assignees": ["[email protected]", "[email protected]"],
"terraform": {
"enabled": true
},
"html": {
"enabled": true
},
"customDatasources": {
"terraform": {
"defaultRegistryUrlTemplate": "/",
"format": "html"
}
},
"customManagers": [
{
"customType": "regex",
"fileMatch": [
".*\\.tf$"
],
"matchStrings": [
"required_version\\s*=\\s*\"=\\s*(?<currentValue>\\d+\\.\\d+\\.\\d+)\""
],
"datasourceTemplate": "custom.terraform",
"depNameTemplate": "terraform",
"versioningTemplate": "regex:^v?(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)$"
}
],
"packageRules": [
{
"matchDatasources": [
"custom.terraform"
],
"extractVersion": "(?<version>\\d+\\.\\d+\\.\\d+)"
}
]
}
The code above is picking up the 1.12.0 and edits my files just fine. But in this case I don't want the 1.12.0 seeing as it's an alpha versions and I would like Renovate to pick up the latest stable, which is terraform_1.11.3 without any suffixes and we tried these variants:
"allowedVersions": "^(?!.(alpha|beta|rc)).$" "allowedVersions": "!/-$/"
Logging when using default settings:
"currentValue": "= 1.3.7",
"depType": "required_version",
"datasource": "github-releases",
"depName": "hashicorp/terraform",
"extractVersion": "v(?<version>.*)$",
"versioning": "hashicorp",
"skipReason": "github-token-required",
"updates": [],
"packageName": "hashicorp/terraform"
}
],
My input file:
terraform {
required_version = "= 1.3.7"
required_providers {
azurerm = {
version = "4.25.0"
}
}
}
本文标签: Renovate bot custom HTML managerStack Overflow
版权声明:本文标题:Renovate bot custom HTML manager - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744017499a2576601.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论