zz74b Posted April 17, 2013 Report Share Posted April 17, 2013 Hi, I have a requirement to version various dlls in our c# solution using the revision property from Plastic SCM. Originally when we were running on Jenkins, and the checkouts were done by the build agents, we could run cm.exe status and parse the result. However using Teamcity, we have no option to checkout on the client and the sources are copied from the server to the client without there being a workspace on the client. Is there any way that I can, from the build agent (which has plastic scm client tools installed) query the version of the files it is compiling - given that it has no access to the workspace on the teamcity server nor any of the selectors. Cheers zz74b Link to comment Share on other sites More sharing options...
manu Posted April 17, 2013 Report Share Posted April 17, 2013 Hi! I can't imagine how to match a workspace that is not having the .plastic metadata directory with a Plastic SCM changeset. At least in a clean and fast way sorry. I trying to think about having some sort of changelist file inside the workspace with the status command info, or even versioning a copy if the .plastic metadata dir, but it means that you have to create a new commit in order to add that info... not a good idea.... Link to comment Share on other sites More sharing options...
zz74b Posted April 17, 2013 Author Report Share Posted April 17, 2013 One option I thought of was to use some kind of 'checkout' trigger to write a file in the root of the workspace on the server (which would then get copied to the build agents) with the revision information in. Is this a possibility? Does plastic offer the ability to hook into an operation such as this? Cheers Link to comment Share on other sites More sharing options...
manu Posted April 17, 2013 Report Share Posted April 17, 2013 Nice try but I'm sorry. The Team City Build Server creates a path file with only the files that has been change between builds so I'm afraid that your file will not be copied to the agents I'm trying to think a way, maybe if from the teamcity plugin you can get the machine where the build is going to happen you can place a file with the info.... Or maybe plying with the actions after the build. Link to comment Share on other sites More sharing options...
zz74b Posted April 17, 2013 Author Report Share Posted April 17, 2013 The problem is that all the 'build' actions are performed on the agent, I can't script anything to be run on the TC Server... Link to comment Share on other sites More sharing options...
Olaf Kober Posted April 22, 2013 Report Share Posted April 22, 2013 Hi zz74b! Maybe this workaround helps: http://www.plasticscm.net/index.php?/topic/981-teamcity-patching/?p=5474 Link to comment Share on other sites More sharing options...
zz74b Posted April 25, 2013 Author Report Share Posted April 25, 2013 Hi Olaf, That was really useful, it turns out that due to the changeset number being part of the Teamcity has saved me having to interact with the cm.exe executable at all on the Build agent. Cheers Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.