Octopus deployment from Teamcity not using the latest packages

Deadly 提交于 2019-12-03 00:01:45

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.

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?

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.

It could be a few things.

Check out.

http://octopusdeploy.com/documentation/integration/teamcity

You haven't mentioned how your consuming the feeds from Octopus in Teamcity. I would start there.

Next I would use the teamcity action to do your deploy. You asked "Where should the --waitfordeployment flag be added" there is a check box to make sure the deploy has worked before the action can continue.

In TeamCity I use a Octo Push Packages step and in the Additional Parameters field I specify the --defaultpackgeversion {VERSION} parameter.

This will force Octo to use a specific version of packages instead of just choosing the 'Latest Version'.

There are more possible reasons for the problem.

  1. To see the problems with Octopus go to Configuration -> Diagnostics

  2. Another common problem is to use a Package Name #{variable} in a deploy step

    Currently it is not possible and Package Name should be set manually, for example MyWebSite or MyWindowsService. See UserVoice for this feature.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!