public static string GetDeploymentItems(string teamProjectName, string buildType, IWorkingDirectory workingDirectory) { var localPath = workingDirectory.DirectoryInfo.FullName; var serverPath = GetConfigurationFileLocation(teamProjectName, buildType); TraceHelper.TraceInformation(TraceSwitches.TfsDeployer, "Getting files from {0} to {1}", serverPath, localPath); var serverItemSpec = new ItemSpec(serverPath, RecursionType.Full); var request = new[] { new GetRequest(serverItemSpec, VersionSpec.Latest) }; SourceCodeControlHelper.GetLatestFromSourceCodeControl(serverPath, localPath, request); return(localPath); }
//const string ConfigurationFileLocation = "{0}/TeamBuildTypes/{1}/Deployment/"; public static string GetDeploymentItems(string teamProjectName, string buildType) { string workspaceDirectory = SourceCodeControlHelper.GetWorkspaceDirectory("TFSDeployerConfiguration2"); TeamProject teamProject = GetTeamProject(teamProjectName); var configurationFileLocation = GetConfigurationFileLocation(teamProjectName, buildType); var configurationFileItemSpec = new ItemSpec(string.Format(configurationFileLocation, teamProject.ServerItem, buildType), RecursionType.Full); VersionSpec version = VersionSpec.Latest; var request = new [] { new GetRequest(configurationFileItemSpec, version) }; string directoryToPlaceFiles = string.Format(configurationFileLocation, teamProject.ServerItem, buildType); TraceHelper.TraceInformation(TraceSwitches.TfsDeployer, "Getting file from {0} to {1}", workspaceDirectory, directoryToPlaceFiles); SourceCodeControlHelper.GetLatestFromSourceCodeControl(directoryToPlaceFiles, workspaceDirectory, request); return(workspaceDirectory); }
public static void GetSharedResources(IWorkingDirectory workingDirectory) { var localPath = workingDirectory.DirectoryInfo.FullName; var serverPath = Properties.Settings.Default.SharedResourceServerPath; if (string.IsNullOrEmpty(serverPath)) { return; } var serverItemSpec = new ItemSpec(serverPath, RecursionType.Full); var request = new[] { new GetRequest(serverItemSpec, VersionSpec.Latest) }; SourceCodeControlHelper.GetLatestFromSourceCodeControl(serverPath, localPath, request); }