示例#1
0
        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);
        }
示例#2
0
        //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);
        }
示例#3
0
        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);
        }
示例#4
0
 private static string GetLocalPath()
 {
     return(SourceCodeControlHelper.GetWorkspaceDirectory("TFSDeployerConfiguration2"));
 }