arcus-azure/arcus.scripting

Doc: improve performance of using Arcus libs in DevOps pipelines

Closed this issue ยท 8 comments

We've heard multiple comments from people that are using Arcus.Scripting in their DevOps pipelines that they're frustrated by the time it takes to install an Arcus package in their pipeline.
I personally have experienced this myself: In one of my steps in the pipeline, I want to make use of functionality provided by Arcus, and I execute for instance this command:

Install-Module -Name Arcus.Scripting.KeyVault -Force

This step takes over 5 minutes to execute, which is way too long, and people are being frustrated about that.
I think it takes 5 minutes, because the -Force parameter makes sure that all dependent modules are also being installed.

I suggest that we add some tips regarding this in our documentation.
Instead of using the -Force parameter, we could suggest to use the commands below. It will drastically increase performance ๐Ÿ‘๐Ÿป

Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
Install-Module -Name Arcus.Scripting.KeyVault -AllowClobber

Aha aha! Yeah, if this combination indeed helps faster installation. Why not? We don't mention the -Force switch, though, in our docs.
This is rather something typical PowerShell, and not per-se Arcus. I image the same would be true for all other PS modules out there. But, yeah, maybe people are only copy-pasting what they see ๐Ÿ˜… . This is maybe even something for the academy, on how to work with PowerShell in DevOps.

In PR #282 I introduced this the old way that takes too long. OK if I only update it in the Azure DevOps YAML sections there, or should we put this somewhere explicitly as well?

@spasal , great that you already worked on this! Mind that assignment of issues/work is also important, as someone else could be doing the same thing without anyone dedicated assigned on the issue. If the issue is of your own making and you want to propose something, by all means! But an other issue from someone else, can maybe lead to duplicate work, without knowing of each other. Just a quick ping, and we can assign you ๐Ÿ˜‰ . We wouldn't want to disappoint anyone that their work and time was already done by someone else. Super super much thanks for your effort on Arcus! Very very much appreciated! โค๏ธ

I think we can close this issue ?

Ah, yes, I think we can. ๐Ÿ˜„

I'd like to reopen this.
We have already updated our documentation for this, but only the specific documentation on how to install the AzureDevops module contains this information.
You can use other modules in DevOps pipelines as well, so I'd like to have this information more on a 'global' section in the docs.

Why not add a section between 'Welcome' and 'Features' that is called 'Guidelines' , where we put some best practices / advise ?

I'd like to reopen this. We have already updated our documentation for this, but only the specific documentation on how to install the AzureDevops module contains this information. You can use other modules in DevOps pipelines as well, so I'd like to have this information more on a 'global' section in the docs.

Why not add a section between 'Welcome' and 'Features' that is called 'Guidelines' , where we put some best practices / advise ?

Good idea ๐Ÿ‘๐Ÿป will pick this up.

Good idea ๐Ÿ‘๐Ÿป will pick this up.

Thx @pim-simons! We could rename the /preview/02-Features to /preview/03-Features so that the /preview/02-Guides are above the features in the side bar. A suggestion ๐Ÿ˜‰ .