Do not use CDN + download latest CUs etc
Install SqlServer module in PS7
add overrides for PS7 (to support same command)

---------

Co-authored-by: freddydk <freddydk@users.noreply.github.com>
This commit is contained in:
Freddy Kristiansen 2024-04-28 09:56:30 +02:00 коммит произвёл GitHub
Родитель fdbb3372ad
Коммит 049eed4779
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
13 изменённых файлов: 63 добавлений и 72 удалений

2
.github/workflows/BuildMissingImages.yaml поставляемый
Просмотреть файл

@ -45,9 +45,7 @@ jobs:
$neededBcTags = $serverCoreTags | ForEach-Object {
$osVersion = [System.Version](($webclient.DownloadString("https://mcr.microsoft.com/v2/dotnet/framework/runtime/manifests/4.8-windowsservercore-$_") | ConvertFrom-Json).history[0].v1Compatibility | ConvertFrom-Json)."os.version"
"$osVersion-$genericTag|mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-$_|$_"
"$osVersion-$genericTag-24|mcr.microsoft.com/windows/servercore:$_|$_"
"$osVersion-$genericTag-filesonly|mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-$_|$_"
"$osVersion-$genericTag-24-filesonly|mcr.microsoft.com/windows/servercore:$_|$_"
}
Write-Host "Needed Tags ($($neededBcTags.Count))"
$neededBcTags | ForEach-Object { Write-Host "- $_" }

Просмотреть файл

@ -45,7 +45,7 @@ RUN Write-Host ('FilesOnly='+$env:filesOnly); \
$process = Start-Process -FilePath 'temp\SQL2019-SSEI-Expr.exe' -ArgumentList /Action=Install, /ConfigurationFile=$configFileLocation, /IAcceptSQLServerLicenseTerms, /Quiet -NoNewWindow -Wait -PassThru; \
if (($null -ne $process.ExitCode) -and ($process.ExitCode -ne 0)) { Write-Host ('EXIT CODE '+$process.ExitCode) } else { Write-Host 'Success' }; \
Write-Host 'Downloading SQL Server 2019 Cumulative Update'; \
Invoke-RestMethod -Method Get -UseBasicParsing -Uri 'https://download.microsoft.com/download/6/e/7/6e72dddf-dfa4-4889-bc3d-e5d3a0fd11ce/SQLServer2019-KB5033688-x64.exe' -OutFile 'temp\SQL2019CU.exe'; \
Invoke-RestMethod -Method Get -UseBasicParsing -Uri 'https://download.microsoft.com/download/6/e/7/6e72dddf-dfa4-4889-bc3d-e5d3a0fd11ce/SQLServer2019-KB5035123-x64.exe' -OutFile 'temp\SQL2019CU.exe'; \
Write-Host 'Installing SQL Server 2019 Cumulative Update'; \
$process = Start-Process -FilePath 'temp\SQL2019CU.exe' -ArgumentList /Action=Patch, /Quiet, /IAcceptSQLServerLicenseTerms, /AllInstances, /SuppressPrivacyStatementNotice -NoNewWindow -Wait -PassThru; \
if (($null -ne $process.ExitCode) -and ($process.ExitCode -ne 0)) { Write-Host ('EXIT CODE '+$process.ExitCode) } else { Write-Host 'Success' }; \
@ -93,12 +93,12 @@ RUN Write-Host ('FilesOnly='+$env:filesOnly); \
$process = start-process -Wait -FilePath 'temp\OpenXMLSDKV25.msi' -ArgumentList /quiet, /qn, /passive ; \
if (($null -ne $process.ExitCode) -and ($process.ExitCode -ne 0)) { Write-Host ('EXIT CODE '+$process.ExitCode) } else { Write-Host 'Success' }; \
Write-Host 'Downloading dotnet 6'; \
Invoke-RestMethod -Method Get -UseBasicParsing -Uri 'https://download.visualstudio.microsoft.com/download/pr/04389c24-12a9-4e0e-8498-31989f30bb22/141aef28265938153eefad0f2398a73b/dotnet-hosting-6.0.27-win.exe' -OutFile 'temp\DotNet6-Win.exe' ; \
Invoke-RestMethod -Method Get -UseBasicParsing -Uri 'https://download.visualstudio.microsoft.com/download/pr/b54e1bdd-2525-4414-a93a-27c62b329e47/c34cf7303786e74a20f7125475ffa511/dotnet-hosting-6.0.29-win.exe' -OutFile 'temp\DotNet6-Win.exe' ; \
Write-Host 'Installing dotnet 6'; \
$process = start-process -Wait -FilePath 'temp\DotNet6-Win.exe' -ArgumentList /quiet ; \
if (($null -ne $process.ExitCode) -and ($process.ExitCode -ne 0)) { Write-Host ('EXIT CODE '+$process.ExitCode) } else { Write-Host 'Success' }; \
Write-Host 'Downloading dotnet 8'; \
Invoke-RestMethod -Method Get -UseBasicParsing -Uri 'https://download.visualstudio.microsoft.com/download/pr/98ff0a08-a283-428f-8e54-19841d97154c/8c7d5f9600eadf264f04c82c813b7aab/dotnet-hosting-8.0.2-win.exe' -OutFile 'temp\DotNet8-Win.exe' ; \
Invoke-RestMethod -Method Get -UseBasicParsing -Uri 'https://download.visualstudio.microsoft.com/download/pr/00397fee-1bd9-44ef-899b-4504b26e6e96/ab9c73409659f3238d33faee304a8b7c/dotnet-hosting-8.0.4-win.exe' -OutFile 'temp\DotNet8-Win.exe' ; \
Write-Host 'Installing dotnet 8'; \
$process = start-process -Wait -FilePath 'temp\DotNet8-Win.exe' -ArgumentList /quiet ; \
if (($null -ne $process.ExitCode) -and ($process.ExitCode -ne 0)) { Write-Host ('EXIT CODE '+$process.ExitCode) } else { Write-Host 'Success' }; \
@ -131,6 +131,10 @@ RUN Write-Host ('FilesOnly='+$env:filesOnly); \
Write-Host 'Remove x86 dotnet files'; \
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue 'C:\Program Files (x86)\dotnet'
RUN Write-Host 'Installing SqlServer Module in PowerShell 7'; \
pwsh -Command 'Install-Module -Name SqlServer -RequiredVersion 22.2.0 -Scope AllUsers -Force'; \
Write-Host 'Done'
HEALTHCHECK --interval=30s --timeout=10s CMD [ "powershell", ".\\Run\\HealthCheck.ps1" ]
EXPOSE 1433 80 8080 443 7045-7049 7083

