feat: add registry target contracts

This commit is contained in:
2026-04-28 15:40:55 +00:00
parent eb299afb53
commit 7f5cb4e247
6 changed files with 53 additions and 1 deletions
+6
View File
@@ -1,4 +1,5 @@
import * as plugins from '../plugins.js';
import type { IRegistryPushEvent } from './registry.js';
export interface IImage {
id: string;
@@ -12,9 +13,14 @@ export interface IImage {
description: string;
versions: Array<{
versionString: string;
digest?: string;
registryRepository?: string;
registryTag?: string;
source?: 'upload' | 'registry';
storagePath?: string;
size: number;
createdAt: number;
}>;
lastPushEvent?: IRegistryPushEvent;
};
}
+1
View File
@@ -8,6 +8,7 @@ export * from './domain.js';
export * from './event.js';
export * from './externalregistry.js';
export * from './image.js';
export * from './registry.js';
export * from './secretbundle.js';
export * from './secretgroup.js';
export * from './baremetal.js';
+25
View File
@@ -0,0 +1,25 @@
export type TRegistryProtocol = 'oci';
export interface IRegistryTarget {
protocol: TRegistryProtocol;
registryHost: string;
repository: string;
tag: string;
imageUrl: string;
serviceId?: string;
imageId?: string;
}
export interface IRegistryPushEvent {
protocol: TRegistryProtocol;
registryHost: string;
repository: string;
tag: string;
digest: string;
imageUrl: string;
pushedAt: number;
serviceId?: string;
imageId?: string;
actorUserId?: string;
manifestMediaType?: string;
}
+3
View File
@@ -1,4 +1,5 @@
import type { IServiceRessources } from './docker.js';
import type { IRegistryTarget } from './registry.js';
export interface IService {
id: string;
@@ -7,6 +8,8 @@ export interface IService {
description: string;
imageId: string;
imageVersion: string;
registryTarget?: IRegistryTarget;
deployOnPush?: boolean;
environment: { [key: string]: string };
/**
* the main secret bundle id, exclusive to the service