UNPKG

long-git-cli

Version:

A CLI tool for Git tag management.

77 lines 2 kB
/** * 完整部署流程编排器 * 整合 Git Tag 创建、Pipeline 监听、Jenkins 部署等功能 */ import { BitbucketClient } from "../api/bitbucket-client"; import { JenkinsClient } from "../api/jenkins-client"; import { ProjectConfig, EnvironmentConfig } from "../types"; /** * 部署步骤枚举 */ export declare enum DeployStep { CREATING_TAG = "CREATING_TAG", PUSHING_TAG = "PUSHING_TAG", MONITORING_PIPELINE = "MONITORING_PIPELINE", DEPLOYING_JENKINS = "DEPLOYING_JENKINS", COMPLETED = "COMPLETED", FAILED = "FAILED" } /** * 部署进度信息 */ export interface DeployProgress { step: DeployStep; message: string; timestamp: Date; data?: any; } /** * 完整部署选项 */ export interface FullDeployOptions { /** 是否创建新 tag(如果为 false,则使用现有 tag) */ createNewTag?: boolean; /** Tag 名称(如果 createNewTag 为 false,则必须提供) */ tagName?: string; /** 进度回调 */ onProgress?: (progress: DeployProgress) => void; } /** * 完整部署结果 */ export interface FullDeployResult { success: boolean; tagName: string; pipelineStatus?: string; jenkinsResult?: string; jenkinsBuildNumber?: number; jenkinsBuildUrl?: string; error?: string; } /** * 完整部署流程编排器类 */ export declare class FullDeployer { private bitbucketClient; private jenkinsClient; private projectConfig; private environmentConfig; constructor(bitbucketClient: BitbucketClient, jenkinsClient: JenkinsClient, projectConfig: ProjectConfig, environmentConfig: EnvironmentConfig); /** * 执行完整部署流程 */ deploy(options?: FullDeployOptions): Promise<FullDeployResult>; /** * 创建 Git Tag */ private createTag; /** * 推送 Tag 到远程仓库 */ private pushTag; /** * 报告进度 */ private reportProgress; } //# sourceMappingURL=full-deployer.d.ts.map