WHAT'S NEW?
Loading...

Configure a new project in TeamCity


Index

  • Intro
  • Index and previous steps
  • Create your new Project in TeamCity
  • Add some configuration to your project

Intro


When someone wants to set up an automatic deployment environment using "Octopus Deploy" for example, previously, he needs to configure TeamCity in order to build the solution.

In this "how-to" guide I'll try to teach you which are the steps to prepare a proper build process in TeamCity.


Index and previous steps

First of all you would need to install the OctoPack nugget package in your .Net solution in order to be detected by TeamCity.

Then push the changes to your repository and now we’ll try to link that repository to your TeamCity solution.
Configuration to build the solution.

Create your new Project in TeamCity

First go to Administration in TeamCity where we'll add our new Project.




Create a new Project within the "Project" option.





Give it a name and paste the URL of your repository. In this case is a Bitbucket repository.





Add some configuration to your project


Once our project is created and linked to the repository, it's time to tune the build process.

Go to the projects list and select our build process by clicking on its name.





In the following window select "Edit Configuration Settings"




In General Settings add a Build number format which, effectively, will be the folder where TeamCity deploy the solution




Within "Version Control Settings" go and edit your VCS configuration.





Add the following text within the "Branch specification":
+:refs/heads/*
+:refs/heads/(feature/*)
+:refs/heads/(release/*)
+:refs/heads/(hotfix/*)
+:refs/(tags/*)
+:refs/pull/(*/merge)
+:refs/pull-requests/(*/merge-clean)


This will make TeamCity run a build process no matter where branch you push to the repository.





Go to the "Build Steps" option where we'll add two new steps:
  • Nuget Installer
  • Visual Studio


For the Nuget Packages copy the following conf.
if you can't see all these options click on "See advanced configuration" at the bottom of the page


Remember to add the name of your solution file within the "Path To Solution File" textbox (this parameter could change from one solution to other).





For the Visual Studio build step do the same as the previous step.





Final step, add a trigger using the default configuration.




0 comments:

Post a Comment