npmci/dist/npmci.build.docker.d.ts

99 lines
3.1 KiB
TypeScript
Raw Permalink Normal View History

/// <reference types="q" />
2016-07-18 14:56:53 +00:00
/// <reference types="node" />
2016-11-24 22:21:40 +00:00
import * as plugins from './npmci.plugins';
2016-09-04 15:56:56 +00:00
/**
* builds a cwd of Dockerfiles by triggering a promisechain
*/
export declare let build: () => plugins.q.Promise<{}>;
2016-09-04 15:56:56 +00:00
/**
* creates instance of class Dockerfile for all Dockerfiles in cwd
* @returns Promise<Dockerfile[]>
*/
export declare let readDockerfiles: () => plugins.q.Promise<Dockerfile[]>;
/**
* sorts Dockerfiles into a dependency chain
* @param sortableArrayArg an array of instances of class Dockerfile
* @returns Promise<Dockerfile[]>
*/
export declare let sortDockerfiles: (sortableArrayArg: Dockerfile[]) => plugins.q.Promise<Dockerfile[]>;
/**
* maps local Dockerfiles dependencies to the correspoding Dockerfile class instances
*/
export declare let mapDockerfiles: (sortedArray: Dockerfile[]) => plugins.q.Promise<Dockerfile[]>;
/**
* builds the correspoding real docker image for each Dockerfile class instance
*/
export declare let buildDockerfiles: (sortedArrayArg: Dockerfile[]) => plugins.q.Promise<{}>;
2016-09-04 15:56:56 +00:00
/**
* pushes the real Dockerfile images to a Docker registry
*/
export declare let pushDockerfiles: (sortedArrayArg: Dockerfile[]) => plugins.q.Promise<{}>;
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.
*/
export declare let pullDockerfileImages: (sortableArrayArg: Dockerfile[], registryArg?: string) => plugins.q.Promise<{}>;
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
*/
export declare let testDockerfiles: (sortedArrayArg: Dockerfile[]) => plugins.q.Promise<{}>;
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;
2016-06-07 17:41:14 +00:00
testTag: 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;
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
*/
build(): plugins.q.Promise<{}>;
2016-09-04 15:56:56 +00:00
/**
* pushes the Dockerfile to a registry
*/
push(stageArg: any): plugins.q.Promise<{}>;
2016-09-04 15:56:56 +00:00
/**
* pulls the Dockerfile from a registry
*/
2016-06-07 17:41:14 +00:00
pull(registryArg: string): void;
2016-09-04 15:56:56 +00:00
/**
* tests the Dockerfile;
*/
2016-06-07 01:59:47 +00:00
test(): void;
2016-09-04 15:56:56 +00:00
/**
* gets the id of a Dockerfile
*/
2016-06-07 01:59:47 +00:00
getId(): string;
2016-06-05 02:48:39 +00:00
}
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
/**
*
*/
2016-06-05 11:01:45 +00:00
export declare let dockerBaseImage: (dockerfileContentArg: string) => string;
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
/**
*
*/
export declare let cleanTagsArrayFunction: (dockerfileArrayArg: Dockerfile[], trackingArrayArg: Dockerfile[]) => string[];