mirror of
https://github.com/actions/runner-images.git
synced 2025-12-14 22:05:17 +00:00
small changes for scripts.
This commit is contained in:
@@ -166,9 +166,9 @@ function Start-DownloadWithRetry
|
||||
param (
|
||||
[Parameter(Mandatory)]
|
||||
[string] $Url,
|
||||
[string] $DownloadPath = "${env:Temp}",
|
||||
[Parameter(Mandatory)]
|
||||
[string] $Name,
|
||||
[string] $DownloadPath = "${env:Temp}",
|
||||
[int] $retries = 20
|
||||
)
|
||||
$FilePath = Join-Path $DownloadPath $Name
|
||||
|
||||
@@ -6,6 +6,7 @@ Import-Module -Name ImageHelpers -Force;
|
||||
|
||||
function Download-FullSQLPackage {
|
||||
param(
|
||||
[Parameter(Mandatory)]
|
||||
[String]$InstallerPath,
|
||||
[String]$DownloadPath,
|
||||
[String]$Arguments = ("/MEDIAPATH=$DownloadPath", "/MEDIATYPE=Core","/Action=Download", "/QUIET")
|
||||
@@ -26,6 +27,7 @@ function Download-FullSQLPackage {
|
||||
|
||||
function Unpack-SQLInstaller {
|
||||
param(
|
||||
[Parameter(Mandatory)]
|
||||
[String]$InstallPath,
|
||||
[String]$Arguments = ("/Q", "/IACCEPTSQLSERVERLICENSETERMS")
|
||||
)
|
||||
@@ -46,6 +48,7 @@ function Unpack-SQLInstaller {
|
||||
|
||||
function Start-Installer {
|
||||
param(
|
||||
[Parameter(Mandatory)]
|
||||
[String]$InstallerPath,
|
||||
[String]$Arguments = ("/Q", "/IACCEPTSQLSERVERLICENSETERMS", "/Action=Install", "/INSTANCEID=SQL2019", "/INSTANCENAME=SQL2019", "/SECURITYMODE=SQL", "/SAPWD=P@ssword!!", "/TCPENABLED=1")
|
||||
)
|
||||
@@ -69,7 +72,7 @@ $setupPath = Join-Path $downloadPath "SQLEXPR_x64_ENU"
|
||||
#Create directory for temporary files
|
||||
md $downloadPath
|
||||
Set-Location -Path $downloadPath
|
||||
$installerPath = Start-DownloadWithRetry -Url "https://go.microsoft.com/fwlink/?linkid=866658" -DownloadPath $downloadPath -Name "SQL2019-SSEI-Expr.exe"
|
||||
$installerPath = Start-DownloadWithRetry -Url $installerUrl -DownloadPath $downloadPath -Name "SQL2019-SSEI-Expr.exe"
|
||||
Download-FullSQLPackage -InstallerPath $installerPath -DownloadPath $downloadPath
|
||||
Unpack-SQLInstaller -InstallPath "$setupPath.exe"
|
||||
$resultPath = Join-Path $setupPath "SETUP.exe"
|
||||
|
||||
Reference in New Issue
Block a user