UNPKG

jenkins-cli-node

Version:
44 lines (43 loc) 971 B
import { JenkinsClientOptions } from "jenkins"; import { JobInfo } from "../cache"; export interface CliOption { dir: string; job: string; rebuild: boolean; config: JenkinsClientOptions; } export declare enum ParameterType { git = "git", checkbox = "checkbox", radio = "radio" } interface Parameter { type: ParameterType; key: string; value: string[]; description: string; } export interface JobCliInfo { name: string; parameters: { [key: string]: string; }; } export interface CrumbInfo { name: string; value: string; } export declare class JenkinsCli { jenkins: any; cacheJobs: JobInfo[]; private jobCache; private axios; private crumb; constructor(options: CliOption); private setCrumb; private fetch; getJobs(): Promise<string[]>; getParameters(selectJob: any): Promise<Parameter[]>; build(selectJob: any, parameters: any): Promise<any>; } export {};