We currently use Subversion for our release management, and tag all of our releases (both to QA and to our production servers). However, we'd like to create a single Release directory reflecting our newest release instead. This way we can have TeamCity always pull from the same folder for continuous builds. Also, if someone has to make a quick bug fix to production, they won't accidentally make it to the wrong branch.
For example, below is our current structure with a 'release' folder added. Would there be an easy way to move a tagged branch to 'release' each time, or even have 'release' be a link to the newest release_* version?
Clarification
Here's an example of how our build/release process currently works:
You do not need a Subversion client to be installed on the TeamCity server or agents. TeamCity bundles the Java implementation of an SVN client ( SVNKit ). Specify the SVN URL that points to the project sources. Specify the SVN username. Specify the SVN password.
The TeamCity Artifactory Plugin manages a release with Maven running the build only once using the following basic steps: Change the POM versions to the release version (before the build starts). Trigger the Maven build (with optionally different goals). Commit/push changes to the tag (Subversion) or the release branch (Git).
… The TeamCity Artifactory Plugin includes release management capabilities for Maven and Gradle runners that use Subversion, Git or Perforce for version control. When you run your builds using Maven or Gradle with jobs that use Subversion, Git or Perforce as your version control system, you can manually stage a release build allowing you to:
If the option is selected, then TeamCity always runs the svn revert command before updating sources; that is, it will revert all changes in versioned files located in the checkout directory. When the option is disabled and local modifications are detected during the update process, TeamCity runs the svn revert after the update.
I would (and do) take a slightly different approach to this. Source control management is primarily for, well, managing source and treating it as a means of tracking or implying releases can make life a little tricky. This is really the purpose of your continuous integration environment and it does a far better job of it than what SVN does.
I use TeamCity as the means of identifying both path and revision number to pull from SVN. It's easy enough to define this at build runtime and any release to production is always done with caution (i.e. carefully check both path and revision). In the absolute worst case, if you do screw it up, you can always re-run the build with revised parameters.
You really don't want to end up making code changes directly to a "Releases" folder - this is what the trunk is for if it's mainstream development or branches are for if you've had to adjust an earlier revision. It's sort of beating SVN into submission to do something that's not its core strength! On that front, you might find some of the tips in The 10 commandments of good source control management useful.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With