I’m using TeamCity with Octopus Deploy add-in. I have two projects in my Visual Studio solution: a web application and a database migration project. I want to configure these two deployment processes under one Octopus Deploy project.
I have two NuGet Package Deployment Steps defined in one Octopus Project - one for web app and other for database migrations. Their configuration differ in NuGet package ID setting value (and other settings too, but it’s not important in this case).
TeamCity configuration allows us to define only Octopus Deploy Project name, so my question is:
Can I configure two Octopus Deploy deployment steps in TeamCity with the same project name and be sure that Octopus will deploy correct NuGet package depending on NuGet package ID value? Or maybe for each one of these steps Octopus will be trying to process two deployment steps at once?
Thanks in advance, Adam
Thanks for reaching out.
Can I configure two Octopus Deploy deployment steps in TeamCity with the same project name and be sure that Octopus will deploy correct NuGet package depending on NuGet package ID value?
Deployment steps are configured in Octopus, not in TeamCity. All TC does is tell Octopus to start a deployment on a specific project, and from that moment on the logic is on Octopus’ hands.
Your (single) Octopus Project’s deployment process will have 2 “Nuget Deploy” steps. Each step will have its own Nuget package ID (one will have the webapp and the other the database). When the deployment process reaches each step, it will deploy the package of the ID defined for that particular step.
Hope it makes sense :). If it doesn’t please let me know.
Thank you for your reply.
I want to have the following scenario:
TeamCity: two separate build processes defined. Each one will be triggered independently. First one will build and deploy WebApp.nupkg on Octopus. Second one will build and deploy DbMigrations.nupkg on Octopus. In each of these processes there will be one ‘OctopusDeploy: Create release’ build step to trigger
Octopus Deploy deployment process. These build steps will be defined with the same value of Octopus Project Name setting.
Octopus: one project defined in Octopus Deploy, but with two deployment steps: one for web app and one for database migrations.They will differ in the value of NuGet Package ID setting: WebApp.nupkg or DbMigrations.nupkg .
When the deployment process reaches each step, it will deploy the package of the ID defined for that particular
OK, but how Octopus will run deployment steps from my scenario? Will it run those two deployment steps each time I trigger deploy from TeamCity, no matter if it will be web app or db migrations?
If it does, I’m wondering what will happen when I trigger deployment of database migrations? Because it will build only DbMigrations.nupkg, and there will be no new version of WebApp.nupkg. What Octopus will do in that case: return error saying that there is no new version of WebApp.nupkg and break the whole process?
If it does, so what is the purpose of ‘NuGet package ID’ property? To deploy a bunch of NuGet packages, that were build in one TeamCity build process, so each package could have its own deployment process? Or to distinguish packages in the scope of Octopus Deploy project, so programmer could keep the right order and combine different TeamCity build processes into one Octopus Deploy project?
A couple of days ago we released Octopus 3.2 which has a huge new feature called Channels -> https://octopus.com/blog/channels-walkthrough
“Channels” will allow you to have more than one deployment process per project. This means you could have 1 channel that has a deployment process that only deploys your database packages, and another one for your web application.
Then, from TeamCity you’ll be able to trigger a deployment for a specific channel from each of your build configurations.
I suggest you to take a couple of minutes and go through all the Channels listed on the link above. Specially the great video that Mike recorded.
Hope that helps
OK, I’ll check it.
Thanks for your help. This question can be closed.