jenkins-infra / release

Contains every things needed to release jenkins core from the jenkins infra project
MIT License
13 stars 22 forks source link

Windows Packaging: Avoid using the full dotnet SDK #212

Open dduportal opened 2 years ago

dduportal commented 2 years ago

Hello @MarkEWaite @timja , I'm facing a size/speed issue around the Windows packaging step.

The size of the image mcr.microsoft.com/dotnet/framework/sdk:3.5 is 15Gb and need to be pull each time we run a release process (or a build in https://github.com/jenkins-infra/docker-packaging/pull/23).

This issue already exists during the weekly and LTS releases (seen with @Wadeck and @daniel-beck during the last security update) and the time of pulling this images is coherent with the docker-packaging build times: around 14 min only for pulling the base image.

I wonder what part of the dotnet SDK are strictly required for generating the MSI package and if we couldn't only install these elements instead of pulling the full sized image. WDYT?

dduportal commented 2 years ago

For tomorrow's release, I would want to try the version 4.8 of the dotnet sdk: the Docker image is 12.8 Gb : still 3 Gb less.

timja commented 2 years ago

Either @olblak or @slide may know

dduportal commented 2 years ago

As per https://github.com/jenkinsci/packaging#pre-requisites:

This Jenkins needs to have a Windows build agent that has WiX Toolset (currently 3.5), msbuild, cygwin and .net 2.0. This build agent is used to build MSI packages, which can be only built on Windows.

Not sure if ".net 2.0" covers the whole SDK framework?

timja commented 2 years ago

wix3 requires at least .net 3.5

wix4 which is in development uses .net core

dduportal commented 2 years ago

I'm gonna try installing .net SDK + wix in the inbound-agent Docker image instead of pulling the whole 12 Gb of framework then

timja commented 2 years ago

I think wix will require the whole framework but worth a try

slide commented 2 years ago

Those pre-requisites are not correct. Cygwin is not needed. .Net core will not work. It must be 3.5.