Only first Nuget packages added to the nuget feed
Hi All,
we recently updated TeamCity from version 2018.2.4 to 2019.1.5 and have an issue where we generate 2 NuGet packages, which before the upgrade were put straight onto the TeamCity NuGet feed. Now we have an issue where the first NuGet packages are added to the feed, but the second is not added until the end of the build. This causes issues, as part of the build steps is to initiate the deployment of these 2 apps in octopus. Obviously the first project is deployed fine but the second app fails. The NuGet packages add straight after team city finishes its build, so we can kick it off manually (as a temp workaround).
The issue is similar to the issue mentioned here:
* https://teamcity-support.jetbrains.com/hc/en-us/community/posts/360000122080-Published-to-TeamCity-NuGet-feed-not-including-all-artifacts-in-feed?flash_digest=4ea08ffd2bfbe81f6fd5866224f340ff46bdb736, however, was due to an upgrade to 2018.1
Any suggestions on how to fix would be appreciated.
Please sign in to leave a comment.
Hi Todd,
sorry, just answered in the other thread where you posted. To debug what exactly is going on we would need to understand how you publish the artifacts. Some publishing methods are asynchronous and some of them just wait until the end of the build, so it might be that you are observing expected behavior.
This said, there should be an easy workaround: Split your build in two, the first one generates the build artifacts and publishes them as artifacts (in the "Artifact paths" section of the build config settings), the second one contains the octopus steps with an artifact dependency on the previous build. Since the first build seems to wait until the end of the build to publish some of the artifacts, this would guarantee that this artifacts exist before moving on to octopus.
We would normally recommend separating the generation of artifacts and its publishing anyway, since that allows to separate concerns, reporting, and when some rerun is required only on one of the parts, you can run them independently.
Would that work for you?