3 ms·
We have tones of PowerShell and it works like a charm, although we have some experienced posh devs We also test REST backend in PowerShell using Pester and hom
by majkinetor 6y ago
We have tones of PowerShell and it works like a charm, although we have some experienced posh devs
We also test REST backend in PowerShell using Pester and home made Posh rest client.
PowerShell is preferred in this house because
a) you can run it on any Windows OS on the spot and modify it in ad hoc manner, you can even debug it with breakpoints etc easily. Also our Linux machines have it so it is unifying admin interface.
b) its powerful, you can do anything in it with few lines of code (one case: we did 10 million SOAP requests using certificate per day for entire country)
c) many Windows tools use it like SqlServer, IIS etc. which makes management way easier - for example we use [1] to install sql server on all dev/prod machines or use [2] to monitor all our servers or use [3] to send CI metrics to influx (all those are just minor samples, we have bunch of stuff like that)
d) we find it way easier to keep CI/CD vars in PowerShell hashtables then in yaml, so our yaml fiels are one liners and everything works locally.
e) Python, ruby and friends are NOT designed for shell work. Its akward, unfriendly and most of all not there on Windows OTB.
---
[1] https://github.com/majkinetor/Install-SqlServer https://github.com/majkinetor/Install-SqlServer
[2] https://github.com/majkinetor/flea https://github.com/majkinetor/flea
[3] https://github.com/majkinetor/psinflux https://github.com/majkinetor/psinflux
- a1o 6y agoHey, since you appears to use Chocolatey and there's few people using it, how do you feel it? Do you think it will keep existing? I am not that into the way MS is doing the winget thing, but I also noticed it appears to impact how people adopt or not chocolatey. I see a lot of manual scripts for installing things on Windows CI systems (some using now defunct fciv and soon to be defunct bitsadmin)... I really like chocolatey but I am worried it will disappear soon.
- majkinetor 6y agoChocolatey is the only thing I use to install stuff both on CI and on each dev machine and I regularly create packages for it [1]. I worked hard to make what I need stable and not depend on their existence - [2] and all the repos using the same methodology release packages on GH [4] and there is a handy script to install from there. I also created AU for it [3] and managed to convince people to embed software in packages [5] so packages always work (you can cache them on your own via file system, artifactory, nexus etc). You can also host your own gallery in number of different ways. So, in short, there is escape plan. TBH, it looks like choco is going better then ever. And you can't simply find any better repository for sw, its better and more up to date then most linux package repos (on par with Arch). > I am not that into the way MS is doing the winget thing, That is years away IMO, no scripting there too, and it moves like a snail. I would really be embarrassed if I were leading that team. > I see a lot of manual scripts for installing things on Windows CI systems Yeah, most people suck, like their scripts :-) There is literary 0 chance for you to make reliable installation script in general that works in any context. > I really like chocolatey but I am worried it will disappear soon. Just use it. I don't work for them. I maintain core team repo [2]. Its great tool now. What will happen tomorrow nobody knows but like I said, you have escape plan and even if they go down your CI will still work for many years if you set it up properly. --- [1] https://gist.github.com/majkinetor/a700c70b8847b29ebb1c918d47ee4eb1 https://gist.github.com/majkinetor/a700c70b8847b29ebb1c918d4... [2] https://github.com/chocolatey-community/chocolatey-coreteampackages https://github.com/chocolatey-community/chocolatey-coreteamp... [3] https://github.com/majkinetor/au https://github.com/majkinetor/au [4] https://github.com/majkinetor/au-packages/tags https://github.com/majkinetor/au-packages/tags [5] https://github.com/chocolatey-community/chocolatey-coreteampackages/blob/master/CONTRIBUTING.md#114-embed-a-package-if-allowed https://github.com/chocolatey-community/chocolatey-coreteamp...
- louwrentius 6y agoPowershell is an entirely different matter to me. Powershell is so much powerfull, I’ve written a ton of code in that and also used Pester for unit testing. Entirely different world compared to shell scripting.