UNPKG

1.08 kBTypeScriptView Raw
1import { GoalInvocation } from "@atomist/sdm";
2import { SpawnedDeployment } from "@atomist/sdm-core";
3/**
4 * Options for the DockerPerBranchDeployer
5 */
6export interface DockerPerBranchDeployerOptions {
7 /**
8 * Starting port to be scanned for free ports
9 */
10 lowerPort: number;
11 /**
12 * Pattern that indicates that the container has started up correctly
13 */
14 successPatterns: RegExp[];
15 /**
16 * Base URL for the docker container. Probably localhost or your Docker machine IP
17 */
18 baseUrl: string;
19 /**
20 * The exposed port in the Dockerfile to be mapped externally
21 */
22 sourcePort: number;
23}
24/**
25 * Deployer that uses `docker run` in order to deploy images produces by the `DockerBuild` goal.
26 */
27export declare class DockerPerBranchDeployer {
28 private readonly options;
29 readonly repoBranchToPort: {
30 [repoAndBranch: string]: number;
31 };
32 private readonly portToContainer;
33 constructor(options: DockerPerBranchDeployerOptions);
34 deployProject(goalInvocation: GoalInvocation): Promise<SpawnedDeployment>;
35}