appveyor / ci

AppVeyor community support repository
https://www.appveyor.com
344 stars 64 forks source link

Storing BYOC image definitions for re-building images #3152

Open xclayl opened 4 years ago

xclayl commented 4 years ago

First, please describe the problem you want to solve. Then how you propose to implement it in AppVeyor. If you are not sure the problem is solved in the current version, please post your question to https://help.appveyor.com/discussions/questions.

I'm loving the idea of BYOC images. Although, currently I'd like to:

1) I'd like all co-workers to be able to see the image definition & be able to add to it. 2) I'd like it easy to update (for example add the .Net Core to an existing image). Starting from scratch again means I could forget something and break the build.

"Assisted Setup" is great. I just want to keep the definition around for next time.

One option for me might be to create a Docker image with the software I want. However this isn't practical. The build image would include nodejs, Java, .Net, SQL Server and Octo. Creating a single Docker image with all this is beyond my abilities.

FeodorFitsner commented 4 years ago

Thanks for the great words!

2 is clear - we will add a mode to install additional software on top of existing image. Are you currently using BYOC against Hyper-V provider or Docker?

Re #1 - could you please elaborate what do you mean by "image definition"? Is it the command you want to store/share?

xclayl commented 4 years ago

2 would be helpful. We're currently using the Visual Studio 2019 image hosted by appveyor. I'm interested in setting up a similar image in Azure to see if we can get the build times lower. We have one build that is over 40 minutes.

For #1, you see this as a command, which I get why you see it that way -- Assisted Setup gives you a command to run. For us, I'd see it (or would like to see it) as a set of checkboxes, with maybe some additional chocolately commands. I'm not very interested in the command that creates the image. Instead, I'd like to look at this a year from now and see, "image A contains .net Core, Java7/8, and SQL Server 2017 Developer".

However, I would be interested in the console output from creating the image. I imagine it could be presented in the same way the build output is now.

It might be done the current way for permissions reasons. Currently you ask me to run the command under my account and which gives you a subset of rights for running builds. But if I care about limited permissions, I'm going to give you your own Azure subscription, away from our production environment. Which it might be easier to give you high-level rights to a subscription and you build the image.

OK, so here's my dream end-result: 1) You'll ask me to run a command in an Azure subscription that gives you the rights you need. 2) I check (checkboxes) the software I want, and give the custom image a name 3) wait (as YOU create the image). I see the console output like I do for builds. 4) Appveyor BYOC works just like normal Appveyor (maybe my image name in the yml is "byoc:CustomImage" -- "byoc" prefix prevents conflicts with normal AppVeyor images) 5) There's a page similar to https://www.appveyor.com/docs/windows-images-software/ so that I can see the software installed on my custom image 6) 5 years from now, I can check another box to update the image with an additional piece of software (like Visual Studio 2023 when is comes out) 7) You have a diagnotics page to rebuild images in the Azure subscription, if builds stop working.

FeodorFitsner commented 4 years ago

Thank you for the fantastic feedback! Your vision is actually very close that what we are going to implement in the coming months :) Stay tuned!