@atomist/sdm-core
Version:
Atomist Software Delivery Machine - Implementation
47 lines • 2.25 kB
TypeScript
import { GitProject } from "@atomist/automation-client";
import { GoalInvocation } from "@atomist/sdm";
import { GoalCache } from "./goalCaching";
export interface GoalCacheArchiveStore {
/**
* Store a compressed goal archive
* @param gi The goal invocation thar triggered the caching
* @param classifier The classifier of the cache
* @param archivePath The path of the archive to be stored.
*/
store(gi: GoalInvocation, classifier: string, archivePath: string): Promise<void>;
/**
* Remove a compressed goal archive
* @param gi The goal invocation thar triggered the cache removal
* @param classifier The classifier of the cache
*/
delete(gi: GoalInvocation, classifier: string): Promise<void>;
/**
* Retrieve a compressed goal archive
* @param gi The goal invocation thar triggered the cache retrieval
* @param classifier The classifier of the cache
* @param targetArchivePath The destination path where the archive needs to be stored.
*/
retrieve(gi: GoalInvocation, classifier: string, targetArchivePath: string): Promise<void>;
}
/**
* Cache implementation that caches files produced by goals to an archive that can then be stored,
* using tar and gzip to create the archives per goal invocation (and classifier if present).
*/
export declare class CompressingGoalCache implements GoalCache {
private readonly store;
constructor(store?: GoalCacheArchiveStore);
put(gi: GoalInvocation, project: GitProject, files: string[], classifier?: string): Promise<void>;
remove(gi: GoalInvocation, classifier?: string): Promise<void>;
retrieve(gi: GoalInvocation, project: GitProject, classifier?: string): Promise<void>;
}
/**
* Interpolate information from goal invocation into the classifier.
*/
export declare function resolveClassifierPath(classifier: string | undefined, gi: GoalInvocation): Promise<string>;
/**
* Sanitize classifier for use in path. Replace any characters
* which might cause problems on POSIX or MS Windows with "_",
* including path separators. Ensure resulting file is not "hidden".
*/
export declare function sanitizeClassifier(classifier: string): string;
//# sourceMappingURL=CompressingGoalCache.d.ts.map