UNPKG

@jameslnewell/buildkite-pipelines

Version:
134 lines (133 loc) 4.9 kB
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; getSkip(): boolean | string | undefined; /** * @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; getParallelism(): number | undefined; /** * @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; /** * @see https://buildkite.com/docs/pipelines/configure/workflows/controlling-concurrency#concurrency-limits */ getConcurrency(): number | undefined; /** * @deprecated Use .setConcurrency() instead */ concurrency(group: string, jobs: number): this; /** * @see https://buildkite.com/docs/pipelines/configure/workflows/controlling-concurrency#concurrency-limits */ setConcurrency(concurrency: number): this; /** @deprecated Use .setConcurrency() and .setConcurrencyGroup() instead */ setConcurrency(group: string, jobs: number): this; /** * * @see https://buildkite.com/docs/pipelines/configure/workflows/controlling-concurrency#concurrency-groups */ getConcurrencyGroup(): string | undefined; /** * @see https://buildkite.com/docs/pipelines/configure/workflows/controlling-concurrency#concurrency-groups */ setConcurrencyGroup(group: string): 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; getManualRetry(): ManualRetry; setManualRetry(retry: ManualRetry): this; getAutomaticRetries(): AutomaticRetry[]; addAutomaticRetry(retry: AutomaticRetry): this; build(): Promise<CommandStepSchema>; } export {};