microsoft / AL-Go

The plug-and-play DevOps solution for Business Central app development on GitHub
MIT License
279 stars 114 forks source link

Reducing build time by skipping app compilation and installation in localdevenv.ps1 script. #1034

Closed frottke closed 4 months ago

frottke commented 5 months ago

If I do not want to compile my own apps when building the container and also do not want to install them (i.e. only install the dependencies). How should I set this up?

I had already tried to set "DoNotPublishApps" to true. Unfortunately, this did not have the desired effect. Likewise, setting "appFolders" (localdev.settings.json) to empty was not effective, as the array is apparently only updated but not overwritten.

The reason for my question is as follows: The creation of the container with dependencies takes about 10 minutes, if the apps are also compiled and installed, we are talking about 30 minutes. That's a bit too long for many of our developers for just a small change in on of our apps. Hence the question of whether it can be deactivated.

aholstrup1 commented 5 months ago

If you don't want to compile or install any of the apps from your repository in your devcontainers, wouldn't it be enough to just run New-BCContainer? Or are you missing something if you create containers that way?

frottke commented 5 months ago

If you don't want to compile or install any of the apps from your repository in your devcontainers, wouldn't it be enough to just run New-BCContainer? Or are you missing something if you create containers that way?

with the localdevenv.ps1 script functionality we already have the possibility to use all settings available in the repository. The matching BC version and also all dependencies are installed automatically. Which is exactly what we want 😄

freddydk commented 5 months ago

Are we talking about the BCApps repository here - or any other repo? BCApps is especially slow because it needs to uninstall everything and install everything. Or are you having a large repository with many apps?

frottke commented 5 months ago

Are we talking about the BCApps repository here - or any other repo? BCApps is especially slow because it needs to uninstall everything and install everything. Or are you having a large repository with many apps?

We are talking about our own repos. We develop according to the SaLi Concept, therefore we have depending on the project we are working a few hands full of apps in on repo. The 20 minutes time difference are due to compiling and installing 16 apps.

freddydk commented 5 months ago

I could try to add a parameter to localdevenv and clouddevenv called -clean, which basically would skip compiling and publishing - then you can try it out in a test branch of AL-Go and provide feedback?

frottke commented 5 months ago

That would be awesome if you could do that! Might be also useful for other to have an clean environment to base upon. I could imagine that having this as an setting in the devenv.settings.json might be useful and also in your script at the same place where you are getting asked about the container name and license file.