feat: implement rollback command for deployments
- Added a new `rollback` command to roll back deployments to their previous release. - Introduced `findRollbackCandidates` and `rollbackDeployment` functions to handle rollback logic. - Updated CLI command definitions to include the new `rollback` command with an alias. - Enhanced deployment conversion to use resolved images for buildable services. - Introduced a new `graph` module to visualize Kubernetes resources and their relationships. - Added tests for the new rollback functionality and graph rendering. - Updated package version to 1.3.0.
This commit is contained in:
+4
-3
@@ -2,13 +2,13 @@ import type { ComposeSpecification } from "../schema/docker.d";
|
||||
import { composeToKubernetes, type KubernetesResource } from "./convert";
|
||||
import { reconcilePostgresClaims } from "./database";
|
||||
import { reconcileS3Claims } from "./storage";
|
||||
import { DEFAULT_REGISTRY } from "./config";
|
||||
import { resolveBuildImages, type BuildOptions } from "./build";
|
||||
|
||||
export async function renderResources(
|
||||
project: string,
|
||||
compose: ComposeSpecification,
|
||||
cwd = process.cwd(),
|
||||
registry = DEFAULT_REGISTRY,
|
||||
options: BuildOptions = {},
|
||||
): Promise<KubernetesResource[]> {
|
||||
const postgresEnv = await reconcilePostgresClaims(project, compose);
|
||||
const s3Env = await reconcileS3Claims(project, compose);
|
||||
@@ -16,5 +16,6 @@ export async function renderResources(
|
||||
for (const [service, environment] of Object.entries(s3Env)) {
|
||||
serviceEnv[service] = { ...serviceEnv[service], ...environment };
|
||||
}
|
||||
return composeToKubernetes(project, compose, cwd, serviceEnv, registry);
|
||||
const buildImages = await resolveBuildImages(project, compose, options);
|
||||
return composeToKubernetes(project, compose, cwd, serviceEnv, buildImages);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user