Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Octopus deployment from Teamcity not using the latest packages

I have set up a build step on TeamCity,as described here, to do automatic release deployments to our test server. But it is not using the latest nuget packages that was build in TeamCity.

Use Case :

Teamcity will create nuget package with version 1.0.0.9, all the dlls that is in the package is the correct version, and the Release in Octopus, that was deployed has got the same version number , but the packages that octopus uses is of an earlier package eg 1.0.0.5.

I have specified the --force parameter on the build step so it should use the latest packages but it is not.

If I manually create a release in Octopus, and select the latest packages it is working 100%

Please can someone tell me if I am missing something.

thanks in advance

like image 250
Captain0 Avatar asked Jun 14 '13 11:06

Captain0


People also ask

What is difference between TeamCity and octopus?

About Octopus Deploy TeamCity builds the code and runs tests, while Octopus takes care of: Distributing applications to all the remote machines, securely. Environment-specific configuration, like connection strings.

What is the latest version of Octopus Deploy?

We ship a major release of Octopus Server every quarter. This is every release we've ever shipped! The recommended release for self-hosted installations is 2022.3 (Build 10640).

Can you Deploy with TeamCity?

TeamCity provides the Deployment type of build configuration. Build configurations which perform deploying to some environment can be marked with this type: these are usually build configurations that have snapshot or artifact dependencies on the builds whose results they deploy.


3 Answers

I think what you need to do is create two build configurations in TeamCity, one to build and one to deploy with Octopus. Refer to this link that has a small blurb toward the end:

Note that NuGet packages created from your build won't appear in TeamCity until after the build completes. This means you'll usually need to configure a secondary build configuration, and use a snapshot dependency and build trigger in TeamCity to run the deployment build configuration after the first build configuration completes.

So in my case I created 2 build configurations, then setup a snapshot dependency from the build to the deploy config and also a trigger to kick off the deploy after a successful build.

like image 179
Nate Rickard Avatar answered Oct 04 '22 23:10

Nate Rickard


It looks like --force is just to force packages to the be re-installed if they have already been installed. Are you using the --packageversion parameter?

like image 23
ryan.rousseau Avatar answered Oct 04 '22 23:10

ryan.rousseau


My organization uses Jenkins CI. We use the unique build number as our package version and then deploy that specific package version using the --packageversion paramater.

In the case where we have multiple services that need to be deployed. We have an upstream job / main job that provides the unique build number.

I'd imagine you can do the same thing with TeamCity

Master Job (unique build number) calls jobs A and jobs B with parameter (unique build). Jobs A and B build version (from Master Job). Jobs A and B complete then publish their respective versions.

like image 37
badazzhindu Avatar answered Oct 04 '22 23:10

badazzhindu