Просмотреть файл

@ -33,10 +33,10 @@ Start-Service -Name $SqlBrowserServiceName -ErrorAction Ignore
Start-Service -Name $SqlWriterServiceName -ErrorAction Ignore
Start-Service -Name $SqlServiceName -ErrorAction Ignore
InstallPrerequisite -Name "Url Rewrite" -MsiPath "$NavDvdPath\Prerequisite Components\IIS URL Rewrite Module\rewrite_2.0_rtw_x64.msi" -MsiUrl "https://bcartifacts.azureedge.net/prerequisites/rewrite_2.0_rtw_x64.msi"
InstallPrerequisite -Name "SQL Clr Types" -MsiPath "$NavDvdPath\Prerequisite Components\Microsoft Report Viewer\SQLSysClrTypes.msi" -MsiUrl "https://bcartifacts.azureedge.net/prerequisites/SQLSysClrTypes.msi"
InstallPrerequisite -Name "Report Viewer" -MsiPath "$NavDvdPath\Prerequisite Components\Microsoft Report Viewer\ReportViewer.msi" -MsiUrl "https://bcartifacts.azureedge.net/prerequisites/ReportViewer.msi"
InstallPrerequisite -Name "OpenXML" -MsiPath "$NavDvdPath\Prerequisite Components\Open XML SDK 2.5 for Microsoft Office\OpenXMLSDKv25.msi" -MsiUrl "https://bcartifacts.azureedge.net/prerequisites/OpenXMLSDKv25.msi"
InstallPrerequisite -Name "Url Rewrite" -MsiPath "$NavDvdPath\Prerequisite Components\IIS URL Rewrite Module\rewrite_2.0_rtw_x64.msi" -MsiUrl "https://bcartifacts.blob.core.windows.net/prerequisites/rewrite_2.0_rtw_x64.msi"
InstallPrerequisite -Name "SQL Clr Types" -MsiPath "$NavDvdPath\Prerequisite Components\Microsoft Report Viewer\SQLSysClrTypes.msi" -MsiUrl "https://bcartifacts.blob.core.windows.net/prerequisites/SQLSysClrTypes.msi"
InstallPrerequisite -Name "Report Viewer" -MsiPath "$NavDvdPath\Prerequisite Components\Microsoft Report Viewer\ReportViewer.msi" -MsiUrl "https://bcartifacts.blob.core.windows.net/prerequisites/ReportViewer.msi"
InstallPrerequisite -Name "OpenXML" -MsiPath "$NavDvdPath\Prerequisite Components\Open XML SDK 2.5 for Microsoft Office\OpenXMLSDKv25.msi" -MsiUrl "https://bcartifacts.blob.core.windows.net/prerequisites/OpenXMLSDKv25.msi"
# start IIS services
Write-Host "Starting Internet Information Server"

