From 44f74fced5853d9a0ad43ee556d26530ab6ff2b6 Mon Sep 17 00:00:00 2001 From: Aaron Parker Date: Sun, 18 Feb 2024 20:31:44 +1100 Subject: [PATCH 1/5] Fix PSScriptAnalyzer issues --- Evergreen/Apps/Get-AdobeDigitalEditions.ps1 | 1 + Evergreen/Apps/Get-CitrixShareFile.ps1 | 1 - Evergreen/Apps/Get-ClarivateEndnote.ps1 | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Evergreen/Apps/Get-AdobeDigitalEditions.ps1 b/Evergreen/Apps/Get-AdobeDigitalEditions.ps1 index be782e19..58f3c92e 100644 --- a/Evergreen/Apps/Get-AdobeDigitalEditions.ps1 +++ b/Evergreen/Apps/Get-AdobeDigitalEditions.ps1 @@ -8,6 +8,7 @@ Function Get-AdobeDigitalEditions { E-mail: jms@du.se #> [OutputType([System.Management.Automation.PSObject])] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseSingularNouns", "", Justification="Product name is a plural")] [CmdletBinding(SupportsShouldProcess = $False)] param ( [Parameter(Mandatory = $False, Position = 0)] diff --git a/Evergreen/Apps/Get-CitrixShareFile.ps1 b/Evergreen/Apps/Get-CitrixShareFile.ps1 index 3acf3344..2f86530c 100644 --- a/Evergreen/Apps/Get-CitrixShareFile.ps1 +++ b/Evergreen/Apps/Get-CitrixShareFile.ps1 @@ -5,7 +5,6 @@ .NOTES Author: Tschuegy - Twitter: #> [OutputType([System.Management.Automation.PSObject])] [CmdletBinding(SupportsShouldProcess = $false)] diff --git a/Evergreen/Apps/Get-ClarivateEndnote.ps1 b/Evergreen/Apps/Get-ClarivateEndnote.ps1 index 7c3b18f0..0d1f7df5 100644 --- a/Evergreen/Apps/Get-ClarivateEndnote.ps1 +++ b/Evergreen/Apps/Get-ClarivateEndnote.ps1 @@ -22,7 +22,7 @@ function Get-ClarivateEndNote { Write-Verbose -Message "$($MyInvocation.MyCommand): Download URL: $($res.Get.Download.Uri.$Release)" # Query the EndNote update API - $UpdateFeed = Invoke-EvergreenRestMethod -Uri $res.Get.Update.Uri.($Release) + $UpdateFeed = Invoke-EvergreenRestMethod -Uri $res.Get.Update.Uri.($Release) if ($null -ne $UpdateFeed) { # Sort the updates to find the latest From bc8d68bdbd40ccc2b1a8c964b71486a9a791354c Mon Sep 17 00:00:00 2001 From: BornToBeRoot <16019165+BornToBeRoot@users.noreply.github.com> Date: Fri, 23 Feb 2024 18:17:52 +0100 Subject: [PATCH 2/5] Add kubernetes kubectl --- Evergreen/Apps/Get-KubernetesKubectl.ps1 | 31 +++++++++++++++++++ Evergreen/Manifests/KubernetesKubectl.json | 36 ++++++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 Evergreen/Apps/Get-KubernetesKubectl.ps1 create mode 100644 Evergreen/Manifests/KubernetesKubectl.json diff --git a/Evergreen/Apps/Get-KubernetesKubectl.ps1 b/Evergreen/Apps/Get-KubernetesKubectl.ps1 new file mode 100644 index 00000000..8d14e5ac --- /dev/null +++ b/Evergreen/Apps/Get-KubernetesKubectl.ps1 @@ -0,0 +1,31 @@ +Function Get-KubernetesKubectl { + <# + .SYNOPSIS + Returns the available Kubernetes Kubectl versions. + + .NOTES + Author: BornToBeRoot + Twitter: @_BornToBeRoot + #> + [OutputType([System.Management.Automation.PSObject])] + [CmdletBinding(SupportsShouldProcess = $False)] + param ( + [Parameter(Mandatory = $False, Position = 0)] + [ValidateNotNull()] + [System.Management.Automation.PSObject] + $res = (Get-FunctionResource -AppName ("$($MyInvocation.MyCommand)".Split("-"))[1]) + ) + + # Get the latest version for kubectl + $Version = Invoke-RestMethod -Uri $res.Get.Update.Uri + + # Build the download links for each platform & architecture + foreach ($DownloadUri in $res.Get.Download.Uri.GetEnumerator()) { + [pscustomobject] @{ + Version = $Version + Architecture = $DownloadUri.Name.Split("_")[1] + Platform = $DownloadUri.Name.Split("_")[0] + URI = $DownloadUri.Value -replace $res.Get.Download.ReplaceVersionText, $Version + } + } +} diff --git a/Evergreen/Manifests/KubernetesKubectl.json b/Evergreen/Manifests/KubernetesKubectl.json new file mode 100644 index 00000000..05436fc2 --- /dev/null +++ b/Evergreen/Manifests/KubernetesKubectl.json @@ -0,0 +1,36 @@ +{ + "Name": "Kubernetes Kubectl", + "Source": "https://kubernetes.io/", + "Get": { + "Update": { + "Uri": "https://cdn.dl.k8s.io/release/stable.txt" + }, + "Download": { + "Uri": { + "Windows_x64": "https://dl.k8s.io/release/#version/bin/windows/amd64/kubectl.exe", + "Windows_x86": "https://dl.k8s.io/release/#version/bin/windows/386/kubectl.exe", + "Windows_arm64": "https://dl.k8s.io/release/#version/bin/windows/arm64/kubectl.exe", + "Linux_x64": "https://dl.k8s.io/release/#version/bin/linux/amd64/kubectl", + "Linux_arm64": "https://dl.k8s.io/release/#version/bin/linux/arm64/kubectl", + "Darwin_x64": "https://dl.k8s.io/release/#version/bin/darwin/amd64/kubectl", + "Darwin_arm64": "https://dl.k8s.io/release/#version/bin/darwin/arm64/kubectl" + }, + "ReplaceVersionText": "#version" + } + }, + "Install": { + "Setup": { + "Windows": "kubectl.exe", + "Linux" : "kubectl", + "Darwin" : "kubectl" + }, + "Physical": { + "Arguments": "", + "PostInstall": [] + }, + "Virtual": { + "Arguments": "", + "PostInstall": [] + } + } +} From 2bb75df319593055d49c51a16593ae4a1f6a5e7f Mon Sep 17 00:00:00 2001 From: Aaron Parker Date: Thu, 29 Feb 2024 09:15:18 +1100 Subject: [PATCH 3/5] Update KubernetesKubectl Align to project code standards --- Evergreen/Apps/Get-KubernetesKubectl.ps1 | 62 ++++++++++---------- Evergreen/Manifests/KubernetesKubectl.json | 66 ++++++++++------------ 2 files changed, 61 insertions(+), 67 deletions(-) diff --git a/Evergreen/Apps/Get-KubernetesKubectl.ps1 b/Evergreen/Apps/Get-KubernetesKubectl.ps1 index 8d14e5ac..2ebd0cb2 100644 --- a/Evergreen/Apps/Get-KubernetesKubectl.ps1 +++ b/Evergreen/Apps/Get-KubernetesKubectl.ps1 @@ -1,31 +1,31 @@ -Function Get-KubernetesKubectl { - <# - .SYNOPSIS - Returns the available Kubernetes Kubectl versions. - - .NOTES - Author: BornToBeRoot - Twitter: @_BornToBeRoot - #> - [OutputType([System.Management.Automation.PSObject])] - [CmdletBinding(SupportsShouldProcess = $False)] - param ( - [Parameter(Mandatory = $False, Position = 0)] - [ValidateNotNull()] - [System.Management.Automation.PSObject] - $res = (Get-FunctionResource -AppName ("$($MyInvocation.MyCommand)".Split("-"))[1]) - ) - - # Get the latest version for kubectl - $Version = Invoke-RestMethod -Uri $res.Get.Update.Uri - - # Build the download links for each platform & architecture - foreach ($DownloadUri in $res.Get.Download.Uri.GetEnumerator()) { - [pscustomobject] @{ - Version = $Version - Architecture = $DownloadUri.Name.Split("_")[1] - Platform = $DownloadUri.Name.Split("_")[0] - URI = $DownloadUri.Value -replace $res.Get.Download.ReplaceVersionText, $Version - } - } -} +function Get-KubernetesKubectl { + <# + .SYNOPSIS + Returns the available Kubernetes Kubectl versions. + + .NOTES + Author: BornToBeRoot + Twitter: @_BornToBeRoot + #> + [OutputType([System.Management.Automation.PSObject])] + [CmdletBinding(SupportsShouldProcess = $False)] + param ( + [Parameter(Mandatory = $False, Position = 0)] + [ValidateNotNull()] + [System.Management.Automation.PSObject] + $res = (Get-FunctionResource -AppName ("$($MyInvocation.MyCommand)".Split("-"))[1]) + ) + + # Get the latest version for kubectl + $Version = Invoke-RestMethod -Uri $res.Get.Update.Uri + + # Build the download links for each platform & architecture + foreach ($DownloadUri in $res.Get.Download.Uri.GetEnumerator()) { + [PSCustomObject] @{ + Version = $Version + Architecture = $DownloadUri.Name.Split("_")[1] + Platform = $DownloadUri.Name.Split("_")[0] + URI = $DownloadUri.Value -replace $res.Get.Download.ReplaceVersionText, $Version + } + } +} diff --git a/Evergreen/Manifests/KubernetesKubectl.json b/Evergreen/Manifests/KubernetesKubectl.json index 05436fc2..56368087 100644 --- a/Evergreen/Manifests/KubernetesKubectl.json +++ b/Evergreen/Manifests/KubernetesKubectl.json @@ -1,36 +1,30 @@ -{ - "Name": "Kubernetes Kubectl", - "Source": "https://kubernetes.io/", - "Get": { - "Update": { - "Uri": "https://cdn.dl.k8s.io/release/stable.txt" - }, - "Download": { - "Uri": { - "Windows_x64": "https://dl.k8s.io/release/#version/bin/windows/amd64/kubectl.exe", - "Windows_x86": "https://dl.k8s.io/release/#version/bin/windows/386/kubectl.exe", - "Windows_arm64": "https://dl.k8s.io/release/#version/bin/windows/arm64/kubectl.exe", - "Linux_x64": "https://dl.k8s.io/release/#version/bin/linux/amd64/kubectl", - "Linux_arm64": "https://dl.k8s.io/release/#version/bin/linux/arm64/kubectl", - "Darwin_x64": "https://dl.k8s.io/release/#version/bin/darwin/amd64/kubectl", - "Darwin_arm64": "https://dl.k8s.io/release/#version/bin/darwin/arm64/kubectl" - }, - "ReplaceVersionText": "#version" - } - }, - "Install": { - "Setup": { - "Windows": "kubectl.exe", - "Linux" : "kubectl", - "Darwin" : "kubectl" - }, - "Physical": { - "Arguments": "", - "PostInstall": [] - }, - "Virtual": { - "Arguments": "", - "PostInstall": [] - } - } -} +{ + "Name": "Kubernetes Kubectl", + "Source": "https://kubernetes.io/", + "Get": { + "Update": { + "Uri": "https://cdn.dl.k8s.io/release/stable.txt" + }, + "Download": { + "Uri": { + "Windows_x64": "https://dl.k8s.io/release/#version/bin/windows/amd64/kubectl.exe", + "Windows_x86": "https://dl.k8s.io/release/#version/bin/windows/386/kubectl.exe", + "Windows_arm64": "https://dl.k8s.io/release/#version/bin/windows/arm64/kubectl.exe" + }, + "ReplaceVersionText": "#version" + } + }, + "Install": { + "Setup": { + "Windows": "kubectl.exe" + }, + "Physical": { + "Arguments": "", + "PostInstall": [] + }, + "Virtual": { + "Arguments": "", + "PostInstall": [] + } + } +} From 75c4666c6101e2542aa8d24a2e9b0bc6894035c2 Mon Sep 17 00:00:00 2001 From: Aaron Parker Date: Mon, 11 Mar 2024 13:09:56 +1100 Subject: [PATCH 4/5] ProtonVPN #596 --- Evergreen/Apps/Get-ProtonVPN.ps1 | 26 ++++++++++++++++++++++++++ Evergreen/Manifests/ProtonVPN.json | 24 ++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 Evergreen/Apps/Get-ProtonVPN.ps1 create mode 100644 Evergreen/Manifests/ProtonVPN.json diff --git a/Evergreen/Apps/Get-ProtonVPN.ps1 b/Evergreen/Apps/Get-ProtonVPN.ps1 new file mode 100644 index 00000000..3707b319 --- /dev/null +++ b/Evergreen/Apps/Get-ProtonVPN.ps1 @@ -0,0 +1,26 @@ +function Get-ProtonVPN { + <# + .SYNOPSIS + Returns the latest ProtonVPN version number and download. + + .NOTES + Author: Adrian Scott + #> + [OutputType([System.Management.Automation.PSObject])] + [CmdletBinding(SupportsShouldProcess = $False)] + param ( + [Parameter(Mandatory = $False, Position = 0)] + [ValidateNotNull()] + [System.Management.Automation.PSObject] + $res = (Get-FunctionResource -AppName ("$($MyInvocation.MyCommand)".Split("-"))[1]) + ) + + # Pass the repo releases API URL and return a formatted object + $params = @{ + Uri = $res.Get.Uri + MatchVersion = $res.Get.MatchVersion + Filter = $res.Get.MatchFileTypes + } + $object = Get-GitHubRepoRelease @params + Write-Output -InputObject $object +} diff --git a/Evergreen/Manifests/ProtonVPN.json b/Evergreen/Manifests/ProtonVPN.json new file mode 100644 index 00000000..1f454655 --- /dev/null +++ b/Evergreen/Manifests/ProtonVPN.json @@ -0,0 +1,24 @@ +{ + "Name": "ProtonVPN", + "Source": "https://protonvpn.com/", + "Get": { + "Uri": "https://api.github.com/repos/ProtonVPN/win-app/releases/latest", + "MatchVersion": "(\\d+(\\.\\d+){1,4}).*", + "MatchFileTypes": "\\.exe$" + }, + "Install": { + "Setup": "ProtonVPN*.exe", + "Physical": { + "Arguments": "/exenoui /exelog C:\\Windows\\Temp\\ProtonVPN.log /qn /exenoupdates", + "PostInstall": [ + "TASKKILL /F /IM ProtonVPN.exe" + ] + }, + "Virtual": { + "Arguments": "/exenoui /exelog C:\\Windows\\Temp\\ProtonVPN.log /qn /exenoupdates", + "PostInstall": [ + "TASKKILL /F /IM ProtonVPN.exe" + ] + } + } +} \ No newline at end of file From a174701bf73ba1b374bf1ffa7e4b423e3af9f24c Mon Sep 17 00:00:00 2001 From: Aaron Parker Date: Mon, 11 Mar 2024 15:02:18 +1100 Subject: [PATCH 5/5] Update URLs #567 --- Evergreen/Manifests/MicrosoftODBCDriverForSQLServer.json | 6 +++--- Evergreen/Manifests/MicrosoftOLEDBDriverForSQLServer.json | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Evergreen/Manifests/MicrosoftODBCDriverForSQLServer.json b/Evergreen/Manifests/MicrosoftODBCDriverForSQLServer.json index 7192b8b0..7d610b78 100644 --- a/Evergreen/Manifests/MicrosoftODBCDriverForSQLServer.json +++ b/Evergreen/Manifests/MicrosoftODBCDriverForSQLServer.json @@ -7,9 +7,9 @@ }, "Download": { "Uri": [ - "https://go.microsoft.com/fwlink/?linkid=2242886", - "https://go.microsoft.com/fwlink/?linkid=2242980", - "https://go.microsoft.com/fwlink/?linkid=2243268" + "https://go.microsoft.com/fwlink/?linkid=2249006", + "https://go.microsoft.com/fwlink/?linkid=2249005", + "https://go.microsoft.com/fwlink/?linkid=2248720" ], "MaximumRedirection": 3, "DatePattern": "d/M/yyyy" diff --git a/Evergreen/Manifests/MicrosoftOLEDBDriverForSQLServer.json b/Evergreen/Manifests/MicrosoftOLEDBDriverForSQLServer.json index f0f258fb..04a78707 100644 --- a/Evergreen/Manifests/MicrosoftOLEDBDriverForSQLServer.json +++ b/Evergreen/Manifests/MicrosoftOLEDBDriverForSQLServer.json @@ -7,9 +7,9 @@ }, "Download": { "Uri": [ - "https://go.microsoft.com/fwlink/?linkid=2238602", - "https://go.microsoft.com/fwlink/?linkid=2238512", - "https://go.microsoft.com/fwlink/?linkid=2238411" + "https://go.microsoft.com/fwlink/?linkid=2248728", + "https://go.microsoft.com/fwlink/?linkid=2249102", + "https://go.microsoft.com/fwlink/?linkid=2249103" ], "MaximumRedirection": 3, "DatePattern": "d/M/yyyy"