@jameslnewell/buildkite-pipelines
Version:
Generate Buildkite pipelines from code.
112 lines (111 loc) • 3.95 kB
TypeScript
import { StepBuilder } from './StepBuilder';
import { KeyBuilder } from './helpers/key';
import { LabelBuilder } from './helpers/label';
import { ConditionBuilder } from './helpers/condition';
import { BranchFilterBuilder } from './helpers/branches';
import { DependenciesBuilder } from './helpers/dependencies';
import { SkipBuilder } from './helpers/skip';
import { PluginBuilder } from './PluginBuilder';
import { CommandStepSchema, PluginSchema, StepDependsOn } from '../schema';
import { AgentsBuilder } from './helpers/agents';
import { EnvironmentBuilder } from './helpers/env';
import { AutomaticRetry } from '../schema/schema';
type ManualRetry = Exclude<CommandStepSchema['retry'], undefined>['manual'];
export declare class CommandStep implements StepBuilder, KeyBuilder, LabelBuilder, ConditionBuilder, BranchFilterBuilder, DependenciesBuilder, SkipBuilder, AgentsBuilder, EnvironmentBuilder {
#private;
getCommands(): Iterable<string>;
/**
* @deprecated Use .addCommand() instead
*/
command(command: string): this;
addCommand(command: string): this;
getKey(): string | undefined;
/**
* @deprecated Use .setKey() instead
*/
key(key: string): this;
setKey(key: string): this;
getLabel(): string | undefined;
/**
* @deprecated Use .setLabel() instead
*/
label(label: string): this;
setLabel(label: string): this;
getCondition(): string | undefined;
/**
* @deprecated Use .setCondition() instead
*/
condition(condition: string): this;
setCondition(condition: string): this;
getBranches(): ReadonlyArray<string>;
/**
* @deprecated Use .addBranch() instead
*/
branch(branch: string): this;
addBranch(branch: string): this;
getDependencies(): ReadonlyArray<StepDependsOn>;
/**
* @deprecated Use .addDependency() instead
*/
dependOn(dependency: StepDependsOn): this;
addDependency(dependency: StepDependsOn): this;
/**
* @deprecated Use .addDependency() instead
*/
allowDependencyFailure(allow: boolean): this;
setAllowDependencyFailure(allow: boolean): this;
/**
* @deprecated Use .setSkip() instead
*/
skip(skip: boolean | string): this;
setSkip(skip: boolean | string): this;
getPlugins(): Iterable<PluginSchema | PluginBuilder>;
/**
* @deprecated Use .addPlugin() instead
*/
plugin(plugin: PluginSchema | PluginBuilder): this;
addPlugin(plugin: PluginSchema | PluginBuilder): this;
/**
* @deprecated Use .addPlugins() instead
*/
plugins(plugins: Iterable<PluginSchema | PluginBuilder>): this;
addPlugins(plugins: Iterable<PluginSchema | PluginBuilder>): this;
/**
* @deprecated Use .setParallelism() instead
*/
parallelism(parallelism: number): this;
setParallelism(parallelism: number): this;
getEnv(): Readonly<Record<string, unknown>>;
/**
* @deprecated Use .addEnv() instead
*/
env(name: string, value: unknown): this;
addEnv(name: string, value: unknown): this;
/**
* @deprecated Use .setConcurrency() instead
*/
concurrency(group: string, jobs: number): this;
setConcurrency(group: string, jobs: number): this;
getSoftFail(): boolean | undefined;
/**
* @deprecated Use .setSoftFail() instead
*/
softFail(fail?: boolean): this;
setSoftFail(fail: boolean): this;
getTimeout(): number | undefined;
/**
* @deprecated Use .setTimeout() instead
*/
timeout(minutes: number): this;
setTimeout(minutes: number): this;
getAgents(): Readonly<Record<string, string>>;
/**
* @deprecated Use .addAgent() instead
*/
agent(tag: string, value: string): this;
addAgent(tag: string, value: string): this;
setManualRetry(retry: ManualRetry): this;
addAutomaticRetry(retry: AutomaticRetry): this;
build(): Promise<CommandStepSchema>;
}
export {};