2016-07-18 14:56:53 +00:00
|
|
|
/// <reference types="node" />
|
2016-09-04 15:56:56 +00:00
|
|
|
/**
|
|
|
|
* builds a cwd of Dockerfiles by triggering a promisechain
|
|
|
|
*/
|
2017-07-27 11:15:39 +00:00
|
|
|
export declare let build: (argvArg: any) => Promise<void>;
|
2016-09-04 15:56:56 +00:00
|
|
|
/**
|
|
|
|
* creates instance of class Dockerfile for all Dockerfiles in cwd
|
|
|
|
* @returns Promise<Dockerfile[]>
|
|
|
|
*/
|
2017-07-27 12:20:56 +00:00
|
|
|
export declare let readDockerfiles: (argvArg: any) => Promise<Dockerfile[]>;
|
2016-09-04 15:56:56 +00:00
|
|
|
/**
|
|
|
|
* sorts Dockerfiles into a dependency chain
|
|
|
|
* @param sortableArrayArg an array of instances of class Dockerfile
|
|
|
|
* @returns Promise<Dockerfile[]>
|
|
|
|
*/
|
2017-03-11 00:10:37 +00:00
|
|
|
export declare let sortDockerfiles: (sortableArrayArg: Dockerfile[]) => Promise<Dockerfile[]>;
|
2016-09-04 15:56:56 +00:00
|
|
|
/**
|
|
|
|
* maps local Dockerfiles dependencies to the correspoding Dockerfile class instances
|
|
|
|
*/
|
2017-03-11 00:10:37 +00:00
|
|
|
export declare let mapDockerfiles: (sortedArray: Dockerfile[]) => Promise<Dockerfile[]>;
|
2016-09-04 15:56:56 +00:00
|
|
|
/**
|
|
|
|
* builds the correspoding real docker image for each Dockerfile class instance
|
|
|
|
*/
|
2017-03-11 00:10:37 +00:00
|
|
|
export declare let buildDockerfiles: (sortedArrayArg: Dockerfile[]) => Promise<Dockerfile[]>;
|
2016-09-04 15:56:56 +00:00
|
|
|
/**
|
|
|
|
* pushes the real Dockerfile images to a Docker registry
|
|
|
|
*/
|
2017-03-11 00:10:37 +00:00
|
|
|
export declare let pushDockerfiles: (sortedArrayArg: Dockerfile[]) => Promise<Dockerfile[]>;
|
2016-09-04 15:56:56 +00:00
|
|
|
/**
|
|
|
|
* pulls corresponding real Docker images for instances of Dockerfile from a registry.
|
|
|
|
* This is needed if building, testing, and publishing of Docker images is carried out in seperate CI stages.
|
|
|
|
*/
|
2017-03-11 00:10:37 +00:00
|
|
|
export declare let pullDockerfileImages: (sortableArrayArg: Dockerfile[], registryArg?: string) => Promise<Dockerfile[]>;
|
2016-09-04 15:56:56 +00:00
|
|
|
/**
|
|
|
|
* tests all Dockerfiles in by calling class Dockerfile.test();
|
|
|
|
* @param sortedArrayArg Dockerfile[] that contains all Dockerfiles in cwd
|
|
|
|
*/
|
2017-03-11 00:10:37 +00:00
|
|
|
export declare let testDockerfiles: (sortedArrayArg: Dockerfile[]) => Promise<Dockerfile[]>;
|
2016-09-04 15:56:56 +00:00
|
|
|
/**
|
|
|
|
* class Dockerfile represents a Dockerfile on disk in npmci
|
|
|
|
*/
|
2016-06-05 02:48:39 +00:00
|
|
|
export declare class Dockerfile {
|
|
|
|
filePath: string;
|
|
|
|
repo: string;
|
|
|
|
version: string;
|
2016-06-05 04:20:05 +00:00
|
|
|
cleanTag: string;
|
|
|
|
buildTag: string;
|
2017-04-02 20:56:40 +00:00
|
|
|
gitlabTestTag: string;
|
|
|
|
gitlabReleaseTag: string;
|
2016-06-07 01:59:47 +00:00
|
|
|
releaseTag: string;
|
|
|
|
containerName: string;
|
2016-06-05 02:48:39 +00:00
|
|
|
content: string;
|
|
|
|
baseImage: string;
|
2016-06-05 12:27:56 +00:00
|
|
|
localBaseImageDependent: boolean;
|
|
|
|
localBaseDockerfile: Dockerfile;
|
2016-06-05 02:48:39 +00:00
|
|
|
constructor(options: {
|
|
|
|
filePath?: string;
|
|
|
|
fileContents?: string | Buffer;
|
|
|
|
read?: boolean;
|
|
|
|
});
|
2016-09-04 15:56:56 +00:00
|
|
|
/**
|
|
|
|
* builds the Dockerfile
|
|
|
|
*/
|
2017-03-11 00:10:37 +00:00
|
|
|
build(): Promise<void>;
|
2016-09-04 15:56:56 +00:00
|
|
|
/**
|
|
|
|
* pushes the Dockerfile to a registry
|
|
|
|
*/
|
2017-03-11 00:10:37 +00:00
|
|
|
push(stageArg: any): Promise<void>;
|
2016-09-04 15:56:56 +00:00
|
|
|
/**
|
|
|
|
* pulls the Dockerfile from a registry
|
|
|
|
*/
|
2017-03-11 00:10:37 +00:00
|
|
|
pull(registryArg: string): Promise<void>;
|
2016-09-04 15:56:56 +00:00
|
|
|
/**
|
|
|
|
* tests the Dockerfile;
|
|
|
|
*/
|
2017-03-11 00:10:37 +00:00
|
|
|
test(): Promise<void>;
|
2016-09-04 15:56:56 +00:00
|
|
|
/**
|
|
|
|
* gets the id of a Dockerfile
|
|
|
|
*/
|
2017-03-11 00:10:37 +00:00
|
|
|
getId(): Promise<string>;
|
2016-06-05 02:48:39 +00:00
|
|
|
}
|
2016-09-04 15:56:56 +00:00
|
|
|
/**
|
2017-03-11 00:10:37 +00:00
|
|
|
* returns a version for a docker file
|
|
|
|
* @execution SYNC
|
2016-09-04 15:56:56 +00:00
|
|
|
*/
|
2016-06-05 11:01:45 +00:00
|
|
|
export declare let dockerFileVersion: (dockerfileNameArg: string) => string;
|
2016-09-04 15:56:56 +00:00
|
|
|
/**
|
2017-07-27 12:20:56 +00:00
|
|
|
* returns the docker base image for a Dockerfile
|
2016-09-04 15:56:56 +00:00
|
|
|
*/
|
2016-06-05 11:01:45 +00:00
|
|
|
export declare let dockerBaseImage: (dockerfileContentArg: string) => string;
|
2016-09-04 15:56:56 +00:00
|
|
|
/**
|
2017-07-27 12:20:56 +00:00
|
|
|
* returns the docker tag
|
2016-09-04 15:56:56 +00:00
|
|
|
*/
|
2016-06-07 17:41:14 +00:00
|
|
|
export declare let dockerTag: (registryArg: string, repoArg: string, versionArg: string, suffixArg?: string) => string;
|
2016-09-04 15:56:56 +00:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
2016-06-05 12:27:56 +00:00
|
|
|
export declare let cleanTagsArrayFunction: (dockerfileArrayArg: Dockerfile[], trackingArrayArg: Dockerfile[]) => string[];
|