nunit / teamcity-event-listener

NUnit Engine extension that helps integration with teamcity
MIT License
11 stars 10 forks source link

Integrate chocolatey package with the build script #41

Closed CharliePoole closed 7 years ago

CharliePoole commented 7 years ago

A Chocolatey package now exists for the extension, having been created using the binaries from the 3.5 release. We need to now integrate the creation of the package with the build script for the extension.

See nunit/nunit-console#253 and nunit/nunit-project-loader#8 for more info.

CharliePoole commented 7 years ago

@NikolayPianikov My default assumption is that it will be done just like the others, but since you are the maintainer of this package, it's basically up to you. The main points of the implementation as I have done it elsewhere are as follows:

  1. There are no nuspec files. Instead the nupkg is generated in the cake script. This allows constants to be used so that both packages (nuget and chocolatey) use the same values for fields like description, summary, etc. Of course, each one is also tailored to conform to the different conventions of the nuget.org and chocolatey.org and they have different ids.

  2. The script allows repackaging without rebuilding, including specifying the binary source directory and the nuget or chocolatey package version to produce. This helps when the binaries are correct but there is an error in package format. Packaging depends on build but repackaging does not.

  3. It's an error to build if an alternate source is provided. That's because the built binaries would not be in the packages produced.

If you see any problem in the approach, let me know. You can tell me now or after I do a PR, whichever is easier.

NikolayPianikov commented 7 years ago

@CharliePoole Common approach is better from my point of view. But just for reflection, we could think about how it works for the VS 2017 project model and targets, I mean dotnet pack or msbuild /t:pack and so on

CharliePoole commented 7 years ago

@NikolayPianikov I'm currently building all the extensions in VS2015. Probably the best way to deal with this is for me to get in my basic changes and then have you review and suggest more steps. If we do more, it will eventually be migrated back to the other extensions.

I tried to build and it failed. You are referencing a CI build of the 3.5.0 engine API that no longer exists. I'll change the references to a released version, which will fix one of the other issues.

CharliePoole commented 7 years ago

@NikolayPianikov Regarding the VS2017 model, it seems that the Cake nuget and chocolatey commands are supposed to hide that from us - i.e. it should work for both versions of VS transparently. But we may need to update the version of Cake you are using.

CharliePoole commented 7 years ago

@NikolayPianikov Do you normally have a failure on the Travis CI build?

NikolayPianikov commented 7 years ago

@CharliePoole sometimes when tests check agent's processes they are still in memory :(

CharliePoole commented 7 years ago

Should we do a new release? If so, what should be the version number?

The version could be either 1.0.3 or 1.1.0. Since you have a 1.0.3 milestone, I added it there but we could change it. There is already a 1.0.2 chocolatey package that I created using the same binaries as the 1.0.2 nuget package, so it could wait till you are ready to do a new release. Once you release, then it's up to the engine team to decide whether to include the new package in the bundles they produce, so we will need to create an issue for them to do that. What would you like to do?

NikolayPianikov commented 7 years ago

We haven't done any significant changes, so I think the new release is not needed. What I should do to use current version of extension?

CharliePoole commented 7 years ago

Not sure what you mean by "what should I do".

Users can download the current release (1.0.2) from either nuget or chocolatey. It will also be incluced in the new nunit-console-with-extensions chocolatey package when I release it.

If you create a new release of the extension and you want it to be included in the next release of the package by the engine team, then you would create an issue on the nunit-console repo. Since you already test everything, I assume it would be accepted immediately.