import { GitProject, HandlerResult, ProjectFile } from "@atomist/automation-client"; import { CommandHandlerRegistration, CommandListenerInvocation, SoftwareDeliveryMachine } from "@atomist/sdm"; export declare const KubernetesSync = "KubernetesSync"; /** * Command to synchronize the resources in a Kubernetes cluster with * the resource specs in the configured sync repo. The sync repo will * be cloned and the resources applied against the Kubernetes API in * lexical order sorted by file name. If no sync repo is configured * in the SDM, the command errors. This command is typically executed * on an interval timer by setting the `intervalMinutes` * [[KubernetesSyncOptions]]. * * If the SDM configuration says this packs commands should be added, * i.e., `sdm.configuration.sdm.k8s.options.addCommands` is `true`, * the command will have the intent `kube sync SDM_NAME`. Otherwise * the command will be registered without an intent. */ export declare function kubernetesSync(sdm: SoftwareDeliveryMachine): CommandHandlerRegistration; /** * Clone the sync repo and apply the specs to the Kubernetes cluster. */ export declare function repoSync(cli: CommandListenerInvocation): Promise; /** * Consume stream of files from project and sort them by their `path` * property using `localeCompare`. Any file at the root of the * project, i.e., not in a subdirectory, having the extensions * ".json", ".yaml", or ".yml` are considered specs. * * Essentially, this function converts a FileStream into a Promise of * sorted ProjectFiles. * * @param syncRepo Repository of specs to sort * @return Sorted array of specs in project */ export declare function sortSpecs(syncRepo: GitProject): Promise; //# sourceMappingURL=sync.d.ts.map