mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-25 14:06:27 +00:00
feat(manager/flux): Allow OCI media type used by flux push artifact
to enable Release Notes lookup (#32783)
This commit is contained in:
parent
baea715bea
commit
2f8ff83eab
2 changed files with 55 additions and 0 deletions
|
@ -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,
|
||||
|
|
|
@ -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(),
|
||||
|
|
Loading…
Reference in a new issue