Просмотреть файл

@ -27,14 +27,14 @@ You must map a folder on the host with the NAVDVD content to $navDvdPath"
exit 1
}
InstallPrerequisite -Name "Url Rewrite" -MsiPath "$NavDvdPath\Prerequisite Components\IIS URL Rewrite Module\rewrite_2.0_rtw_x64.msi" -MsiUrl "https://bcartifacts.azureedge.net/prerequisites/rewrite_2.0_rtw_x64.msi"
InstallPrerequisite -Name "OpenXML" -MsiPath "$NavDvdPath\Prerequisite Components\Open XML SDK 2.5 for Microsoft Office\OpenXMLSDKv25.msi" -MsiUrl "https://bcartifacts.azureedge.net/prerequisites/OpenXMLSDKv25.msi"
InstallPrerequisite -Name "Url Rewrite" -MsiPath "$NavDvdPath\Prerequisite Components\IIS URL Rewrite Module\rewrite_2.0_rtw_x64.msi" -MsiUrl "https://bcartifacts.blob.core.windows.net/prerequisites/rewrite_2.0_rtw_x64.msi"
InstallPrerequisite -Name "OpenXML" -MsiPath "$NavDvdPath\Prerequisite Components\Open XML SDK 2.5 for Microsoft Office\OpenXMLSDKv25.msi" -MsiUrl "https://bcartifacts.blob.core.windows.net/prerequisites/OpenXMLSDKv25.msi"
if (Test-Path "$NavDvdPath\Prerequisite Components\DotNetCore") {
$dotnetCoreExe = (Get-ChildItem -Path "$NavDvdPath\Prerequisite Components\DotNetCore" -Filter "*.exe").FullName
} else {
Write-Host "Downloading DotNetCore"
$dotnetCoreDownloadUrl = "https://bcartifacts.azureedge.net/prerequisites/DotNetCore.1.0.4_1.1.1-WindowsHosting.exe"
$dotnetCoreDownloadUrl = "https://bcartifacts.blob.core.windows.net/prerequisites/DotNetCore.1.0.4_1.1.1-WindowsHosting.exe"
$dotnetCoreExe = "$NavDvdPath\Prerequisite Components\DotNetCore\DotNetCore.1.0.4_1.1.1-WindowsHosting.exe"
$dotnetCoreFolder = [System.IO.Path]::GetDirectoryName($dotnetCoreExe)
if (!(Test-Path $dotnetCoreFolder)) {

Просмотреть файл

@ -27,14 +27,14 @@ You must map a folder on the host with the NAVDVD content to $navDvdPath"
exit 1
}
InstallPrerequisite -Name "Url Rewrite" -MsiPath "$NavDvdPath\Prerequisite Components\IIS URL Rewrite Module\rewrite_2.0_rtw_x64.msi" -MsiUrl "https://bcartifacts.azureedge.net/prerequisites/rewrite_2.0_rtw_x64.msi"
InstallPrerequisite -Name "OpenXML" -MsiPath "$NavDvdPath\Prerequisite Components\Open XML SDK 2.5 for Microsoft Office\OpenXMLSDKv25.msi" -MsiUrl "https://bcartifacts.azureedge.net/prerequisites/OpenXMLSDKv25.msi"
InstallPrerequisite -Name "Url Rewrite" -MsiPath "$NavDvdPath\Prerequisite Components\IIS URL Rewrite Module\rewrite_2.0_rtw_x64.msi" -MsiUrl "https://bcartifacts.blob.core.windows.net/prerequisites/rewrite_2.0_rtw_x64.msi"
InstallPrerequisite -Name "OpenXML" -MsiPath "$NavDvdPath\Prerequisite Components\Open XML SDK 2.5 for Microsoft Office\OpenXMLSDKv25.msi" -MsiUrl "https://bcartifacts.blob.core.windows.net/prerequisites/OpenXMLSDKv25.msi"
if (Test-Path "$NavDvdPath\Prerequisite Components\DotNetCore") {
$dotnetCoreExe = (Get-ChildItem -Path "$NavDvdPath\Prerequisite Components\DotNetCore" -Filter "*.exe").FullName
} else {
Write-Host "Downloading DotNetCore"
$dotnetCoreDownloadUrl = "https://bcartifacts.azureedge.net/prerequisites/DotNetCore.1.0.4_1.1.1-WindowsHosting.exe"
$dotnetCoreDownloadUrl = "https://bcartifacts.blob.core.windows.net/prerequisites/DotNetCore.1.0.4_1.1.1-WindowsHosting.exe"
$dotnetCoreExe = "$NavDvdPath\Prerequisite Components\DotNetCore\DotNetCore.1.0.4_1.1.1-WindowsHosting.exe"
$dotnetCoreFolder = [System.IO.Path]::GetDirectoryName($dotnetCoreExe)
if (!(Test-Path $dotnetCoreFolder)) {

Просмотреть файл

@ -27,14 +27,14 @@ You must map a folder on the host with the NAVDVD content to $navDvdPath"
exit 1
}
InstallPrerequisite -Name "Url Rewrite" -MsiPath "$NavDvdPath\Prerequisite Components\IIS URL Rewrite Module\rewrite_2.0_rtw_x64.msi" -MsiUrl "https://bcartifacts.azureedge.net/prerequisites/rewrite_2.0_rtw_x64.msi"
InstallPrerequisite -Name "OpenXML" -MsiPath "$NavDvdPath\Prerequisite Components\Open XML SDK 2.5 for Microsoft Office\OpenXMLSDKv25.msi" -MsiUrl "https://bcartifacts.azureedge.net/prerequisites/OpenXMLSDKv25.msi"
InstallPrerequisite -Name "Url Rewrite" -MsiPath "$NavDvdPath\Prerequisite Components\IIS URL Rewrite Module\rewrite_2.0_rtw_x64.msi" -MsiUrl "https://bcartifacts.blob.core.windows.net/prerequisites/rewrite_2.0_rtw_x64.msi"
InstallPrerequisite -Name "OpenXML" -MsiPath "$NavDvdPath\Prerequisite Components\Open XML SDK 2.5 for Microsoft Office\OpenXMLSDKv25.msi" -MsiUrl "https://bcartifacts.blob.core.windows.net/prerequisites/OpenXMLSDKv25.msi"
if (Test-Path "$NavDvdPath\Prerequisite Components\DotNetCore") {
$dotnetCoreExe = (Get-ChildItem -Path "$NavDvdPath\Prerequisite Components\DotNetCore" -Filter "*.exe").FullName
} else {
Write-Host "Downloading DotNetCore"
$dotnetCoreDownloadUrl = "https://bcartifacts.azureedge.net/prerequisites/DotNetCore.1.0.4_1.1.1-WindowsHosting.exe"
$dotnetCoreDownloadUrl = "https://bcartifacts.blob.core.windows.net/prerequisites/DotNetCore.1.0.4_1.1.1-WindowsHosting.exe"
$dotnetCoreExe = "$NavDvdPath\Prerequisite Components\DotNetCore\DotNetCore.1.0.4_1.1.1-WindowsHosting.exe"
$dotnetCoreFolder = [System.IO.Path]::GetDirectoryName($dotnetCoreExe)
if (!(Test-Path $dotnetCoreFolder)) {

Просмотреть файл

@ -27,14 +27,14 @@ You must map a folder on the host with the NAVDVD content to $navDvdPath"
exit 1
}
InstallPrerequisite -Name "Url Rewrite" -MsiPath "$NavDvdPath\Prerequisite Components\IIS URL Rewrite Module\rewrite_2.0_rtw_x64.msi" -MsiUrl "https://bcartifacts.azureedge.net/prerequisites/rewrite_2.0_rtw_x64.msi"
InstallPrerequisite -Name "OpenXML" -MsiPath "$NavDvdPath\Prerequisite Components\Open XML SDK 2.5 for Microsoft Office\OpenXMLSDKv25.msi" -MsiUrl "https://bcartifacts.azureedge.net/prerequisites/OpenXMLSDKv25.msi"
InstallPrerequisite -Name "Url Rewrite" -MsiPath "$NavDvdPath\Prerequisite Components\IIS URL Rewrite Module\rewrite_2.0_rtw_x64.msi" -MsiUrl "https://bcartifacts.blob.core.windows.net/prerequisites/rewrite_2.0_rtw_x64.msi"
InstallPrerequisite -Name "OpenXML" -MsiPath "$NavDvdPath\Prerequisite Components\Open XML SDK 2.5 for Microsoft Office\OpenXMLSDKv25.msi" -MsiUrl "https://bcartifacts.blob.core.windows.net/prerequisites/OpenXMLSDKv25.msi"
if (Test-Path "$NavDvdPath\Prerequisite Components\DotNetCore") {
$dotnetCoreExe = (Get-ChildItem -Path "$NavDvdPath\Prerequisite Components\DotNetCore" -Filter "*.exe").FullName
} else {
Write-Host "Downloading DotNetCore"
$dotnetCoreDownloadUrl = "https://bcartifacts.azureedge.net/prerequisites/DotNetCore.1.0.4_1.1.1-WindowsHosting.exe"
$dotnetCoreDownloadUrl = "https://bcartifacts.blob.core.windows.net/prerequisites/DotNetCore.1.0.4_1.1.1-WindowsHosting.exe"
$dotnetCoreExe = "$NavDvdPath\Prerequisite Components\DotNetCore\DotNetCore.1.0.4_1.1.1-WindowsHosting.exe"
$dotnetCoreFolder = [System.IO.Path]::GetDirectoryName($dotnetCoreExe)
if (!(Test-Path $dotnetCoreFolder)) {

Просмотреть файл

@ -34,10 +34,10 @@ Start-Service -Name $SqlWriterServiceName -ErrorAction Ignore
Start-Service -Name $SqlServiceName -ErrorAction Ignore
# Prerequisites
InstallPrerequisite -Name "Url Rewrite" -MsiPath "$NavDvdPath\Prerequisite Components\IIS URL Rewrite Module\rewrite_2.0_rtw_x64.msi" -MsiUrl "https://bcartifacts.azureedge.net/prerequisites/rewrite_2.0_rtw_x64.msi"
InstallPrerequisite -Name "SQL Clr Types" -MsiPath "$NavDvdPath\Prerequisite Components\Microsoft Report Viewer 2015\SQLSysClrTypes.msi" -MsiUrl "https://bcartifacts.azureedge.net/prerequisites/SQLSysClrTypes.msi"
InstallPrerequisite -Name "Report Viewer" -MsiPath "$NavDvdPath\Prerequisite Components\Microsoft Report Viewer 2015\ReportViewer.msi" -MsiUrl "https://bcartifacts.azureedge.net/prerequisites/ReportViewer.msi"
InstallPrerequisite -Name "OpenXML" -MsiPath "$NavDvdPath\Prerequisite Components\Open XML SDK 2.5 for Microsoft Office\OpenXMLSDKv25.msi" -MsiUrl "https://bcartifacts.azureedge.net/prerequisites/OpenXMLSDKv25.msi"
InstallPrerequisite -Name "Url Rewrite" -MsiPath "$NavDvdPath\Prerequisite Components\IIS URL Rewrite Module\rewrite_2.0_rtw_x64.msi" -MsiUrl "https://bcartifacts.blob.core.windows.net/prerequisites/rewrite_2.0_rtw_x64.msi"
InstallPrerequisite -Name "SQL Clr Types" -MsiPath "$NavDvdPath\Prerequisite Components\Microsoft Report Viewer 2015\SQLSysClrTypes.msi" -MsiUrl "https://bcartifacts.blob.core.windows.net/prerequisites/SQLSysClrTypes.msi"
InstallPrerequisite -Name "Report Viewer" -MsiPath "$NavDvdPath\Prerequisite Components\Microsoft Report Viewer 2015\ReportViewer.msi" -MsiUrl "https://bcartifacts.blob.core.windows.net/prerequisites/ReportViewer.msi"
InstallPrerequisite -Name "OpenXML" -MsiPath "$NavDvdPath\Prerequisite Components\Open XML SDK 2.5 for Microsoft Office\OpenXMLSDKv25.msi" -MsiUrl "https://bcartifacts.blob.core.windows.net/prerequisites/OpenXMLSDKv25.msi"
# start IIS services
Write-Host "Starting Internet Information Server"

Просмотреть файл

@ -634,11 +634,13 @@ function Download-File {
)
$replaceUrls = @{
"https://go.microsoft.com/fwlink/?LinkID=844461" = "https://bcartifacts.azureedge.net/prerequisites/DotNetCore.1.0.4_1.1.1-WindowsHosting.exe"
"https://download.microsoft.com/download/C/9/E/C9E8180D-4E51-40A6-A9BF-776990D8BCA9/rewrite_amd64.msi" = "https://bcartifacts.azureedge.net/prerequisites/rewrite_2.0_rtw_x64.msi"
"https://download.microsoft.com/download/5/5/3/553C731E-9333-40FB-ADE3-E02DC9643B31/OpenXMLSDKV25.msi" = "https://bcartifacts.azureedge.net/prerequisites/OpenXMLSDKv25.msi"
"https://download.microsoft.com/download/A/1/2/A129F694-233C-4C7C-860F-F73139CF2E01/ENU/x86/ReportViewer.msi" = "https://bcartifacts.azureedge.net/prerequisites/ReportViewer.msi"
"https://download.microsoft.com/download/1/3/0/13089488-91FC-4E22-AD68-5BE58BD5C014/ENU/x86/SQLSysClrTypes.msi" = "https://bcartifacts.azureedge.net/prerequisites/SQLSysClrTypes.msi"
"https://go.microsoft.com/fwlink/?LinkID=844461" = "https://bcartifacts.blob.core.windows.net/prerequisites/DotNetCore.1.0.4_1.1.1-WindowsHosting.exe"
"https://download.microsoft.com/download/C/9/E/C9E8180D-4E51-40A6-A9BF-776990D8BCA9/rewrite_amd64.msi" = "https://bcartifacts.blob.core.windows.net/prerequisites/rewrite_2.0_rtw_x64.msi"
"https://download.microsoft.com/download/5/5/3/553C731E-9333-40FB-ADE3-E02DC9643B31/OpenXMLSDKV25.msi" = "https://bcartifacts.blob.core.windows.net/prerequisites/OpenXMLSDKv25.msi"
"https://download.microsoft.com/download/A/1/2/A129F694-233C-4C7C-860F-F73139CF2E01/ENU/x86/ReportViewer.msi" = "https://bcartifacts.blob.core.windows.net/prerequisites/ReportViewer.msi"
"https://download.microsoft.com/download/1/3/0/13089488-91FC-4E22-AD68-5BE58BD5C014/ENU/x86/SQLSysClrTypes.msi" = "https://bcartifacts.blob.core.windows.net/prerequisites/SQLSysClrTypes.msi"
"https://download.microsoft.com/download/3/A/6/3A632674-A016-4E31-A675-94BE390EA739/ENU/x64/sqlncli.msi" = "https://bcartifacts.blob.core.windows.net/prerequisites/sqlncli.msi"
"https://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x86.exe" = "https://bcartifacts.blob.core.windows.net/prerequisites/vcredist_x86.exe"
}
if ($replaceUrls.ContainsKey($sourceUrl)) {
@ -695,16 +697,10 @@ function Download-Artifacts {
if (-not $exists) {
Write-Host "Downloading application artifact $($appUri.AbsolutePath)"
$appZip = Join-Path ([System.IO.Path]::GetTempPath()) "$([Guid]::NewGuid().ToString()).zip"
try {
Download-File -sourceUrl $artifactUrl -destinationFile $appZip
}
catch {
if ($artifactUrl.Contains('.azureedge.net/')) {
$artifactUrl = $artifactUrl.Replace('.azureedge.net/','.blob.core.windows.net/')
Write-Host "Retrying download..."
Download-File -sourceUrl $artifactUrl -destinationFile $appZip
}
if ($artifactUrl.Contains('.azureedge.net/')) {
$artifactUrl = $artifactUrl.Replace('.azureedge.net/','.blob.core.windows.net/')
}
Download-File -sourceUrl $artifactUrl -destinationFile $appZip
Write-Host "Unpacking application artifact"
Expand-Archive -Path $appZip -DestinationPath $appArtifactPath -Force
Remove-Item -path $appZip -force
@ -748,16 +744,10 @@ function Download-Artifacts {
if (-not $exists) {
Write-Host "Downloading platform artifact $($platformUri.AbsolutePath)"
$platformZip = Join-Path ([System.IO.Path]::GetTempPath()) "$([Guid]::NewGuid().ToString()).zip"
try {
Download-File -sourceUrl $platformUrl -destinationFile $platformZip
}
catch {
if ($platformUrl.Contains('.azureedge.net/')) {
$platformUrl = $platformUrl.Replace('.azureedge.net/','.blob.core.windows.net/')
Write-Host "Retrying download..."
Download-File -sourceUrl $platformUrl -destinationFile $platformZip
}
if ($platformUrl.Contains('.azureedge.net/')) {
$platformUrl = $platformUrl.Replace('.azureedge.net/','.blob.core.windows.net/')
}
Download-File -sourceUrl $platformUrl -destinationFile $platformZip
Write-Host "Unpacking platform artifact"
Expand-Archive -Path $platformZip -DestinationPath $platformArtifactPath -Force
Remove-Item -path $platformZip -force

Просмотреть файл

@ -21,6 +21,12 @@ else {
ImportModule "$serviceTierFolder\Admin\Microsoft.Dynamics.Nav.Management.psm1"
ImportModule "$serviceTierFolder\Admin\Microsoft.BusinessCentral.Management.psd1"
ImportModule "$serviceTierFolder\Admin\Microsoft.BusinessCentral.Apps.Management.dll"
if (Test-Path 'c:\run\my\pscoreoverrides.ps1') {
. 'c:\run\my\pscoreoverrides.ps1'
}
else {
. 'c:\run\pscoreoverrides.ps1'
}
}
else {
if (Test-Path "$serviceTierFolder\Microsoft.Dynamics.Nav.Management.psm1") {

Просмотреть файл

@ -0,0 +1,3 @@
function Invoke-SqlCmd { SqlServer\Invoke-Sqlcmd @args -Encrypt Optional }
function Backup-SqlDatabase { SqlServer\Backup-SqlDatabase @args -Encrypt Optional }
function Restore-SqlDatabase { SqlServer\Restore-SqlDatabase @args -Encrypt Optional }

Просмотреть файл

@ -1 +1 @@
1.0.2.17
1.0.2.20

Просмотреть файл

@ -634,11 +634,13 @@ function Download-File {
)
$replaceUrls = @{
"https://go.microsoft.com/fwlink/?LinkID=844461" = "https://bcartifacts.azureedge.net/prerequisites/DotNetCore.1.0.4_1.1.1-WindowsHosting.exe"
"https://download.microsoft.com/download/C/9/E/C9E8180D-4E51-40A6-A9BF-776990D8BCA9/rewrite_amd64.msi" = "https://bcartifacts.azureedge.net/prerequisites/rewrite_2.0_rtw_x64.msi"
"https://download.microsoft.com/download/5/5/3/553C731E-9333-40FB-ADE3-E02DC9643B31/OpenXMLSDKV25.msi" = "https://bcartifacts.azureedge.net/prerequisites/OpenXMLSDKv25.msi"
"https://download.microsoft.com/download/A/1/2/A129F694-233C-4C7C-860F-F73139CF2E01/ENU/x86/ReportViewer.msi" = "https://bcartifacts.azureedge.net/prerequisites/ReportViewer.msi"
"https://download.microsoft.com/download/1/3/0/13089488-91FC-4E22-AD68-5BE58BD5C014/ENU/x86/SQLSysClrTypes.msi" = "https://bcartifacts.azureedge.net/prerequisites/SQLSysClrTypes.msi"
"https://go.microsoft.com/fwlink/?LinkID=844461" = "https://bcartifacts.blob.core.windows.net/prerequisites/DotNetCore.1.0.4_1.1.1-WindowsHosting.exe"
"https://download.microsoft.com/download/C/9/E/C9E8180D-4E51-40A6-A9BF-776990D8BCA9/rewrite_amd64.msi" = "https://bcartifacts.blob.core.windows.net/prerequisites/rewrite_2.0_rtw_x64.msi"
"https://download.microsoft.com/download/5/5/3/553C731E-9333-40FB-ADE3-E02DC9643B31/OpenXMLSDKV25.msi" = "https://bcartifacts.blob.core.windows.net/prerequisites/OpenXMLSDKv25.msi"
"https://download.microsoft.com/download/A/1/2/A129F694-233C-4C7C-860F-F73139CF2E01/ENU/x86/ReportViewer.msi" = "https://bcartifacts.blob.core.windows.net/prerequisites/ReportViewer.msi"
"https://download.microsoft.com/download/1/3/0/13089488-91FC-4E22-AD68-5BE58BD5C014/ENU/x86/SQLSysClrTypes.msi" = "https://bcartifacts.blob.core.windows.net/prerequisites/SQLSysClrTypes.msi"
"https://download.microsoft.com/download/3/A/6/3A632674-A016-4E31-A675-94BE390EA739/ENU/x64/sqlncli.msi" = "https://bcartifacts.blob.core.windows.net/prerequisites/sqlncli.msi"
"https://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x86.exe" = "https://bcartifacts.blob.core.windows.net/prerequisites/vcredist_x86.exe"
}
if ($replaceUrls.ContainsKey($sourceUrl)) {
@ -695,16 +697,10 @@ function Download-Artifacts {
if (-not $exists) {
Write-Host "Downloading application artifact $($appUri.AbsolutePath)"
$appZip = Join-Path ([System.IO.Path]::GetTempPath()) "$([Guid]::NewGuid().ToString()).zip"
try {
Download-File -sourceUrl $artifactUrl -destinationFile $appZip
}
catch {
if ($artifactUrl.Contains('.azureedge.net/')) {
$artifactUrl = $artifactUrl.Replace('.azureedge.net/','.blob.core.windows.net/')
Write-Host "Retrying download..."
Download-File -sourceUrl $artifactUrl -destinationFile $appZip
}
if ($artifactUrl.Contains('.azureedge.net/')) {
$artifactUrl = $artifactUrl.Replace('.azureedge.net/','.blob.core.windows.net/')
}
Download-File -sourceUrl $artifactUrl -destinationFile $appZip
Write-Host "Unpacking application artifact"
Expand-Archive -Path $appZip -DestinationPath $appArtifactPath -Force
Remove-Item -path $appZip -force
@ -748,16 +744,10 @@ function Download-Artifacts {
if (-not $exists) {
Write-Host "Downloading platform artifact $($platformUri.AbsolutePath)"
$platformZip = Join-Path ([System.IO.Path]::GetTempPath()) "$([Guid]::NewGuid().ToString()).zip"
try {
Download-File -sourceUrl $platformUrl -destinationFile $platformZip
}
catch {
if ($platformUrl.Contains('.azureedge.net/')) {
$platformUrl = $platformUrl.Replace('.azureedge.net/','.blob.core.windows.net/')
Write-Host "Retrying download..."
Download-File -sourceUrl $platformUrl -destinationFile $platformZip
}
if ($platformUrl.Contains('.azureedge.net/')) {
$platformUrl = $platformUrl.Replace('.azureedge.net/','.blob.core.windows.net/')
}
Download-File -sourceUrl $platformUrl -destinationFile $platformZip
Write-Host "Unpacking platform artifact"
Expand-Archive -Path $platformZip -DestinationPath $platformArtifactPath -Force
Remove-Item -path $platformZip -force