mirror of
https://github.com/actions/runner-images.git
synced 2025-12-13 20:56:47 +00:00
[Windows] Add SQL OLEDB Driver to win19 and win22 (#4893)
* Add SQL OLEDB Driver to win19 and win22 * Update installation, improve install-binary and resolve comments * Slight improvement of the installation. Fixing argument list for the WebPI * Fix argument list for AzureCLI * Fix software report
This commit is contained in:
@@ -45,7 +45,10 @@ function Install-Binary
|
|||||||
$fileExtension = ([System.IO.Path]::GetExtension($Name)).Replace(".", "")
|
$fileExtension = ([System.IO.Path]::GetExtension($Name)).Replace(".", "")
|
||||||
if ($fileExtension -eq "msi")
|
if ($fileExtension -eq "msi")
|
||||||
{
|
{
|
||||||
$ArgumentList = ('/i', $filePath, '/QN', '/norestart')
|
if (-not $ArgumentList)
|
||||||
|
{
|
||||||
|
$ArgumentList = ('/i', $filePath, '/QN', '/norestart')
|
||||||
|
}
|
||||||
$filePath = "msiexec.exe"
|
$filePath = "msiexec.exe"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
Write-Host "Install the latest Azure CLI release"
|
Write-Host "Install the latest Azure CLI release"
|
||||||
$azCliUrl = "https://aka.ms/installazurecliwindows"
|
$azCliUrl = "https://aka.ms/installazurecliwindows"
|
||||||
Install-Binary -Url $azCliUrl -Name "azure-cli.msi" -ArgumentList ("/qn", "/norestart")
|
Install-Binary -Url $azCliUrl -Name "azure-cli.msi"
|
||||||
|
|
||||||
$azureCliExtensionPath = Join-Path $Env:CommonProgramFiles 'AzureCliExtensionDirectory'
|
$azureCliExtensionPath = Join-Path $Env:CommonProgramFiles 'AzureCliExtensionDirectory'
|
||||||
$null = New-Item -ItemType "Directory" -Path $azureCliExtensionPath
|
$null = New-Item -ItemType "Directory" -Path $azureCliExtensionPath
|
||||||
|
|||||||
8
images/win/scripts/Installers/Install-SQLOLEDBDriver.ps1
Normal file
8
images/win/scripts/Installers/Install-SQLOLEDBDriver.ps1
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
################################################################################
|
||||||
|
## File: Install-SQLOLEDBDriver.ps1
|
||||||
|
## Desc: Install SQL OLEDB Driver
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
$binaryDownloadPath = Start-DownloadWithRetry "https://go.microsoft.com/fwlink/?linkid=2183083" "msoledbsql.msi"
|
||||||
|
$ArgumentList = ("/i", "$binaryDownloadPath", "ADDLOCAL=ALL", "IACCEPTMSOLEDBSQLLICENSETERMS=YES", "/qn")
|
||||||
|
Install-Binary -FilePath msiexec.exe -ArgumentList $ArgumentList
|
||||||
@@ -6,6 +6,6 @@
|
|||||||
# Download and install WebPlatformInstaller
|
# Download and install WebPlatformInstaller
|
||||||
$webPlatformInstallerFile = "WebPlatformInstaller_x64_en-US.msi"
|
$webPlatformInstallerFile = "WebPlatformInstaller_x64_en-US.msi"
|
||||||
$webPlatformInstallerUrl = "http://go.microsoft.com/fwlink/?LinkId=287166"
|
$webPlatformInstallerUrl = "http://go.microsoft.com/fwlink/?LinkId=287166"
|
||||||
Install-Binary -Url $webPlatformInstallerUrl -Name $webPlatformInstallerFile -ArgumentList ("/silent", "/install")
|
Install-Binary -Url $webPlatformInstallerUrl -Name $webPlatformInstallerFile
|
||||||
|
|
||||||
Invoke-PesterTests -TestFile "Tools" -TestName "WebPlatformInstaller"
|
Invoke-PesterTests -TestFile "Tools" -TestName "WebPlatformInstaller"
|
||||||
@@ -215,14 +215,20 @@ $markdown += New-MDHeader "Databases" -Level 3
|
|||||||
$markdown += Build-DatabasesMarkdown
|
$markdown += Build-DatabasesMarkdown
|
||||||
|
|
||||||
$markdown += New-MDHeader "Database tools" -Level 3
|
$markdown += New-MDHeader "Database tools" -Level 3
|
||||||
$markdown += New-MDList -Style Unordered -Lines (@(
|
$databaseTools = @(
|
||||||
(Get-AzCosmosDBEmulatorVersion),
|
(Get-AzCosmosDBEmulatorVersion),
|
||||||
(Get-DacFxVersion),
|
(Get-DacFxVersion),
|
||||||
(Get-MySQLVersion),
|
(Get-MySQLVersion),
|
||||||
(Get-SQLPSVersion)
|
(Get-SQLPSVersion)
|
||||||
) | Sort-Object
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (-not (Test-IsWin16))
|
||||||
|
{
|
||||||
|
$databaseTools += Get-SQLOLEDBDriverVersion
|
||||||
|
}
|
||||||
|
|
||||||
|
$markdown += New-MDList -Style Unordered -Lines ($databaseTools | Sort-Object)
|
||||||
|
|
||||||
$markdown += Build-WebServersSection
|
$markdown += Build-WebServersSection
|
||||||
|
|
||||||
$vs = Get-VisualStudioVersion
|
$vs = Get-VisualStudioVersion
|
||||||
|
|||||||
@@ -111,6 +111,11 @@ function Get-MySQLVersion {
|
|||||||
return "MySQL $mysqlVersion"
|
return "MySQL $mysqlVersion"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function Get-SQLOLEDBDriverVersion {
|
||||||
|
$SQLOLEDBDriverVersion = (Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSOLEDBSQL' InstalledVersion).InstalledVersion
|
||||||
|
return "SQL OLEDB Driver $SQLOLEDBDriverVersion"
|
||||||
|
}
|
||||||
|
|
||||||
function Get-MercurialVersion {
|
function Get-MercurialVersion {
|
||||||
($(hg --version) | Out-String) -match "version (?<version>\d+\.\d+\.?\d*)" | Out-Null
|
($(hg --version) | Out-String) -match "version (?<version>\d+\.\d+\.?\d*)" | Out-Null
|
||||||
$mercurialVersion = $Matches.Version
|
$mercurialVersion = $Matches.Version
|
||||||
|
|||||||
@@ -201,3 +201,9 @@ Describe "Kotlin" {
|
|||||||
"$toolName -version" | Should -ReturnZeroExitCode
|
"$toolName -version" | Should -ReturnZeroExitCode
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Describe "SQL OLEDB Driver" {
|
||||||
|
It "SQL OLEDB Driver" {
|
||||||
|
"HKLM:\SOFTWARE\Microsoft\MSOLEDBSQL" | Should -Exist
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -229,6 +229,7 @@
|
|||||||
"{{ template_dir }}/scripts/Installers/Install-DACFx.ps1",
|
"{{ template_dir }}/scripts/Installers/Install-DACFx.ps1",
|
||||||
"{{ template_dir }}/scripts/Installers/Install-MysqlCli.ps1",
|
"{{ template_dir }}/scripts/Installers/Install-MysqlCli.ps1",
|
||||||
"{{ template_dir }}/scripts/Installers/Install-SQLPowerShellTools.ps1",
|
"{{ template_dir }}/scripts/Installers/Install-SQLPowerShellTools.ps1",
|
||||||
|
"{{ template_dir }}/scripts/Installers/Install-SQLOLEDBDriver.ps1",
|
||||||
"{{ template_dir }}/scripts/Installers/Install-DotnetSDK.ps1",
|
"{{ template_dir }}/scripts/Installers/Install-DotnetSDK.ps1",
|
||||||
"{{ template_dir }}/scripts/Installers/Install-Mingw64.ps1",
|
"{{ template_dir }}/scripts/Installers/Install-Mingw64.ps1",
|
||||||
"{{ template_dir }}/scripts/Installers/Install-Haskell.ps1",
|
"{{ template_dir }}/scripts/Installers/Install-Haskell.ps1",
|
||||||
|
|||||||
@@ -228,6 +228,7 @@
|
|||||||
"{{ template_dir }}/scripts/Installers/Install-DACFx.ps1",
|
"{{ template_dir }}/scripts/Installers/Install-DACFx.ps1",
|
||||||
"{{ template_dir }}/scripts/Installers/Install-MysqlCli.ps1",
|
"{{ template_dir }}/scripts/Installers/Install-MysqlCli.ps1",
|
||||||
"{{ template_dir }}/scripts/Installers/Install-SQLPowerShellTools.ps1",
|
"{{ template_dir }}/scripts/Installers/Install-SQLPowerShellTools.ps1",
|
||||||
|
"{{ template_dir }}/scripts/Installers/Install-SQLOLEDBDriver.ps1",
|
||||||
"{{ template_dir }}/scripts/Installers/Install-DotnetSDK.ps1",
|
"{{ template_dir }}/scripts/Installers/Install-DotnetSDK.ps1",
|
||||||
"{{ template_dir }}/scripts/Installers/Install-Mingw64.ps1",
|
"{{ template_dir }}/scripts/Installers/Install-Mingw64.ps1",
|
||||||
"{{ template_dir }}/scripts/Installers/Install-Haskell.ps1",
|
"{{ template_dir }}/scripts/Installers/Install-Haskell.ps1",
|
||||||
|
|||||||
Reference in New Issue
Block a user