Deploy/Release source code.

Dear Sir/Madame,

We are trying to not only release compiled executables and artifacts but also source code of the actual project as archives. So far we are doing SVN export manually, compressing that as a .7z and our installer points to these 7z files.

What I am trying to do is the following:

I would also like to send a SVN export command to the folder just commited ( the commit actually triggered TC ) and compress the exported folder as an archive. This is where I stuck. My plan is to create an executable (or batch file) I call as a build step but in order to SVN export I need the path to the folder in the VCS and not the .svn less sources in agent's work folder, ie %teamcity.build.checkoutDir%

Example:
-------------

VCS Root solution (VS solution) -> Software1 (VS project)
                                                    -> Software2 (VS project)
                                                    -> Software3 (VS project)
                                                    ...
                                                    -> Software20 (VS project)

If a commit is done on Software3, I want to export Software3 folder in the root SVN, compile that exported source code, compress the source code, deploy both source code archive and compiled exe/artifacts to FTP.

I would only need to have the path to Software3 in the root SVN server known and passed to my executable so my executable can do the rest and so far I am not able to have that path propagated down but only the path where the agent have its source code.

Any help welcome,
Thanks!

1 comment
Comment actions Permalink

You don't need to export manually, TC can do this for you.

You need to setup a VCS root pointing to SVN root solution, then use checkout rules to to checkout Software3 to the desired folder (it can either be build configuration checkout folder or its subfolder or an absolute path or even a path under temporary directory that will become unavailable after build is finished).


If you want to package sources and/or compiled executables, you need to use build artifacts feature (http://confluence.jetbrains.com/display/TCD8/Build+Artifact) and establish nessary patterns, for instance:
src/** => src.zip
compiled/myFile.exe

TC doesn't have bundled "upload to" functionality. You can setup an additional build step that have an artifact dependency to the current one and with a command line runner that will upload artifacts to FTP or shared folder.

0

Please sign in to leave a comment.