Add getDockerImageSpec and cleanDockerObjects to API (#19900)

* Add getDockerImageSpec and cleanDockerObjects to API

* docs
This commit is contained in:
Charles Gagnon
2022-07-01 12:57:40 -07:00
committed by GitHub
parent c211fb981c
commit 60026a39f9
5 changed files with 94 additions and 49 deletions

View File

@@ -66,8 +66,25 @@ declare module 'sqldbproj' {
*/
addItemPrompt(project: ISqlProject, relativeFilePath: string, options?: AddItemOptions): Promise<void>;
/**
* Gathers information required for publishing a project to a docker container, prompting the user as necessary
* @param project The Project being published
*/
getPublishToDockerSettings(project: ISqlProject): Promise<IPublishToDockerSettings | undefined>;
/**
* Gets the information required to start a docker container for publishing to
* @param projectName The name of the project being published
* @param baseImage The base docker image being deployed
* @param imageUniqueId The unique ID to use in the name, default is a random GUID
*/
getDockerImageSpec(projectName: string, baseImage: string, imageUniqueId?: string): DockerImageSpec;
/**
* Checks if any containers with the specified label already exist, and if they do prompt the user whether they want to clean them up
* @param imageLabel The label of the container to search for
*/
cleanDockerObjectsIfNeeded(imageLabel: string): Promise<void>;
}
export interface AddItemOptions {
@@ -333,4 +350,22 @@ declare module 'sqldbproj' {
deploymentOptions?: DeploymentOptions;
profileUsed?: boolean;
}
/**
* Information for deploying a new docker container
*/
interface DockerImageSpec {
/**
* The label to apply to the container
*/
label: string;
/**
* The full name to give the container
*/
containerName: string;
/**
* The tag to apply to the container
*/
tag: string
}
}