Пример #1
0
        static Action NewVaultExportAction(ActionContext context)
        {
            var vaultCredential = new NetworkCredential(context.Parameters.VaultUserName,
                context.Parameters.VaultPassword);
            var vaultClient = new VaultExport.Interop.CommandLineClient(context.Parameters.VaultCommandLineClientPath,
                context.Parameters.VaultHost, vaultCredential,
                TimeSpan.FromSeconds(context.Parameters.VaultServerTimeOutInSeconds));
            var vaultFactory = new VaultFacade(vaultClient);

            var gitClient = new CommandLineClient(context.Parameters.LocalWorkspacePath, context.Logger);
            var versionMarker = new FilePersistedLastVersionMarker(context.Parameters.LocalWorkspacePath, new FileSystem());

            Action<VersionHistoryItem> versionDownloadedAction =
                new GitCommitFilesAction(context, gitClient).Execute;

            return
                new VaultExportAction(context, vaultFactory, versionMarker, new DirectoryCleaner(new FileSystem()),
                    versionDownloadedAction).Execute;
        }
Пример #2
0
 static Action NewPrepareEmptyVersionMarkerAction(ActionContext context)
 {
     var versionMarker = new FilePersistedLastVersionMarker(context.Parameters.LocalWorkspacePath, new FileSystem());
     return new WriteNoVersionMarkerAction(versionMarker).Execute;
 }