@atomist/sdm
Version:
Atomist Software Delivery Machine SDK
89 lines • 3.02 kB
TypeScript
import { GitProject } from "@atomist/automation-client/lib/project/git/GitProject";
import { Goal } from "../../../api/goal/Goal";
import { FulfillableGoalDetails, FulfillableGoalWithRegistrations, ImplementationRegistration } from "../../../api/goal/GoalWithFulfillment";
import { DockerImageNameCreator } from "./executeDockerBuild";
export interface DockerRegistry {
/**
* Push Url for this registry
*/
registry: string;
/**
* Should this registry be displayed with the goal status after a push? Default true.
*/
display?: boolean;
/**
* Display Url - ie the url humans can go to
* assumes <url>/<image>
*/
displayUrl?: string;
/**
* If specified, this will replace the label version details (eg <image><:version>)
* For example, for Dockerhub the correct value would be `/tags`, with a displayUrl set
* to https://hub.docker.com/r/<user/org>; will result in:
* https://hub.docker.com/r/<user/org>/<image>/tags as the link URL
*
*/
displayBrowsePath?: string;
/**
* How should urls to this registry be labeled?
* ie DockerHub, ECR, etc (friendly name instead of big tag string)
* if not supplied, we'll display the tag
*/
label?: string;
user?: string;
password?: string;
}
/**
* Options to configure the Docker image build
*/
export interface DockerOptions extends Partial<ImplementationRegistration> {
/**
* Provide the image tag for the docker image to build
*/
dockerImageNameCreator?: DockerImageNameCreator;
/**
* True if the docker image should be pushed to the registry
*/
push?: boolean;
/**
* True if pushes should happen concurrently
*/
concurrentPush?: boolean;
/**
* Optional registries to push the docker image too.
* Needs to set when push === true
*/
registry?: DockerRegistry | DockerRegistry[];
/**
* Optional Docker config in json as alternative to running
* 'docker login' with provided registry, user and password.
*/
config?: string;
/**
* Find the Dockerfile within the project
* @param p the project
*/
dockerfileFinder?: (p: GitProject) => Promise<string>;
/**
* Optionally specify what docker image builder to use.
* Defaults to "docker"
*/
builder?: "docker" | "kaniko";
/**
* Optional arguments passed to the docker image builder
*/
builderArgs?: string[];
/**
* Path relative to base of project to build. If not provided,
* ".", i.e., the project base directory, is used.
*/
builderPath?: string;
}
/**
* Goal that performs docker build and push depending on the provided options
*/
export declare class DockerBuild extends FulfillableGoalWithRegistrations<DockerOptions> {
constructor(goalDetailsOrUniqueName?: FulfillableGoalDetails | string, ...dependsOn: Goal[]);
with(registration: DockerOptions): this;
}
//# sourceMappingURL=DockerBuild.d.ts.map