Вопрос

I've finished reading the book Pro Nuget, and I think making use of it for our dependencies would be better than our current method. Also, you can build application deployment packages to deploy your build to various environments, something we are also looking to better automate.

One of the ideas is to have several Nuget feeds; a ci feed where every successful integration publishes a package, a qa feed that you only publish versions you want qa to test and then a release feed, where you copy only packages from the qa feed that they successfully tested.

I like this idea but the recommendation is for ci builds to be marked as prerelease by ending the version in -alphaXXXX or similar. If I do that though, I need to get that designation removed during the promotion to the qa feed. I think you'd have to modify the package to do that however part of the appeal of Nuget packages is that once built you don't change them

Another idea is that since we mostly work in trunk, when I make the rc branch our build process would stop adding the prerelease part of the version. That seems like it would work, and then promoting from qa to release feed would be a simple package copy.

Is anyone is doing this approach and is it the recommended approach? Am I missing anything? I have googled but nit found much discussion on the details of such an approach.

Это было полезно?

Решение

I'm one of the authors of the book, so I hope you liked it! We're working on a second edition with lots of new content, and this particular case is being tackled as well.

Just to clarify, the CI --> QA --> PROD scenario is set as an example package promotion flow: you can create your own if you like.

You point is correct: package promotion should not require any modifications to the package nor its contents. This effectively means there's not even a rebuild of the binaries inside of your package when promoting it to another feed. The only exception to this rule is the package prerelease version, which can be adjusted or removed. Note: the semantic version should stay the same when promoting!

This is a core feature of http://www.MyGet.org: here's the documentation for it http://docs.myget.org/docs/reference/package-sources (scenario: pushing package upstream).

The above principles are applied in this feature, and we also take care of feed security/api keys. If you do not use MyGet, then you'll need to do this for yourself. The logical steps are:

  1. download the package from the source feed
  2. optionally change the prerelease tag (manually?)
  3. push the package to the target feed

Many open source projects are using this scenario, using a CI feed on MyGet.org and then pushing upstream to NuGet.org. The upstream package source can be any other NuGet feed (e.g. Chocolatey.org gallery, Resharper plug-in gallery, another MyGet.org feed, ...).

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top