mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-11 22:46:27 +00:00
fix(versionCompatibility): support digest updates (#25518)
This commit is contained in:
parent
bece5a1c50
commit
4850110f36
2 changed files with 18 additions and 3 deletions
|
@ -1747,20 +1747,36 @@ describe('workers/repository/process/lookup/index', () => {
|
|||
|
||||
it('applies versionCompatibility for 18.10.0', async () => {
|
||||
config.currentValue = '18.10.0-alpine';
|
||||
config.currentDigest = 'aaa111';
|
||||
config.packageName = 'node';
|
||||
config.versioning = nodeVersioningId;
|
||||
config.versionCompatibility = '^(?<version>[^-]+)(?<compatibility>-.*)?$';
|
||||
config.datasource = DockerDatasource.id;
|
||||
getDockerReleases.mockResolvedValueOnce({
|
||||
releases: [
|
||||
{ version: '18.10.0' },
|
||||
{ version: '18.18.0' },
|
||||
{ version: '18.19.0-alpine' },
|
||||
{ version: '18.20.0' },
|
||||
],
|
||||
});
|
||||
getDockerDigest.mockResolvedValueOnce('bbb222');
|
||||
getDockerDigest.mockResolvedValueOnce('ccc333');
|
||||
const res = await lookup.lookupUpdates(config);
|
||||
expect(res.updates).toHaveLength(2);
|
||||
expect(res).toMatchObject({
|
||||
updates: [{ newValue: '18.19.0-alpine', updateType: 'minor' }],
|
||||
updates: [
|
||||
{
|
||||
newValue: '18.19.0-alpine',
|
||||
newDigest: 'bbb222',
|
||||
updateType: 'minor',
|
||||
},
|
||||
{
|
||||
newValue: '18.10.0-alpine',
|
||||
newDigest: 'ccc333',
|
||||
updateType: 'digest',
|
||||
},
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -419,8 +419,7 @@ export async function lookupUpdates(
|
|||
// digest update
|
||||
res.updates.push({
|
||||
updateType: 'digest',
|
||||
// TODO #22198
|
||||
newValue: config.currentValue!,
|
||||
newValue: compareValue,
|
||||
});
|
||||
}
|
||||
} else if (config.pinDigests) {
|
||||
|
|
Loading…
Reference in a new issue