Skip to content

Commit

Permalink
chore: renovate: remove config related to alpine packages
Browse files Browse the repository at this point in the history
  • Loading branch information
nadiamoe committed Nov 22, 2024
1 parent d54d970 commit 935993e
Showing 1 changed file with 11 additions and 38 deletions.
49 changes: 11 additions & 38 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,16 @@
{
"matchPackageNames": "**/renovate",
"extends": ["schedule:weekly"]
}
},
{
// The default "docker" versioning will try to restrict upgrades to versions that do not change everything after
// a dash (-) for the current tag, as this typically indicates the "flavor" (e.g. postgresql:17.1-alpine will not
// be upgraded to postgresql:17.2-debian).
// This image in particular has lots of dashes and does not follow this convention, so we force "loose"
// versioning which is pretty much an alphabetical sort.
"matchPackageNames": ["ghcr.io/grafana/chromium-swiftshader-alpine"],
"versioning": "loose",
},
],

"customManagers": [
Expand Down Expand Up @@ -70,22 +79,6 @@
"(?:^|\\n)[ \\t]*K6_VERSION\\s*:=\\s*(?<currentValue>\\S+)[ \\t]*(?:$|\\n)"
]
},
{
// Update pinned alpine packages in Dockerfile.
"customType": "regex",
"fileMatch": [ "Dockerfile", "Dockerfile.build" ],
"matchStrings": [
// Lines that loosely look like "apk add --repository community --arch value something=version".
// To keep this regex simple, only one package per "apk add" is supported.
"\\bapk\\b.+?\\badd\\b.+?(--repository|-X)[ =\\t]+(?<alpineRepo>[a-z]+)\\s+(--arch[ =\\t]+(?<arch>\\w+)\\s+)?(?<depName>[-\\w]+?)=(?<currentValue>[-.\\w]+)"
],
"versioningTemplate": "loose", // The most lenient versioning renovate supports.
// We use different datasources for main and community, as alpine serves them in different URLs.
// Specifying --arch is optional, if not found it will default to x86_64.
"datasourceTemplate": "custom.alpine-{{alpineRepo}}-{{#if arch}}{{arch}}{{else}}x86_64{{/if}}",
// Extracted "versions" include the package name, so here we strip that prefix using a regex.
"extractVersionTemplate": "{{depName}}-(?<version>.+).apk",
},
{
// Update renovate version in GHA workflow file.
"customType": "regex",
Expand All @@ -99,25 +92,5 @@
"RENOVATE_IMAGE=ghcr.io/renovatebot/renovate:(?<currentValue>[^@\\s]+)(?:@(?<currentDigest>\\S+))?"
]
}
],
"customDatasources": {
// Use alpine HTML mirror page as a repository. When using `html` format, renovate produces version strings from
// all links present in the page. The version is extracted from that using extractVersionTemplate above.
"alpine-main-x86_64": {
"defaultRegistryUrlTemplate": "https://dl-cdn.alpinelinux.org/alpine/latest-stable/main/x86_64/",
"format": "html",
},
"alpine-community-x86_64": {
"defaultRegistryUrlTemplate": "https://dl-cdn.alpinelinux.org/alpine/latest-stable/community/x86_64/",
"format": "html",
},
"alpine-main-aarch64": {
"defaultRegistryUrlTemplate": "https://dl-cdn.alpinelinux.org/alpine/latest-stable/main/aarch64/",
"format": "html",
},
"alpine-community-aarch64": {
"defaultRegistryUrlTemplate": "https://dl-cdn.alpinelinux.org/alpine/latest-stable/community/aarch64/",
"format": "html",
},
},
]
}

0 comments on commit 935993e

Please sign in to comment.