split launcher versions into client and backend deployment
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@@ -36,6 +36,25 @@ export type LauncherBuildJob = {
|
||||
updatedAt?: string;
|
||||
};
|
||||
|
||||
export type LauncherBackendDeployment = {
|
||||
namespace: string;
|
||||
deployment: string;
|
||||
container: string;
|
||||
currentImage?: string | null;
|
||||
available: boolean;
|
||||
source?: LauncherSource['backend'];
|
||||
latestBuild?: LauncherBuildJob | null;
|
||||
};
|
||||
|
||||
export type LauncherBackendDeployResult = {
|
||||
deployed: boolean;
|
||||
namespace: string;
|
||||
deployment: string;
|
||||
container: string;
|
||||
image: string;
|
||||
logs: string;
|
||||
};
|
||||
|
||||
export type LauncherBuildEnvVariable = {
|
||||
key: string;
|
||||
value: string;
|
||||
@@ -199,6 +218,17 @@ export function listLauncherBuildJobs() {
|
||||
return apiRequest<LauncherBuildJob[]>('/launcher/builds');
|
||||
}
|
||||
|
||||
export function getLauncherBackendDeployment() {
|
||||
return apiRequest<LauncherBackendDeployment>('/launcher/backend-deployment');
|
||||
}
|
||||
|
||||
export function deployLauncherBackend(image: string) {
|
||||
return apiRequest<LauncherBackendDeployResult>('/launcher/backend-deployment', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ image })
|
||||
});
|
||||
}
|
||||
|
||||
export function listLauncherBuildEnv() {
|
||||
return apiRequest<{ variables: LauncherBuildEnvVariable[] }>('/launcher/build-env');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user