mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 23:16:26 +00:00
fix(docker): use docker versioning for debian images with regular tags (#17602)
This commit is contained in:
parent
4ccd085aa5
commit
c4127f994c
2 changed files with 20 additions and 1 deletions
|
@ -649,6 +649,22 @@ describe('modules/manager/dockerfile/extract', () => {
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('handles debian with regular tag', () => {
|
||||||
|
const res = extractPackageFile('FROM debian:11.4-slim\n', '', {})?.deps;
|
||||||
|
expect(res).toEqual([
|
||||||
|
{
|
||||||
|
autoReplaceStringTemplate:
|
||||||
|
'{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}',
|
||||||
|
currentDigest: undefined,
|
||||||
|
currentValue: '11.4-slim',
|
||||||
|
datasource: 'docker',
|
||||||
|
depName: 'debian',
|
||||||
|
depType: 'final',
|
||||||
|
replaceString: 'debian:11.4-slim',
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
|
||||||
it('handles debian with prefixes', () => {
|
it('handles debian with prefixes', () => {
|
||||||
const res = extractPackageFile('FROM amd64/debian:10\n', '', {})?.deps;
|
const res = extractPackageFile('FROM amd64/debian:10\n', '', {})?.deps;
|
||||||
expect(res).toEqual([
|
expect(res).toEqual([
|
||||||
|
|
|
@ -208,7 +208,10 @@ export function getDep(
|
||||||
dep.versioning = ubuntuVersioning.id;
|
dep.versioning = ubuntuVersioning.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dep.depName === 'debian') {
|
if (
|
||||||
|
dep.depName === 'debian' &&
|
||||||
|
debianVersioning.api.isVersion(dep.currentValue)
|
||||||
|
) {
|
||||||
dep.versioning = debianVersioning.id;
|
dep.versioning = debianVersioning.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue