feat(manager/flux): Allow OCI media type used by flux push artifact to enable Release Notes lookup (#32783)

This commit is contained in:
Marcel Boehm 2024-11-28 18:13:54 +01:00 committed by GitHub
parent baea715bea
commit 2f8ff83eab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 55 additions and 0 deletions

View file

@ -152,6 +152,60 @@ describe('modules/datasource/docker/schema', () => {
});
});
it('parses OCI flux artifact', () => {
const manifest = {
schemaVersion: 2,
mediaType: 'application/vnd.oci.image.manifest.v1+json',
config: {
mediaType: 'application/vnd.cncf.flux.config.v1+json',
digest:
'sha256:7cd37ea18409c76d241ad0d4ed484e206275be3535782be144ae257d54dd8d50',
size: 233,
},
layers: [
{
mediaType: 'application/vnd.cncf.flux.content.v1.tar+gzip',
digest:
'sha256:243a01363756cd6bc04243680d4c9aeac274523f298f9525823db9ae7e188a3c',
size: 1113,
},
],
annotations: {
'org.opencontainers.image.source':
'https://github.com/renovatebot/renovate',
},
};
expect(OciImageManifest.parse(manifest)).toMatchObject({
schemaVersion: 2,
mediaType: 'application/vnd.oci.image.manifest.v1+json',
config: {
mediaType: 'application/vnd.cncf.flux.config.v1+json',
digest:
'sha256:7cd37ea18409c76d241ad0d4ed484e206275be3535782be144ae257d54dd8d50',
size: 233,
},
annotations: {
'org.opencontainers.image.source':
'https://github.com/renovatebot/renovate',
},
});
expect(Manifest.parse(manifest)).toMatchObject({
schemaVersion: 2,
mediaType: 'application/vnd.oci.image.manifest.v1+json',
config: {
mediaType: 'application/vnd.cncf.flux.config.v1+json',
digest:
'sha256:7cd37ea18409c76d241ad0d4ed484e206275be3535782be144ae257d54dd8d50',
size: 233,
},
annotations: {
'org.opencontainers.image.source':
'https://github.com/renovatebot/renovate',
},
});
});
it('parses distribution manifest', () => {
const manifest = {
schemaVersion: 2,

View file

@ -69,6 +69,7 @@ export const OciImageManifest = ManifestObject.extend({
'application/vnd.cncf.helm.config.v1+json',
'application/vnd.devcontainers',
'application/vnd.oci.empty.v1+json',
'application/vnd.cncf.flux.config.v1+json',
]),
}),
annotations: z.record(z.string()).nullish(),