Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Build and deploy specific revision number with TeamCity

I'm just getting to grips with TeamCity and MSDeploy and have deployment to a dev environment triggered by SVN commit working nicely. The question I have is in terms of releasing to a test environment; I want to do this on demand and based on a specific revision number. What's the best way to configure a TeamCity build based on a user-defined revision?

like image 228
Troy Hunt Avatar asked Nov 03 '10 23:11

Troy Hunt


People also ask

What is build counter in TeamCity?

The third group (“34”) is the build counter in Teamcity and is used to separate different builds with the same major and minor versions from each other. The last part is the pre-release version tag and we use the branch name from the Git repository for this.

What is artifact path in TeamCity?

Artifact Paths Build artifacts are files produced by the build which are stored on TeamCity server and can be downloaded from the TeamCity UI or used as artifact dependencies by other builds.

How do I check my TeamCity build history?

To view the history of builds in the current configuration, click previous and next links in the upper right corner of Build Results. Click All history link to open the History tab.


2 Answers

You can use Run Custom Build Dialog in the TeamCity, and customize there Changes to include parameter, where you need to specify actually SVN revision to build.

like image 200
s.ermakovich Avatar answered Sep 28 '22 07:09

s.ermakovich


Take a look on Pin functionality in TeamCity. You can pin a certain build and then deploy latest pinned build.

So you have a 'Create development build' task in TeamCity which deploys to dev environment and exposes artefacts. You can create another task in TeamCity that will use artefacts from latest pinned build in 'Create development build' task and deploy to your testing environment.

You can create yet another task that deploys to production latest pinned 'test' build. Rollback can be achieved by simply unpinning last pinned build.

You also have a history of deployed build.

like image 20
Jakub Konecki Avatar answered Sep 28 '22 08:09

Jakub Konecki