fix: make the matchStrings pattern generic for all packages
What
Fix the matchStrings and make it generic instead of hardcoded to opentelemtry.
Why
Looks like it's broken as it is:
{
"deps": [
{
"depName": "docker://",
"currentValue": "0.83.0",
"datasource": "docker",
"replaceString": "default = \"0.83.0\" # datasource=docker depName=open-telemetry/opentelemetry-collector-contrib",
"updates": [],
"packageName": "docker://",
"versioning": "docker",
"warnings": [
{
"topic": "docker://",
"message": "Failed to look up docker package docker://"
}
]
}
],
"matchStrings": [
"default\\s*=\\s*\"(?<currentValue>\\d+\\.\\d+\\.\\d+)\"\\s*#\\s*datasource=docker\\s+depName=open-telemetry/opentelemetry-collector-contrib"
],
"depNameTemplate": "docker://{{depName}}",
"datasourceTemplate": "docker",
"packageFile": "reconciler/kind/RunwayService/variables.tf"
}
https://gitlab.com/gitlab-com/gl-infra/platform/runway/runwayctl/-/jobs/8783817917#L3472
Also it is hardcoded to opentelemtry so this MR updates it to work with other packages.