|
73 | 73 | { |
74 | 74 | // Update pinned alpine packages in Dockerfile. |
75 | 75 | "customType": "regex", |
76 | | - "fileMatch": [ "Dockerfile" ], |
| 76 | + "fileMatch": [ "Dockerfile", "Dockerfile.build" ], |
77 | 77 | "matchStrings": [ |
78 | | - // Lines that loosely look like "apk add --repository community something=version". |
| 78 | + // Lines that loosely look like "apk add --repository community --arch value something=version". |
79 | 79 | // To keep this regex simple, only one package per "apk add" is supported. |
80 | | - "\\bapk\\b.+?\\badd\\b.+?(--repository|-X)[ =\\t]+(?<alpineRepo>[a-z]+)\\s+(?<depName>[-\\w]+?)=(?<currentValue>[-.\\w]+)" |
| 80 | + "\\bapk\\b.+?\\badd\\b.+?(--repository|-X)[ =\\t]+(?<alpineRepo>[a-z]+)\\s+(--arch[ =\\t]+(?<arch>\\w+)\\s+)?(?<depName>[-\\w]+?)=(?<currentValue>[-.\\w]+)" |
81 | 81 | ], |
82 | 82 | "versioningTemplate": "loose", // The most lenient versioning renovate supports. |
83 | | - // We use two different datasources for main and community, as alpine serves them in different URLs. |
84 | | - "datasourceTemplate": "custom.alpine-{{alpineRepo}}", |
| 83 | + // We use different datasources for main and community, as alpine serves them in different URLs. |
| 84 | + // Specifying --arch is optional, if not found it will default to x86_64. |
| 85 | + "datasourceTemplate": "custom.alpine-{{alpineRepo}}-{{#if arch}}{{arch}}{{else}}x86_64{{/if}}", |
85 | 86 | // Extracted "versions" include the package name, so here we strip that prefix using a regex. |
86 | 87 | "extractVersionTemplate": "{{depName}}-(?<version>.+).apk", |
87 | 88 | }, |
|
102 | 103 | "customDatasources": { |
103 | 104 | // Use alpine HTML mirror page as a repository. When using `html` format, renovate produces version strings from |
104 | 105 | // all links present in the page. The version is extracted from that using extractVersionTemplate above. |
105 | | - "alpine-main": { |
| 106 | + "alpine-main-x86_64": { |
106 | 107 | "defaultRegistryUrlTemplate": "https://dl-cdn.alpinelinux.org/alpine/latest-stable/main/x86_64/", |
107 | 108 | "format": "html", |
108 | 109 | }, |
109 | | - "alpine-community": { |
| 110 | + "alpine-community-x86_64": { |
110 | 111 | "defaultRegistryUrlTemplate": "https://dl-cdn.alpinelinux.org/alpine/latest-stable/community/x86_64/", |
111 | 112 | "format": "html", |
112 | 113 | }, |
| 114 | + "alpine-main-aarch64": { |
| 115 | + "defaultRegistryUrlTemplate": "https://dl-cdn.alpinelinux.org/alpine/latest-stable/main/aarch64/", |
| 116 | + "format": "html", |
| 117 | + }, |
| 118 | + "alpine-community-aarch64": { |
| 119 | + "defaultRegistryUrlTemplate": "https://dl-cdn.alpinelinux.org/alpine/latest-stable/community/aarch64/", |
| 120 | + "format": "html", |
| 121 | + }, |
113 | 122 | }, |
114 | 123 | } |
0 commit comments