1

We have a SQL Server Visual Studio Database Project in Source Control. We have 10 databases in the solution. We build all database projects together, since there are dependencies/cross joins etc. Then depending on which file/project is changed, we want to conditionally deploy to 10 different Octopus projects.

1 Source Control ---> 1 Teamcity Build ---> 10 Octopus Deploy Projects

Eg: if it notices a file called eg ProductDatabase.sqlproj in %changedFiles.file%, then OctopusDeployCreate-Release to OctopusProduct

Eg if it notices a file called eg CustomerDatabase.sqlproj in %changedFiles.file%, then OctopusDeployCreate-Release to OctopusCustomer.

How would I create a conditional build step for OctopusDeploy-CreateRelease in Teamcity using %changedFiles.file%?

enter image description here.

  • 1
    can someone with 150 reputation, create a tag called sql-server, and octopus deploy? This can help the New Devops stackexchangeboard. surprised no one created them yet, Thanks! – SkyPool392 Jul 5 '18 at 5:43
  • You could use Channels and Life cycles to control if a particular package should be deployed. Then call Octo Client to create the release with a dry run to see if there is a channel. At the end of the build, all being well create the release which assumes the other steps have pushed up the relevant packages. – lloyd Aug 21 '18 at 6:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.