In a similar to this question - How build and publish to octopus deploy in two separate steps - is there a way to use the TeamCity msbuild plugin to just invoke the “pack” and “publish” from a separate build step? E.g. something like “msbuild /t:octopack,octopublish”
The reason I’m asking is that at present the sequence for the TeamCity MSBuild Runner with the Octopus plugin is as follows:
mysolution.sln - first.csproj - build - octo pack - octo publish - second.csprj - build - octo pack - octo publish - third.csproj - build - !! build failure !! - build failed
The downside to this is that the build step will publish first.nupkg and second.nupkg even if the overall build fails.
What I’d prefer instead is:
- build mysolution.sln - first.csproj - build - second.csprj - build - third.csproj - build - octo pack - first.nupkg - second.nupkg - third.nupkg - octo publish - first.nupkg - second.nupkg - third.nupkg
That way, if the third.csproj build fails it stops before any of packages are published.
From the other answer I linked to, I could just write a bit of PowerShell to find any “obj\octopacked*,nupkg” files and publish the packages myself, but it would nice if this was all bundled up into the shrink-wrapped TeamCity Octopus plugin.