Octopus deployment from Teamcity not using the latest packages

后端 未结 6 1633
南笙
南笙 2021-02-04 02:02

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

相关标签:
6条回答
  • 2021-02-04 02:07

    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?

    0 讨论(0)
  • 2021-02-04 02:09

    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.

    0 讨论(0)
  • 2021-02-04 02:15

    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.

    0 讨论(0)
  • 2021-02-04 02:17

    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.

    0 讨论(0)
  • 2021-02-04 02:20

    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.

    0 讨论(0)
  • 2021-02-04 02:30

    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'.

    0 讨论(0)
提交回复
热议问题