Deployment Scripts separate from Build Templates

Apr 25, 2013 at 4:05 PM
Great work on TfsDeployer. Is there a way to set the location of the deployment scripts? I don't want to have themin a sub-directory of the build templates, because they serve two different purposes, and the build template is not specific to the source, while our deployment is.
Apr 25, 2013 at 4:13 PM
I looked through the source, and found the answer, it looks like it is currently not customizable. This would be a great feature to add in the future. We don't version our build templates, but we do version our deployment scripts.
    public static class VersionControlPath
    {
        public static string GetDeploymentFolderServerPath(BuildDetail buildDetail)
        {
            return GetDeploymentFolderServerPath(buildDetail.BuildDefinition.Process.ServerPath);
        }

        private static string GetDeploymentFolderServerPath(string templateFile)
        {
            return Regex.Replace(templateFile, @"/[^/]+$", "/Deployment");
        }
    }
Thanks,

Gregg
May 16, 2013 at 7:34 PM
Hi Gregg,

I'm not an expert, but. What if you create a powershell module with your scripts. That way in your deployment script you can simply include the module, and execute the script that is already in the server. Also, as a second step, you can deploy your scripts' changes to the server using tfs deployer too.

I think it can work.

Hope this give you some ideas.

Bye,

Paul
May 16, 2013 at 7:50 PM
Edited May 16, 2013 at 7:50 PM
Thanks for your response Paul. That actually is what I am doing currently. I was hoping that this directory would be moved to the configuration file so that it wouldn't have as much overhead. Right now I have to pull down the scripts myself.

Gregg
May 16, 2013 at 7:51 PM
I went ahead and posted an issue on this as well.

https://tfsdeployer.codeplex.com/workitem/9389