From cde2e7d56d1b6d7a6cd46fa0793db9ebcec9d977 Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Thu, 12 Mar 2020 21:22:54 +0700 Subject: [PATCH 001/111] added SQL Express install step --- .../scripts/Installers/Install-SQLExpress.ps1 | 20 +++++++++++++++++++ .../Installers/Validate-SQLExpress.ps1 | 15 ++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 images/win/scripts/Installers/Install-SQLExpress.ps1 create mode 100644 images/win/scripts/Installers/Validate-SQLExpress.ps1 diff --git a/images/win/scripts/Installers/Install-SQLExpress.ps1 b/images/win/scripts/Installers/Install-SQLExpress.ps1 new file mode 100644 index 000000000..4cb6deae1 --- /dev/null +++ b/images/win/scripts/Installers/Install-SQLExpress.ps1 @@ -0,0 +1,20 @@ +#Download web-installer +$installerUrl = "https://go.microsoft.com/fwlink/?linkid=866658" +$installerName = "SQL2019-SSEI-Expr.exe" +$installerPath = "${env:Temp}\$installerName" +Write-Host "Download web-installer" +(New-Object System.Net.WebClient).DownloadFile($installerUrl, $installerPath) +#use web-installer to download setup package +$downloadPath = "C:\SQLEXPRESS2019" +$setupPath = Join-Path $downloadPath "SQLEXPR_x64_ENU" +$downloadArgs = ("/MEDIAPATH=$downloadPath", "/MEDIATYPE=Core","/Action=Download", "/QUIET") +$installArgs = ("/Q", "/IACCEPTSQLSERVERLICENSETERMS") +$args = ("/Q", "/IACCEPTSQLSERVERLICENSETERMS", "/Action=Install", "/INSTANCEID=SQL2020", "/INSTANCENAME=SQL2020", "/SECURITYMODE=SQL", "/SAPWD=P@ssword!!", "/TCPENABLED=1") +Write-Host "Downloading SQL Express setup package" +Start-Process -FilePath $installerPath -ArgumentList $downloadArgs -Wait -PassThru +#Unpack and run setup-package +Set-Location -Path $downloadPath +Write-Host "Unpack SQL Express setup package" +Start-Process -FilePath "$setupPath.exe" -ArgumentList $installArgs -Wait -PassThru +Write-Host "Run SQL Express setup package" +Start-Process -FilePath "$setupPath/SETUP.exe" -ArgumentList $args -Wait -PassThru \ No newline at end of file diff --git a/images/win/scripts/Installers/Validate-SQLExpress.ps1 b/images/win/scripts/Installers/Validate-SQLExpress.ps1 new file mode 100644 index 000000000..8a0b78fdd --- /dev/null +++ b/images/win/scripts/Installers/Validate-SQLExpress.ps1 @@ -0,0 +1,15 @@ +$sqlConn = New-Object System.Data.SqlClient.SqlConnection +$sqlConn.ConnectionString = "Server=$env:computername\SQL2019;Integrated Security=false;User ID=sa; Password=P@ssword!!" +$sqlConn.Open() +$str1="" +$sqlConn.State +IF (Compare-Object $sqlConn.State $str1) +{ +Write-Host "Failed attempt" +exit 1 +} +ELSE +{ +Write-Host "Success" +exit 0 +} \ No newline at end of file From a318add44ded8d5159ba96586efd4243f5598d53 Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Thu, 12 Mar 2020 21:26:22 +0700 Subject: [PATCH 002/111] Added SQL Express installation --- images/win/Windows2019-Azure.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index 8f82a6eb2..732d417dd 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -436,6 +436,12 @@ "{{ template_dir }}/scripts/Installers/Install-MysqlCli.ps1" ] }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Windows2019/Install-SQLExpress.ps1" + ] + }, { "type": "powershell", "scripts":[ @@ -574,6 +580,12 @@ "type": "windows-restart", "restart_timeout": "10m" }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-SQLExpress.ps1" + ] + }, { "type": "powershell", "scripts":[ From 1773dd7a92ca417c6eb0982ff295baf074fe052d Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Fri, 13 Mar 2020 14:44:24 +0300 Subject: [PATCH 003/111] Add msys2 install script --- .../Installers/Windows2019/Install-Msys2.ps1 | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 images/win/scripts/Installers/Windows2019/Install-Msys2.ps1 diff --git a/images/win/scripts/Installers/Windows2019/Install-Msys2.ps1 b/images/win/scripts/Installers/Windows2019/Install-Msys2.ps1 new file mode 100644 index 000000000..88c6b6ef8 --- /dev/null +++ b/images/win/scripts/Installers/Windows2019/Install-Msys2.ps1 @@ -0,0 +1,79 @@ +################################################################################ +## File: Install-MSYS2.ps1 +## Desc: Install MSYS2 and 64-bit gcc, cmake, & llvm (32-bit commented out) +################################################################################ + +# References +# https://github.com/msys2/MINGW-packages/blob/master/azure-pipelines.yml +# https://packages.msys2.org/group/ + +$env:orig_path = $env:PATH +$env:git_path = "C:\Program Files\Git" + +# get info from https://sourceforge.net/projects/msys2/files/Base/x86_64/ +$msy2_uri = "https://netix.dl.sourceforge.net/project/msys2/Base/x86_64/msys2-base-x86_64-20190524.tar.xz" +$msy2_file = "C:\Windows\Temp\msys2.tar.xz" + +# Download the latest msys2 x86_64 +Write-Host "Starting msys2 download..." +(New-Object System.Net.WebClient).DownloadFile($msy2_uri, $msy2_file) +Write-Host "Finished download" + +$msy2_file_u = "/$msy2_file".replace(':', '') + +# git has tar.exe in usr/bin, but xz.exe is in mingw64/bin +$env:PATH = "$env:git_path\mingw64\bin;$env:orig_path" +$tar = "$env:git_path\usr\bin\tar.exe" + +# extract tar.xz to C:\ +Write-Host "Starting extraction..." +&$tar -Jxf $msy2_file_u -C /c/ +Remove-Item $msy2_file + +Write-Host "Finished extraction" + +$env:PATH = "C:\msys64\mingw64\bin;C:\msys64\usr\bin;$env:orig_path" + +Write-Host "bash.exe -c pacman-key --init" +bash.exe -c "pacman-key --init" + +Write-Host "bash.exe -c pacman-key --populate msys2" +bash.exe -c "pacman-key --populate msys2" + +Write-Host "pacman --noconfirm -Syyuu" +pacman.exe -Syyuu --noconfirm + +# install msys2 packages +Write-Host "Install msys2 packages" +pacman.exe -S --noconfirm --needed --noprogressbar base-devel compression + +# mingw package list +$tools = "___clang ___cmake ___llvm ___toolchain ___ragel" + +# install mingw64 packages +Write-Host "Install mingw64 packages" +$pre = "mingw-w64-x86_64-" +pacman.exe -S --noconfirm --needed --noprogressbar $tools.replace('___', $pre).split(' ') + +# install mingw32 packages +Write-Host "Install mingw32 packages" +$pre = "mingw-w64-i686-" +pacman.exe -S --noconfirm --needed --noprogressbar $tools.replace('___', $pre).split(' ') + +# clean all packages to decrease image size +Write-Host "Clean packages" +pacman.exe -Scc --noconfirm + +Write-Host +Write-Host "Installed mingw64 packages" +pacman.exe -Qs --noconfirm mingw-w64-x86_64- + +Write-Host +Write-Host "Installed mingw32 packages" +pacman.exe -Qs --noconfirm mingw-w64-i686- + +Write-Host +Write-Host "Installed msys2 packages" +pacman.exe -Qs --noconfirm + +exit 0 \ No newline at end of file From 9630ed7c1d2e4567577e1a05521a33b087b98f44 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Fri, 13 Mar 2020 14:49:04 +0300 Subject: [PATCH 004/111] Add msys2 to template --- images/win/Windows2019-Azure.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index c6df555b8..fd4e26850 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -139,6 +139,12 @@ "{{ template_dir }}/scripts/Installers/Update-ImageData.ps1" ] }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-MSYS2.ps1" + ] + }, { "type": "powershell", "scripts":[ From 25ed30427cc08f63536eb756c433e13a4d7eb505 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Fri, 13 Mar 2020 14:53:00 +0300 Subject: [PATCH 005/111] Fix filename --- images/win/Windows2019-Azure.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index fd4e26850..0f432b6ce 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -142,7 +142,7 @@ { "type": "powershell", "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-MSYS2.ps1" + "{{ template_dir }}/scripts/Installers/Install-Msys2.ps1" ] }, { From d4ef717e85e5df5eb099c36f1257465caea6e999 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Fri, 13 Mar 2020 14:55:39 +0300 Subject: [PATCH 006/111] Fix filename --- images/win/Windows2019-Azure.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index 0f432b6ce..eb574cecf 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -142,7 +142,7 @@ { "type": "powershell", "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-Msys2.ps1" + "{{ template_dir }}/scripts/Installers/Windows2019/Install-Msys2.ps1" ] }, { From debb478679eee046a9b0a86c8daee750ea56f72f Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Tue, 17 Mar 2020 01:28:14 +0700 Subject: [PATCH 007/111] SQLExpress installation full process --- images/win/Windows2016-Azure.json | 14 +++++++ images/win/Windows2019-Azure.json | 4 +- .../scripts/Installers/Install-SQLExpress.ps1 | 42 +++++++++++++++++-- 3 files changed, 55 insertions(+), 5 deletions(-) diff --git a/images/win/Windows2016-Azure.json b/images/win/Windows2016-Azure.json index fcb0ed4ca..b40335295 100644 --- a/images/win/Windows2016-Azure.json +++ b/images/win/Windows2016-Azure.json @@ -296,6 +296,12 @@ "{{ template_dir }}/scripts/Installers/Install-Bazel.ps1" ] }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-SQLExpress.ps1" + ] + }, { "type": "powershell", "scripts":[ @@ -455,6 +461,14 @@ "{{ template_dir }}/scripts/Installers/Install-MysqlCli.ps1" ] }, + { + "type": "powershell", + "elevated_user": "SYSTEM", + "elevated_password": "", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-SQLExpress.ps1" + ] + }, { "type": "powershell", "scripts":[ diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index 732d417dd..20711d802 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -438,8 +438,10 @@ }, { "type": "powershell", + "elevated_user": "SYSTEM", + "elevated_password": "", "scripts":[ - "{{ template_dir }}/scripts/Installers/Windows2019/Install-SQLExpress.ps1" + "{{ template_dir }}/scripts/Installers/Install-SQLExpress.ps1" ] }, { diff --git a/images/win/scripts/Installers/Install-SQLExpress.ps1 b/images/win/scripts/Installers/Install-SQLExpress.ps1 index 4cb6deae1..707687295 100644 --- a/images/win/scripts/Installers/Install-SQLExpress.ps1 +++ b/images/win/scripts/Installers/Install-SQLExpress.ps1 @@ -1,4 +1,5 @@ #Download web-installer +Set-Item .\MaxMemoryPerShellMB 4096 $installerUrl = "https://go.microsoft.com/fwlink/?linkid=866658" $installerName = "SQL2019-SSEI-Expr.exe" $installerPath = "${env:Temp}\$installerName" @@ -9,12 +10,45 @@ $downloadPath = "C:\SQLEXPRESS2019" $setupPath = Join-Path $downloadPath "SQLEXPR_x64_ENU" $downloadArgs = ("/MEDIAPATH=$downloadPath", "/MEDIATYPE=Core","/Action=Download", "/QUIET") $installArgs = ("/Q", "/IACCEPTSQLSERVERLICENSETERMS") -$args = ("/Q", "/IACCEPTSQLSERVERLICENSETERMS", "/Action=Install", "/INSTANCEID=SQL2020", "/INSTANCENAME=SQL2020", "/SECURITYMODE=SQL", "/SAPWD=P@ssword!!", "/TCPENABLED=1") +$args = ("/c", "$setupPath/SETUP.exe", "/Q", "/IACCEPTSQLSERVERLICENSETERMS", "/Action=Install", "/INSTANCEID=SQL2019", "/INSTANCENAME=SQL2019", "/SECURITYMODE=SQL", "/SAPWD=P@ssword!!", "/TCPENABLED=1") Write-Host "Downloading SQL Express setup package" -Start-Process -FilePath $installerPath -ArgumentList $downloadArgs -Wait -PassThru +$process = Start-Process -FilePath $installerPath -ArgumentList $downloadArgs -Wait -PassThru +$exitCode = $process.ExitCode +if ($exitCode -eq 0) +{ + Write-Host -Object 'Downloaded successfully' + Write-Host $exitCode +} + else +{ + Write-Host -Object "Non zero exit code returned by the installation process : $exitCode." + exit $exitCode +} #Unpack and run setup-package Set-Location -Path $downloadPath Write-Host "Unpack SQL Express setup package" -Start-Process -FilePath "$setupPath.exe" -ArgumentList $installArgs -Wait -PassThru +$process = Start-Process -FilePath "$setupPath.exe" -ArgumentList $installArgs -Wait -PassThru +$exitCode = $process.ExitCode +if ($exitCode -eq 0) +{ + Write-Host -Object 'Unpacked successfully' + Write-Host $exitCode +} + else +{ + Write-Host -Object "Non zero exit code returned by the installation process : $exitCode." + Write-Host $exitCode +} Write-Host "Run SQL Express setup package" -Start-Process -FilePath "$setupPath/SETUP.exe" -ArgumentList $args -Wait -PassThru \ No newline at end of file +$process = Start-Process -FilePath cmd.exe -ArgumentList $args -Wait -PassThru +$exitCode = $process.ExitCode +if ($exitCode -eq 0) +{ + Write-Host -Object 'Installed successfully' + Write-Host $exitCode +} + else +{ + Write-Host -Object "Non zero exit code returned by the installation process : $exitCode." + exit $exitCode +} \ No newline at end of file From ab8fb88d957e2a2c5fcc57bed00aec2515ff4015 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Tue, 17 Mar 2020 11:07:29 +0300 Subject: [PATCH 008/111] Add validate spript --- images/win/Windows2019-Azure.json | 18 ++++-- .../{Windows2019 => }/Install-Msys2.ps1 | 27 +++++---- .../win/scripts/Installers/Validate-Msys2.ps1 | 57 +++++++++++++++++++ 3 files changed, 84 insertions(+), 18 deletions(-) rename images/win/scripts/Installers/{Windows2019 => }/Install-Msys2.ps1 (78%) create mode 100644 images/win/scripts/Installers/Validate-Msys2.ps1 diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index eb574cecf..a8623ef28 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -139,12 +139,6 @@ "{{ template_dir }}/scripts/Installers/Update-ImageData.ps1" ] }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Windows2019/Install-Msys2.ps1" - ] - }, { "type": "powershell", "scripts":[ @@ -470,6 +464,12 @@ "{{ template_dir }}/scripts/Installers/Install-AzureModules.ps1" ] }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-Msys2.ps1" + ] + }, { "type": "powershell", "scripts":[ @@ -604,6 +604,12 @@ "{{ template_dir }}/scripts/Installers/Validate-AzureDevOpsCli.ps1" ] }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-Msys2.ps1" + ] + }, { "type": "powershell", "environment_vars":[ diff --git a/images/win/scripts/Installers/Windows2019/Install-Msys2.ps1 b/images/win/scripts/Installers/Install-Msys2.ps1 similarity index 78% rename from images/win/scripts/Installers/Windows2019/Install-Msys2.ps1 rename to images/win/scripts/Installers/Install-Msys2.ps1 index 88c6b6ef8..73d7b81d9 100644 --- a/images/win/scripts/Installers/Windows2019/Install-Msys2.ps1 +++ b/images/win/scripts/Installers/Install-Msys2.ps1 @@ -11,11 +11,11 @@ $env:orig_path = $env:PATH $env:git_path = "C:\Program Files\Git" # get info from https://sourceforge.net/projects/msys2/files/Base/x86_64/ -$msy2_uri = "https://netix.dl.sourceforge.net/project/msys2/Base/x86_64/msys2-base-x86_64-20190524.tar.xz" +$msy2_uri = "http://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-20190524.tar.xz" $msy2_file = "C:\Windows\Temp\msys2.tar.xz" # Download the latest msys2 x86_64 -Write-Host "Starting msys2 download..." +Write-Host "Starting download" (New-Object System.Net.WebClient).DownloadFile($msy2_uri, $msy2_file) Write-Host "Finished download" @@ -26,22 +26,26 @@ $env:PATH = "$env:git_path\mingw64\bin;$env:orig_path" $tar = "$env:git_path\usr\bin\tar.exe" # extract tar.xz to C:\ -Write-Host "Starting extraction..." +Write-Host "Starting extraction" &$tar -Jxf $msy2_file_u -C /c/ Remove-Item $msy2_file -Write-Host "Finished extraction" +Write-Host Finished extraction $env:PATH = "C:\msys64\mingw64\bin;C:\msys64\usr\bin;$env:orig_path" -Write-Host "bash.exe -c pacman-key --init" -bash.exe -c "pacman-key --init" +$ErrorActionPreference = "Continue" -Write-Host "bash.exe -c pacman-key --populate msys2" -bash.exe -c "pacman-key --populate msys2" +Write-Host "sh -c pacman-key --init" +Invoke-Expression "bash -c `"pacman-key --init 2>&1`"" + + +Write-Host "sh.exe -c pacman-key --populate msys2" +Invoke-Expression "sh -c `"pacman-key --populate msys2 2>&1`"" Write-Host "pacman --noconfirm -Syyuu" -pacman.exe -Syyuu --noconfirm +pacman.exe -Syyuu --noconfirm 2>$null +pacman.exe -Syuu --noconfirm 2>$null # install msys2 packages Write-Host "Install msys2 packages" @@ -64,16 +68,15 @@ pacman.exe -S --noconfirm --needed --noprogressbar $tools.replace('___', $pre).s Write-Host "Clean packages" pacman.exe -Scc --noconfirm -Write-Host Write-Host "Installed mingw64 packages" pacman.exe -Qs --noconfirm mingw-w64-x86_64- -Write-Host Write-Host "Installed mingw32 packages" pacman.exe -Qs --noconfirm mingw-w64-i686- -Write-Host Write-Host "Installed msys2 packages" pacman.exe -Qs --noconfirm +Write-Host "MSYS2 installation completed" + exit 0 \ No newline at end of file diff --git a/images/win/scripts/Installers/Validate-Msys2.ps1 b/images/win/scripts/Installers/Validate-Msys2.ps1 new file mode 100644 index 000000000..9b0492a31 --- /dev/null +++ b/images/win/scripts/Installers/Validate-Msys2.ps1 @@ -0,0 +1,57 @@ +################################################################################ +## File: Validate-MSYS2.ps1 +## Desc: Validate MSYS2 +################################################################################ + +if (Get-Command -Name 'gcc') +{ + Write-Host "gcc is successfully installed:" + gcc --version | Write-Host +} +else +{ + Write-Host "gcc is not on PATH" + exit 1 +} + +if (Get-Command -Name 'g++') +{ + Write-Host "g++ is successfully installed:" + g++ --version | Write-Host +} +else +{ + Write-Host "g++ is not on PATH" + exit 1 +} + +if (Get-Command -Name 'make') +{ + Write-Host "make is successfully installed:" + make --version | Write-Host +} +else +{ + Write-Host "make is not on PATH" + exit 1 +} + +Adding description of the software to Markdown + +`gcc --version` gives output like: +gcc.exe (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 5.3.0 +Copyright (C) 2015 Free Software Foundation, Inc. +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +$SoftwareName = "MinGW" +$(gcc --version).Split([System.Environment]::NewLine)[0] -match "\d\.\d\.\d$" +$minGwVersion = $matches[0] + +$Description = @" +_Version:_ $minGwVersion
+_Environment:_ +* PATH: contains location of the MinGW 'bin' directory +"@ + +Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description From 1cb09f80a286be26220ea92eebd3a010b4032eb3 Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Tue, 17 Mar 2020 21:47:47 +0700 Subject: [PATCH 009/111] re-worked SQLExpress installer --- .../scripts/Installers/Install-SQLExpress.ps1 | 89 ++++++++----------- 1 file changed, 39 insertions(+), 50 deletions(-) diff --git a/images/win/scripts/Installers/Install-SQLExpress.ps1 b/images/win/scripts/Installers/Install-SQLExpress.ps1 index 707687295..a732f86b7 100644 --- a/images/win/scripts/Installers/Install-SQLExpress.ps1 +++ b/images/win/scripts/Installers/Install-SQLExpress.ps1 @@ -1,54 +1,43 @@ -#Download web-installer -Set-Item .\MaxMemoryPerShellMB 4096 +function Start-Task { + param( + [String]$InstallPath, + [String]$Arguments + ) + $process = Start-Process -FilePath $InstallPath -ArgumentList $Arguments -Wait -PassThru + $exitCode = $process.ExitCode +# Exit code -2067529716 is added since SQL Unpack procedure returns it on success. + if ($exitCode -eq 0 -or -2067529716) + { + Write-Host -Object "Success. Exit code: $exitCode." + } + else + { + Write-Host -Object "Non zero exit code returned by the installation process : $exitCode." + exit $exitCode + } +} + +function Start-DownloadSQLExpress { + param( + [String]$InstallerUrl, + [String]$InstallerPath + ) + Write-Host "Download web-installer" + (New-Object System.Net.WebClient).DownloadFile($InstallerUrl, $InstallerPath) +} + $installerUrl = "https://go.microsoft.com/fwlink/?linkid=866658" -$installerName = "SQL2019-SSEI-Expr.exe" -$installerPath = "${env:Temp}\$installerName" -Write-Host "Download web-installer" -(New-Object System.Net.WebClient).DownloadFile($installerUrl, $installerPath) -#use web-installer to download setup package +$installerPath = "${env:Temp}\SQL2019-SSEI-Expr.exe" $downloadPath = "C:\SQLEXPRESS2019" $setupPath = Join-Path $downloadPath "SQLEXPR_x64_ENU" $downloadArgs = ("/MEDIAPATH=$downloadPath", "/MEDIATYPE=Core","/Action=Download", "/QUIET") -$installArgs = ("/Q", "/IACCEPTSQLSERVERLICENSETERMS") -$args = ("/c", "$setupPath/SETUP.exe", "/Q", "/IACCEPTSQLSERVERLICENSETERMS", "/Action=Install", "/INSTANCEID=SQL2019", "/INSTANCENAME=SQL2019", "/SECURITYMODE=SQL", "/SAPWD=P@ssword!!", "/TCPENABLED=1") -Write-Host "Downloading SQL Express setup package" -$process = Start-Process -FilePath $installerPath -ArgumentList $downloadArgs -Wait -PassThru -$exitCode = $process.ExitCode -if ($exitCode -eq 0) -{ - Write-Host -Object 'Downloaded successfully' - Write-Host $exitCode -} - else -{ - Write-Host -Object "Non zero exit code returned by the installation process : $exitCode." - exit $exitCode -} -#Unpack and run setup-package -Set-Location -Path $downloadPath -Write-Host "Unpack SQL Express setup package" -$process = Start-Process -FilePath "$setupPath.exe" -ArgumentList $installArgs -Wait -PassThru -$exitCode = $process.ExitCode -if ($exitCode -eq 0) -{ - Write-Host -Object 'Unpacked successfully' - Write-Host $exitCode -} - else -{ - Write-Host -Object "Non zero exit code returned by the installation process : $exitCode." - Write-Host $exitCode -} -Write-Host "Run SQL Express setup package" -$process = Start-Process -FilePath cmd.exe -ArgumentList $args -Wait -PassThru -$exitCode = $process.ExitCode -if ($exitCode -eq 0) -{ - Write-Host -Object 'Installed successfully' - Write-Host $exitCode -} - else -{ - Write-Host -Object "Non zero exit code returned by the installation process : $exitCode." - exit $exitCode -} \ No newline at end of file +$unpackArgs = ("/Q", "/IACCEPTSQLSERVERLICENSETERMS") +$installArgs = ("/Q", "/IACCEPTSQLSERVERLICENSETERMS", "/Action=Install", "/INSTANCEID=SQL2019", "/INSTANCENAME=SQL2019", "/SECURITYMODE=SQL", "/SAPWD=P@ssword!!", "/TCPENABLED=1") +#Download installer for SQL Express +Start-DownloadSQLExpress -InstallerUrl $installerUrl -InstallerPath $installerPath +#Download full SQL Express package +Start-Task -InstallPath $installerPath -Arguments $downloadArgs +#Unpack SQL Express Installer +Start-Task -InstallPath "$setupPath.exe" -Arguments $unpackArgs +#Start SQL Express installer silently +Start-Task -InstallPath "$setupPath/SETUP.exe" -Arguments $installArgs \ No newline at end of file From 6b8ec803ad7352db49290b48f7c8c20cc51a583c Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Tue, 17 Mar 2020 21:54:40 +0700 Subject: [PATCH 010/111] added messages --- images/win/scripts/Installers/Install-SQLExpress.ps1 | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/images/win/scripts/Installers/Install-SQLExpress.ps1 b/images/win/scripts/Installers/Install-SQLExpress.ps1 index a732f86b7..113fe1e90 100644 --- a/images/win/scripts/Installers/Install-SQLExpress.ps1 +++ b/images/win/scripts/Installers/Install-SQLExpress.ps1 @@ -1,14 +1,15 @@ function Start-Task { param( [String]$InstallPath, - [String]$Arguments + [String]$Arguments, + [String]$SuccessMessage ) $process = Start-Process -FilePath $InstallPath -ArgumentList $Arguments -Wait -PassThru $exitCode = $process.ExitCode # Exit code -2067529716 is added since SQL Unpack procedure returns it on success. if ($exitCode -eq 0 -or -2067529716) { - Write-Host -Object "Success. Exit code: $exitCode." + Write-Host -Object "$SuccessMessage : ExitCode: $exitCode" } else { @@ -36,8 +37,8 @@ $installArgs = ("/Q", "/IACCEPTSQLSERVERLICENSETERMS", "/Action=Install", "/INST #Download installer for SQL Express Start-DownloadSQLExpress -InstallerUrl $installerUrl -InstallerPath $installerPath #Download full SQL Express package -Start-Task -InstallPath $installerPath -Arguments $downloadArgs +Start-Task -InstallPath $installerPath -Arguments $downloadArgs -SuccessMessage "Downloaded package from: $installerUrl . To path: $installerPath " #Unpack SQL Express Installer -Start-Task -InstallPath "$setupPath.exe" -Arguments $unpackArgs +Start-Task -InstallPath "$setupPath.exe" -Arguments $unpackArgs -SuccessMessage "Unpacked package to directory: $setupPath" #Start SQL Express installer silently -Start-Task -InstallPath "$setupPath/SETUP.exe" -Arguments $installArgs \ No newline at end of file +Start-Task -InstallPath "$setupPath/SETUP.exe" -Arguments $installArgs -SuccessMessage "SQL has been installed to directory: ${env:ProgramFiles}/Microsoft SQL Server" \ No newline at end of file From 3674469663a99e81d0ebfaadb8acdc7db5ec52b6 Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Tue, 17 Mar 2020 21:56:27 +0700 Subject: [PATCH 011/111] added debug messages --- images/win/scripts/Installers/Install-SQLExpress.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/images/win/scripts/Installers/Install-SQLExpress.ps1 b/images/win/scripts/Installers/Install-SQLExpress.ps1 index 113fe1e90..c9bd3c8ce 100644 --- a/images/win/scripts/Installers/Install-SQLExpress.ps1 +++ b/images/win/scripts/Installers/Install-SQLExpress.ps1 @@ -23,8 +23,9 @@ function Start-DownloadSQLExpress { [String]$InstallerUrl, [String]$InstallerPath ) - Write-Host "Download web-installer" + Write-Host "Download SQL Express web-installer from: $InstallerUrl" (New-Object System.Net.WebClient).DownloadFile($InstallerUrl, $InstallerPath) + Write-Host "SQL Express has been successfully downladed from the link: $InstallerUrl" } $installerUrl = "https://go.microsoft.com/fwlink/?linkid=866658" @@ -37,7 +38,7 @@ $installArgs = ("/Q", "/IACCEPTSQLSERVERLICENSETERMS", "/Action=Install", "/INST #Download installer for SQL Express Start-DownloadSQLExpress -InstallerUrl $installerUrl -InstallerPath $installerPath #Download full SQL Express package -Start-Task -InstallPath $installerPath -Arguments $downloadArgs -SuccessMessage "Downloaded package from: $installerUrl . To path: $installerPath " +Start-Task -InstallPath $installerPath -Arguments $downloadArgs -SuccessMessage "Downloaded full package. To path: $installerPath " #Unpack SQL Express Installer Start-Task -InstallPath "$setupPath.exe" -Arguments $unpackArgs -SuccessMessage "Unpacked package to directory: $setupPath" #Start SQL Express installer silently From a64115f034a2de1a3a3758b31c483d61df214641 Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Tue, 17 Mar 2020 22:56:55 +0700 Subject: [PATCH 012/111] changed if statement --- images/win/scripts/Installers/Install-SQLExpress.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/win/scripts/Installers/Install-SQLExpress.ps1 b/images/win/scripts/Installers/Install-SQLExpress.ps1 index c9bd3c8ce..74d51d804 100644 --- a/images/win/scripts/Installers/Install-SQLExpress.ps1 +++ b/images/win/scripts/Installers/Install-SQLExpress.ps1 @@ -7,7 +7,7 @@ function Start-Task { $process = Start-Process -FilePath $InstallPath -ArgumentList $Arguments -Wait -PassThru $exitCode = $process.ExitCode # Exit code -2067529716 is added since SQL Unpack procedure returns it on success. - if ($exitCode -eq 0 -or -2067529716) + if ($exitCode -eq 0 -or $exitCode -eq -2067529716) { Write-Host -Object "$SuccessMessage : ExitCode: $exitCode" } From 8354d1a3827c7483b010675f6b2e14abe349e21e Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Tue, 17 Mar 2020 23:22:20 +0700 Subject: [PATCH 013/111] validation with function --- .../Installers/Validate-SQLExpress.ps1 | 46 +++++++++++++------ 1 file changed, 32 insertions(+), 14 deletions(-) diff --git a/images/win/scripts/Installers/Validate-SQLExpress.ps1 b/images/win/scripts/Installers/Validate-SQLExpress.ps1 index 8a0b78fdd..db246910d 100644 --- a/images/win/scripts/Installers/Validate-SQLExpress.ps1 +++ b/images/win/scripts/Installers/Validate-SQLExpress.ps1 @@ -1,15 +1,33 @@ -$sqlConn = New-Object System.Data.SqlClient.SqlConnection -$sqlConn.ConnectionString = "Server=$env:computername\SQL2019;Integrated Security=false;User ID=sa; Password=P@ssword!!" -$sqlConn.Open() -$str1="" -$sqlConn.State -IF (Compare-Object $sqlConn.State $str1) -{ -Write-Host "Failed attempt" -exit 1 +function Test-SqlConnection { + param( + [Parameter(Mandatory)] + [string]$ServerName, + + [Parameter(Mandatory)] + [string]$IntegratedSecurity, + + [Parameter(Mandatory)] + [string]$UserName, + + [Parameter(Mandatory)] + [string]$Password + ) + + $ErrorActionPreference = 'Stop' + + try { + $connectionString = 'Server={0};Integrated Security={1};User ID={2};Password={3}' -f $ServerName,$IntegratedSecurity,$UserName,$Password + Write-Host -Object "Trying to connect to SQL Express instance: $ServerName" + $sqlConnection = New-Object System.Data.SqlClient.SqlConnection $connectionString + $sqlConnection.Open() + Write-Host -Object "Connection to SQL Express was successful." + } catch { + Write-Host -Object "Connection to SQL Express cannot be established." + exit 1 + } finally { + ## Close the connection when we're done + $sqlConnection.Close() + } } -ELSE -{ -Write-Host "Success" -exit 0 -} \ No newline at end of file +$instanceName = "$env:computername\SQL2019" +Test-SqlConnection -ServerName $instanceName -IntegratedSecurity "false" -UserName "sa" -Password "P@ssword!!" \ No newline at end of file From 02154aad2e7967f6998f7afc63f09255dcc32a68 Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Tue, 17 Mar 2020 23:46:14 +0700 Subject: [PATCH 014/111] added description for SQL Express scripts --- images/win/scripts/Installers/Install-SQLExpress.ps1 | 9 +++++++++ images/win/scripts/Installers/Validate-SQLExpress.ps1 | 6 +++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/images/win/scripts/Installers/Install-SQLExpress.ps1 b/images/win/scripts/Installers/Install-SQLExpress.ps1 index 74d51d804..735ee4086 100644 --- a/images/win/scripts/Installers/Install-SQLExpress.ps1 +++ b/images/win/scripts/Installers/Install-SQLExpress.ps1 @@ -1,3 +1,12 @@ +################################################################################ +## File: Install-SQLExpress.ps1 +## Desc: Install SQL Express for Windows +## SQL Version: Microsoft SQL Express 2019 ( 15.00.2000 ) +## InstanceName: SQL2019 +## Username - sa +## Password - P@ssword!! +## Default path - C:\Program Files (x86)\Microsoft SQL Server +################################################################################ function Start-Task { param( [String]$InstallPath, diff --git a/images/win/scripts/Installers/Validate-SQLExpress.ps1 b/images/win/scripts/Installers/Validate-SQLExpress.ps1 index db246910d..951e7048b 100644 --- a/images/win/scripts/Installers/Validate-SQLExpress.ps1 +++ b/images/win/scripts/Installers/Validate-SQLExpress.ps1 @@ -1,3 +1,7 @@ +################################################################################ +## File: Validate-SQLExpress.ps1 +## Desc: Validate Microsoft SQL Express installation +################################################################################ function Test-SqlConnection { param( [Parameter(Mandatory)] @@ -20,7 +24,7 @@ function Test-SqlConnection { Write-Host -Object "Trying to connect to SQL Express instance: $ServerName" $sqlConnection = New-Object System.Data.SqlClient.SqlConnection $connectionString $sqlConnection.Open() - Write-Host -Object "Connection to SQL Express was successful." + Write-Host -Object "Connection to database: {0} in in was successful. Version of SQL Express is: {1}" -f $sqlConnection.Database,$sqlConnection.ServerVersion } catch { Write-Host -Object "Connection to SQL Express cannot be established." exit 1 From c279ba06642d90652a5552407e59020016a6ff4b Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Wed, 18 Mar 2020 00:16:00 +0700 Subject: [PATCH 015/111] added software markdon --- .../scripts/Installers/Validate-SQLExpress.ps1 | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/images/win/scripts/Installers/Validate-SQLExpress.ps1 b/images/win/scripts/Installers/Validate-SQLExpress.ps1 index 951e7048b..fc54a4d06 100644 --- a/images/win/scripts/Installers/Validate-SQLExpress.ps1 +++ b/images/win/scripts/Installers/Validate-SQLExpress.ps1 @@ -25,6 +25,7 @@ function Test-SqlConnection { $sqlConnection = New-Object System.Data.SqlClient.SqlConnection $connectionString $sqlConnection.Open() Write-Host -Object "Connection to database: {0} in in was successful. Version of SQL Express is: {1}" -f $sqlConnection.Database,$sqlConnection.ServerVersion + return $sqlConnection.ServerVersion } catch { Write-Host -Object "Connection to SQL Express cannot be established." exit 1 @@ -34,4 +35,17 @@ function Test-SqlConnection { } } $instanceName = "$env:computername\SQL2019" -Test-SqlConnection -ServerName $instanceName -IntegratedSecurity "false" -UserName "sa" -Password "P@ssword!!" \ No newline at end of file +$version = Test-SqlConnection -ServerName $instanceName -IntegratedSecurity "false" -UserName "sa" -Password "P@ssword!!" + +# Adding description of the software to Markdown +$SoftwareName = "Git" + +$Description = @" +_Version:_ $version
+_InstanceName:_ SQL2019
+_Username:_ sa
+_Password:_ P@ssword!!
+_Default Path:_ C:\Program Files (x86)\Microsoft SQL Server +"@ + +Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description From b2c676b3e30c4b522bdec951ca8c460107ce3b08 Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Wed, 18 Mar 2020 00:22:02 +0700 Subject: [PATCH 016/111] changed comment for SQL Express install --- images/win/scripts/Installers/Install-SQLExpress.ps1 | 5 ----- 1 file changed, 5 deletions(-) diff --git a/images/win/scripts/Installers/Install-SQLExpress.ps1 b/images/win/scripts/Installers/Install-SQLExpress.ps1 index 735ee4086..254d09bcd 100644 --- a/images/win/scripts/Installers/Install-SQLExpress.ps1 +++ b/images/win/scripts/Installers/Install-SQLExpress.ps1 @@ -1,11 +1,6 @@ ################################################################################ ## File: Install-SQLExpress.ps1 ## Desc: Install SQL Express for Windows -## SQL Version: Microsoft SQL Express 2019 ( 15.00.2000 ) -## InstanceName: SQL2019 -## Username - sa -## Password - P@ssword!! -## Default path - C:\Program Files (x86)\Microsoft SQL Server ################################################################################ function Start-Task { param( From 81872a6a71eed002eda446b20630d0098a2cad33 Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Wed, 18 Mar 2020 00:46:51 +0700 Subject: [PATCH 017/111] added retry logic for download --- .../scripts/Installers/Install-SQLExpress.ps1 | 33 +++++++++++++++++-- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/images/win/scripts/Installers/Install-SQLExpress.ps1 b/images/win/scripts/Installers/Install-SQLExpress.ps1 index 254d09bcd..2834371e3 100644 --- a/images/win/scripts/Installers/Install-SQLExpress.ps1 +++ b/images/win/scripts/Installers/Install-SQLExpress.ps1 @@ -25,10 +25,37 @@ function Start-Task { function Start-DownloadSQLExpress { param( [String]$InstallerUrl, - [String]$InstallerPath + [String]$InstallerPath, + [int] $retries = 10 ) - Write-Host "Download SQL Express web-installer from: $InstallerUrl" - (New-Object System.Net.WebClient).DownloadFile($InstallerUrl, $InstallerPath) + Write-Host "Downloading SQL Express web-installer from: $InstallerUrl" + # In case of any errors -try to download package several times + while($retries -gt 0) + { + try + { + Write-Host "Downloading SQL Express installer..." + (New-Object System.Net.WebClient).DownloadFile($InstallerUrl, $InstallerPath) + break + } + catch + { + Write-Host "There is an error during SQL Express downloading" + $_ + + $retries-- + + if ($retries -eq 0) + { + Write-Host "File can't be downloaded" + $_ + exit 1 + } + + Write-Host "Waiting 30 seconds before retrying. Retries left: $retries" + Start-Sleep -Seconds 30 + } + } Write-Host "SQL Express has been successfully downladed from the link: $InstallerUrl" } From 8583664d46e0b4726bf407f8416efd33c967db9b Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Tue, 17 Mar 2020 21:07:56 +0300 Subject: [PATCH 018/111] Test elevated user --- images/win/Windows2019-Azure.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index a8623ef28..f8ebb4bcd 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -478,6 +478,8 @@ }, { "type": "powershell", + "elevated_user": "SYSTEM", + "elevated_password": "", "scripts":[ "{{ template_dir }}/scripts/Installers/Install-TypeScript.ps1" ] From 0b0f21043e6da2b4ee0145be9bcd65f67d987a8d Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Wed, 18 Mar 2020 09:16:21 +0300 Subject: [PATCH 019/111] Test elevated user --- images/win/Windows2019-Azure.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index f8ebb4bcd..eba725ee9 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -151,6 +151,14 @@ "{{ template_dir }}/scripts/Installers/Install-PowershellCore.ps1" ] }, + { + "type": "powershell", + "elevated_user": "SYSTEM", + "elevated_password": "", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-Msys2.ps1" + ] + }, { "type": "windows-restart", "restart_timeout": "10m" @@ -464,12 +472,6 @@ "{{ template_dir }}/scripts/Installers/Install-AzureModules.ps1" ] }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-Msys2.ps1" - ] - }, { "type": "powershell", "scripts":[ @@ -478,8 +480,6 @@ }, { "type": "powershell", - "elevated_user": "SYSTEM", - "elevated_password": "", "scripts":[ "{{ template_dir }}/scripts/Installers/Install-TypeScript.ps1" ] From e68c39c1bd64ce38333b68a389bcbb6d5834757e Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Wed, 18 Mar 2020 09:26:14 +0300 Subject: [PATCH 020/111] Test --- images/win/Windows2019-Azure.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index eba725ee9..c32d8bb70 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -102,6 +102,14 @@ "{{ template_dir }}/scripts/Installers/Windows2019/Initialize-VM.ps1" ] }, + { + "type": "powershell", + "elevated_user": "SYSTEM", + "elevated_password": "", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-Msys2.ps1" + ] + }, { "type": "powershell", "scripts":[ @@ -151,14 +159,6 @@ "{{ template_dir }}/scripts/Installers/Install-PowershellCore.ps1" ] }, - { - "type": "powershell", - "elevated_user": "SYSTEM", - "elevated_password": "", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-Msys2.ps1" - ] - }, { "type": "windows-restart", "restart_timeout": "10m" From 7339af8a51262b2ba747cecc84225a3dc9f17731 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Wed, 18 Mar 2020 10:19:10 +0300 Subject: [PATCH 021/111] Test --- images/win/Windows2019-Azure.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index c32d8bb70..e51a72818 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -102,6 +102,12 @@ "{{ template_dir }}/scripts/Installers/Windows2019/Initialize-VM.ps1" ] }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-Git.ps1" + ] + }, { "type": "powershell", "elevated_user": "SYSTEM", @@ -312,12 +318,6 @@ "{{ template_dir }}/scripts/Installers/Install-Perl.ps1" ] }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-Git.ps1" - ] - }, { "type": "powershell", "environment_vars": [ From e269c20b6a8968cfaf995e774e70a48f96a4ac52 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Wed, 18 Mar 2020 12:02:58 +0300 Subject: [PATCH 022/111] Test --- images/win/Windows2019-Azure.json | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index e51a72818..07674aaa4 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -102,20 +102,6 @@ "{{ template_dir }}/scripts/Installers/Windows2019/Initialize-VM.ps1" ] }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-Git.ps1" - ] - }, - { - "type": "powershell", - "elevated_user": "SYSTEM", - "elevated_password": "", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-Msys2.ps1" - ] - }, { "type": "powershell", "scripts":[ @@ -318,6 +304,12 @@ "{{ template_dir }}/scripts/Installers/Install-Perl.ps1" ] }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-Git.ps1" + ] + }, { "type": "powershell", "environment_vars": [ @@ -472,6 +464,14 @@ "{{ template_dir }}/scripts/Installers/Install-AzureModules.ps1" ] }, + { + "type": "powershell", + "elevated_user": "SYSTEM", + "elevated_password": "", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-Msys2.ps1" + ] + }, { "type": "powershell", "scripts":[ From 89b21c86936b71c89e78d6a69d84b0293c8afaf9 Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Thu, 19 Mar 2020 01:21:50 +0700 Subject: [PATCH 023/111] changed validation in 2016 --- images/win/Windows2016-Azure.json | 12 ++++++------ images/win/Windows2019-Azure.json | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/images/win/Windows2016-Azure.json b/images/win/Windows2016-Azure.json index b40335295..df58ba849 100644 --- a/images/win/Windows2016-Azure.json +++ b/images/win/Windows2016-Azure.json @@ -296,12 +296,6 @@ "{{ template_dir }}/scripts/Installers/Install-Bazel.ps1" ] }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-SQLExpress.ps1" - ] - }, { "type": "powershell", "scripts":[ @@ -732,6 +726,12 @@ "{{ template_dir }}/scripts/Installers/Validate-Bazel.ps1" ] }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-SQLExpress.ps1" + ] + }, { "type": "powershell", "scripts":[ diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index 20711d802..7e7df2348 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -582,12 +582,6 @@ "type": "windows-restart", "restart_timeout": "10m" }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-SQLExpress.ps1" - ] - }, { "type": "powershell", "scripts":[ @@ -743,6 +737,12 @@ "{{ template_dir }}/scripts/Installers/Validate-MysqlCli.ps1" ] }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-SQLExpress.ps1" + ] + }, { "type": "powershell", "scripts":[ From 66c53c10652ecc041896e55c36c613599260032d Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Thu, 19 Mar 2020 01:36:41 +0700 Subject: [PATCH 024/111] added parameters for validation. --- .../Installers/Validate-SQLExpress.ps1 | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/images/win/scripts/Installers/Validate-SQLExpress.ps1 b/images/win/scripts/Installers/Validate-SQLExpress.ps1 index fc54a4d06..106a5b7dc 100644 --- a/images/win/scripts/Installers/Validate-SQLExpress.ps1 +++ b/images/win/scripts/Installers/Validate-SQLExpress.ps1 @@ -2,29 +2,30 @@ ## File: Validate-SQLExpress.ps1 ## Desc: Validate Microsoft SQL Express installation ################################################################################ + +#Parameters for database access +$sqlUser = "sa" +$sqlPassword = "P@ssword!!" +$sqlInstance = "SQL2019" + function Test-SqlConnection { param( [Parameter(Mandatory)] [string]$ServerName, - [Parameter(Mandatory)] [string]$IntegratedSecurity, - [Parameter(Mandatory)] [string]$UserName, - [Parameter(Mandatory)] [string]$Password ) - $ErrorActionPreference = 'Stop' - try { $connectionString = 'Server={0};Integrated Security={1};User ID={2};Password={3}' -f $ServerName,$IntegratedSecurity,$UserName,$Password Write-Host -Object "Trying to connect to SQL Express instance: $ServerName" $sqlConnection = New-Object System.Data.SqlClient.SqlConnection $connectionString $sqlConnection.Open() - Write-Host -Object "Connection to database: {0} in in was successful. Version of SQL Express is: {1}" -f $sqlConnection.Database,$sqlConnection.ServerVersion + Write-Host -Object "Connection to database: {0} was successful. Version of SQL Express is: {1}" -f $sqlConnection.Database,$sqlConnection.ServerVersion return $sqlConnection.ServerVersion } catch { Write-Host -Object "Connection to SQL Express cannot be established." @@ -34,17 +35,16 @@ function Test-SqlConnection { $sqlConnection.Close() } } -$instanceName = "$env:computername\SQL2019" -$version = Test-SqlConnection -ServerName $instanceName -IntegratedSecurity "false" -UserName "sa" -Password "P@ssword!!" +$instanceName = "$env:computername\$sqlInstance" +$version = Test-SqlConnection -ServerName $instanceName -IntegratedSecurity "false" -UserName $sqlUser -Password $sqlPassword # Adding description of the software to Markdown $SoftwareName = "Git" - $Description = @" _Version:_ $version
-_InstanceName:_ SQL2019
-_Username:_ sa
-_Password:_ P@ssword!!
+_InstanceName:_ $sqlInstance
+_Username:_ $sqlUser
+_Password:_ $sqlPassword
_Default Path:_ C:\Program Files (x86)\Microsoft SQL Server "@ From 7bc1e5494f631d7f49b6ad007c162ff2bfbe96bc Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Thu, 19 Mar 2020 01:56:11 +0700 Subject: [PATCH 025/111] created separate functions for each step. --- .../scripts/Installers/Install-SQLExpress.ps1 | 62 +++++++++++++++---- 1 file changed, 50 insertions(+), 12 deletions(-) diff --git a/images/win/scripts/Installers/Install-SQLExpress.ps1 b/images/win/scripts/Installers/Install-SQLExpress.ps1 index 2834371e3..d39f4f7b5 100644 --- a/images/win/scripts/Installers/Install-SQLExpress.ps1 +++ b/images/win/scripts/Installers/Install-SQLExpress.ps1 @@ -2,26 +2,65 @@ ## File: Install-SQLExpress.ps1 ## Desc: Install SQL Express for Windows ################################################################################ -function Start-Task { + +function Download-FullSQLPackage { + param( + [String]$InstallerPath, + [String]$Arguments = ("/MEDIAPATH=$downloadPath", "/MEDIATYPE=Core","/Action=Download", "/QUIET") + ) + $process = Start-Process -FilePath $InstallerPath -ArgumentList $Arguments -Wait -PassThru + $exitCode = $process.ExitCode +# Exit code -2067529716 is added since SQL Unpack procedure returns it on success. + if ($exitCode -eq 0) + { + Write-Host -Object "Full SQL Express package has been successfully downloaded to $InstallerPath : ExitCode: $exitCode" + } + else + { + Write-Host -Object "Full package downloading process was unsuccessful. Exit code: $exitCode." + exit $exitCode + } +} + +function Unpack-SQLInstaller { param( [String]$InstallPath, - [String]$Arguments, - [String]$SuccessMessage + [String]$Arguments = ("/Q", "/IACCEPTSQLSERVERLICENSETERMS") ) $process = Start-Process -FilePath $InstallPath -ArgumentList $Arguments -Wait -PassThru $exitCode = $process.ExitCode # Exit code -2067529716 is added since SQL Unpack procedure returns it on success. if ($exitCode -eq 0 -or $exitCode -eq -2067529716) { - Write-Host -Object "$SuccessMessage : ExitCode: $exitCode" + Write-Host -Object "SQL installer unpacking has been completed." } else { - Write-Host -Object "Non zero exit code returned by the installation process : $exitCode." + Write-Host -Object "SQL installer unpacking was interrupted : $exitCode." exit $exitCode } } +function Start-Installer { + param( + [String]$InstallPath, + [String]$Arguments = ("/Q", "/IACCEPTSQLSERVERLICENSETERMS", "/Action=Install", "/INSTANCEID=SQL2019", "/INSTANCENAME=SQL2019", "/SECURITYMODE=SQL", "/SAPWD=P@ssword!!", "/TCPENABLED=1") + ) + $process = Start-Process -FilePath $InstallPath -ArgumentList $Arguments -Wait -PassThru + $exitCode = $process.ExitCode +# Exit code -2067529716 is added since SQL Unpack procedure returns it on success. + if ($exitCode -eq 0) + { + Write-Host -Object "SQL Express has been successfully installed: ExitCode: $exitCode" + } + else + { + Write-Host -Object "Installation procedure was not correctly completed. Exit code: $exitCode." + exit $exitCode + } +} + + function Start-DownloadSQLExpress { param( [String]$InstallerUrl, @@ -58,19 +97,18 @@ function Start-DownloadSQLExpress { } Write-Host "SQL Express has been successfully downladed from the link: $InstallerUrl" } - +#default variables for functions. $installerUrl = "https://go.microsoft.com/fwlink/?linkid=866658" $installerPath = "${env:Temp}\SQL2019-SSEI-Expr.exe" $downloadPath = "C:\SQLEXPRESS2019" $setupPath = Join-Path $downloadPath "SQLEXPR_x64_ENU" -$downloadArgs = ("/MEDIAPATH=$downloadPath", "/MEDIATYPE=Core","/Action=Download", "/QUIET") -$unpackArgs = ("/Q", "/IACCEPTSQLSERVERLICENSETERMS") -$installArgs = ("/Q", "/IACCEPTSQLSERVERLICENSETERMS", "/Action=Install", "/INSTANCEID=SQL2019", "/INSTANCENAME=SQL2019", "/SECURITYMODE=SQL", "/SAPWD=P@ssword!!", "/TCPENABLED=1") +#Set default location for proper script execution +Set-Location -Path $downloadPath #Download installer for SQL Express Start-DownloadSQLExpress -InstallerUrl $installerUrl -InstallerPath $installerPath #Download full SQL Express package -Start-Task -InstallPath $installerPath -Arguments $downloadArgs -SuccessMessage "Downloaded full package. To path: $installerPath " +Download-FullSQLPackage -InstallerPath $installerPath #Unpack SQL Express Installer -Start-Task -InstallPath "$setupPath.exe" -Arguments $unpackArgs -SuccessMessage "Unpacked package to directory: $setupPath" +Unpack-SQLInstaller -InstallPath "$setupPath.exe" #Start SQL Express installer silently -Start-Task -InstallPath "$setupPath/SETUP.exe" -Arguments $installArgs -SuccessMessage "SQL has been installed to directory: ${env:ProgramFiles}/Microsoft SQL Server" \ No newline at end of file +Start-Installer -InstallPath "$setupPath/SETUP.exe" \ No newline at end of file From 09ce7185499f7587f6e6cfb941ec65391e13ee99 Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Thu, 19 Mar 2020 02:38:23 +0700 Subject: [PATCH 026/111] added Start-DownloadWithRetry function --- .../scripts/ImageHelpers/InstallHelpers.ps1 | 166 +++++++++++++++++- 1 file changed, 165 insertions(+), 1 deletion(-) diff --git a/images/win/scripts/ImageHelpers/InstallHelpers.ps1 b/images/win/scripts/ImageHelpers/InstallHelpers.ps1 index f6c553b2c..201dea865 100644 --- a/images/win/scripts/ImageHelpers/InstallHelpers.ps1 +++ b/images/win/scripts/ImageHelpers/InstallHelpers.ps1 @@ -161,7 +161,134 @@ Hashtable for service arguments } } -function Get-VS19ExtensionVersion + +function Start-DownloadWithRetry +{ + param ( + [Parameter(Mandatory)] + [string] $Url, + [string] $FullFilePath = "${env:Temp}\Default.exe", + [int] $retries = 20 + ) + #Default retry logic for the package. + while($retries -gt 0) + { + try + { + Write-Host "Downloading package from: $Url to path $FilePath ." + (New-Object System.Net.WebClient).DownloadFile($Url, $FilePath) + break + } + catch + { + Write-Host "There is an error during package downloading" + $_ + + $retries-- + + if ($retries -eq 0) + { + Write-Host "File can't be downloaded. Please try later or check that file exists by url: $Url" + $_ + exit 1 + } + + Write-Host "Waiting 30 seconds before retrying. Retries left: $retries" + Start-Sleep -Seconds 30 + } + } + return $FullFilePath +} + + +function Install-VsixExtension +{ + Param + ( + [string] $Url, + [Parameter(Mandatory = $true)] + [string] $Name, + [string] $FilePath, + [Parameter(Mandatory = $true)] + [string] $VSversion, + [int] $retries = 20, + [switch] $InstallOnly + ) + + if (!$InstallOnly) + { + $FilePath = "${env:Temp}\$Name" + + while($retries -gt 0) + { + try + { + Write-Host "Downloading $Name..." + (New-Object System.Net.WebClient).DownloadFile($Url, $FilePath) + break + } + catch + { + Write-Host "There is an error during $Name downloading" + $_ + + $retries-- + + if ($retries -eq 0) + { + Write-Host "File can't be downloaded" + $_ + exit 1 + } + + Write-Host "Waiting 30 seconds before retrying. Retries left: $retries" + Start-Sleep -Seconds 30 + } + } + } + + $ArgumentList = ('/quiet', "`"$FilePath`"") + + Write-Host "Starting Install $Name..." + try + { + #There are 2 types of packages at the moment - exe and vsix + if ($Name -match "vsix") + { + $process = Start-Process -FilePath "C:\Program Files (x86)\Microsoft Visual Studio\$VSversion\Enterprise\Common7\IDE\VSIXInstaller.exe" -ArgumentList $ArgumentList -Wait -PassThru + } + else + { + $process = Start-Process -FilePath ${env:Temp}\$Name /Q -Wait -PassThru + } + } + catch + { + Write-Host "There is an error during $Name installation" + $_ + exit 1 + } + + $exitCode = $process.ExitCode + + if ($exitCode -eq 0 -or $exitCode -eq 1001) # 1001 means the extension is already installed + { + Write-Host "$Name installed successfully" + } + else + { + Write-Host "Unsuccessful exit code returned by the installation process: $exitCode." + exit 1 + } + + #Cleanup downloaded installation files + if (!$InstallOnly) + { + Remove-Item -Force -Confirm:$false $FilePath + } +} + +function Get-VSExtensionVersion { param ( [string] [Parameter(Mandatory=$true)] $packageName @@ -187,3 +314,40 @@ function Get-VS19ExtensionVersion return $packageVersion } + + +function Get-ToolcachePackages { + $toolcachePath = Join-Path $env:ROOT_FOLDER "toolcache.json" + Get-Content -Raw $toolcachePath | ConvertFrom-Json +} + +function Get-ToolsByName { + param ( + [Parameter(Mandatory = $True)] + [string]$SoftwareName + ) + + (Get-ToolcachePackages).PSObject.Properties | Where-Object { $_.Name -match $SoftwareName } | ForEach-Object { + $packageNameParts = $_.Name.Split("-") + [PSCustomObject] @{ + ToolName = $packageNameParts[1] + Versions = $_.Value + Architecture = $packageNameParts[3,4] -join "-" + } + } +} + +function Get-WinVersion +{ + (Get-WmiObject -class Win32_OperatingSystem).Caption +} + +function Test-IsWin19 +{ + (Get-WinVersion) -match "2019" +} + +function Test-IsWin16 +{ + (Get-WinVersion) -match "2016" +} From 3f05ba0dba6724d6c84eec579d9c10b58212a217 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 19 Mar 2020 09:24:11 +0300 Subject: [PATCH 027/111] Add msys2 to windows-2016 --- images/win/Windows2016-Azure.json | 14 ++++++++++++++ images/win/scripts/Installers/Install-Msys2.ps1 | 14 ++++++-------- images/win/scripts/Installers/Validate-Msys2.ps1 | 10 +++++----- 3 files changed, 25 insertions(+), 13 deletions(-) diff --git a/images/win/Windows2016-Azure.json b/images/win/Windows2016-Azure.json index 94f200b0f..df3aa473b 100644 --- a/images/win/Windows2016-Azure.json +++ b/images/win/Windows2016-Azure.json @@ -483,6 +483,14 @@ "{{ template_dir }}/scripts/Installers/Install-AzureModules.ps1" ] }, + { + "type": "powershell", + "elevated_user": "SYSTEM", + "elevated_password": "", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-Msys2.ps1" + ] + }, { "type": "powershell", "scripts":[ @@ -611,6 +619,12 @@ "{{ template_dir }}/scripts/Installers/Validate-AzureDevOpsCli.ps1" ] }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-Msys2.ps1" + ] + }, { "type": "powershell", "environment_vars":[ diff --git a/images/win/scripts/Installers/Install-Msys2.ps1 b/images/win/scripts/Installers/Install-Msys2.ps1 index 73d7b81d9..62195aaae 100644 --- a/images/win/scripts/Installers/Install-Msys2.ps1 +++ b/images/win/scripts/Installers/Install-Msys2.ps1 @@ -15,7 +15,7 @@ $msy2_uri = "http://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-20190524.ta $msy2_file = "C:\Windows\Temp\msys2.tar.xz" # Download the latest msys2 x86_64 -Write-Host "Starting download" +Write-Host "Starting msys2 download" (New-Object System.Net.WebClient).DownloadFile($msy2_uri, $msy2_file) Write-Host "Finished download" @@ -26,22 +26,20 @@ $env:PATH = "$env:git_path\mingw64\bin;$env:orig_path" $tar = "$env:git_path\usr\bin\tar.exe" # extract tar.xz to C:\ -Write-Host "Starting extraction" +Write-Host "Starting msys2 extraction" &$tar -Jxf $msy2_file_u -C /c/ Remove-Item $msy2_file - -Write-Host Finished extraction +Write-Host "Finished extraction" $env:PATH = "C:\msys64\mingw64\bin;C:\msys64\usr\bin;$env:orig_path" $ErrorActionPreference = "Continue" -Write-Host "sh -c pacman-key --init" +Write-Host "bash -c pacman-key --init" Invoke-Expression "bash -c `"pacman-key --init 2>&1`"" - -Write-Host "sh.exe -c pacman-key --populate msys2" -Invoke-Expression "sh -c `"pacman-key --populate msys2 2>&1`"" +Write-Host "bash -c pacman-key --populate msys2" +Invoke-Expression "bash -c `"pacman-key --populate msys2 2>&1`"" Write-Host "pacman --noconfirm -Syyuu" pacman.exe -Syyuu --noconfirm 2>$null diff --git a/images/win/scripts/Installers/Validate-Msys2.ps1 b/images/win/scripts/Installers/Validate-Msys2.ps1 index 9b0492a31..31c8ea888 100644 --- a/images/win/scripts/Installers/Validate-Msys2.ps1 +++ b/images/win/scripts/Installers/Validate-Msys2.ps1 @@ -38,11 +38,11 @@ else Adding description of the software to Markdown -`gcc --version` gives output like: -gcc.exe (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 5.3.0 -Copyright (C) 2015 Free Software Foundation, Inc. -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# `gcc --version` gives output like: +# gcc.exe (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 5.3.0 +# Copyright (C) 2015 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $SoftwareName = "MinGW" $(gcc --version).Split([System.Environment]::NewLine)[0] -match "\d\.\d\.\d$" From 07b107e7343312538a4577fdeb97a07168c30d96 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 19 Mar 2020 09:25:53 +0300 Subject: [PATCH 028/111] Minor fix --- images/win/scripts/Installers/Install-Msys2.ps1 | 4 ++-- images/win/scripts/Installers/Validate-Msys2.ps1 | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/images/win/scripts/Installers/Install-Msys2.ps1 b/images/win/scripts/Installers/Install-Msys2.ps1 index 62195aaae..5f7ec1371 100644 --- a/images/win/scripts/Installers/Install-Msys2.ps1 +++ b/images/win/scripts/Installers/Install-Msys2.ps1 @@ -1,6 +1,6 @@ ################################################################################ -## File: Install-MSYS2.ps1 -## Desc: Install MSYS2 and 64-bit gcc, cmake, & llvm (32-bit commented out) +## File: Install-Msys2.ps1 +## Desc: Install Msys2 and 64-bit gcc, cmake, & llvm (32-bit commented out) ################################################################################ # References diff --git a/images/win/scripts/Installers/Validate-Msys2.ps1 b/images/win/scripts/Installers/Validate-Msys2.ps1 index 31c8ea888..3554b6039 100644 --- a/images/win/scripts/Installers/Validate-Msys2.ps1 +++ b/images/win/scripts/Installers/Validate-Msys2.ps1 @@ -1,6 +1,6 @@ ################################################################################ -## File: Validate-MSYS2.ps1 -## Desc: Validate MSYS2 +## File: Validate-Msys2.ps1 +## Desc: Validate Msys2 ################################################################################ if (Get-Command -Name 'gcc') @@ -36,7 +36,7 @@ else exit 1 } -Adding description of the software to Markdown +# Adding description of the software to Markdown # `gcc --version` gives output like: # gcc.exe (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 5.3.0 From 7803da6806396147030efb7e2ed881cebd90cfef Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Thu, 19 Mar 2020 18:15:11 +0700 Subject: [PATCH 029/111] added DownloadWithRetry function --- .../scripts/ImageHelpers/InstallHelpers.ps1 | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/images/win/scripts/ImageHelpers/InstallHelpers.ps1 b/images/win/scripts/ImageHelpers/InstallHelpers.ps1 index 201dea865..5ce11dede 100644 --- a/images/win/scripts/ImageHelpers/InstallHelpers.ps1 +++ b/images/win/scripts/ImageHelpers/InstallHelpers.ps1 @@ -161,15 +161,17 @@ Hashtable for service arguments } } - function Start-DownloadWithRetry { param ( - [Parameter(Mandatory)] - [string] $Url, - [string] $FullFilePath = "${env:Temp}\Default.exe", - [int] $retries = 20 - ) + [Parameter(Mandatory)] + [string] $Url, + [string] $DownloadPath = "${env:Temp}", + [Parameter(Mandatory)] + [string] $Name, + [int] $retries = 20 + ) + $FilePath = Join-Path $DownloadPath "\" $Name #Default retry logic for the package. while($retries -gt 0) { @@ -183,7 +185,6 @@ function Start-DownloadWithRetry { Write-Host "There is an error during package downloading" $_ - $retries-- if ($retries -eq 0) @@ -192,12 +193,11 @@ function Start-DownloadWithRetry $_ exit 1 } - Write-Host "Waiting 30 seconds before retrying. Retries left: $retries" Start-Sleep -Seconds 30 } } - return $FullFilePath + return $FilePath } From 71dfd431bdb84841425601f81c44b02644437ec5 Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Thu, 19 Mar 2020 18:48:52 +0700 Subject: [PATCH 030/111] added DownloadWithRetry function --- .../scripts/Installers/Install-SQLExpress.ps1 | 41 +------------------ 1 file changed, 2 insertions(+), 39 deletions(-) diff --git a/images/win/scripts/Installers/Install-SQLExpress.ps1 b/images/win/scripts/Installers/Install-SQLExpress.ps1 index d39f4f7b5..ed6a66062 100644 --- a/images/win/scripts/Installers/Install-SQLExpress.ps1 +++ b/images/win/scripts/Installers/Install-SQLExpress.ps1 @@ -2,6 +2,7 @@ ## File: Install-SQLExpress.ps1 ## Desc: Install SQL Express for Windows ################################################################################ +Import-Module -Name ImageHelpers -Force; function Download-FullSQLPackage { param( @@ -60,52 +61,14 @@ function Start-Installer { } } - -function Start-DownloadSQLExpress { - param( - [String]$InstallerUrl, - [String]$InstallerPath, - [int] $retries = 10 - ) - Write-Host "Downloading SQL Express web-installer from: $InstallerUrl" - # In case of any errors -try to download package several times - while($retries -gt 0) - { - try - { - Write-Host "Downloading SQL Express installer..." - (New-Object System.Net.WebClient).DownloadFile($InstallerUrl, $InstallerPath) - break - } - catch - { - Write-Host "There is an error during SQL Express downloading" - $_ - - $retries-- - - if ($retries -eq 0) - { - Write-Host "File can't be downloaded" - $_ - exit 1 - } - - Write-Host "Waiting 30 seconds before retrying. Retries left: $retries" - Start-Sleep -Seconds 30 - } - } - Write-Host "SQL Express has been successfully downladed from the link: $InstallerUrl" -} #default variables for functions. $installerUrl = "https://go.microsoft.com/fwlink/?linkid=866658" -$installerPath = "${env:Temp}\SQL2019-SSEI-Expr.exe" $downloadPath = "C:\SQLEXPRESS2019" $setupPath = Join-Path $downloadPath "SQLEXPR_x64_ENU" #Set default location for proper script execution Set-Location -Path $downloadPath #Download installer for SQL Express -Start-DownloadSQLExpress -InstallerUrl $installerUrl -InstallerPath $installerPath +$installerPath = Start-DownloadWithRetry -Url "https://go.microsoft.com/fwlink/?linkid=866658" -Name SQL2019-SSEI-Expr.exe #Download full SQL Express package Download-FullSQLPackage -InstallerPath $installerPath #Unpack SQL Express Installer From b4471d81b0345c3a8df4712e180822a935e8eb18 Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Thu, 19 Mar 2020 18:53:27 +0700 Subject: [PATCH 031/111] added new parameter for Unpack function --- images/win/scripts/Installers/Install-SQLExpress.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/images/win/scripts/Installers/Install-SQLExpress.ps1 b/images/win/scripts/Installers/Install-SQLExpress.ps1 index ed6a66062..68e8a2107 100644 --- a/images/win/scripts/Installers/Install-SQLExpress.ps1 +++ b/images/win/scripts/Installers/Install-SQLExpress.ps1 @@ -7,7 +7,8 @@ Import-Module -Name ImageHelpers -Force; function Download-FullSQLPackage { param( [String]$InstallerPath, - [String]$Arguments = ("/MEDIAPATH=$downloadPath", "/MEDIATYPE=Core","/Action=Download", "/QUIET") + [String]$DestinationPath, + [String]$Arguments = ("/MEDIAPATH=$DestinationPath", "/MEDIATYPE=Core","/Action=Download", "/QUIET") ) $process = Start-Process -FilePath $InstallerPath -ArgumentList $Arguments -Wait -PassThru $exitCode = $process.ExitCode @@ -70,7 +71,7 @@ Set-Location -Path $downloadPath #Download installer for SQL Express $installerPath = Start-DownloadWithRetry -Url "https://go.microsoft.com/fwlink/?linkid=866658" -Name SQL2019-SSEI-Expr.exe #Download full SQL Express package -Download-FullSQLPackage -InstallerPath $installerPath +Download-FullSQLPackage -InstallerPath $installerPath -DestinationPath $downloadPath #Unpack SQL Express Installer Unpack-SQLInstaller -InstallPath "$setupPath.exe" #Start SQL Express installer silently From 1316969c5207109a22cca14a2a86922fb77dfd6d Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Thu, 19 Mar 2020 18:57:35 +0700 Subject: [PATCH 032/111] moved all installation packages to Temp folder --- images/win/scripts/Installers/Install-SQLExpress.ps1 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/images/win/scripts/Installers/Install-SQLExpress.ps1 b/images/win/scripts/Installers/Install-SQLExpress.ps1 index 68e8a2107..292b65b26 100644 --- a/images/win/scripts/Installers/Install-SQLExpress.ps1 +++ b/images/win/scripts/Installers/Install-SQLExpress.ps1 @@ -7,8 +7,7 @@ Import-Module -Name ImageHelpers -Force; function Download-FullSQLPackage { param( [String]$InstallerPath, - [String]$DestinationPath, - [String]$Arguments = ("/MEDIAPATH=$DestinationPath", "/MEDIATYPE=Core","/Action=Download", "/QUIET") + [String]$Arguments = ("/MEDIAPATH=${env:Temp}", "/MEDIATYPE=Core","/Action=Download", "/QUIET") ) $process = Start-Process -FilePath $InstallerPath -ArgumentList $Arguments -Wait -PassThru $exitCode = $process.ExitCode @@ -64,14 +63,14 @@ function Start-Installer { #default variables for functions. $installerUrl = "https://go.microsoft.com/fwlink/?linkid=866658" -$downloadPath = "C:\SQLEXPRESS2019" +$downloadPath = "${env:Temp}" $setupPath = Join-Path $downloadPath "SQLEXPR_x64_ENU" #Set default location for proper script execution Set-Location -Path $downloadPath #Download installer for SQL Express $installerPath = Start-DownloadWithRetry -Url "https://go.microsoft.com/fwlink/?linkid=866658" -Name SQL2019-SSEI-Expr.exe #Download full SQL Express package -Download-FullSQLPackage -InstallerPath $installerPath -DestinationPath $downloadPath +Download-FullSQLPackage -InstallerPath $installerPath #Unpack SQL Express Installer Unpack-SQLInstaller -InstallPath "$setupPath.exe" #Start SQL Express installer silently From 8875bb35856101c32cfd18e8e0dde671b4cae000 Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Thu, 19 Mar 2020 19:00:16 +0700 Subject: [PATCH 033/111] removed unnecessary comments from code. --- images/win/scripts/Installers/Install-SQLExpress.ps1 | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/images/win/scripts/Installers/Install-SQLExpress.ps1 b/images/win/scripts/Installers/Install-SQLExpress.ps1 index 292b65b26..693c9303f 100644 --- a/images/win/scripts/Installers/Install-SQLExpress.ps1 +++ b/images/win/scripts/Installers/Install-SQLExpress.ps1 @@ -11,7 +11,6 @@ function Download-FullSQLPackage { ) $process = Start-Process -FilePath $InstallerPath -ArgumentList $Arguments -Wait -PassThru $exitCode = $process.ExitCode -# Exit code -2067529716 is added since SQL Unpack procedure returns it on success. if ($exitCode -eq 0) { Write-Host -Object "Full SQL Express package has been successfully downloaded to $InstallerPath : ExitCode: $exitCode" @@ -49,7 +48,6 @@ function Start-Installer { ) $process = Start-Process -FilePath $InstallPath -ArgumentList $Arguments -Wait -PassThru $exitCode = $process.ExitCode -# Exit code -2067529716 is added since SQL Unpack procedure returns it on success. if ($exitCode -eq 0) { Write-Host -Object "SQL Express has been successfully installed: ExitCode: $exitCode" @@ -60,18 +58,13 @@ function Start-Installer { exit $exitCode } } - -#default variables for functions. $installerUrl = "https://go.microsoft.com/fwlink/?linkid=866658" $downloadPath = "${env:Temp}" $setupPath = Join-Path $downloadPath "SQLEXPR_x64_ENU" -#Set default location for proper script execution +#Set default location for installation process Set-Location -Path $downloadPath -#Download installer for SQL Express +#Download installer for SQL Express and return path to it $installerPath = Start-DownloadWithRetry -Url "https://go.microsoft.com/fwlink/?linkid=866658" -Name SQL2019-SSEI-Expr.exe -#Download full SQL Express package Download-FullSQLPackage -InstallerPath $installerPath -#Unpack SQL Express Installer Unpack-SQLInstaller -InstallPath "$setupPath.exe" -#Start SQL Express installer silently Start-Installer -InstallPath "$setupPath/SETUP.exe" \ No newline at end of file From 6d42c04772c6cf17c9e2cbfabed09f020749b0cc Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Fri, 20 Mar 2020 00:26:46 +0700 Subject: [PATCH 034/111] InstallHelpers has been reworled with new function --- images/win/scripts/ImageHelpers/InstallHelpers.ps1 | 7 ------- 1 file changed, 7 deletions(-) diff --git a/images/win/scripts/ImageHelpers/InstallHelpers.ps1 b/images/win/scripts/ImageHelpers/InstallHelpers.ps1 index 0f965f74c..5ce11dede 100644 --- a/images/win/scripts/ImageHelpers/InstallHelpers.ps1 +++ b/images/win/scripts/ImageHelpers/InstallHelpers.ps1 @@ -161,7 +161,6 @@ Hashtable for service arguments } } -<<<<<<< HEAD function Start-DownloadWithRetry { param ( @@ -202,8 +201,6 @@ function Start-DownloadWithRetry } -======= ->>>>>>> upstream/master function Install-VsixExtension { Param @@ -354,7 +351,3 @@ function Test-IsWin16 { (Get-WinVersion) -match "2016" } -<<<<<<< HEAD -======= - ->>>>>>> upstream/master From 33fd9bde2ea2ab0311a27f0d2a31d374190ea37e Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Fri, 20 Mar 2020 00:28:25 +0700 Subject: [PATCH 035/111] added some unneccesary things --- images/win/scripts/Installers/Install-SQLExpress.ps1 | 2 -- images/win/scripts/Installers/Validate-SQLExpress.ps1 | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/images/win/scripts/Installers/Install-SQLExpress.ps1 b/images/win/scripts/Installers/Install-SQLExpress.ps1 index 693c9303f..016dcd7cb 100644 --- a/images/win/scripts/Installers/Install-SQLExpress.ps1 +++ b/images/win/scripts/Installers/Install-SQLExpress.ps1 @@ -61,9 +61,7 @@ function Start-Installer { $installerUrl = "https://go.microsoft.com/fwlink/?linkid=866658" $downloadPath = "${env:Temp}" $setupPath = Join-Path $downloadPath "SQLEXPR_x64_ENU" -#Set default location for installation process Set-Location -Path $downloadPath -#Download installer for SQL Express and return path to it $installerPath = Start-DownloadWithRetry -Url "https://go.microsoft.com/fwlink/?linkid=866658" -Name SQL2019-SSEI-Expr.exe Download-FullSQLPackage -InstallerPath $installerPath Unpack-SQLInstaller -InstallPath "$setupPath.exe" diff --git a/images/win/scripts/Installers/Validate-SQLExpress.ps1 b/images/win/scripts/Installers/Validate-SQLExpress.ps1 index 106a5b7dc..ddb4ca3fd 100644 --- a/images/win/scripts/Installers/Validate-SQLExpress.ps1 +++ b/images/win/scripts/Installers/Validate-SQLExpress.ps1 @@ -27,9 +27,11 @@ function Test-SqlConnection { $sqlConnection.Open() Write-Host -Object "Connection to database: {0} was successful. Version of SQL Express is: {1}" -f $sqlConnection.Database,$sqlConnection.ServerVersion return $sqlConnection.ServerVersion + } catch { Write-Host -Object "Connection to SQL Express cannot be established." exit 1 + } finally { ## Close the connection when we're done $sqlConnection.Close() From 1efd5a626fffa3a288dc3f6699d36ab357b1e0c4 Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Fri, 20 Mar 2020 01:54:56 +0700 Subject: [PATCH 036/111] small fixes --- images/win/scripts/ImageHelpers/InstallHelpers.ps1 | 2 +- images/win/scripts/Installers/Install-SQLExpress.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/images/win/scripts/ImageHelpers/InstallHelpers.ps1 b/images/win/scripts/ImageHelpers/InstallHelpers.ps1 index 5ce11dede..910fbe5c1 100644 --- a/images/win/scripts/ImageHelpers/InstallHelpers.ps1 +++ b/images/win/scripts/ImageHelpers/InstallHelpers.ps1 @@ -171,7 +171,7 @@ function Start-DownloadWithRetry [string] $Name, [int] $retries = 20 ) - $FilePath = Join-Path $DownloadPath "\" $Name + $FilePath = Join-Path $DownloadPath $Name #Default retry logic for the package. while($retries -gt 0) { diff --git a/images/win/scripts/Installers/Install-SQLExpress.ps1 b/images/win/scripts/Installers/Install-SQLExpress.ps1 index 016dcd7cb..68c56470d 100644 --- a/images/win/scripts/Installers/Install-SQLExpress.ps1 +++ b/images/win/scripts/Installers/Install-SQLExpress.ps1 @@ -62,7 +62,7 @@ $installerUrl = "https://go.microsoft.com/fwlink/?linkid=866658" $downloadPath = "${env:Temp}" $setupPath = Join-Path $downloadPath "SQLEXPR_x64_ENU" Set-Location -Path $downloadPath -$installerPath = Start-DownloadWithRetry -Url "https://go.microsoft.com/fwlink/?linkid=866658" -Name SQL2019-SSEI-Expr.exe +$installerPath = Start-DownloadWithRetry -Url "https://go.microsoft.com/fwlink/?linkid=866658" -Name "SQL2019-SSEI-Expr.exe" Download-FullSQLPackage -InstallerPath $installerPath Unpack-SQLInstaller -InstallPath "$setupPath.exe" Start-Installer -InstallPath "$setupPath/SETUP.exe" \ No newline at end of file From 3a426e8c3a6d1b486e3fc9aa25cf9675e4af13bf Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Fri, 20 Mar 2020 01:56:57 +0700 Subject: [PATCH 037/111] info messages --- images/win/scripts/Installers/Install-SQLExpress.ps1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/images/win/scripts/Installers/Install-SQLExpress.ps1 b/images/win/scripts/Installers/Install-SQLExpress.ps1 index 68c56470d..ebdb2c747 100644 --- a/images/win/scripts/Installers/Install-SQLExpress.ps1 +++ b/images/win/scripts/Installers/Install-SQLExpress.ps1 @@ -9,6 +9,7 @@ function Download-FullSQLPackage { [String]$InstallerPath, [String]$Arguments = ("/MEDIAPATH=${env:Temp}", "/MEDIATYPE=Core","/Action=Download", "/QUIET") ) + Write-Host "Downloading full package to $InstallerPath..." $process = Start-Process -FilePath $InstallerPath -ArgumentList $Arguments -Wait -PassThru $exitCode = $process.ExitCode if ($exitCode -eq 0) @@ -27,6 +28,7 @@ function Unpack-SQLInstaller { [String]$InstallPath, [String]$Arguments = ("/Q", "/IACCEPTSQLSERVERLICENSETERMS") ) + Write-Host "Start unpacking procedure to $InstallPath..." $process = Start-Process -FilePath $InstallPath -ArgumentList $Arguments -Wait -PassThru $exitCode = $process.ExitCode # Exit code -2067529716 is added since SQL Unpack procedure returns it on success. @@ -46,6 +48,7 @@ function Start-Installer { [String]$InstallPath, [String]$Arguments = ("/Q", "/IACCEPTSQLSERVERLICENSETERMS", "/Action=Install", "/INSTANCEID=SQL2019", "/INSTANCENAME=SQL2019", "/SECURITYMODE=SQL", "/SAPWD=P@ssword!!", "/TCPENABLED=1") ) + Write-Host "Installating SQL Express..." $process = Start-Process -FilePath $InstallPath -ArgumentList $Arguments -Wait -PassThru $exitCode = $process.ExitCode if ($exitCode -eq 0) From d6c9eb8583bba3db3cddc89f5cd9482734be1bc9 Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Fri, 20 Mar 2020 02:21:37 +0700 Subject: [PATCH 038/111] changed connection to SQL due to some mistakes --- images/win/scripts/Installers/Validate-SQLExpress.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/images/win/scripts/Installers/Validate-SQLExpress.ps1 b/images/win/scripts/Installers/Validate-SQLExpress.ps1 index ddb4ca3fd..75ef91855 100644 --- a/images/win/scripts/Installers/Validate-SQLExpress.ps1 +++ b/images/win/scripts/Installers/Validate-SQLExpress.ps1 @@ -22,10 +22,10 @@ function Test-SqlConnection { $ErrorActionPreference = 'Stop' try { $connectionString = 'Server={0};Integrated Security={1};User ID={2};Password={3}' -f $ServerName,$IntegratedSecurity,$UserName,$Password - Write-Host -Object "Trying to connect to SQL Express instance: $ServerName" + Write-Host $connectionString $sqlConnection = New-Object System.Data.SqlClient.SqlConnection $connectionString $sqlConnection.Open() - Write-Host -Object "Connection to database: {0} was successful. Version of SQL Express is: {1}" -f $sqlConnection.Database,$sqlConnection.ServerVersion + Write-Host -Object "Connection to SQL Express was successful." return $sqlConnection.ServerVersion } catch { From 3e0c42d950442d6d7568ff6326e77bbbd522deec Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Fri, 20 Mar 2020 02:29:59 +0700 Subject: [PATCH 039/111] remove redundunt write-host --- images/win/scripts/Installers/Validate-SQLExpress.ps1 | 1 - 1 file changed, 1 deletion(-) diff --git a/images/win/scripts/Installers/Validate-SQLExpress.ps1 b/images/win/scripts/Installers/Validate-SQLExpress.ps1 index 75ef91855..1b5a35783 100644 --- a/images/win/scripts/Installers/Validate-SQLExpress.ps1 +++ b/images/win/scripts/Installers/Validate-SQLExpress.ps1 @@ -22,7 +22,6 @@ function Test-SqlConnection { $ErrorActionPreference = 'Stop' try { $connectionString = 'Server={0};Integrated Security={1};User ID={2};Password={3}' -f $ServerName,$IntegratedSecurity,$UserName,$Password - Write-Host $connectionString $sqlConnection = New-Object System.Data.SqlClient.SqlConnection $connectionString $sqlConnection.Open() Write-Host -Object "Connection to SQL Express was successful." From ee850858850a9d475558baf7ab033e1b9f1437fc Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Fri, 20 Mar 2020 11:33:59 +0700 Subject: [PATCH 040/111] added download with retry function to psm. --- images/win/scripts/ImageHelpers/ImageHelpers.psm1 | 1 + 1 file changed, 1 insertion(+) diff --git a/images/win/scripts/ImageHelpers/ImageHelpers.psm1 b/images/win/scripts/ImageHelpers/ImageHelpers.psm1 index 743dc7a18..c40b10989 100644 --- a/images/win/scripts/ImageHelpers/ImageHelpers.psm1 +++ b/images/win/scripts/ImageHelpers/ImageHelpers.psm1 @@ -20,6 +20,7 @@ Export-ModuleMember -Function @( 'Add-SoftwareDetailsToMarkdown' 'Stop-SvcWithErrHandling' 'Set-SvcWithErrHandling' + 'Start-DownloadWithRetry' 'Install-VsixExtension' 'Get-VSExtensionVersion' 'Get-WinVersion' From fbf0e5ea07a09d2d4b6420e5e785058808214276 Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Fri, 20 Mar 2020 11:38:05 +0700 Subject: [PATCH 041/111] changed installvsix. added downloadwithretry func --- .../scripts/ImageHelpers/InstallHelpers.ps1 | 29 +------------------ 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/images/win/scripts/ImageHelpers/InstallHelpers.ps1 b/images/win/scripts/ImageHelpers/InstallHelpers.ps1 index 910fbe5c1..8ba4594e7 100644 --- a/images/win/scripts/ImageHelpers/InstallHelpers.ps1 +++ b/images/win/scripts/ImageHelpers/InstallHelpers.ps1 @@ -217,34 +217,7 @@ function Install-VsixExtension if (!$InstallOnly) { - $FilePath = "${env:Temp}\$Name" - - while($retries -gt 0) - { - try - { - Write-Host "Downloading $Name..." - (New-Object System.Net.WebClient).DownloadFile($Url, $FilePath) - break - } - catch - { - Write-Host "There is an error during $Name downloading" - $_ - - $retries-- - - if ($retries -eq 0) - { - Write-Host "File can't be downloaded" - $_ - exit 1 - } - - Write-Host "Waiting 30 seconds before retrying. Retries left: $retries" - Start-Sleep -Seconds 30 - } - } + $FilePath = Start-DownloadWithRetry -Url $Url -Name $Name } $ArgumentList = ('/quiet', "`"$FilePath`"") From 326bf84da439768c3c7a14309e584e8a1818a38c Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Fri, 20 Mar 2020 09:56:20 +0300 Subject: [PATCH 042/111] Fix var names --- .../win/scripts/Installers/Install-Msys2.ps1 | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/images/win/scripts/Installers/Install-Msys2.ps1 b/images/win/scripts/Installers/Install-Msys2.ps1 index 5f7ec1371..312a9d02f 100644 --- a/images/win/scripts/Installers/Install-Msys2.ps1 +++ b/images/win/scripts/Installers/Install-Msys2.ps1 @@ -7,31 +7,31 @@ # https://github.com/msys2/MINGW-packages/blob/master/azure-pipelines.yml # https://packages.msys2.org/group/ -$env:orig_path = $env:PATH -$env:git_path = "C:\Program Files\Git" +$env:origPath = $env:PATH +$env:gitPath = "C:\Program Files\Git" # get info from https://sourceforge.net/projects/msys2/files/Base/x86_64/ -$msy2_uri = "http://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-20190524.tar.xz" -$msy2_file = "C:\Windows\Temp\msys2.tar.xz" +$msys2Uri = "http://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-20190524.tar.xz" +$msys2File = "C:\Windows\Temp\msys2.tar.xz" # Download the latest msys2 x86_64 Write-Host "Starting msys2 download" -(New-Object System.Net.WebClient).DownloadFile($msy2_uri, $msy2_file) +(New-Object System.Net.WebClient).DownloadFile($msys2Uri, $msys2File) Write-Host "Finished download" -$msy2_file_u = "/$msy2_file".replace(':', '') +$msys2FileU = "/$msys2File".replace(':', '') # git has tar.exe in usr/bin, but xz.exe is in mingw64/bin -$env:PATH = "$env:git_path\mingw64\bin;$env:orig_path" -$tar = "$env:git_path\usr\bin\tar.exe" +$env:PATH = "$env:gitPath\mingw64\bin;$env:origPath" +$tar = "$env:gitPath\usr\bin\tar.exe" # extract tar.xz to C:\ Write-Host "Starting msys2 extraction" -&$tar -Jxf $msy2_file_u -C /c/ -Remove-Item $msy2_file +&$tar -Jxf $msys2FileU -C /c/ +Remove-Item $msys2File Write-Host "Finished extraction" -$env:PATH = "C:\msys64\mingw64\bin;C:\msys64\usr\bin;$env:orig_path" +$env:PATH = "C:\msys64\mingw64\bin;C:\msys64\usr\bin;$env:origPath" $ErrorActionPreference = "Continue" From 3fdcbbd94f438643271d2948713b9f3cd8766ab3 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Fri, 20 Mar 2020 09:58:12 +0300 Subject: [PATCH 043/111] Fix gcc version parsing --- images/win/scripts/Installers/Validate-Msys2.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/win/scripts/Installers/Validate-Msys2.ps1 b/images/win/scripts/Installers/Validate-Msys2.ps1 index 3554b6039..187e219de 100644 --- a/images/win/scripts/Installers/Validate-Msys2.ps1 +++ b/images/win/scripts/Installers/Validate-Msys2.ps1 @@ -45,7 +45,7 @@ else # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $SoftwareName = "MinGW" -$(gcc --version).Split([System.Environment]::NewLine)[0] -match "\d\.\d\.\d$" +$(gcc --version).Split([System.Environment]::NewLine)[0] -match "\d+\.\d+\.\d+$" $minGwVersion = $matches[0] $Description = @" From 58591f939b998e2ab0ebbca0c2f486e95f9647cc Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Fri, 20 Mar 2020 12:47:52 +0300 Subject: [PATCH 044/111] Remove redirect stderr to stdout --- .../win/scripts/Installers/Install-Msys2.ps1 | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/images/win/scripts/Installers/Install-Msys2.ps1 b/images/win/scripts/Installers/Install-Msys2.ps1 index 312a9d02f..197461c6a 100644 --- a/images/win/scripts/Installers/Install-Msys2.ps1 +++ b/images/win/scripts/Installers/Install-Msys2.ps1 @@ -7,12 +7,12 @@ # https://github.com/msys2/MINGW-packages/blob/master/azure-pipelines.yml # https://packages.msys2.org/group/ -$env:origPath = $env:PATH -$env:gitPath = "C:\Program Files\Git" +$origPath = $env:PATH +$gitPath = "C:\Program Files\Git" # get info from https://sourceforge.net/projects/msys2/files/Base/x86_64/ $msys2Uri = "http://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-20190524.tar.xz" -$msys2File = "C:\Windows\Temp\msys2.tar.xz" +$msys2File = "$env:TEMP\msys2.tar.xz" # Download the latest msys2 x86_64 Write-Host "Starting msys2 download" @@ -22,8 +22,8 @@ Write-Host "Finished download" $msys2FileU = "/$msys2File".replace(':', '') # git has tar.exe in usr/bin, but xz.exe is in mingw64/bin -$env:PATH = "$env:gitPath\mingw64\bin;$env:origPath" -$tar = "$env:gitPath\usr\bin\tar.exe" +$env:PATH = "$gitPath\mingw64\bin;$origPath" +$tar = "$gitPath\usr\bin\tar.exe" # extract tar.xz to C:\ Write-Host "Starting msys2 extraction" @@ -31,21 +31,20 @@ Write-Host "Starting msys2 extraction" Remove-Item $msys2File Write-Host "Finished extraction" -$env:PATH = "C:\msys64\mingw64\bin;C:\msys64\usr\bin;$env:origPath" +$env:PATH = "C:\msys64\mingw64\bin;C:\msys64\usr\bin;$origPath" $ErrorActionPreference = "Continue" Write-Host "bash -c pacman-key --init" -Invoke-Expression "bash -c `"pacman-key --init 2>&1`"" +Invoke-Expression "bash -c `"pacman-key --init`"" Write-Host "bash -c pacman-key --populate msys2" -Invoke-Expression "bash -c `"pacman-key --populate msys2 2>&1`"" +Invoke-Expression "bash -c `"pacman-key --populate msys2`"" Write-Host "pacman --noconfirm -Syyuu" -pacman.exe -Syyuu --noconfirm 2>$null -pacman.exe -Syuu --noconfirm 2>$null +pacman.exe -Syyuu --noconfirm +pacman.exe -Syuu --noconfirm -# install msys2 packages Write-Host "Install msys2 packages" pacman.exe -S --noconfirm --needed --noprogressbar base-devel compression From 5f459a3e58642bc8b2258524d7e83adc4e38b35b Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Fri, 20 Mar 2020 14:48:49 +0300 Subject: [PATCH 045/111] Remove errors ignore command --- images/win/scripts/Installers/Install-Msys2.ps1 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/images/win/scripts/Installers/Install-Msys2.ps1 b/images/win/scripts/Installers/Install-Msys2.ps1 index 197461c6a..67f43f9cb 100644 --- a/images/win/scripts/Installers/Install-Msys2.ps1 +++ b/images/win/scripts/Installers/Install-Msys2.ps1 @@ -31,10 +31,9 @@ Write-Host "Starting msys2 extraction" Remove-Item $msys2File Write-Host "Finished extraction" +# Add msys2 bin tools folders to PATH $env:PATH = "C:\msys64\mingw64\bin;C:\msys64\usr\bin;$origPath" -$ErrorActionPreference = "Continue" - Write-Host "bash -c pacman-key --init" Invoke-Expression "bash -c `"pacman-key --init`"" From 3c6b72b40d600651ad860c0d0622fe481d5cfbab Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Fri, 20 Mar 2020 18:48:51 +0700 Subject: [PATCH 046/111] changed setupPath join --- images/win/scripts/Installers/Install-SQLExpress.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/images/win/scripts/Installers/Install-SQLExpress.ps1 b/images/win/scripts/Installers/Install-SQLExpress.ps1 index ebdb2c747..8b40d9219 100644 --- a/images/win/scripts/Installers/Install-SQLExpress.ps1 +++ b/images/win/scripts/Installers/Install-SQLExpress.ps1 @@ -45,11 +45,11 @@ function Unpack-SQLInstaller { function Start-Installer { param( - [String]$InstallPath, + [String]$InstallerPath, [String]$Arguments = ("/Q", "/IACCEPTSQLSERVERLICENSETERMS", "/Action=Install", "/INSTANCEID=SQL2019", "/INSTANCENAME=SQL2019", "/SECURITYMODE=SQL", "/SAPWD=P@ssword!!", "/TCPENABLED=1") ) Write-Host "Installating SQL Express..." - $process = Start-Process -FilePath $InstallPath -ArgumentList $Arguments -Wait -PassThru + $process = Start-Process -FilePath $InstallerPath -ArgumentList $Arguments -Wait -PassThru $exitCode = $process.ExitCode if ($exitCode -eq 0) { @@ -67,5 +67,5 @@ $setupPath = Join-Path $downloadPath "SQLEXPR_x64_ENU" Set-Location -Path $downloadPath $installerPath = Start-DownloadWithRetry -Url "https://go.microsoft.com/fwlink/?linkid=866658" -Name "SQL2019-SSEI-Expr.exe" Download-FullSQLPackage -InstallerPath $installerPath -Unpack-SQLInstaller -InstallPath "$setupPath.exe" -Start-Installer -InstallPath "$setupPath/SETUP.exe" \ No newline at end of file +Unpack-SQLInstaller -InstallPath (Join-Path $setupPath ".exe") +Start-Installer -InstallPath (Join-Path $setupPath "SETUP.exe") \ No newline at end of file From 25fabc3d1bd4fee7a145788cb5dd0047f2562421 Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Fri, 20 Mar 2020 19:09:06 +0700 Subject: [PATCH 047/111] fix for installerPath --- images/win/scripts/Installers/Install-SQLExpress.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/images/win/scripts/Installers/Install-SQLExpress.ps1 b/images/win/scripts/Installers/Install-SQLExpress.ps1 index 8b40d9219..12b8019a6 100644 --- a/images/win/scripts/Installers/Install-SQLExpress.ps1 +++ b/images/win/scripts/Installers/Install-SQLExpress.ps1 @@ -67,5 +67,5 @@ $setupPath = Join-Path $downloadPath "SQLEXPR_x64_ENU" Set-Location -Path $downloadPath $installerPath = Start-DownloadWithRetry -Url "https://go.microsoft.com/fwlink/?linkid=866658" -Name "SQL2019-SSEI-Expr.exe" Download-FullSQLPackage -InstallerPath $installerPath -Unpack-SQLInstaller -InstallPath (Join-Path $setupPath ".exe") -Start-Installer -InstallPath (Join-Path $setupPath "SETUP.exe") \ No newline at end of file +Unpack-SQLInstaller -InstallPath "$setupPath.exe" +Start-Installer -InstallerPath "$setupPath\SETUP.exe" \ No newline at end of file From 7720b74a0096c1cfc9d646b66b05886e77bb7963 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Fri, 20 Mar 2020 15:43:25 +0300 Subject: [PATCH 048/111] Minor fix --- images/win/scripts/Installers/Install-Msys2.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/images/win/scripts/Installers/Install-Msys2.ps1 b/images/win/scripts/Installers/Install-Msys2.ps1 index 67f43f9cb..9656ecc06 100644 --- a/images/win/scripts/Installers/Install-Msys2.ps1 +++ b/images/win/scripts/Installers/Install-Msys2.ps1 @@ -35,10 +35,10 @@ Write-Host "Finished extraction" $env:PATH = "C:\msys64\mingw64\bin;C:\msys64\usr\bin;$origPath" Write-Host "bash -c pacman-key --init" -Invoke-Expression "bash -c `"pacman-key --init`"" +bash.exe "pacman-key --init 2>&1" Write-Host "bash -c pacman-key --populate msys2" -Invoke-Expression "bash -c `"pacman-key --populate msys2`"" +bash.exe "pacman-key --populate msys2 2>&1" Write-Host "pacman --noconfirm -Syyuu" pacman.exe -Syyuu --noconfirm From 418d16888fca4934d89e9a9aaf33d551f16f70e7 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Fri, 20 Mar 2020 16:10:58 +0300 Subject: [PATCH 049/111] Minor fix --- images/win/scripts/Installers/Install-Msys2.ps1 | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/images/win/scripts/Installers/Install-Msys2.ps1 b/images/win/scripts/Installers/Install-Msys2.ps1 index 9656ecc06..4fe380cfc 100644 --- a/images/win/scripts/Installers/Install-Msys2.ps1 +++ b/images/win/scripts/Installers/Install-Msys2.ps1 @@ -21,9 +21,7 @@ Write-Host "Finished download" $msys2FileU = "/$msys2File".replace(':', '') -# git has tar.exe in usr/bin, but xz.exe is in mingw64/bin -$env:PATH = "$gitPath\mingw64\bin;$origPath" -$tar = "$gitPath\usr\bin\tar.exe" +$tar = "$gitPath\usr\bin\tar.exe" # extract tar.xz to C:\ Write-Host "Starting msys2 extraction" @@ -34,10 +32,10 @@ Write-Host "Finished extraction" # Add msys2 bin tools folders to PATH $env:PATH = "C:\msys64\mingw64\bin;C:\msys64\usr\bin;$origPath" -Write-Host "bash -c pacman-key --init" +Write-Host "bash pacman-key --init" bash.exe "pacman-key --init 2>&1" -Write-Host "bash -c pacman-key --populate msys2" +Write-Host "bash pacman-key --populate msys2" bash.exe "pacman-key --populate msys2 2>&1" Write-Host "pacman --noconfirm -Syyuu" From 66a71260b4105e3ec70b126eb5b92d85fa3785f4 Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Sun, 22 Mar 2020 20:17:57 +0700 Subject: [PATCH 050/111] added resultPath to resolve the issue --- images/win/scripts/Installers/Install-SQLExpress.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/images/win/scripts/Installers/Install-SQLExpress.ps1 b/images/win/scripts/Installers/Install-SQLExpress.ps1 index 12b8019a6..419e410d4 100644 --- a/images/win/scripts/Installers/Install-SQLExpress.ps1 +++ b/images/win/scripts/Installers/Install-SQLExpress.ps1 @@ -68,4 +68,5 @@ Set-Location -Path $downloadPath $installerPath = Start-DownloadWithRetry -Url "https://go.microsoft.com/fwlink/?linkid=866658" -Name "SQL2019-SSEI-Expr.exe" Download-FullSQLPackage -InstallerPath $installerPath Unpack-SQLInstaller -InstallPath "$setupPath.exe" -Start-Installer -InstallerPath "$setupPath\SETUP.exe" \ No newline at end of file +$resultPath = Join-Path $setupPath "SETUP.exe" +Start-Installer -InstallerPath $resultPath \ No newline at end of file From de434649ee6484793fb17bd3d9dafb85d7d85540 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Mon, 23 Mar 2020 09:15:33 +0300 Subject: [PATCH 051/111] Minor fix --- images/win/scripts/Installers/Install-Msys2.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/images/win/scripts/Installers/Install-Msys2.ps1 b/images/win/scripts/Installers/Install-Msys2.ps1 index 4fe380cfc..9f57ea230 100644 --- a/images/win/scripts/Installers/Install-Msys2.ps1 +++ b/images/win/scripts/Installers/Install-Msys2.ps1 @@ -33,10 +33,10 @@ Write-Host "Finished extraction" $env:PATH = "C:\msys64\mingw64\bin;C:\msys64\usr\bin;$origPath" Write-Host "bash pacman-key --init" -bash.exe "pacman-key --init 2>&1" +bash.exe -c "pacman-key --init 2>&1" Write-Host "bash pacman-key --populate msys2" -bash.exe "pacman-key --populate msys2 2>&1" +bash.exe -c "pacman-key --populate msys2 2>&1" Write-Host "pacman --noconfirm -Syyuu" pacman.exe -Syyuu --noconfirm From 1dcacb7449e5ff59dfdf94bce9493c2c84e9d13b Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Tue, 24 Mar 2020 12:50:18 +0700 Subject: [PATCH 052/111] added comment --- images/win/scripts/Installers/Install-SQLExpress.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/images/win/scripts/Installers/Install-SQLExpress.ps1 b/images/win/scripts/Installers/Install-SQLExpress.ps1 index 419e410d4..2c0293d27 100644 --- a/images/win/scripts/Installers/Install-SQLExpress.ps1 +++ b/images/win/scripts/Installers/Install-SQLExpress.ps1 @@ -61,6 +61,7 @@ function Start-Installer { exit $exitCode } } +#Main function $installerUrl = "https://go.microsoft.com/fwlink/?linkid=866658" $downloadPath = "${env:Temp}" $setupPath = Join-Path $downloadPath "SQLEXPR_x64_ENU" From 98077f0a0ad9739198467fbedffa386df6855155 Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Tue, 24 Mar 2020 12:54:43 +0700 Subject: [PATCH 053/111] short list --- images/win/Windows2019-Azure.json | 765 ------------------------------ 1 file changed, 765 deletions(-) diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index 399758f5a..b3b67ca8e 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -103,346 +103,6 @@ "{{ template_dir }}/scripts/Installers/Windows2019/Initialize-VM.ps1" ] }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Update-DotnetTLS.ps1" - ] - }, - { - "type": "windows-restart", - "restart_timeout": "10m" - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-ContainersFeature.ps1" - ] - }, - { - "type": "windows-restart", - "restart_timeout": "10m" - }, - { - "type": "powershell", - "inline": [ - "setx ImageVersion {{user `image_version` }} /m", - "setx ImageOS {{user `image_os` }} /m" - ] - }, - { - "type": "powershell", - "environment_vars": [ - "IMAGE_VERSION={{user `image_version`}}", - "IMAGEDATA_FILE={{user `imagedata_file`}}" - ], - "scripts":[ - "{{ template_dir }}/scripts/Installers/Update-ImageData.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-Docker.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-PowershellCore.ps1" - ] - }, - { - "type": "windows-restart", - "restart_timeout": "10m" - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-Docker.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-PowershellCore.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Windows2019/Update-DockerImages.ps1" - ] - }, - { - "type": "powershell", - "valid_exit_codes": [ - 0, - 3010 - ], - "scripts":[ - "{{ template_dir }}/scripts/Installers/Windows2019/Install-VS2019.ps1" - ], - "elevated_user": "{{user `install_user`}}", - "elevated_password": "{{user `install_password`}}" - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-Wix.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Windows2019/Install-SSDTExtensions.ps1" - ] - }, - { - "type": "powershell", - "valid_exit_codes": [ - 0, - 3010 - ], - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-NET48.ps1" - ] - }, - { - "type": "powershell", - "scripts": [ - "{{ template_dir }}/scripts/Installers/Install-WDK.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-ServiceFabricSDK.ps1" - ] - }, - { - "type": "windows-restart", - "restart_timeout": "10m" - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-Wix.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Windows2019/Validate-SSDTExtensions.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-NET48.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-WDK.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-ServiceFabricSDK.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-AzureCli.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-AzureDevOpsCli.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-NodeLts.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-7zip.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-Packer.ps1" - ] - }, - { - "type": "file", - "source": "{{template_dir}}/toolcache-2019.json", - "destination": "{{user `root_folder`}}/toolcache.json" - }, - { - "type": "powershell", - "environment_vars":[ - "GITHUB_FEED_TOKEN={{ user `github_feed_token` }}", - "ROOT_FOLDER={{user `root_folder`}}" - ], - "scripts":[ - "{{ template_dir }}/scripts/Installers/Download-ToolCache.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-OpenSSL.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-Perl.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-Git.ps1" - ] - }, - { - "type": "powershell", - "environment_vars": [ - "GO_VERSIONS={{user `go_versions`}}", - "GO_DEFAULT={{user `go_default`}}" - ], - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-Go.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-PHP.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-Rust.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-Julia.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-Sbt.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-Svn.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-Chrome.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-Edge.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-Firefox.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-Selenium.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-IEWebDriver.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Enable-DeveloperMode.ps1" - ], - "elevated_user": "{{user `install_user`}}", - "elevated_password": "{{user `install_password`}}" - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-VSWhere.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-WinAppDriver.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-WinAppDriver.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-JavaTools.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-Cmake.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-DACFx.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Update-AndroidSDK.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-MysqlCli.ps1" - ] - }, { "type": "powershell", "elevated_user": "SYSTEM", @@ -451,441 +111,16 @@ "{{ template_dir }}/scripts/Installers/Install-SQLExpress.ps1" ] }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-SQLPowerShellTools.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-DotnetSDK.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-WindowsUpdates.ps1" - ] - }, - { - "type": "windows-shell", - "inline": ["wmic product where \"name like '%%microsoft azure powershell%%'\" call uninstall /nointeractive"] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-AzureModules.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-MinGW.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-TypeScript.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-Miniconda.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-AzureCosmosDbEmulator.ps1" - ] - }, - { - "type": "powershell", - "environment_vars": [ - "ROOT_FOLDER={{user `root_folder`}}", - "BOOST_DEFAULT={{user `boost_default`}}" - ], - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-Boost.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-Mercurial.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-Jq.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-Zstd.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-InnoSetup.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-GitVersion.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-NSIS.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-CloudFoundryCli.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-Vcpkg.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-KubernetesCli.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-Kind.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-Bazel.ps1" - ] - }, - { - "type": "windows-restart", - "restart_timeout": "10m" - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-AzureModules.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-DotnetTLS.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-AzureCli.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-AzureDevOpsCli.ps1" - ] - }, - { - "type": "powershell", - "environment_vars":[ - "ROOT_FOLDER={{user `root_folder`}}" - ], - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-ToolCache.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-OpenSSL.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-Perl.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-Git.ps1" - ] - }, - { - "type": "powershell", - "environment_vars": [ - "GO_VERSIONS={{user `go_versions`}}", - "GO_DEFAULT={{user `go_default`}}" - ], - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-Go.ps1" - ] - }, - { - "type": "powershell", - "environment_vars": [ - "ROOT_FOLDER={{user `root_folder`}}", - "BOOST_DEFAULT={{user `boost_default`}}" - ], - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-Boost.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-PHP.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-Rust.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-Julia.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-Svn.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-Sbt.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-Chrome.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-Edge.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-Firefox.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-SeleniumWebDrivers.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-NodeLts.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-JavaTools.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-Cmake.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-DACFx.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-DotnetSDK.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-MysqlCli.ps1" - ] - }, { "type": "powershell", "scripts":[ "{{ template_dir }}/scripts/Installers/Validate-SQLExpress.ps1" ] }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-SQLPowerShellTools.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-MinGW.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-TypeScript.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-Miniconda.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-AzureCosmosDbEmulator.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-7zip.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-Packer.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-Mercurial.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-Jq.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-Zstd.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-InnoSetup.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-GitVersion.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-NSIS.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-CloudFoundryCli.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-Vcpkg.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-VSWhere.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-KubernetesCli.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-Kind.ps1" - ] - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-Bazel.ps1" - ] - }, - { - "type": "file", - "source": "C:\\InstalledSoftware.md", - "destination": "{{ template_dir }}/Windows2019-Readme.md", - "direction": "download" - }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Finalize-VM.ps1" - ] - }, { "type": "windows-restart", "restart_timeout": "10m" }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Windows2019/Run-Antivirus.ps1" - ] - }, { "type": "powershell", "inline": [ From 07e1f37d74c5d851e0cff66d52d35323d8007644 Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Tue, 24 Mar 2020 09:27:15 +0300 Subject: [PATCH 054/111] added swift support --- images/linux/scripts/installers/1604/basic.sh | 2 ++ images/linux/scripts/installers/swift.sh | 24 +++++++++++++++++++ images/linux/ubuntu1604.json | 1 + images/linux/ubuntu1804.json | 1 + 4 files changed, 28 insertions(+) create mode 100644 images/linux/scripts/installers/swift.sh diff --git a/images/linux/scripts/installers/1604/basic.sh b/images/linux/scripts/installers/1604/basic.sh index adc1e8098..6f358be1c 100644 --- a/images/linux/scripts/installers/1604/basic.sh +++ b/images/linux/scripts/installers/1604/basic.sh @@ -23,6 +23,8 @@ apt-fast install -y --no-install-recommends \ libc++abi-dev \ libcurl3 \ libicu55 \ + libpython2.7 \ + libpython2.7-dev \ libunwind8 \ locales \ netcat \ diff --git a/images/linux/scripts/installers/swift.sh b/images/linux/scripts/installers/swift.sh new file mode 100644 index 000000000..23dd0d063 --- /dev/null +++ b/images/linux/scripts/installers/swift.sh @@ -0,0 +1,24 @@ +#!/bin/bash +################################################################################ +## File: swift.sh +## Desc: Installs Swift +################################################################################ + +# Install # Install +image_label="$(lsb_release -rs)" +wget https://swift.org/builds/swift-5.1.5-release/ubuntu${image_label//./}/swift-5.1.5-RELEASE/swift-5.1.5-RELEASE-ubuntu$image_label.tar.gz +tar xzf swift-5.1.5-RELEASE-ubuntu$image_label.tar.gz +sudo mv swift-5.1.5-RELEASE-ubuntu$image_label /usr/share/swift +sudo echo "PATH=/usr/share/swift/usr/bin:$PATH" | sudo tee -a /etc/environment +source ~/.bashrc + +# Run tests to determine that the software installed as expected +echo "Testing to make sure that script performed as expected, and basic scenarios work" +if ! command -v swift; then + echo "Swift was not installed" + exit 1 +fi + +# Document what was added to the image +echo "Lastly, documenting what we added to the metadata file" +DocumentInstalledItem "$(swift --version)" \ No newline at end of file diff --git a/images/linux/ubuntu1604.json b/images/linux/ubuntu1604.json index e604b0581..78a0d8041 100644 --- a/images/linux/ubuntu1604.json +++ b/images/linux/ubuntu1604.json @@ -144,6 +144,7 @@ "{{template_dir}}/scripts/installers/aws.sh", "{{template_dir}}/scripts/installers/build-essential.sh", "{{template_dir}}/scripts/installers/clang.sh", + "{{template_dir}}/scripts/installers/swift.sh", "{{template_dir}}/scripts/installers/cmake.sh", "{{template_dir}}/scripts/installers/docker-compose.sh", "{{template_dir}}/scripts/installers/docker-moby.sh", diff --git a/images/linux/ubuntu1804.json b/images/linux/ubuntu1804.json index 6396229d7..70ab724ab 100644 --- a/images/linux/ubuntu1804.json +++ b/images/linux/ubuntu1804.json @@ -147,6 +147,7 @@ "{{template_dir}}/scripts/installers/aws.sh", "{{template_dir}}/scripts/installers/build-essential.sh", "{{template_dir}}/scripts/installers/clang.sh", + "{{template_dir}}/scripts/installers/swift.sh", "{{template_dir}}/scripts/installers/cmake.sh", "{{template_dir}}/scripts/installers/docker-compose.sh", "{{template_dir}}/scripts/installers/docker-moby.sh", From 94b6445f8c01f7f0b42cd39af3b749a82064bf42 Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Tue, 24 Mar 2020 09:35:39 +0300 Subject: [PATCH 055/111] updated basic.sh for both images --- images/linux/scripts/installers/1604/basic.sh | 2 ++ images/linux/scripts/installers/1804/basic.sh | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/images/linux/scripts/installers/1604/basic.sh b/images/linux/scripts/installers/1604/basic.sh index 6f358be1c..6a629e4f2 100644 --- a/images/linux/scripts/installers/1604/basic.sh +++ b/images/linux/scripts/installers/1604/basic.sh @@ -83,6 +83,8 @@ DocumentInstalledItemIndent "libc++-dev" DocumentInstalledItemIndent "libc++abi-dev" DocumentInstalledItemIndent "libcurl3" DocumentInstalledItemIndent "libicu55" +DocumentInstalledItemIndent "libpython2.7" +DocumentInstalledItemIndent "libpython2.7-dev" DocumentInstalledItemIndent "libunwind8" DocumentInstalledItemIndent "locales" DocumentInstalledItemIndent "netcat" diff --git a/images/linux/scripts/installers/1804/basic.sh b/images/linux/scripts/installers/1804/basic.sh index c12c7a819..84f3790ff 100644 --- a/images/linux/scripts/installers/1804/basic.sh +++ b/images/linux/scripts/installers/1804/basic.sh @@ -31,6 +31,12 @@ apt-get install -y --no-install-recommends jq echo "Install libcurl3" apt-get install -y --no-install-recommends libcurl3 +echo "Install libpython2.7" +apt-get install -y --no-install-recommends libpython2.7 + +echo "Install libpython2.7-dev" +apt-get install -y --no-install-recommends libpython2.7-dev + echo "Install libunwind8" apt-get install -y --no-install-recommends libunwind8 @@ -148,6 +154,8 @@ DocumentInstalledItemIndent "iputils-ping" DocumentInstalledItemIndent "jq" DocumentInstalledItemIndent "libcurl3" DocumentInstalledItemIndent "libicu55" +DocumentInstalledItemIndent "libpython2.7" +DocumentInstalledItemIndent "libpython2.7-dev" DocumentInstalledItemIndent "libunwind8" DocumentInstalledItemIndent "locales" DocumentInstalledItemIndent "netcat" From e387112a3a12f9e0c9a88919f86ce8e8cf0e9969 Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Tue, 24 Mar 2020 13:53:44 +0700 Subject: [PATCH 056/111] added variable for current position --- images/win/scripts/Installers/Install-SQLExpress.ps1 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/images/win/scripts/Installers/Install-SQLExpress.ps1 b/images/win/scripts/Installers/Install-SQLExpress.ps1 index 2c0293d27..2dca217ec 100644 --- a/images/win/scripts/Installers/Install-SQLExpress.ps1 +++ b/images/win/scripts/Installers/Install-SQLExpress.ps1 @@ -70,4 +70,6 @@ $installerPath = Start-DownloadWithRetry -Url "https://go.microsoft.com/fwlink/? Download-FullSQLPackage -InstallerPath $installerPath Unpack-SQLInstaller -InstallPath "$setupPath.exe" $resultPath = Join-Path $setupPath "SETUP.exe" +Write-Host $resultPath +ls Start-Installer -InstallerPath $resultPath \ No newline at end of file From aac8f5b66b3d1aa4d1d39a7d1c4f4c940c1b5205 Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Tue, 24 Mar 2020 14:54:47 +0700 Subject: [PATCH 057/111] added file content --- images/win/scripts/Installers/Install-SQLExpress.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/images/win/scripts/Installers/Install-SQLExpress.ps1 b/images/win/scripts/Installers/Install-SQLExpress.ps1 index 2dca217ec..e566fed34 100644 --- a/images/win/scripts/Installers/Install-SQLExpress.ps1 +++ b/images/win/scripts/Installers/Install-SQLExpress.ps1 @@ -72,4 +72,5 @@ Unpack-SQLInstaller -InstallPath "$setupPath.exe" $resultPath = Join-Path $setupPath "SETUP.exe" Write-Host $resultPath ls +type SQLEXPR_x64_ENU_decompression_log.txt Start-Installer -InstallerPath $resultPath \ No newline at end of file From 409a20175e00985bf8004ca8ab402083f5baba62 Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Tue, 24 Mar 2020 15:11:15 +0700 Subject: [PATCH 058/111] Need to move out system directory --- images/win/scripts/Installers/Install-SQLExpress.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/images/win/scripts/Installers/Install-SQLExpress.ps1 b/images/win/scripts/Installers/Install-SQLExpress.ps1 index e566fed34..d6bbfaa3a 100644 --- a/images/win/scripts/Installers/Install-SQLExpress.ps1 +++ b/images/win/scripts/Installers/Install-SQLExpress.ps1 @@ -7,7 +7,7 @@ Import-Module -Name ImageHelpers -Force; function Download-FullSQLPackage { param( [String]$InstallerPath, - [String]$Arguments = ("/MEDIAPATH=${env:Temp}", "/MEDIATYPE=Core","/Action=Download", "/QUIET") + [String]$Arguments = ("/MEDIAPATH=C:\SQLInstall", "/MEDIATYPE=Core","/Action=Download", "/QUIET") ) Write-Host "Downloading full package to $InstallerPath..." $process = Start-Process -FilePath $InstallerPath -ArgumentList $Arguments -Wait -PassThru @@ -63,7 +63,7 @@ function Start-Installer { } #Main function $installerUrl = "https://go.microsoft.com/fwlink/?linkid=866658" -$downloadPath = "${env:Temp}" +$downloadPath = "C:\SQLInstall" $setupPath = Join-Path $downloadPath "SQLEXPR_x64_ENU" Set-Location -Path $downloadPath $installerPath = Start-DownloadWithRetry -Url "https://go.microsoft.com/fwlink/?linkid=866658" -Name "SQL2019-SSEI-Expr.exe" From bbf8c7f71c585593dffaa3b44766200eb744e275 Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Tue, 24 Mar 2020 15:37:56 +0700 Subject: [PATCH 059/111] change pathes to avoid installation problems --- images/win/scripts/Installers/Install-SQLExpress.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/images/win/scripts/Installers/Install-SQLExpress.ps1 b/images/win/scripts/Installers/Install-SQLExpress.ps1 index d6bbfaa3a..d93f82383 100644 --- a/images/win/scripts/Installers/Install-SQLExpress.ps1 +++ b/images/win/scripts/Installers/Install-SQLExpress.ps1 @@ -7,7 +7,7 @@ Import-Module -Name ImageHelpers -Force; function Download-FullSQLPackage { param( [String]$InstallerPath, - [String]$Arguments = ("/MEDIAPATH=C:\SQLInstall", "/MEDIATYPE=Core","/Action=Download", "/QUIET") + [String]$Arguments = ("/MEDIAPATH=$InstallerPath", "/MEDIATYPE=Core","/Action=Download", "/QUIET") ) Write-Host "Downloading full package to $InstallerPath..." $process = Start-Process -FilePath $InstallerPath -ArgumentList $Arguments -Wait -PassThru @@ -65,8 +65,9 @@ function Start-Installer { $installerUrl = "https://go.microsoft.com/fwlink/?linkid=866658" $downloadPath = "C:\SQLInstall" $setupPath = Join-Path $downloadPath "SQLEXPR_x64_ENU" +md $downloadPath Set-Location -Path $downloadPath -$installerPath = Start-DownloadWithRetry -Url "https://go.microsoft.com/fwlink/?linkid=866658" -Name "SQL2019-SSEI-Expr.exe" +$installerPath = Start-DownloadWithRetry -Url "https://go.microsoft.com/fwlink/?linkid=866658" -DownloadPath $downloadPath -Name "SQL2019-SSEI-Expr.exe" Download-FullSQLPackage -InstallerPath $installerPath Unpack-SQLInstaller -InstallPath "$setupPath.exe" $resultPath = Join-Path $setupPath "SETUP.exe" From 770a4152fda1f82e62f50aa07ee6866b7ae40329 Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Tue, 24 Mar 2020 16:12:52 +0700 Subject: [PATCH 060/111] added new variable to FullSQLPackage function --- images/win/scripts/Installers/Install-SQLExpress.ps1 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/images/win/scripts/Installers/Install-SQLExpress.ps1 b/images/win/scripts/Installers/Install-SQLExpress.ps1 index d93f82383..8e64c6212 100644 --- a/images/win/scripts/Installers/Install-SQLExpress.ps1 +++ b/images/win/scripts/Installers/Install-SQLExpress.ps1 @@ -7,14 +7,15 @@ Import-Module -Name ImageHelpers -Force; function Download-FullSQLPackage { param( [String]$InstallerPath, - [String]$Arguments = ("/MEDIAPATH=$InstallerPath", "/MEDIATYPE=Core","/Action=Download", "/QUIET") + [String]$DownloadPath, + [String]$Arguments = ("/MEDIAPATH=$DownloadPath", "/MEDIATYPE=Core","/Action=Download", "/QUIET") ) - Write-Host "Downloading full package to $InstallerPath..." + Write-Host "Downloading full package to $DownloadPath..." $process = Start-Process -FilePath $InstallerPath -ArgumentList $Arguments -Wait -PassThru $exitCode = $process.ExitCode if ($exitCode -eq 0) { - Write-Host -Object "Full SQL Express package has been successfully downloaded to $InstallerPath : ExitCode: $exitCode" + Write-Host -Object "Full SQL Express package has been successfully downloaded to $DownloadPath : ExitCode: $exitCode" } else { @@ -68,7 +69,7 @@ $setupPath = Join-Path $downloadPath "SQLEXPR_x64_ENU" md $downloadPath Set-Location -Path $downloadPath $installerPath = Start-DownloadWithRetry -Url "https://go.microsoft.com/fwlink/?linkid=866658" -DownloadPath $downloadPath -Name "SQL2019-SSEI-Expr.exe" -Download-FullSQLPackage -InstallerPath $installerPath +Download-FullSQLPackage -InstallerPath $installerPath -DownloadPath $downloadPath Unpack-SQLInstaller -InstallPath "$setupPath.exe" $resultPath = Join-Path $setupPath "SETUP.exe" Write-Host $resultPath From 827d2cacd4dfe1614c9a2fc6dad2b91492b5b6f5 Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Tue, 24 Mar 2020 16:28:43 +0700 Subject: [PATCH 061/111] cleanup installation folder. --- images/win/scripts/Installers/Install-SQLExpress.ps1 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/images/win/scripts/Installers/Install-SQLExpress.ps1 b/images/win/scripts/Installers/Install-SQLExpress.ps1 index 8e64c6212..7e34a9bf4 100644 --- a/images/win/scripts/Installers/Install-SQLExpress.ps1 +++ b/images/win/scripts/Installers/Install-SQLExpress.ps1 @@ -73,6 +73,5 @@ Download-FullSQLPackage -InstallerPath $installerPath -DownloadPath $downloadPat Unpack-SQLInstaller -InstallPath "$setupPath.exe" $resultPath = Join-Path $setupPath "SETUP.exe" Write-Host $resultPath -ls -type SQLEXPR_x64_ENU_decompression_log.txt -Start-Installer -InstallerPath $resultPath \ No newline at end of file +Start-Installer -InstallerPath $resultPath +Remove-Item $downloadPath -Recurse \ No newline at end of file From 739bbe26b5fe02c59b7874ba828a5d158fef9347 Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Tue, 24 Mar 2020 17:23:59 +0700 Subject: [PATCH 062/111] add comments for all steps --- images/win/scripts/Installers/Install-SQLExpress.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/images/win/scripts/Installers/Install-SQLExpress.ps1 b/images/win/scripts/Installers/Install-SQLExpress.ps1 index 7e34a9bf4..27d19147c 100644 --- a/images/win/scripts/Installers/Install-SQLExpress.ps1 +++ b/images/win/scripts/Installers/Install-SQLExpress.ps1 @@ -66,12 +66,13 @@ function Start-Installer { $installerUrl = "https://go.microsoft.com/fwlink/?linkid=866658" $downloadPath = "C:\SQLInstall" $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" Download-FullSQLPackage -InstallerPath $installerPath -DownloadPath $downloadPath Unpack-SQLInstaller -InstallPath "$setupPath.exe" $resultPath = Join-Path $setupPath "SETUP.exe" -Write-Host $resultPath Start-Installer -InstallerPath $resultPath +#Cleanup folder with installation packages. Remove-Item $downloadPath -Recurse \ No newline at end of file From d3ab1f0bb0afb5ffcc95692fab9387de4b0c7566 Mon Sep 17 00:00:00 2001 From: Dariy Nurgaleev <50947177+Darleev@users.noreply.github.com> Date: Tue, 24 Mar 2020 17:28:01 +0700 Subject: [PATCH 063/111] changed installation packages and cleanup --- .../scripts/Installers/Install-SQLExpress.ps1 | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/images/win/scripts/Installers/Install-SQLExpress.ps1 b/images/win/scripts/Installers/Install-SQLExpress.ps1 index 419e410d4..99da3ccd4 100644 --- a/images/win/scripts/Installers/Install-SQLExpress.ps1 +++ b/images/win/scripts/Installers/Install-SQLExpress.ps1 @@ -7,14 +7,15 @@ Import-Module -Name ImageHelpers -Force; function Download-FullSQLPackage { param( [String]$InstallerPath, - [String]$Arguments = ("/MEDIAPATH=${env:Temp}", "/MEDIATYPE=Core","/Action=Download", "/QUIET") + [String]$DownloadPath, + [String]$Arguments = ("/MEDIAPATH=$DownloadPath", "/MEDIATYPE=Core","/Action=Download", "/QUIET") ) - Write-Host "Downloading full package to $InstallerPath..." + Write-Host "Downloading full package to $DownloadPath..." $process = Start-Process -FilePath $InstallerPath -ArgumentList $Arguments -Wait -PassThru $exitCode = $process.ExitCode if ($exitCode -eq 0) { - Write-Host -Object "Full SQL Express package has been successfully downloaded to $InstallerPath : ExitCode: $exitCode" + Write-Host -Object "Full SQL Express package has been successfully downloaded to $DownloadPath : ExitCode: $exitCode" } else { @@ -61,12 +62,17 @@ function Start-Installer { exit $exitCode } } +#Main function $installerUrl = "https://go.microsoft.com/fwlink/?linkid=866658" -$downloadPath = "${env:Temp}" +$downloadPath = "C:\SQLInstall" $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" -Name "SQL2019-SSEI-Expr.exe" -Download-FullSQLPackage -InstallerPath $installerPath +$installerPath = Start-DownloadWithRetry -Url "https://go.microsoft.com/fwlink/?linkid=866658" -DownloadPath $downloadPath -Name "SQL2019-SSEI-Expr.exe" +Download-FullSQLPackage -InstallerPath $installerPath -DownloadPath $downloadPath Unpack-SQLInstaller -InstallPath "$setupPath.exe" $resultPath = Join-Path $setupPath "SETUP.exe" -Start-Installer -InstallerPath $resultPath \ No newline at end of file +Start-Installer -InstallerPath $resultPath +#Cleanup folder with installation packages. +Remove-Item $downloadPath -Recurse From dd931593e82f16c037c9a87a12427f97b1b3e482 Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Tue, 24 Mar 2020 17:35:11 +0700 Subject: [PATCH 064/111] small changes for scripts. --- images/win/scripts/ImageHelpers/InstallHelpers.ps1 | 2 +- images/win/scripts/Installers/Install-SQLExpress.ps1 | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/images/win/scripts/ImageHelpers/InstallHelpers.ps1 b/images/win/scripts/ImageHelpers/InstallHelpers.ps1 index 8ba4594e7..03c4b98f8 100644 --- a/images/win/scripts/ImageHelpers/InstallHelpers.ps1 +++ b/images/win/scripts/ImageHelpers/InstallHelpers.ps1 @@ -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 diff --git a/images/win/scripts/Installers/Install-SQLExpress.ps1 b/images/win/scripts/Installers/Install-SQLExpress.ps1 index 27d19147c..a56f09cca 100644 --- a/images/win/scripts/Installers/Install-SQLExpress.ps1 +++ b/images/win/scripts/Installers/Install-SQLExpress.ps1 @@ -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" From 2c98daaee3490f431a750b820209017ad066ccec Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Tue, 24 Mar 2020 17:44:29 +0700 Subject: [PATCH 065/111] Windows2019 file was corrupted --- images/win/Windows2019-Azure.json | 772 +++++++++++++++++++++++++++++- 1 file changed, 768 insertions(+), 4 deletions(-) diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index b3b67ca8e..e723d97f4 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -30,8 +30,7 @@ "image_os": "win19", "github_feed_token": "{{env `GITHUB_FEED_TOKEN`}}", "go_versions": "1.9, 1.10, 1.11, 1.12, 1.13, 1.14", - "go_default": "1.14", - "boost_default": "1.72.0" + "go_default": "1.14" }, "sensitive-variables": ["install_password", "ssh_password", "client_secret", "github_feed_token"], "builders": [ @@ -103,6 +102,340 @@ "{{ template_dir }}/scripts/Installers/Windows2019/Initialize-VM.ps1" ] }, + { + "type": "windows-restart", + "restart_timeout": "10m" + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-ContainersFeature.ps1" + ] + }, + { + "type": "windows-restart", + "restart_timeout": "10m" + }, + { + "type": "powershell", + "inline": [ + "setx ImageVersion {{user `image_version` }} /m", + "setx ImageOS {{user `image_os` }} /m" + ] + }, + { + "type": "powershell", + "environment_vars": [ + "IMAGE_VERSION={{user `image_version`}}", + "IMAGEDATA_FILE={{user `imagedata_file`}}" + ], + "scripts":[ + "{{ template_dir }}/scripts/Installers/Update-ImageData.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-Docker.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-PowershellCore.ps1" + ] + }, + { + "type": "windows-restart", + "restart_timeout": "10m" + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-Docker.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-PowershellCore.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Windows2019/Update-DockerImages.ps1" + ] + }, + { + "type": "powershell", + "valid_exit_codes": [ + 0, + 3010 + ], + "scripts":[ + "{{ template_dir }}/scripts/Installers/Windows2019/Install-VS2019.ps1" + ], + "elevated_user": "{{user `install_user`}}", + "elevated_password": "{{user `install_password`}}" + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Windows2019/Install-Wix.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Windows2019/Install-AnalysisExtenstion.ps1" + ] + }, + { + "type": "powershell", + "valid_exit_codes": [ + 0, + 3010 + ], + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-NET48.ps1" + ] + }, + { + "type": "powershell", + "scripts": [ + "{{ template_dir }}/scripts/Installers/Windows2019/Install-WDK.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-ServiceFabricSDK.ps1" + ] + }, + { + "type": "windows-restart", + "restart_timeout": "10m" + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Windows2019/Validate-Wix.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Windows2019/Validate-AnalysisExtenstion.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-NET48.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Windows2019/Validate-WDK.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-ServiceFabricSDK.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Update-DotnetTLS.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-AzureCli.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-AzureDevOpsCli.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-NodeLts.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-7zip.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-Packer.ps1" + ] + }, + { + "type": "file", + "source": "{{template_dir}}/toolcache-2019.json", + "destination": "{{user `root_folder`}}/toolcache.json" + }, + { + "type": "powershell", + "environment_vars":[ + "GITHUB_FEED_TOKEN={{ user `github_feed_token` }}", + "ROOT_FOLDER={{user `root_folder`}}" + ], + "scripts":[ + "{{ template_dir }}/scripts/Installers/Download-ToolCache.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-Perl.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-Git.ps1" + ] + }, + { + "type": "powershell", + "environment_vars": [ + "GO_VERSIONS={{user `go_versions`}}", + "GO_DEFAULT={{user `go_default`}}" + ], + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-Go.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-PHP.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-Rust.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-Julia.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-Sbt.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-Svn.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-Chrome.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-Edge.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-Firefox.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-Selenium.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-IEWebDriver.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Enable-DeveloperMode.ps1" + ], + "elevated_user": "{{user `install_user`}}", + "elevated_password": "{{user `install_password`}}" + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-VSWhere.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-WinAppDriver.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-WinAppDriver.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-JavaTools.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-Cmake.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-DACFx.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Update-AndroidSDK.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-MysqlCli.ps1" + ] + }, { "type": "powershell", "elevated_user": "SYSTEM", @@ -114,13 +447,444 @@ { "type": "powershell", "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-SQLExpress.ps1" + "{{ template_dir }}/scripts/Installers/Install-SQLPowerShellTools.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-DotnetSDK.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-WindowsUpdates.ps1" + ] + }, + { + "type": "windows-shell", + "inline": ["wmic product where \"name like '%%microsoft azure powershell%%'\" call uninstall /nointeractive"] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-AzureModules.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-MinGW.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-TypeScript.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-Miniconda.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-AzureCosmosDbEmulator.ps1" + ] + }, + { + "type": "powershell", + "environment_vars": [ + "BOOST_VERSIONS=1.69.0,1.72.0", + "BOOST_DEFAULT=1.72.0" + ], + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-Boost.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-Mercurial.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-Jq.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-Zstd.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-InnoSetup.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-GitVersion.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-OpenSSL.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-NSIS.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-CloudFoundryCli.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-Vcpkg.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-KubernetesCli.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-Kind.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-Bazel.ps1" ] }, { "type": "windows-restart", "restart_timeout": "10m" }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-AzureModules.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-DotnetTLS.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-AzureCli.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-AzureDevOpsCli.ps1" + ] + }, + { + "type": "powershell", + "environment_vars":[ + "ROOT_FOLDER={{user `root_folder`}}" + ], + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-ToolCache.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-Perl.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-Git.ps1" + ] + }, + { + "type": "powershell", + "environment_vars": [ + "GO_VERSIONS={{user `go_versions`}}", + "GO_DEFAULT={{user `go_default`}}" + ], + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-Go.ps1" + ] + }, + { + "type": "powershell", + "environment_vars": [ + "BOOST_VERSIONS=1.69.0,1.72.0", + "BOOST_DEFAULT=1.72.0" + ], + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-Boost.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-PHP.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-Rust.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-Julia.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-Svn.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-Sbt.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-Chrome.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-Edge.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-Firefox.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-SeleniumWebDrivers.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-NodeLts.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-JavaTools.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-Cmake.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-DACFx.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-DotnetSDK.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-MysqlCli.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-SQLExpress.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-SQLPowerShellTools.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-MinGW.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-TypeScript.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-Miniconda.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-AzureCosmosDbEmulator.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-7zip.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-Packer.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-Mercurial.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-Jq.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-Zstd.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-InnoSetup.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-GitVersion.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-OpenSSL.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-NSIS.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-CloudFoundryCli.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-Vcpkg.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-VSWhere.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-KubernetesCli.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-Kind.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-Bazel.ps1" + ] + }, + { + "type": "file", + "source": "C:\\InstalledSoftware.md", + "destination": "{{ template_dir }}/Windows2019-Readme.md", + "direction": "download" + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Finalize-VM.ps1" + ] + }, + { + "type": "windows-restart", + "restart_timeout": "10m" + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Windows2019/Run-Antivirus.ps1" + ] + }, { "type": "powershell", "inline": [ @@ -130,4 +894,4 @@ ] } ] -} +} \ No newline at end of file From 20f097261725533d329421e2100a40c62f74549e Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Tue, 24 Mar 2020 17:50:46 +0700 Subject: [PATCH 066/111] fixed Install-Wix change. --- images/win/Windows2019-Azure.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index e723d97f4..2b081be7a 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -182,7 +182,7 @@ { "type": "powershell", "scripts":[ - "{{ template_dir }}/scripts/Installers/Windows2019/Install-Wix.ps1" + "{{ template_dir }}/scripts/Installers/Install-Wix.ps1" ] }, { From d9c166b7930bb9593d99e6c205bcacd7aaa2e9c9 Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Tue, 24 Mar 2020 17:57:29 +0700 Subject: [PATCH 067/111] applied proper changes for Windows2019 --- images/win/Windows2019-Azure.json | 57 ++++++++++++++++--------------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index 2b081be7a..e965b9a09 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -30,7 +30,8 @@ "image_os": "win19", "github_feed_token": "{{env `GITHUB_FEED_TOKEN`}}", "go_versions": "1.9, 1.10, 1.11, 1.12, 1.13, 1.14", - "go_default": "1.14" + "go_default": "1.14", + "boost_default": "1.72.0" }, "sensitive-variables": ["install_password", "ssh_password", "client_secret", "github_feed_token"], "builders": [ @@ -102,6 +103,12 @@ "{{ template_dir }}/scripts/Installers/Windows2019/Initialize-VM.ps1" ] }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Update-DotnetTLS.ps1" + ] + }, { "type": "windows-restart", "restart_timeout": "10m" @@ -188,7 +195,7 @@ { "type": "powershell", "scripts":[ - "{{ template_dir }}/scripts/Installers/Windows2019/Install-AnalysisExtenstion.ps1" + "{{ template_dir }}/scripts/Installers/Windows2019/Install-SSDTExtensions.ps1" ] }, { @@ -204,7 +211,7 @@ { "type": "powershell", "scripts": [ - "{{ template_dir }}/scripts/Installers/Windows2019/Install-WDK.ps1" + "{{ template_dir }}/scripts/Installers/Install-WDK.ps1" ] }, { @@ -220,13 +227,13 @@ { "type": "powershell", "scripts":[ - "{{ template_dir }}/scripts/Installers/Windows2019/Validate-Wix.ps1" + "{{ template_dir }}/scripts/Installers/Validate-Wix.ps1" ] }, { "type": "powershell", "scripts":[ - "{{ template_dir }}/scripts/Installers/Windows2019/Validate-AnalysisExtenstion.ps1" + "{{ template_dir }}/scripts/Installers/Windows2019/Validate-SSDTExtensions.ps1" ] }, { @@ -238,7 +245,7 @@ { "type": "powershell", "scripts":[ - "{{ template_dir }}/scripts/Installers/Windows2019/Validate-WDK.ps1" + "{{ template_dir }}/scripts/Installers/Validate-WDK.ps1" ] }, { @@ -247,12 +254,6 @@ "{{ template_dir }}/scripts/Installers/Validate-ServiceFabricSDK.ps1" ] }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Update-DotnetTLS.ps1" - ] - }, { "type": "powershell", "scripts":[ @@ -298,6 +299,12 @@ "{{ template_dir }}/scripts/Installers/Download-ToolCache.ps1" ] }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-OpenSSL.ps1" + ] + }, { "type": "powershell", "scripts":[ @@ -499,8 +506,8 @@ { "type": "powershell", "environment_vars": [ - "BOOST_VERSIONS=1.69.0,1.72.0", - "BOOST_DEFAULT=1.72.0" + "ROOT_FOLDER={{user `root_folder`}}", + "BOOST_DEFAULT={{user `boost_default`}}" ], "scripts":[ "{{ template_dir }}/scripts/Installers/Install-Boost.ps1" @@ -536,12 +543,6 @@ "{{ template_dir }}/scripts/Installers/Install-GitVersion.ps1" ] }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-OpenSSL.ps1" - ] - }, { "type": "powershell", "scripts":[ @@ -615,6 +616,12 @@ "{{ template_dir }}/scripts/Installers/Validate-ToolCache.ps1" ] }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-OpenSSL.ps1" + ] + }, { "type": "powershell", "scripts":[ @@ -640,8 +647,8 @@ { "type": "powershell", "environment_vars": [ - "BOOST_VERSIONS=1.69.0,1.72.0", - "BOOST_DEFAULT=1.72.0" + "ROOT_FOLDER={{user `root_folder`}}", + "BOOST_DEFAULT={{user `boost_default`}}" ], "scripts":[ "{{ template_dir }}/scripts/Installers/Validate-Boost.ps1" @@ -815,12 +822,6 @@ "{{ template_dir }}/scripts/Installers/Validate-GitVersion.ps1" ] }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-OpenSSL.ps1" - ] - }, { "type": "powershell", "scripts":[ From 303d675ea24506f6dddd388565b48c7f5d5a9801 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Tue, 24 Mar 2020 14:29:50 +0300 Subject: [PATCH 068/111] Reworked validation --- .../win/scripts/Installers/Validate-Msys2.ps1 | 75 ++++++++----------- 1 file changed, 32 insertions(+), 43 deletions(-) diff --git a/images/win/scripts/Installers/Validate-Msys2.ps1 b/images/win/scripts/Installers/Validate-Msys2.ps1 index 187e219de..b8eac3aa3 100644 --- a/images/win/scripts/Installers/Validate-Msys2.ps1 +++ b/images/win/scripts/Installers/Validate-Msys2.ps1 @@ -3,55 +3,44 @@ ## Desc: Validate Msys2 ################################################################################ -if (Get-Command -Name 'gcc') -{ - Write-Host "gcc is successfully installed:" - gcc --version | Write-Host -} -else -{ - Write-Host "gcc is not on PATH" - exit 1 +$msys2BinDir = "C:\msys64\usr\bin" +$msys2mingwDir = "C:\msys64\mingw64\bin" + +$installedTools = @( + "bash", + "tar", + "make" +) + +Write-Host "Check installed tools in msys2/usr/bin directory" +$installedTools | ForEach-Object { + $toolName = $_ + try { + Invoke-Expression "$msys2BinDir\$_ --version" + } catch { + Write-Host "$toolName was not installed in MSYS2 bin directory" + Write-Error $_ + exit 1 + } } -if (Get-Command -Name 'g++') -{ - Write-Host "g++ is successfully installed:" - g++ --version | Write-Host -} -else -{ - Write-Host "g++ is not on PATH" - exit 1 -} - -if (Get-Command -Name 'make') -{ - Write-Host "make is successfully installed:" - make --version | Write-Host -} -else -{ - Write-Host "make is not on PATH" +Write-Host "Check gcc in msys2/mingw64/bin directory" +try { + Invoke-Expression "$msys2mingwDir\gcc --version" +} catch { + Write-Host "gcc was not installed in MSYS2 bin directory" + Write-Error $_ exit 1 } # Adding description of the software to Markdown -# `gcc --version` gives output like: -# gcc.exe (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 5.3.0 -# Copyright (C) 2015 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# $SoftwareName = "MSYS2" +# $(pacman.exe --version).Split([System.Environment]::NewLine)[1] -match "v\d+\.\d+\.\d+" +# $pacmanVersion = $matches[0] -$SoftwareName = "MinGW" -$(gcc --version).Split([System.Environment]::NewLine)[0] -match "\d+\.\d+\.\d+$" -$minGwVersion = $matches[0] +# $Description = @" +# _Pacman version:_ $pacmanVersion
+# "@ -$Description = @" -_Version:_ $minGwVersion
-_Environment:_ -* PATH: contains location of the MinGW 'bin' directory -"@ - -Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description +# Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description From 0903a6eaf2e5cc11d2e5a250c4a5aaa929681145 Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Tue, 24 Mar 2020 15:56:42 +0300 Subject: [PATCH 069/111] fixed swift.sh --- images/linux/scripts/installers/swift.sh | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/images/linux/scripts/installers/swift.sh b/images/linux/scripts/installers/swift.sh index 23dd0d063..103e92861 100644 --- a/images/linux/scripts/installers/swift.sh +++ b/images/linux/scripts/installers/swift.sh @@ -6,11 +6,16 @@ # Install # Install image_label="$(lsb_release -rs)" -wget https://swift.org/builds/swift-5.1.5-release/ubuntu${image_label//./}/swift-5.1.5-RELEASE/swift-5.1.5-RELEASE-ubuntu$image_label.tar.gz -tar xzf swift-5.1.5-RELEASE-ubuntu$image_label.tar.gz -sudo mv swift-5.1.5-RELEASE-ubuntu$image_label /usr/share/swift -sudo echo "PATH=/usr/share/swift/usr/bin:$PATH" | sudo tee -a /etc/environment -source ~/.bashrc +swift_version="5.1.5" + +wget -P /tmp https://swift.org/builds/swift-$swift_version-release/ubuntu${image_label//./}/swift-$swift_version-RELEASE/swift-$swift_version-RELEASE-ubuntu$image_label.tar.gz +tar xzf /tmp/swift-$swift_version-RELEASE-ubuntu$image_label.tar.gz +sudo mv swift-$swift_version-RELEASE-ubuntu$image_label /usr/share/swift + +SWIFT_DIR="/usr/share/swift/usr/bin/swift" +SWIFT_PATH="/usr/share/swift/usr/bin" +sudo ln -s "$SWIFT_DIR" /usr/local/bin/swift +echo "SWIFT_PATH =$SWIFT_PATH" | sudo tee -a /etc/environment # Run tests to determine that the software installed as expected echo "Testing to make sure that script performed as expected, and basic scenarios work" @@ -21,4 +26,4 @@ fi # Document what was added to the image echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "$(swift --version)" \ No newline at end of file +DocumentInstalledItem "$(swift --version)" From 6f557cf84c63e90096c537071144c830c931ca0c Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Tue, 24 Mar 2020 16:28:01 +0300 Subject: [PATCH 070/111] removed unused libs and fixed swift.sh --- images/linux/scripts/installers/1604/basic.sh | 4 ---- images/linux/scripts/installers/1804/basic.sh | 8 -------- images/linux/scripts/installers/swift.sh | 8 ++++---- 3 files changed, 4 insertions(+), 16 deletions(-) diff --git a/images/linux/scripts/installers/1604/basic.sh b/images/linux/scripts/installers/1604/basic.sh index 6a629e4f2..adc1e8098 100644 --- a/images/linux/scripts/installers/1604/basic.sh +++ b/images/linux/scripts/installers/1604/basic.sh @@ -23,8 +23,6 @@ apt-fast install -y --no-install-recommends \ libc++abi-dev \ libcurl3 \ libicu55 \ - libpython2.7 \ - libpython2.7-dev \ libunwind8 \ locales \ netcat \ @@ -83,8 +81,6 @@ DocumentInstalledItemIndent "libc++-dev" DocumentInstalledItemIndent "libc++abi-dev" DocumentInstalledItemIndent "libcurl3" DocumentInstalledItemIndent "libicu55" -DocumentInstalledItemIndent "libpython2.7" -DocumentInstalledItemIndent "libpython2.7-dev" DocumentInstalledItemIndent "libunwind8" DocumentInstalledItemIndent "locales" DocumentInstalledItemIndent "netcat" diff --git a/images/linux/scripts/installers/1804/basic.sh b/images/linux/scripts/installers/1804/basic.sh index 84f3790ff..c12c7a819 100644 --- a/images/linux/scripts/installers/1804/basic.sh +++ b/images/linux/scripts/installers/1804/basic.sh @@ -31,12 +31,6 @@ apt-get install -y --no-install-recommends jq echo "Install libcurl3" apt-get install -y --no-install-recommends libcurl3 -echo "Install libpython2.7" -apt-get install -y --no-install-recommends libpython2.7 - -echo "Install libpython2.7-dev" -apt-get install -y --no-install-recommends libpython2.7-dev - echo "Install libunwind8" apt-get install -y --no-install-recommends libunwind8 @@ -154,8 +148,6 @@ DocumentInstalledItemIndent "iputils-ping" DocumentInstalledItemIndent "jq" DocumentInstalledItemIndent "libcurl3" DocumentInstalledItemIndent "libicu55" -DocumentInstalledItemIndent "libpython2.7" -DocumentInstalledItemIndent "libpython2.7-dev" DocumentInstalledItemIndent "libunwind8" DocumentInstalledItemIndent "locales" DocumentInstalledItemIndent "netcat" diff --git a/images/linux/scripts/installers/swift.sh b/images/linux/scripts/installers/swift.sh index 103e92861..36c70571f 100644 --- a/images/linux/scripts/installers/swift.sh +++ b/images/linux/scripts/installers/swift.sh @@ -10,12 +10,12 @@ swift_version="5.1.5" wget -P /tmp https://swift.org/builds/swift-$swift_version-release/ubuntu${image_label//./}/swift-$swift_version-RELEASE/swift-$swift_version-RELEASE-ubuntu$image_label.tar.gz tar xzf /tmp/swift-$swift_version-RELEASE-ubuntu$image_label.tar.gz -sudo mv swift-$swift_version-RELEASE-ubuntu$image_label /usr/share/swift +mv swift-$swift_version-RELEASE-ubuntu$image_label /usr/share/swift -SWIFT_DIR="/usr/share/swift/usr/bin/swift" +SWIFT_BIN="/usr/share/swift/usr/bin/swift" SWIFT_PATH="/usr/share/swift/usr/bin" -sudo ln -s "$SWIFT_DIR" /usr/local/bin/swift -echo "SWIFT_PATH =$SWIFT_PATH" | sudo tee -a /etc/environment +ln -s "$SWIFT_BIN" /usr/local/bin/swift +echo "SWIFT_PATH=$SWIFT_PATH" | tee -a /etc/environment # Run tests to determine that the software installed as expected echo "Testing to make sure that script performed as expected, and basic scenarios work" From 4f00d9bbfc2f63f74ef675988541e37e3a5503a9 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Tue, 24 Mar 2020 17:11:27 +0300 Subject: [PATCH 071/111] Add tool versions to description --- .../win/scripts/Installers/Validate-Msys2.ps1 | 35 +++++++++++++++---- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/images/win/scripts/Installers/Validate-Msys2.ps1 b/images/win/scripts/Installers/Validate-Msys2.ps1 index b8eac3aa3..7bed9c9f7 100644 --- a/images/win/scripts/Installers/Validate-Msys2.ps1 +++ b/images/win/scripts/Installers/Validate-Msys2.ps1 @@ -35,12 +35,33 @@ try { # Adding description of the software to Markdown -# $SoftwareName = "MSYS2" -# $(pacman.exe --version).Split([System.Environment]::NewLine)[1] -match "v\d+\.\d+\.\d+" -# $pacmanVersion = $matches[0] +function Get-ToolVersion { + param( + [string] $ToolPath, + [int] $VersionLineNumber + ) -# $Description = @" -# _Pacman version:_ $pacmanVersion
-# "@ + $toolRawVersion = Invoke-Expression "$ToolPath --version" + $toolRawVersion.Split([System.Environment]::NewLine)[$VersionLineNumber] -match "\d+\.\d+(\.\d+)?" + $toolVersion = $matches[0] + return $toolVersion +} -# Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description +$SoftwareName = "MSYS2" +$pacmanVersion = Get-ToolVersion -ToolPath "$msys2BinDir/pacman" -VersionLineNumber 1 +$bashVersion = Get-ToolVersion -ToolPath "$msys2BinDir/bash" -VersionLineNumber 0 +$gccVersion = Get-ToolVersion -ToolPath "$msys2mingwDir/gcc" -LineNumber 0 +$tarVersion = Get-ToolVersion -ToolPath "$msys2BinDir/tar" -LineNumber 0 +$makeVersion = Get-ToolVersion -ToolPath "$msys2BinDir/make" -LineNumber 0 +$cmakeVersion = Get-ToolVersion -ToolPath "$msys2mingwDir/cmake" -LineNumber 0 + +$Description = @" +_Pacman version:_ $pacmanVersion
+_Bash:_ $bashVersion
+_gcc:_ $gccVersion
+_tar:_ $tarVersion
+_make:_ $makeVersion
+_cmake:_ $cmakeVersion
+"@ + +Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description From a9c63356630063124b1d258b62732715d754bed4 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Tue, 24 Mar 2020 17:12:57 +0300 Subject: [PATCH 072/111] Minor fix --- images/win/scripts/Installers/Validate-Msys2.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/images/win/scripts/Installers/Validate-Msys2.ps1 b/images/win/scripts/Installers/Validate-Msys2.ps1 index 7bed9c9f7..0e7805d20 100644 --- a/images/win/scripts/Installers/Validate-Msys2.ps1 +++ b/images/win/scripts/Installers/Validate-Msys2.ps1 @@ -56,7 +56,8 @@ $makeVersion = Get-ToolVersion -ToolPath "$msys2BinDir/make" -LineNumber 0 $cmakeVersion = Get-ToolVersion -ToolPath "$msys2mingwDir/cmake" -LineNumber 0 $Description = @" -_Pacman version:_ $pacmanVersion
+_Tool versions_ +_Pacman:_ $pacmanVersion
_Bash:_ $bashVersion
_gcc:_ $gccVersion
_tar:_ $tarVersion
From 53536cea29fffcb94ead6b7ad36185c610c28cf7 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Tue, 24 Mar 2020 17:44:12 +0300 Subject: [PATCH 073/111] Add cmake check --- images/win/scripts/Installers/Validate-Msys2.ps1 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/images/win/scripts/Installers/Validate-Msys2.ps1 b/images/win/scripts/Installers/Validate-Msys2.ps1 index 0e7805d20..8358df538 100644 --- a/images/win/scripts/Installers/Validate-Msys2.ps1 +++ b/images/win/scripts/Installers/Validate-Msys2.ps1 @@ -33,6 +33,15 @@ try { exit 1 } +Write-Host "Check cmake in msys2/mingw64/bin directory" +try { + Invoke-Expression "$msys2mingwDir\cmake --version" +} catch { + Write-Host "cmake was not installed in MSYS2 bin directory" + Write-Error $_ + exit 1 +} + # Adding description of the software to Markdown function Get-ToolVersion { From e80bf9eefe1f4ab8d1e7effacf95db280726f0ab Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Tue, 24 Mar 2020 17:47:56 +0300 Subject: [PATCH 074/111] Minor fix --- images/win/scripts/Installers/Install-Msys2.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/win/scripts/Installers/Install-Msys2.ps1 b/images/win/scripts/Installers/Install-Msys2.ps1 index 9f57ea230..90e548b41 100644 --- a/images/win/scripts/Installers/Install-Msys2.ps1 +++ b/images/win/scripts/Installers/Install-Msys2.ps1 @@ -29,7 +29,7 @@ Write-Host "Starting msys2 extraction" Remove-Item $msys2File Write-Host "Finished extraction" -# Add msys2 bin tools folders to PATH +# Add msys2 bin tools folders to PATH temporary $env:PATH = "C:\msys64\mingw64\bin;C:\msys64\usr\bin;$origPath" Write-Host "bash pacman-key --init" From 9f55156c04594bcc4ce4ef20d05fa2190e2cbf60 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Tue, 24 Mar 2020 17:50:30 +0300 Subject: [PATCH 075/111] Fix typo --- images/win/scripts/Installers/Validate-Msys2.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/images/win/scripts/Installers/Validate-Msys2.ps1 b/images/win/scripts/Installers/Validate-Msys2.ps1 index 8358df538..a6ec122e7 100644 --- a/images/win/scripts/Installers/Validate-Msys2.ps1 +++ b/images/win/scripts/Installers/Validate-Msys2.ps1 @@ -59,10 +59,10 @@ function Get-ToolVersion { $SoftwareName = "MSYS2" $pacmanVersion = Get-ToolVersion -ToolPath "$msys2BinDir/pacman" -VersionLineNumber 1 $bashVersion = Get-ToolVersion -ToolPath "$msys2BinDir/bash" -VersionLineNumber 0 -$gccVersion = Get-ToolVersion -ToolPath "$msys2mingwDir/gcc" -LineNumber 0 -$tarVersion = Get-ToolVersion -ToolPath "$msys2BinDir/tar" -LineNumber 0 -$makeVersion = Get-ToolVersion -ToolPath "$msys2BinDir/make" -LineNumber 0 -$cmakeVersion = Get-ToolVersion -ToolPath "$msys2mingwDir/cmake" -LineNumber 0 +$gccVersion = Get-ToolVersion -ToolPath "$msys2mingwDir/gcc" -VersionLineNumber 0 +$tarVersion = Get-ToolVersion -ToolPath "$msys2BinDir/tar" -VersionLineNumber 0 +$makeVersion = Get-ToolVersion -ToolPath "$msys2BinDir/make" -VersionLineNumber 0 +$cmakeVersion = Get-ToolVersion -ToolPath "$msys2mingwDir/cmake" -VersionLineNumber 0 $Description = @" _Tool versions_ From 9e12e181a3322cbef9b0e7d2da5caddbda0e9985 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Tue, 24 Mar 2020 18:49:57 +0300 Subject: [PATCH 076/111] Reworked validation --- .../win/scripts/Installers/Validate-Msys2.ps1 | 40 +++++++++---------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/images/win/scripts/Installers/Validate-Msys2.ps1 b/images/win/scripts/Installers/Validate-Msys2.ps1 index a6ec122e7..b249decb2 100644 --- a/images/win/scripts/Installers/Validate-Msys2.ps1 +++ b/images/win/scripts/Installers/Validate-Msys2.ps1 @@ -12,6 +12,11 @@ $installedTools = @( "make" ) +$installedMinGWTools = @( + "gcc", + "cmake" +) + Write-Host "Check installed tools in msys2/usr/bin directory" $installedTools | ForEach-Object { $toolName = $_ @@ -24,22 +29,16 @@ $installedTools | ForEach-Object { } } -Write-Host "Check gcc in msys2/mingw64/bin directory" -try { - Invoke-Expression "$msys2mingwDir\gcc --version" -} catch { - Write-Host "gcc was not installed in MSYS2 bin directory" - Write-Error $_ - exit 1 -} - -Write-Host "Check cmake in msys2/mingw64/bin directory" -try { - Invoke-Expression "$msys2mingwDir\cmake --version" -} catch { - Write-Host "cmake was not installed in MSYS2 bin directory" - Write-Error $_ - exit 1 +Write-Host "Check installed tools in msys2/mingw/bin directory" +$installedMinGWTools | ForEach-Object { + $toolName = $_ + try { + Invoke-Expression "$msys2mingwDir\$_ --version" + } catch { + Write-Error "$toolName was not installed in MSYS2 mingw bin directory" + Write-Error $_ + exit 1 + } } # Adding description of the software to Markdown @@ -61,17 +60,14 @@ $pacmanVersion = Get-ToolVersion -ToolPath "$msys2BinDir/pacman" -VersionLineNum $bashVersion = Get-ToolVersion -ToolPath "$msys2BinDir/bash" -VersionLineNumber 0 $gccVersion = Get-ToolVersion -ToolPath "$msys2mingwDir/gcc" -VersionLineNumber 0 $tarVersion = Get-ToolVersion -ToolPath "$msys2BinDir/tar" -VersionLineNumber 0 -$makeVersion = Get-ToolVersion -ToolPath "$msys2BinDir/make" -VersionLineNumber 0 -$cmakeVersion = Get-ToolVersion -ToolPath "$msys2mingwDir/cmake" -VersionLineNumber 0 $Description = @" _Tool versions_ -_Pacman:_ $pacmanVersion
-_Bash:_ $bashVersion
+_pacman:_ $pacmanVersion
+_bash:_ $bashVersion
_gcc:_ $gccVersion
_tar:_ $tarVersion
-_make:_ $makeVersion
-_cmake:_ $cmakeVersion
+MSYS2 location: C:\msys64 "@ Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description From 0bf06144d7e5d4f62561fabac37f13ccbf4db0a2 Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Wed, 25 Mar 2020 03:22:40 +0700 Subject: [PATCH 077/111] added mkdir instetad of md --- images/win/scripts/Installers/Install-SQLExpress.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/images/win/scripts/Installers/Install-SQLExpress.ps1 b/images/win/scripts/Installers/Install-SQLExpress.ps1 index f2a732afc..79956502e 100644 --- a/images/win/scripts/Installers/Install-SQLExpress.ps1 +++ b/images/win/scripts/Installers/Install-SQLExpress.ps1 @@ -70,7 +70,7 @@ $installerUrl = "https://go.microsoft.com/fwlink/?linkid=866658" $downloadPath = "C:\SQLInstall" $setupPath = Join-Path $downloadPath "SQLEXPR_x64_ENU" #Create directory for temporary files -md $downloadPath +mkdir $downloadPath Set-Location -Path $downloadPath $installerPath = Start-DownloadWithRetry -Url $installerUrl -DownloadPath $downloadPath -Name "SQL2019-SSEI-Expr.exe" Download-FullSQLPackage -InstallerPath $installerPath -DownloadPath $downloadPath @@ -78,4 +78,4 @@ Unpack-SQLInstaller -InstallPath "$setupPath.exe" $resultPath = Join-Path $setupPath "SETUP.exe" Start-Installer -InstallerPath $resultPath #Cleanup folder with installation packages. -Remove-Item $downloadPath -Recurse +Remove-Item $downloadPath -Recurse -Force From 80399e072af74b60dc9caf68015733de87006c7a Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Wed, 25 Mar 2020 09:26:22 +0300 Subject: [PATCH 078/111] resolve comment --- images/linux/scripts/installers/swift.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/linux/scripts/installers/swift.sh b/images/linux/scripts/installers/swift.sh index 36c70571f..a391444e5 100644 --- a/images/linux/scripts/installers/swift.sh +++ b/images/linux/scripts/installers/swift.sh @@ -12,8 +12,8 @@ wget -P /tmp https://swift.org/builds/swift-$swift_version-release/ubuntu${image tar xzf /tmp/swift-$swift_version-RELEASE-ubuntu$image_label.tar.gz mv swift-$swift_version-RELEASE-ubuntu$image_label /usr/share/swift -SWIFT_BIN="/usr/share/swift/usr/bin/swift" SWIFT_PATH="/usr/share/swift/usr/bin" +SWIFT_BIN="$SWIFT_PATH/swift" ln -s "$SWIFT_BIN" /usr/local/bin/swift echo "SWIFT_PATH=$SWIFT_PATH" | tee -a /etc/environment From b0a54cf66472bd79af353f99ee05d58487adecf1 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Wed, 25 Mar 2020 09:38:59 +0300 Subject: [PATCH 079/111] Minor change --- images/win/scripts/Installers/Install-Msys2.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/win/scripts/Installers/Install-Msys2.ps1 b/images/win/scripts/Installers/Install-Msys2.ps1 index 90e548b41..49f75e430 100644 --- a/images/win/scripts/Installers/Install-Msys2.ps1 +++ b/images/win/scripts/Installers/Install-Msys2.ps1 @@ -8,7 +8,7 @@ # https://packages.msys2.org/group/ $origPath = $env:PATH -$gitPath = "C:\Program Files\Git" +$gitPath = "$env:ProgramFiles\Git" # get info from https://sourceforge.net/projects/msys2/files/Base/x86_64/ $msys2Uri = "http://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-20190524.tar.xz" From 09dd3401fe893f6058c1e4f39fd8ccdba06cd7e0 Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Wed, 25 Mar 2020 11:25:36 +0300 Subject: [PATCH 080/111] added document.sh --- images/linux/scripts/installers/swift.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/images/linux/scripts/installers/swift.sh b/images/linux/scripts/installers/swift.sh index a391444e5..36e30e85b 100644 --- a/images/linux/scripts/installers/swift.sh +++ b/images/linux/scripts/installers/swift.sh @@ -4,6 +4,9 @@ ## Desc: Installs Swift ################################################################################ +# Source the helpers for use with the script +source $HELPER_SCRIPTS/document.sh + # Install # Install image_label="$(lsb_release -rs)" swift_version="5.1.5" From e6c9978ac2c4f9f739f2c62b3a896ab38fb93ced Mon Sep 17 00:00:00 2001 From: Marco Mansi Date: Wed, 25 Mar 2020 13:17:38 +0100 Subject: [PATCH 081/111] Set the execution policy in Packar to RemoteSigned Match the same ExecutioPolicy as in the Install-ServiceFabricSDK --- images/win/Windows2016-Azure.json | 3 ++- images/win/Windows2019-Azure.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/images/win/Windows2016-Azure.json b/images/win/Windows2016-Azure.json index e0bf37f50..993e1b18a 100644 --- a/images/win/Windows2016-Azure.json +++ b/images/win/Windows2016-Azure.json @@ -238,7 +238,8 @@ "type": "powershell", "scripts":[ "{{ template_dir }}/scripts/Installers/Install-ServiceFabricSDK.ps1" - ] + ], + "execution_policy": "remotesigned" }, { "type": "windows-restart", diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index 3ebbea245..4bae85793 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -219,7 +219,8 @@ "type": "powershell", "scripts":[ "{{ template_dir }}/scripts/Installers/Install-ServiceFabricSDK.ps1" - ] + ], + "execution_policy": "remotesigned" }, { "type": "windows-restart", From 89c2c31767be65bfa97d6923ff38523b6e652c69 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Wed, 25 Mar 2020 19:04:11 +0300 Subject: [PATCH 082/111] Minor fix --- images/win/scripts/Installers/Validate-Msys2.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/win/scripts/Installers/Validate-Msys2.ps1 b/images/win/scripts/Installers/Validate-Msys2.ps1 index b249decb2..e7d2142a8 100644 --- a/images/win/scripts/Installers/Validate-Msys2.ps1 +++ b/images/win/scripts/Installers/Validate-Msys2.ps1 @@ -50,7 +50,7 @@ function Get-ToolVersion { ) $toolRawVersion = Invoke-Expression "$ToolPath --version" - $toolRawVersion.Split([System.Environment]::NewLine)[$VersionLineNumber] -match "\d+\.\d+(\.\d+)?" + $toolRawVersion.Split([System.Environment]::NewLine)[$VersionLineNumber] -match "\d+\.\d+(\.\d+)?" | Out-Null $toolVersion = $matches[0] return $toolVersion } From fc17e909a8a743cfd10c30c4d0ec014d2784ea33 Mon Sep 17 00:00:00 2001 From: Image generation service account Date: Thu, 26 Mar 2020 09:39:29 +0000 Subject: [PATCH 083/111] Updating readme file for AzP.20200319.win19.1 version 20200319 --- images/win/Windows2019-Readme.md | 110 ++++++++++++++++--------------- 1 file changed, 57 insertions(+), 53 deletions(-) diff --git a/images/win/Windows2019-Readme.md b/images/win/Windows2019-Readme.md index 9819f9a84..cd716b6e1 100644 --- a/images/win/Windows2019-Readme.md +++ b/images/win/Windows2019-Readme.md @@ -1,6 +1,6 @@ # Windows Server 2019 -The following software is installed on machines with the 20200308.0 update. +The following software is installed on machines with the 20200319.1 update. Components marked with **\*** have been upgraded since the previous version of the image. @@ -23,6 +23,12 @@ _Version:_ 1.25.4
_Environment:_ * PATH: contains location of docker-compose.exe +## Helm + +_Version:_ v3.1.2+gd878d4d
+_Environment:_ +* PATH: contains location of helm + ## Powershell Core _Version:_ 7.0.0
@@ -30,15 +36,15 @@ _Version:_ 7.0.0
## Docker images The following container images have been cached: -* mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2019 (Digest: sha256:746e54a4398bff0ad516d02fdb9eec5cba1a3b5ba0c15a82c051fc3dc753fe85) -* mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2019 (Digest: sha256:708a9492c51140a07a0bd160c508dd6d17f3b061af0a3f53de607d671ee7176a) -* mcr.microsoft.com/windows/servercore:ltsc2019 (Digest: sha256:39ba615d7a739fcdd9fc95b97882672d5af7d0861dd16b51b238c822765d2b8d) -* mcr.microsoft.com/windows/nanoserver:1809 (Digest: sha256:4201fb07c1ece2ef0bad7b518fd487d030cd49de98b81b3ed8b98e71432df463) +* mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2019 (Digest: sha256:24ffd5fad1becaf9b16f42ec6f40c90ddf56664986a87212d2d48164e3bb52ba) +* mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2019 (Digest: sha256:ceaf6f000f0a0677510a5511f089071c2822dd40f34a77ca0280f96b10621858) +* mcr.microsoft.com/windows/servercore:ltsc2019 (Digest: sha256:8dcc65367c900f06ad386da6a1e25d578232f7b15981092986ade2f2fd9468b8) +* mcr.microsoft.com/windows/nanoserver:1809 (Digest: sha256:5de6bd32bd453d60c8f549d28845552e89ad3652566e141ac82023b6ba10374d) * microsoft/aspnetcore-build:1.0-2.0 (Digest: sha256:9ecc7c5a8a7a11dca5f08c860165646cb30d084606360a3a72b9cbe447241c0c) ## Visual Studio 2019 Enterprise -_Version:_ VisualStudio/16.4.5+29806.167
+_Version:_ VisualStudio/16.5.0+29911.84
_Location:_ C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise The following workloads and components are installed with Visual Studio 2019: @@ -132,13 +138,15 @@ The following workloads and components are installed with Visual Studio 2019: ## WIX Tools _Toolset Version:_ 3.11.4516
-_WIX Toolset Visual Studio Extension Version:_ 1.0.0.4
+_WIX Toolset Studio 2019 Extension Version:_ 1.0.0.4
_Environment:_ * WIX: Installation root of WIX -## Microsoft Analysis Services Projects Visual Studio Extension +## Microsoft SSDT Visual Studio 2019 Extensions -_Version:_ 2.9.5
+_Microsoft Analysis Services Projects Version:_ 2.9.6
+_SQL Server Integration Services Projects Version:_ 3.5
+_Microsoft Reporting Services Projects Version:_ 2.6.3
## .NET 4.8 @@ -408,7 +416,7 @@ _Description:_ .NET has been configured to use TLS 1.2 by default ## Azure CLI -_Version:_ 2.1.0 +_Version:_ 2.2.0 _Environment:_ * PATH: contains location of az.cmd @@ -418,7 +426,7 @@ _Version:_ azure-devops 0.17.0 ## Python -_Version:_ 2.7.17 (x64)
_Version:_ 3.5.4 (x64)
_Version:_ 3.6.8 (x64)
_Version:_ 3.7.6 (x64)
_Version:_ 3.8.2 (x64)
_Version:_ 2.7.17 (x86)
_Version:_ 3.5.4 (x86)
_Version:_ 3.6.8 (x86)
_Version:_ 3.7.6 (x86)
_Version:_ 3.8.2 (x86)
+_Version:_ 2.7.17 (x64)
_Version:_ 3.5.4 (x64)
_Version:_ 3.6.8 (x64)
_Version:_ 3.7.6 (x64)
_Version:_ 3.8.2 (x64)
_Version:_ 2.7.17 (x86)
_Version:_ 3.5.4 (x86)
_Version:_ 3.6.8 (x86)
_Version:_ 3.7.6 (x86)
_Version:_ 3.8.2 (x86)

__System default version:__ Python 3.7.6
_Environment:_
* Location: C:\hostedtoolcache\windows\Python\3.7.6\x64
* PATH: contains the location of Python 3.7.6
## PyPy @@ -426,21 +434,15 @@ _Version:_ 2.7.13 (x86)
_Version:_ 3.6.9 (x86)
## Ruby -_Version:_ 2.4.9 (x64)
_Version:_ 2.5.7 (x64)
_Version:_ 2.6.5 (x64)
_Version:_ 2.7.0 (x64)
+_Version:_ 2.4.9 (x64)
_Version:_ 2.5.7 (x64)
_Version:_ 2.6.5 (x64)
_Version:_ 2.7.0 (x64)

__System default version:__ Ruby 2.5.7p206
_Environment:_
* Location: C:\hostedtoolcache\windows\Ruby\2.5.7\x64\bin
* PATH: contains the location of Ruby 2.5.7p206
* Gem Version: 2.7.6.2
-## Python (64 bit) +## OpenSSL -#### Python 3.7.6 -_Environment:_ -* PATH: contains location of python.exe - -#### Python 2.7.17 - -_Location:_ C:/hostedtoolcache/windows/Python/2.7*/x64 +_Version:_ 1.1.1 at C:\Program Files\OpenSSL\bin\openssl.exe
_Version:_ 1.1.1d at C:\Strawberry\c\bin\openssl.exe
_Version:_ 1.1.1d at C:\Program Files\Git\mingw64\bin\openssl.exe
_Version:_ 1.1.1d at C:\Program Files\Git\usr\bin\openssl.exe
_Version:_ 1.0.2j at C:\Program Files (x86)\Subversion\bin\openssl.exe
## Perl -_Version:_ v5.30.1
+_Version:_ v5.30.2
## Git @@ -455,33 +457,45 @@ _Environment:_ * PATH: contains location of git-lfs.exe * GIT_LFS_PATH: location of git-lfs.exe +## Hub CLI + +_Version:_ 2.14.2
+_Environment:_ +* PATH: contains location of hub.exe + ## Go (x64) -#### 1.12.7 +#### 1.14 _Environment:_ -* PATH: contains the location of go.exe version 1.12.7 -* GOROOT: root directory of the Go 1.12.7 installation -* GOROOT_1_12_X64: root directory of the Go 1.12.7 installation -#### 1.13 - -_Environment:_ -* GOROOT_1_13_X64: root directory of the Go 1.13 installation - +* PATH: contains the location of go.exe version 1.14 +* GOROOT: root directory of the Go 1.14 installation +* GOROOT_1_14_X64: root directory of the Go 1.14 installation ## Boost -#### 1.69.0 +#### 1.69.0 [msvc-14.1] _Environment:_ * BOOST_ROOT_1_69_0: root directory of the Boost version 1.69.0 installation -#### 1.72.0 +#### 1.72.0 [msvc-14.2] +_Environment:_ * PATH: contains the location of Boost version 1.72.0 -* BOOST_ROOT: root directory of the Boost version 1.72.0 installation * BOOST_ROOT_1_72_0: root directory of the Boost version 1.72.0 installation + +#### _Notes:_ +Link: https://cmake.org/cmake/help/latest/module/FindBoost.html + +If Boost was built using the `boost-cmake` project or from `Boost 1.70.0` on it provides a package +configuration file for use with find\_package's config mode. This module looks for the package +configuration file called BoostConfig.cmake or boost-config.cmake and stores the result in CACHE entry "Boost_DIR". +If found, the package configuration file is loaded and this module returns with no further action. +See documentation of the Boost CMake package configuration for details on what it provides. + +Set `Boost_NO_BOOST_CMAKE to ON`, to disable the search for boost-cmake. ## PHP (x64) @@ -492,17 +506,9 @@ _Environment:_ * PATH: contains the location of php.exe version 7.4.3 * PHPROOT: root directory of the PHP 7.4.3 installation -## Ruby (x64) - -#### 2.5.7p206 -_Environment:_ -* Location: C:\hostedtoolcache\windows\Ruby\2.5.7\x64\bin -* PATH: contains the location of ruby.exe version 2.5.7p206 -* Gem Version: 3.1.2 - ## Rust (64-bit) -#### 1.41.1 +#### 1.42.0 _Location:_ C:\Rust\.cargo\bin _Environment:_ * PATH: contains the location of rustc.exe @@ -524,7 +530,7 @@ _Environment:_ ## Google Chrome _version:_ -80.0.3987.132 +80.0.3987.149 ## Microsoft Edge @@ -534,7 +540,7 @@ _version:_ ## Mozilla Firefox _version:_ -73.0.1 +74.0 ## Selenium Web Drivers @@ -580,7 +586,7 @@ _Environment:_ * PATH: contains location of node.exe
* Gulp CLI version: 2.2.0 Local version: Unknown
* Grunt grunt-cli v1.3.2
-* Yarn 1.22.1
+* Yarn 1.22.4
## npm @@ -591,7 +597,7 @@ _Environment:_ ## Java Development Kit -#### 1.8.0_222 +#### 1.8.0_222 (default) _Environment:_ * JAVA_HOME: location of JDK @@ -645,6 +651,7 @@ _Environment:_ * PATH: contains location of dotnet.exe _SDK:_ +* 3.1.200 C:\Program Files\dotnet\sdk\3.1.200 * 3.1.101 C:\Program Files\dotnet\sdk\3.1.101 * 3.1.100 C:\Program Files\dotnet\sdk\3.1.100 * 2.2.402 C:\Program Files\dotnet\sdk\2.2.402 @@ -702,6 +709,7 @@ _SDK:_ * 2.1.300 C:\Program Files\dotnet\sdk\2.1.300 _Runtime:_ +* 3.1.2 C:\Program Files\dotnet\shared\Microsoft.NETCore.App\3.1.2 * 3.1.1 C:\Program Files\dotnet\shared\Microsoft.NETCore.App\3.1.1 * 3.1.0 C:\Program Files\dotnet\shared\Microsoft.NETCore.App\3.1.0 * 2.2.8 C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.2.8 @@ -788,15 +796,11 @@ _Version:_ 1.4.0
## Inno Setup -_Version:_ 6.0.3
+_Version:_ 6.0.4
## GitVersion -_Version:_ 5.2.0.0
- -## OpenSSL - -_Version:_ 1.1.1c at C:\Strawberry\c\bin\openssl.exe
_Version:_ 1.1.1d at C:\Program Files\Git\mingw64\bin\openssl.exe
_Version:_ 1.1.1d at C:\Program Files\Git\usr\bin\openssl.exe
_Version:_ 1.0.2j at C:\Program Files (x86)\Subversion\bin\openssl.exe
_Version:_ 1.1.1 at C:\Program Files\OpenSSL\bin\openssl.exe
+_Version:_ 5.2.4.0
## Cloud Foundry CLI @@ -828,7 +832,7 @@ _Environment:_ ## bazel -_Version:_ bazel 2.1.0
+_Version:_ bazel 2.2.0
## bazelisk From a0587eafc0d1eaa3678d474335383ca08add98fd Mon Sep 17 00:00:00 2001 From: Alena Sviridenko Date: Thu, 26 Mar 2020 17:55:41 +0300 Subject: [PATCH 084/111] Revert "Install MSYS2 to Windows." (#630) --- images/win/Windows2016-Azure.json | 14 ---- images/win/Windows2019-Azure.json | 14 ---- .../win/scripts/Installers/Install-Msys2.ps1 | 76 ------------------- .../win/scripts/Installers/Validate-Msys2.ps1 | 73 ------------------ 4 files changed, 177 deletions(-) delete mode 100644 images/win/scripts/Installers/Install-Msys2.ps1 delete mode 100644 images/win/scripts/Installers/Validate-Msys2.ps1 diff --git a/images/win/Windows2016-Azure.json b/images/win/Windows2016-Azure.json index dc563c7e1..e0bf37f50 100644 --- a/images/win/Windows2016-Azure.json +++ b/images/win/Windows2016-Azure.json @@ -491,14 +491,6 @@ "{{ template_dir }}/scripts/Installers/Install-AzureModules.ps1" ] }, - { - "type": "powershell", - "elevated_user": "SYSTEM", - "elevated_password": "", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-Msys2.ps1" - ] - }, { "type": "powershell", "scripts":[ @@ -620,12 +612,6 @@ "{{ template_dir }}/scripts/Installers/Validate-AzureDevOpsCli.ps1" ] }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-Msys2.ps1" - ] - }, { "type": "powershell", "environment_vars":[ diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index 022bb5ce8..c93f79e75 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -472,14 +472,6 @@ "{{ template_dir }}/scripts/Installers/Install-AzureModules.ps1" ] }, - { - "type": "powershell", - "elevated_user": "SYSTEM", - "elevated_password": "", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-Msys2.ps1" - ] - }, { "type": "powershell", "scripts":[ @@ -607,12 +599,6 @@ "{{ template_dir }}/scripts/Installers/Validate-AzureDevOpsCli.ps1" ] }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-Msys2.ps1" - ] - }, { "type": "powershell", "environment_vars":[ diff --git a/images/win/scripts/Installers/Install-Msys2.ps1 b/images/win/scripts/Installers/Install-Msys2.ps1 deleted file mode 100644 index 49f75e430..000000000 --- a/images/win/scripts/Installers/Install-Msys2.ps1 +++ /dev/null @@ -1,76 +0,0 @@ -################################################################################ -## File: Install-Msys2.ps1 -## Desc: Install Msys2 and 64-bit gcc, cmake, & llvm (32-bit commented out) -################################################################################ - -# References -# https://github.com/msys2/MINGW-packages/blob/master/azure-pipelines.yml -# https://packages.msys2.org/group/ - -$origPath = $env:PATH -$gitPath = "$env:ProgramFiles\Git" - -# get info from https://sourceforge.net/projects/msys2/files/Base/x86_64/ -$msys2Uri = "http://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-20190524.tar.xz" -$msys2File = "$env:TEMP\msys2.tar.xz" - -# Download the latest msys2 x86_64 -Write-Host "Starting msys2 download" -(New-Object System.Net.WebClient).DownloadFile($msys2Uri, $msys2File) -Write-Host "Finished download" - -$msys2FileU = "/$msys2File".replace(':', '') - -$tar = "$gitPath\usr\bin\tar.exe" - -# extract tar.xz to C:\ -Write-Host "Starting msys2 extraction" -&$tar -Jxf $msys2FileU -C /c/ -Remove-Item $msys2File -Write-Host "Finished extraction" - -# Add msys2 bin tools folders to PATH temporary -$env:PATH = "C:\msys64\mingw64\bin;C:\msys64\usr\bin;$origPath" - -Write-Host "bash pacman-key --init" -bash.exe -c "pacman-key --init 2>&1" - -Write-Host "bash pacman-key --populate msys2" -bash.exe -c "pacman-key --populate msys2 2>&1" - -Write-Host "pacman --noconfirm -Syyuu" -pacman.exe -Syyuu --noconfirm -pacman.exe -Syuu --noconfirm - -Write-Host "Install msys2 packages" -pacman.exe -S --noconfirm --needed --noprogressbar base-devel compression - -# mingw package list -$tools = "___clang ___cmake ___llvm ___toolchain ___ragel" - -# install mingw64 packages -Write-Host "Install mingw64 packages" -$pre = "mingw-w64-x86_64-" -pacman.exe -S --noconfirm --needed --noprogressbar $tools.replace('___', $pre).split(' ') - -# install mingw32 packages -Write-Host "Install mingw32 packages" -$pre = "mingw-w64-i686-" -pacman.exe -S --noconfirm --needed --noprogressbar $tools.replace('___', $pre).split(' ') - -# clean all packages to decrease image size -Write-Host "Clean packages" -pacman.exe -Scc --noconfirm - -Write-Host "Installed mingw64 packages" -pacman.exe -Qs --noconfirm mingw-w64-x86_64- - -Write-Host "Installed mingw32 packages" -pacman.exe -Qs --noconfirm mingw-w64-i686- - -Write-Host "Installed msys2 packages" -pacman.exe -Qs --noconfirm - -Write-Host "MSYS2 installation completed" - -exit 0 \ No newline at end of file diff --git a/images/win/scripts/Installers/Validate-Msys2.ps1 b/images/win/scripts/Installers/Validate-Msys2.ps1 deleted file mode 100644 index e7d2142a8..000000000 --- a/images/win/scripts/Installers/Validate-Msys2.ps1 +++ /dev/null @@ -1,73 +0,0 @@ -################################################################################ -## File: Validate-Msys2.ps1 -## Desc: Validate Msys2 -################################################################################ - -$msys2BinDir = "C:\msys64\usr\bin" -$msys2mingwDir = "C:\msys64\mingw64\bin" - -$installedTools = @( - "bash", - "tar", - "make" -) - -$installedMinGWTools = @( - "gcc", - "cmake" -) - -Write-Host "Check installed tools in msys2/usr/bin directory" -$installedTools | ForEach-Object { - $toolName = $_ - try { - Invoke-Expression "$msys2BinDir\$_ --version" - } catch { - Write-Host "$toolName was not installed in MSYS2 bin directory" - Write-Error $_ - exit 1 - } -} - -Write-Host "Check installed tools in msys2/mingw/bin directory" -$installedMinGWTools | ForEach-Object { - $toolName = $_ - try { - Invoke-Expression "$msys2mingwDir\$_ --version" - } catch { - Write-Error "$toolName was not installed in MSYS2 mingw bin directory" - Write-Error $_ - exit 1 - } -} - -# Adding description of the software to Markdown - -function Get-ToolVersion { - param( - [string] $ToolPath, - [int] $VersionLineNumber - ) - - $toolRawVersion = Invoke-Expression "$ToolPath --version" - $toolRawVersion.Split([System.Environment]::NewLine)[$VersionLineNumber] -match "\d+\.\d+(\.\d+)?" | Out-Null - $toolVersion = $matches[0] - return $toolVersion -} - -$SoftwareName = "MSYS2" -$pacmanVersion = Get-ToolVersion -ToolPath "$msys2BinDir/pacman" -VersionLineNumber 1 -$bashVersion = Get-ToolVersion -ToolPath "$msys2BinDir/bash" -VersionLineNumber 0 -$gccVersion = Get-ToolVersion -ToolPath "$msys2mingwDir/gcc" -VersionLineNumber 0 -$tarVersion = Get-ToolVersion -ToolPath "$msys2BinDir/tar" -VersionLineNumber 0 - -$Description = @" -_Tool versions_ -_pacman:_ $pacmanVersion
-_bash:_ $bashVersion
-_gcc:_ $gccVersion
-_tar:_ $tarVersion
-MSYS2 location: C:\msys64 -"@ - -Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description From 70c2ad2317d435fb2db72b6689540c7608d9096b Mon Sep 17 00:00:00 2001 From: Marco Mansi Date: Thu, 26 Mar 2020 16:20:08 +0100 Subject: [PATCH 085/111] Removed Set-ExecutionPolicy RemoteSigned from Install-ServiceFabricSDK.ps1 --- images/win/Windows2016-Azure.json | 3 +-- images/win/Windows2019-Azure.json | 3 +-- images/win/scripts/Installers/Install-ServiceFabricSDK.ps1 | 2 -- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/images/win/Windows2016-Azure.json b/images/win/Windows2016-Azure.json index 993e1b18a..e0bf37f50 100644 --- a/images/win/Windows2016-Azure.json +++ b/images/win/Windows2016-Azure.json @@ -238,8 +238,7 @@ "type": "powershell", "scripts":[ "{{ template_dir }}/scripts/Installers/Install-ServiceFabricSDK.ps1" - ], - "execution_policy": "remotesigned" + ] }, { "type": "windows-restart", diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index 4bae85793..3ebbea245 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -219,8 +219,7 @@ "type": "powershell", "scripts":[ "{{ template_dir }}/scripts/Installers/Install-ServiceFabricSDK.ps1" - ], - "execution_policy": "remotesigned" + ] }, { "type": "windows-restart", diff --git a/images/win/scripts/Installers/Install-ServiceFabricSDK.ps1 b/images/win/scripts/Installers/Install-ServiceFabricSDK.ps1 index 25a0429db..b8e264a09 100644 --- a/images/win/scripts/Installers/Install-ServiceFabricSDK.ps1 +++ b/images/win/scripts/Installers/Install-ServiceFabricSDK.ps1 @@ -8,6 +8,4 @@ $temp_install_dir = 'C:\Windows\Installer' New-Item -Path $temp_install_dir -ItemType Directory -Force -Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Force - WebpiCmd.exe /Install /Products:MicrosoftAzure-ServiceFabric-CoreSDK /AcceptEula /XML:https://webpifeed.blob.core.windows.net/webpifeed/5.1/WebProductList.xml From 8ecd0d93571767ef508c847f25ea101e212a622d Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Fri, 27 Mar 2020 12:52:54 +0700 Subject: [PATCH 086/111] removed all mandatory parameters to verify build. --- images/win/scripts/Installers/Install-SQLExpress.ps1 | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/images/win/scripts/Installers/Install-SQLExpress.ps1 b/images/win/scripts/Installers/Install-SQLExpress.ps1 index 79956502e..e3a6955ed 100644 --- a/images/win/scripts/Installers/Install-SQLExpress.ps1 +++ b/images/win/scripts/Installers/Install-SQLExpress.ps1 @@ -6,7 +6,6 @@ Import-Module -Name ImageHelpers -Force; function Download-FullSQLPackage { param( - [Parameter(Mandatory)] [String]$InstallerPath, [String]$DownloadPath, [String]$Arguments = ("/MEDIAPATH=$DownloadPath", "/MEDIATYPE=Core","/Action=Download", "/QUIET") @@ -27,7 +26,6 @@ function Download-FullSQLPackage { function Unpack-SQLInstaller { param( - [Parameter(Mandatory)] [String]$InstallPath, [String]$Arguments = ("/Q", "/IACCEPTSQLSERVERLICENSETERMS") ) @@ -48,7 +46,6 @@ 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") ) @@ -70,7 +67,7 @@ $installerUrl = "https://go.microsoft.com/fwlink/?linkid=866658" $downloadPath = "C:\SQLInstall" $setupPath = Join-Path $downloadPath "SQLEXPR_x64_ENU" #Create directory for temporary files -mkdir $downloadPath +md $downloadPath Set-Location -Path $downloadPath $installerPath = Start-DownloadWithRetry -Url $installerUrl -DownloadPath $downloadPath -Name "SQL2019-SSEI-Expr.exe" Download-FullSQLPackage -InstallerPath $installerPath -DownloadPath $downloadPath @@ -78,4 +75,4 @@ Unpack-SQLInstaller -InstallPath "$setupPath.exe" $resultPath = Join-Path $setupPath "SETUP.exe" Start-Installer -InstallerPath $resultPath #Cleanup folder with installation packages. -Remove-Item $downloadPath -Recurse -Force +Remove-Item $downloadPath -Recurse -Force \ No newline at end of file From 01d87333d87803cd5ef7c61c675aba2c6e288452 Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Fri, 27 Mar 2020 09:04:35 +0300 Subject: [PATCH 087/111] updated the swift version --- images/linux/scripts/installers/swift.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/linux/scripts/installers/swift.sh b/images/linux/scripts/installers/swift.sh index 36e30e85b..46f12378f 100644 --- a/images/linux/scripts/installers/swift.sh +++ b/images/linux/scripts/installers/swift.sh @@ -9,7 +9,7 @@ source $HELPER_SCRIPTS/document.sh # Install # Install image_label="$(lsb_release -rs)" -swift_version="5.1.5" +swift_version="5.2" wget -P /tmp https://swift.org/builds/swift-$swift_version-release/ubuntu${image_label//./}/swift-$swift_version-RELEASE/swift-$swift_version-RELEASE-ubuntu$image_label.tar.gz tar xzf /tmp/swift-$swift_version-RELEASE-ubuntu$image_label.tar.gz From af3ba77937c4aeb53e6f1889af45af63308f0203 Mon Sep 17 00:00:00 2001 From: Marco Mansi Date: Thu, 26 Mar 2020 16:20:08 +0100 Subject: [PATCH 088/111] Revert "Removed Set-ExecutionPolicy RemoteSigned from Install-ServiceFabricSDK.ps1" This reverts commit 70c2ad2317d435fb2db72b6689540c7608d9096b. --- images/win/Windows2016-Azure.json | 3 ++- images/win/Windows2019-Azure.json | 3 ++- images/win/scripts/Installers/Install-ServiceFabricSDK.ps1 | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/images/win/Windows2016-Azure.json b/images/win/Windows2016-Azure.json index e0bf37f50..993e1b18a 100644 --- a/images/win/Windows2016-Azure.json +++ b/images/win/Windows2016-Azure.json @@ -238,7 +238,8 @@ "type": "powershell", "scripts":[ "{{ template_dir }}/scripts/Installers/Install-ServiceFabricSDK.ps1" - ] + ], + "execution_policy": "remotesigned" }, { "type": "windows-restart", diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index 3ebbea245..4bae85793 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -219,7 +219,8 @@ "type": "powershell", "scripts":[ "{{ template_dir }}/scripts/Installers/Install-ServiceFabricSDK.ps1" - ] + ], + "execution_policy": "remotesigned" }, { "type": "windows-restart", diff --git a/images/win/scripts/Installers/Install-ServiceFabricSDK.ps1 b/images/win/scripts/Installers/Install-ServiceFabricSDK.ps1 index b8e264a09..25a0429db 100644 --- a/images/win/scripts/Installers/Install-ServiceFabricSDK.ps1 +++ b/images/win/scripts/Installers/Install-ServiceFabricSDK.ps1 @@ -8,4 +8,6 @@ $temp_install_dir = 'C:\Windows\Installer' New-Item -Path $temp_install_dir -ItemType Directory -Force +Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Force + WebpiCmd.exe /Install /Products:MicrosoftAzure-ServiceFabric-CoreSDK /AcceptEula /XML:https://webpifeed.blob.core.windows.net/webpifeed/5.1/WebProductList.xml From 8bf9b153163fcfbf1cd46c69bc8317c6304c5e37 Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Fri, 27 Mar 2020 13:55:47 +0300 Subject: [PATCH 089/111] added getting the latest version by default --- images/linux/scripts/installers/swift.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/images/linux/scripts/installers/swift.sh b/images/linux/scripts/installers/swift.sh index 46f12378f..107779131 100644 --- a/images/linux/scripts/installers/swift.sh +++ b/images/linux/scripts/installers/swift.sh @@ -7,9 +7,11 @@ # Source the helpers for use with the script source $HELPER_SCRIPTS/document.sh -# Install # Install +# Install image_label="$(lsb_release -rs)" -swift_version="5.2" + +curl https://swift.org/download/ > /tmp/tmp_file +swift_version=$(cat /tmp/tmp_file | grep -m1 "id=\"swift-" | cut -d'>' -f2 | cut -d'<' -f1 | cut -d' ' -f2) wget -P /tmp https://swift.org/builds/swift-$swift_version-release/ubuntu${image_label//./}/swift-$swift_version-RELEASE/swift-$swift_version-RELEASE-ubuntu$image_label.tar.gz tar xzf /tmp/swift-$swift_version-RELEASE-ubuntu$image_label.tar.gz From 47dfa3537548353768f2dc6ef95f4e44ce50d167 Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Fri, 27 Mar 2020 14:12:53 +0300 Subject: [PATCH 090/111] fixed getting the swift version --- images/linux/scripts/installers/swift.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/images/linux/scripts/installers/swift.sh b/images/linux/scripts/installers/swift.sh index 107779131..abfbacfb5 100644 --- a/images/linux/scripts/installers/swift.sh +++ b/images/linux/scripts/installers/swift.sh @@ -9,9 +9,7 @@ source $HELPER_SCRIPTS/document.sh # Install image_label="$(lsb_release -rs)" - -curl https://swift.org/download/ > /tmp/tmp_file -swift_version=$(cat /tmp/tmp_file | grep -m1 "id=\"swift-" | cut -d'>' -f2 | cut -d'<' -f1 | cut -d' ' -f2) +swift_version=$(curl https://swift.org/download/ | grep -m1 "id=\"swift-" | cut -d'>' -f2 | cut -d'<' -f1 | cut -d' ' -f2) wget -P /tmp https://swift.org/builds/swift-$swift_version-release/ubuntu${image_label//./}/swift-$swift_version-RELEASE/swift-$swift_version-RELEASE-ubuntu$image_label.tar.gz tar xzf /tmp/swift-$swift_version-RELEASE-ubuntu$image_label.tar.gz @@ -31,4 +29,4 @@ fi # Document what was added to the image echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "$(swift --version)" +DocumentInstalledItem "$(swift --version)" \ No newline at end of file From db9a568512f708ad33277f2a13df544e775eb68e Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Fri, 27 Mar 2020 14:52:12 +0300 Subject: [PATCH 091/111] updated swift_version --- images/linux/scripts/installers/swift.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/linux/scripts/installers/swift.sh b/images/linux/scripts/installers/swift.sh index abfbacfb5..ca97606e9 100644 --- a/images/linux/scripts/installers/swift.sh +++ b/images/linux/scripts/installers/swift.sh @@ -9,7 +9,7 @@ source $HELPER_SCRIPTS/document.sh # Install image_label="$(lsb_release -rs)" -swift_version=$(curl https://swift.org/download/ | grep -m1 "id=\"swift-" | cut -d'>' -f2 | cut -d'<' -f1 | cut -d' ' -f2) +swift_version=$(curl -s https://swift.org/download/ | grep -m1 "id=\"swift-" | awk -F"[ <]" '{print $4}') wget -P /tmp https://swift.org/builds/swift-$swift_version-release/ubuntu${image_label//./}/swift-$swift_version-RELEASE/swift-$swift_version-RELEASE-ubuntu$image_label.tar.gz tar xzf /tmp/swift-$swift_version-RELEASE-ubuntu$image_label.tar.gz From 64dc2fe2b127a7e3cb4d2dbd75052da5339964ee Mon Sep 17 00:00:00 2001 From: Dibir Magomedsaygitov Date: Fri, 27 Mar 2020 15:24:28 +0300 Subject: [PATCH 092/111] change the lint to download ssdt --- images/win/scripts/Installers/Windows2016/Install-SSDT.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/win/scripts/Installers/Windows2016/Install-SSDT.ps1 b/images/win/scripts/Installers/Windows2016/Install-SSDT.ps1 index 9362c9bd6..273444173 100644 --- a/images/win/scripts/Installers/Windows2016/Install-SSDT.ps1 +++ b/images/win/scripts/Installers/Windows2016/Install-SSDT.ps1 @@ -6,7 +6,7 @@ Import-Module -Name ImageHelpers -Force #SSDT for Visual Studio 2017 (15.9.3) -$InstallerURI = 'https://download.microsoft.com/download/5/2/D/52DEF429-5B17-470C-82D9-654116080B15/SSDT-Setup-ENU.exe' +$InstallerURI = 'https://download.microsoft.com/download/e/c/f/ecfccf97-b32c-4c31-b2fc-bff558635096/SSDT-Setup-ENU.exe' $InstallerName = 'SSDT-Setup-ENU.exe' $logFilePath = "$env:TEMP\ssdtlog.txt" $ArgumentList = ('/install', 'INSTALLALL', '/passive', '/norestart', "/log `"$logFilePath`"") From 69ff6d6d7cebc150eb01d7c7493b7feb97383427 Mon Sep 17 00:00:00 2001 From: Dibir Magomedsaygitov Date: Fri, 27 Mar 2020 18:23:22 +0300 Subject: [PATCH 093/111] update the download link for ssdt for win2016 --- images/win/scripts/Installers/Windows2016/Install-SSDT.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/images/win/scripts/Installers/Windows2016/Install-SSDT.ps1 b/images/win/scripts/Installers/Windows2016/Install-SSDT.ps1 index 273444173..132734c81 100644 --- a/images/win/scripts/Installers/Windows2016/Install-SSDT.ps1 +++ b/images/win/scripts/Installers/Windows2016/Install-SSDT.ps1 @@ -5,8 +5,9 @@ Import-Module -Name ImageHelpers -Force -#SSDT for Visual Studio 2017 (15.9.3) -$InstallerURI = 'https://download.microsoft.com/download/e/c/f/ecfccf97-b32c-4c31-b2fc-bff558635096/SSDT-Setup-ENU.exe' +#SSDT for Visual Studio 2017 +#The link down below points to the latest version of SSDT for Visual Studio 2017 +$InstallerURI = 'https://go.microsoft.com/fwlink/?linkid=2124518' $InstallerName = 'SSDT-Setup-ENU.exe' $logFilePath = "$env:TEMP\ssdtlog.txt" $ArgumentList = ('/install', 'INSTALLALL', '/passive', '/norestart', "/log `"$logFilePath`"") From 2938cedba44b2cd67c3b6f0ccddb74b34dbcb261 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Sicard-Ram=C3=ADrez?= Date: Sun, 29 Mar 2020 07:45:57 -0500 Subject: [PATCH 094/111] Supported GHC 8.8.10. --- images/linux/scripts/installers/haskell.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/images/linux/scripts/installers/haskell.sh b/images/linux/scripts/installers/haskell.sh index 05e430df0..db051aaea 100644 --- a/images/linux/scripts/installers/haskell.sh +++ b/images/linux/scripts/installers/haskell.sh @@ -26,6 +26,7 @@ apt-get install -y \ ghc-8.8.1 \ ghc-8.8.2 \ ghc-8.8.3 \ + ghc-8.10.1 \ cabal-install-2.0 \ cabal-install-2.2 \ cabal-install-2.4 \ @@ -37,7 +38,7 @@ curl -sSL https://raw.githubusercontent.com/commercialhaskell/stack/v2.1.3/etc/s # Run tests to determine that the software installed as expected echo "Testing to make sure that script performed as expected, and basic scenarios work" # Check all ghc versions -for version in 8.0.2 8.2.2 8.4.4 8.6.2 8.6.3 8.6.4 8.6.5 8.8.1 8.8.2 8.8.3; do +for version in 8.0.2 8.2.2 8.4.4 8.6.2 8.6.3 8.6.4 8.6.5 8.8.1 8.8.2 8.8.3 8.10.1; do if ! command -v /opt/ghc/$version/bin/ghc; then echo "ghc $version was not installed" exit 1 @@ -60,7 +61,7 @@ echo "Lastly, documenting what we added to the metadata file" for version in 2.0 2.2 2.4 3.0; do DocumentInstalledItem "Haskell Cabal ($(/opt/cabal/$version/bin/cabal --version))" done -for version in 8.0.2 8.2.2 8.4.4 8.6.2 8.6.3 8.6.4 8.6.5 8.8.1 8.8.2 8.8.3; do +for version in 8.0.2 8.2.2 8.4.4 8.6.2 8.6.3 8.6.4 8.6.5 8.8.1 8.8.2 8.8.3 8.10.1; do DocumentInstalledItem "GHC ($(/opt/ghc/$version/bin/ghc --version))" done DocumentInstalledItem "Haskell Stack ($(stack --version))" From 1ea6cc521ad57d1e1c07f119129ebcac07107cae Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov Date: Sun, 29 Mar 2020 23:55:35 +0300 Subject: [PATCH 095/111] install root ca --- images/win/Windows2019-Azure.json | 6 +++++ .../win/scripts/Installers/Install-RootCA.ps1 | 24 +++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 images/win/scripts/Installers/Install-RootCA.ps1 diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index c93f79e75..7376f98ca 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -110,6 +110,12 @@ "{{ template_dir }}/scripts/Installers/Update-DotnetTLS.ps1" ] }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-RootCA.ps1" + ] + }, { "type": "windows-restart", "restart_timeout": "10m" diff --git a/images/win/scripts/Installers/Install-RootCA.ps1 b/images/win/scripts/Installers/Install-RootCA.ps1 new file mode 100644 index 000000000..824b2b465 --- /dev/null +++ b/images/win/scripts/Installers/Install-RootCA.ps1 @@ -0,0 +1,24 @@ +# Serialized Certificate Store File +$sstFile = "$env:TEMP\roots.sst" +# Generate SST from Windows Update +$result = certutil.exe -generateSSTFromWU $sstFile +if ($LASTEXITCODE -eq 0) { + # Dump certificates + $result = certutil.exe -dump $sstFile + if ($LASTEXITCODE -eq 0) { + # Import Root CA into "Trusted Root Certification Authority" + try { + Import-Certificate -FilePath $sstFile -CertStoreLocation Cert:\LocalMachine\Root + } catch { + Write-Host "[Error]: failed to import ROOT CA`n$_" + } + } + else { + Write-Host "[Error]: failed to dump $sstFile sst file`n$result" + } +} +else { + Write-Host "[Error]: failed to generate $sstFile sst file`n$result" +} + +exit $LASTEXITCODE \ No newline at end of file From b8ac95cd81c16bfc7a5b33789d3f07a0dc2d1900 Mon Sep 17 00:00:00 2001 From: Dibir Magomedsaygitov <61747324+dibir-magomedsaygitov@users.noreply.github.com> Date: Mon, 30 Mar 2020 11:09:02 +0300 Subject: [PATCH 096/111] Add awscli (#610) * uppdate/add awscli * change awscli to aws and fix for aws version * concatenate install and validate script files * update image templates * add aws to the path Co-authored-by: Dibir Magomedsaygitov --- images/win/Windows2016-Azure.json | 6 ++++ images/win/Windows2019-Azure.json | 6 ++++ images/win/scripts/Installers/Install-AWS.ps1 | 31 +++++++++++++++++++ 3 files changed, 43 insertions(+) create mode 100644 images/win/scripts/Installers/Install-AWS.ps1 diff --git a/images/win/Windows2016-Azure.json b/images/win/Windows2016-Azure.json index e0bf37f50..2f304145d 100644 --- a/images/win/Windows2016-Azure.json +++ b/images/win/Windows2016-Azure.json @@ -445,6 +445,12 @@ "{{ template_dir }}/scripts/Installers/Install-Cmake.ps1" ] }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-AWS.ps1" + ] + }, { "type": "powershell", "scripts":[ diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index c93f79e75..9d197301a 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -426,6 +426,12 @@ "{{ template_dir }}/scripts/Installers/Install-Cmake.ps1" ] }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-AWS.ps1" + ] + }, { "type": "powershell", "scripts":[ diff --git a/images/win/scripts/Installers/Install-AWS.ps1 b/images/win/scripts/Installers/Install-AWS.ps1 new file mode 100644 index 000000000..124f32d20 --- /dev/null +++ b/images/win/scripts/Installers/Install-AWS.ps1 @@ -0,0 +1,31 @@ +################################################################################ +## File: Install-awscli.ps1 +## Desc: Install awscli +################################################################################ + +choco install awscli -y + +$env:PATH =$env:PATH + ";$Env:Programfiles\Amazon\AWSCLIV2" + +$command = Get-Command -Name 'aws' + +if ($command) +{ + Write-Host "awscli on path" +} +else +{ + Write-Host 'awscli is not on path' + exit 1 +} + +# Adding description of the software to Markdown +$SoftwareName = "AWS CLI" + +$version = (aws --version).Split(" ")[0].Replace("/"," ") + +$Description = @" +_Version:_ $version
+"@ + +Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description \ No newline at end of file From a48d21f57ab731b24d59f0569ccd456d6f6abcba Mon Sep 17 00:00:00 2001 From: Dariy Nurgaleev <50947177+Darleev@users.noreply.github.com> Date: Mon, 30 Mar 2020 16:49:34 +0700 Subject: [PATCH 097/111] Create directory using native powershell tools --- images/win/scripts/Installers/Install-SQLExpress.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/images/win/scripts/Installers/Install-SQLExpress.ps1 b/images/win/scripts/Installers/Install-SQLExpress.ps1 index e3a6955ed..f1913088e 100644 --- a/images/win/scripts/Installers/Install-SQLExpress.ps1 +++ b/images/win/scripts/Installers/Install-SQLExpress.ps1 @@ -67,7 +67,7 @@ $installerUrl = "https://go.microsoft.com/fwlink/?linkid=866658" $downloadPath = "C:\SQLInstall" $setupPath = Join-Path $downloadPath "SQLEXPR_x64_ENU" #Create directory for temporary files -md $downloadPath +New-Item -Path $downloadPath -ItemType Directory Set-Location -Path $downloadPath $installerPath = Start-DownloadWithRetry -Url $installerUrl -DownloadPath $downloadPath -Name "SQL2019-SSEI-Expr.exe" Download-FullSQLPackage -InstallerPath $installerPath -DownloadPath $downloadPath @@ -75,4 +75,4 @@ Unpack-SQLInstaller -InstallPath "$setupPath.exe" $resultPath = Join-Path $setupPath "SETUP.exe" Start-Installer -InstallerPath $resultPath #Cleanup folder with installation packages. -Remove-Item $downloadPath -Recurse -Force \ No newline at end of file +Remove-Item $downloadPath -Recurse -Force From ad58d07d917241434a2039bcc80bcdf773f10b6a Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov Date: Mon, 30 Mar 2020 15:41:42 +0300 Subject: [PATCH 098/111] fix environmnet path --- images/win/scripts/Installers/Install-DotnetSDK.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/images/win/scripts/Installers/Install-DotnetSDK.ps1 b/images/win/scripts/Installers/Install-DotnetSDK.ps1 index 996887885..d5a414114 100644 --- a/images/win/scripts/Installers/Install-DotnetSDK.ps1 +++ b/images/win/scripts/Installers/Install-DotnetSDK.ps1 @@ -100,10 +100,10 @@ function RunPostInstallationSteps() { Add-MachinePathItem "C:\Program Files\dotnet" # Run script at startup for all users - $cmdDotNetPath = @" + $cmdDotNetPath = @' @echo off -SETX PATH "%USERPROFILE%\.dotnet\tools;%PATH%" -"@ +powershell -executionpolicy bypass -noprofile -command "[System.Environment]::SetEnvironmentVariable('PATH',"""$env:USERPROFILE\.dotnet\tools;$env:PATH""", 'USER')" +'@ $cmdPath = "C:\Program Files\dotnet\userpath.bat" $cmdDotNetPath | Out-File -Encoding ascii -FilePath $cmdPath From ff07d56975499796602b7ffc1ad8c8b44d3dd18a Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov Date: Mon, 30 Mar 2020 18:33:21 +0300 Subject: [PATCH 099/111] install root ca --- images/win/Windows2019-Azure.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index 7376f98ca..bdac45b55 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -110,12 +110,6 @@ "{{ template_dir }}/scripts/Installers/Update-DotnetTLS.ps1" ] }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-RootCA.ps1" - ] - }, { "type": "windows-restart", "restart_timeout": "10m" @@ -577,6 +571,12 @@ "{{ template_dir }}/scripts/Installers/Install-Bazel.ps1" ] }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-RootCA.ps1" + ] + }, { "type": "windows-restart", "restart_timeout": "10m" From e91f2138c0b7304831e9aaa43ea47279d4160ef4 Mon Sep 17 00:00:00 2001 From: Image generation service account Date: Mon, 30 Mar 2020 17:25:52 +0000 Subject: [PATCH 100/111] Updating readme file for AzP.20200323.win16.1 version 20200323 --- images/win/Windows2016-Readme.md | 64 ++++++++++++++++++++------------ 1 file changed, 41 insertions(+), 23 deletions(-) diff --git a/images/win/Windows2016-Readme.md b/images/win/Windows2016-Readme.md index e81702625..f20e48706 100644 --- a/images/win/Windows2016-Readme.md +++ b/images/win/Windows2016-Readme.md @@ -1,6 +1,6 @@ # Windows Server 2016 -The following software is installed on machines with the 20200316.1 update. +The following software is installed on machines with the 20200323.1 update. Components marked with **\*** have been upgraded since the previous version of the image. @@ -23,6 +23,12 @@ _Version:_ 1.25.4
_Environment:_ * PATH: contains location of docker-compose.exe +## Helm + +_Version:_ v3.1.2+gd878d4d
+_Environment:_ +* PATH: contains location of helm + ## Powershell Core _Version:_ 7.0.0
@@ -30,8 +36,8 @@ _Version:_ 7.0.0
## Docker images The following container images have been cached: -* mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2016 (Digest: sha256:e53049e13aa29b2df35642fa827c532ceaa78745e6ca72be2cbe74b1d75b5b99) -* mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2016 (Digest: sha256:9d34bebe71fdebfd288b3e87a9b8372e47a9291782c09fbaeb657f8f78817779) +* mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2016 (Digest: sha256:7bf99ba791cce2c51091ac0c6922ff98e5a448c1046ba046fab3760070173e0d) +* mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2016 (Digest: sha256:000d639c6c287bf0e69b27c008f2d411a9e161093dd1855667a8e6189f9adac8) * mcr.microsoft.com/windows/servercore:ltsc2016 (Digest: sha256:5bd97dbab1afe8d3200f5d5c974df3b0130e74e8a69fddcd427699c4c8cb5037) * microsoft/aspnetcore-build:1.0-2.0 (Digest: sha256:9ecc7c5a8a7a11dca5f08c860165646cb30d084606360a3a72b9cbe447241c0c) * mcr.microsoft.com/windows/nanoserver:10.0.14393.953 (Digest: sha256:fc60bd5ae0e61b334ce1cf1bcbf20c10c36b4c5482a01da319c9c989f9e6e268) @@ -155,7 +161,8 @@ _Path:_ C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools ## Windows Driver Kit -_Version:_ 10.0.17763.0
+_WDK Version:_ 10.1.17763.1
+_WDK Visual Studio Extension Version:_ 10.0.17740.0
## Azure Service Fabric @@ -437,11 +444,11 @@ _Version:_ 2.4.9 (x64)
_Version:_ 2.5.7 (x64)
_Version:_ 2.6.5 (x64)
_Version:_ 1.1.1c at C:\Strawberry\c\bin\openssl.exe
_Version:_ 1.1.1d at C:\Program Files\Git\mingw64\bin\openssl.exe
_Version:_ 1.1.1d at C:\Program Files\Git\usr\bin\openssl.exe
_Version:_ 1.0.2j at C:\Program Files (x86)\Subversion\bin\openssl.exe
+_Version:_ 1.1.1 at C:\Program Files\OpenSSL\bin\openssl.exe
_Version:_ 1.1.1d at C:\Strawberry\c\bin\openssl.exe
_Version:_ 1.1.1d at C:\Program Files\Git\mingw64\bin\openssl.exe
_Version:_ 1.1.1d at C:\Program Files\Git\usr\bin\openssl.exe
_Version:_ 1.0.2j at C:\Program Files (x86)\Subversion\bin\openssl.exe
## Perl -_Version:_ v5.30.1
+_Version:_ v5.30.2
## Git @@ -456,28 +463,39 @@ _Environment:_ * PATH: contains location of git-lfs.exe * GIT_LFS_PATH: location of git-lfs.exe +## Hub CLI + +_Version:_ 2.14.2
+_Environment:_ +* PATH: contains location of hub.exe + ## Go (x64) -#### 1.14 - -_Environment:_ -* PATH: contains the location of go.exe version 1.14 -* GOROOT: root directory of the Go 1.14 installation -* GOROOT_1_14_X64: root directory of the Go 1.14 installation ## Boost -#### 1.69.0 +#### 1.69.0 [msvc-14.1] +_Environment:_ * PATH: contains the location of Boost version 1.69.0 -* BOOST_ROOT: root directory of the Boost version 1.69.0 installation * BOOST_ROOT_1_69_0: root directory of the Boost version 1.69.0 installation -#### 1.72.0 +#### 1.72.0 [msvc-14.1] _Environment:_ * BOOST_ROOT_1_72_0: root directory of the Boost version 1.72.0 installation + +#### _Notes:_ +Link: https://cmake.org/cmake/help/latest/module/FindBoost.html + +If Boost was built using the `boost-cmake` project or from `Boost 1.70.0` on it provides a package +configuration file for use with find\_package's config mode. This module looks for the package +configuration file called BoostConfig.cmake or boost-config.cmake and stores the result in CACHE entry "Boost_DIR". +If found, the package configuration file is loaded and this module returns with no further action. +See documentation of the Boost CMake package configuration for details on what it provides. + +Set `Boost_NO_BOOST_CMAKE to ON`, to disable the search for boost-cmake. ## PHP (x64) @@ -512,12 +530,12 @@ _Environment:_ ## Google Chrome _version:_ -80.0.3987.132 +80.0.3987.149 ## Microsoft Edge _version:_ -80.0.361.66 +80.0.361.69 ## Mozilla Firefox @@ -554,7 +572,7 @@ _Environment:_ #### Microsoft Edge Driver _version:_ -80.0.361.66 +80.0.361.69 _Environment:_ * EdgeWebDriver: location of msedgedriver.exe @@ -579,7 +597,7 @@ _Environment:_ ## bazel -_Version:_ bazel 2.1.0
+_Version:_ bazel 2.2.0
## bazelisk @@ -587,7 +605,7 @@ _Version:_ 1.3.0
## Java Development Kit -#### 1.8.0_222 +#### 1.8.0_222 (default) _Environment:_ * JAVA_HOME: location of JDK @@ -624,7 +642,7 @@ _Environment:_ ## Cmake -_Version:_ 3.16.5
+_Version:_ 3.17.0
_Environment:_ * PATH: contains location of cmake.exe @@ -744,7 +762,7 @@ _Version:_ 1.0 ## SQLServer PS -_Version:_ 21.1.18218 +_Version:_ 21.1.18221 ## MinGW @@ -793,7 +811,7 @@ _Version:_ 6.0.4
## GitVersion -_Version:_ 5.2.3.0
+_Version:_ 5.2.4.0
## Cloud Foundry CLI From 6f5ac4b86b791a1f029058520420f62b2fabf6dc Mon Sep 17 00:00:00 2001 From: Maxim Lobanov Date: Tue, 31 Mar 2020 09:52:53 +0300 Subject: [PATCH 101/111] update triage rules --- .github/workflows/issue-triager.yml | 14 +++----------- triage-rules.yml | 26 -------------------------- 2 files changed, 3 insertions(+), 37 deletions(-) diff --git a/.github/workflows/issue-triager.yml b/.github/workflows/issue-triager.yml index d28b1080c..41eb3c813 100644 --- a/.github/workflows/issue-triager.yml +++ b/.github/workflows/issue-triager.yml @@ -13,13 +13,13 @@ jobs: steps: - uses: actions/checkout@v1 - + - uses: damccorm/tag-ur-it@master with: repo-token: "${{ secrets.GITHUB_TOKEN }}" configuration-path: "./triage-rules.yml" - - if: failure() + - if: always() uses: actions/github-script@0.4.0 with: github-token: ${{secrets.GITHUB_TOKEN}} @@ -29,12 +29,4 @@ jobs: owner: context.owner, repo: context.repo, labels: ['needs triage'] - }) - - - name: Set Node.js 10.x - uses: actions/setup-node@master - with: - version: 10.x - - # Need to explicitly install @octokit/rest separately or else it will mess with our typings. - - run: npm install && npm install @octokit/rest + }) \ No newline at end of file diff --git a/triage-rules.yml b/triage-rules.yml index 20d1edce6..1894fa574 100644 --- a/triage-rules.yml +++ b/triage-rules.yml @@ -7,157 +7,131 @@ rules: - valueFor: '**Area for Triage**' contains: '.NET Core' addLabels: ['Area: .NET Core'] - assign: ['bishal-pdmsft', 'pulkitaggarwl'] # Area: .NET Framework - valueFor: '**Area for Triage**' contains: '.NET Framework' addLabels: ['Area: .NET Framework'] - assign: ['azuredaveops', 'wnjenkin'] # Area: Android - valueFor: '**Area for Triage**' contains: 'Android' addLabels: ['Area: Android'] - assign: ['madhurig'] # Area: Apple - valueFor: '**Area for Triage**' contains: 'Apple' addLabels: ['Area: Apple'] - assign: ['sergey-akhalkov'] # Area: Artifacts - valueFor: '**Area for Triage**' contains: 'Artifacts' addLabels: ['Area: Artifacts'] - assign: ['animania4ka'] # Area: C/C++ - valueFor: '**Area for Triage**' contains: 'C/C++' addLabels: ['Area: C/C++'] - assign: ['azuredaveops', 'wnjenkin'] # Area: Containers - valueFor: '**Area for Triage**' contains: 'Containers' addLabels: ['Area: Containers'] - assign: ['bryanmacfarlane'] # Area: Databases - valueFor: '**Area for Triage**' contains: 'Databases' addLabels: ['Area: Databases'] - assign: ['kmkumaran', 'RoopeshNair'] # Area: Deployment/Release - valueFor: '**Area for Triage**' contains: 'Deployment/Release' addLabels: ['Area: Deployment/Release'] - assign: ['kmkumaran', 'RoopeshNair'] # Area: Erlang / Elixir - valueFor: '**Area for Triage**' contains: 'Erlang / Elixir' addLabels: ['Area: Erlang / Elixir'] - assign: ['andymckay'] # Area: Git - valueFor: '**Area for Triage**' contains: 'Git' addLabels: ['Area: Git'] - assign: ['alepauly','thejoebourneidentity'] # Area: Go - valueFor: '**Area for Triage**' contains: 'Go' addLabels: ['Area: Go'] - assign: ['bishal-pdmsft', 'pulkitaggarwl'] # Area: Haskell - valueFor: '**Area for Triage**' contains: 'Haskell' addLabels: ['Area: Haskell'] - assign: ['andymckay'] # Area: Java - valueFor: '**Area for Triage**' contains: 'Java' addLabels: ['Area: Java'] - assign: ['leantk','vijayma'] # Area: JavaScript and Node.js - valueFor: '**Area for Triage**' contains: 'JavaScript and Node.js' addLabels: ['Area: JavaScript and Node.js'] - assign: ['bryanmacfarlane'] # Area: Packages - valueFor: '**Area for Triage**' contains: 'Packages' addLabels: ['Area: Packages'] - assign: ['johnterickson', 'animania4ka'] # Area: PHP - valueFor: '**Area for Triage**' contains: 'PHP' addLabels: ['Area: PHP'] - assign: ['alepauly', 'thejoebourneidentity'] # Area: Python - valueFor: '**Area for Triage**' contains: 'Python' addLabels: ['Area: Python'] - assign: ['madhurig'] # Area: Ruby - valueFor: '**Area for Triage**' contains: 'Ruby' addLabels: ['Area: Ruby'] - assign: ['zachariahcox'] # Area: Rust - valueFor: '**Area for Triage**' contains: 'Rust' addLabels: ['Area: Rust'] - assign: ['sergey-akhalkov'] # Area: Scala - valueFor: '**Area for Triage**' contains: 'Scala' addLabels: ['Area: Scala'] - assign: ['leantk','vijayma'] # Area: Scripting and command line - valueFor: '**Area for Triage**' contains: 'Scripting and command line' addLabels: ['Area: Scripting and command line'] - assign: ['zachariahcox','vtbassmatt'] # Area: Servers - valueFor: '**Area for Triage**' contains: 'Servers' addLabels: ['Area: Servers'] - assign: ['kmkumaran', 'RoopeshNair'] # Area: SSH - valueFor: '**Area for Triage**' contains: 'SSH' addLabels: ['Area: SSH'] - assign: ['zachariahcox','vtbassmatt'] # Area: Testing and code coverage (incl. browser testing) - valueFor: '**Area for Triage**' contains: 'Testing and code coverage' addLabels: ['Area: Testing and code coverage'] - assign: ['sadagopanrajaram','PBoraMSFT'] # Area: Xamarin - valueFor: '**Area for Triage**' contains: 'Xamarin' addLabels: ['Area: Xamarin'] - assign: ['sergey-akhalkov'] # Types - valueFor: '**Question, Bug, or Feature?**' From 32f2b166f72674baf4cb2dd389b86d89a8899e92 Mon Sep 17 00:00:00 2001 From: Maxim Lobanov Date: Tue, 31 Mar 2020 10:46:59 +0300 Subject: [PATCH 102/111] Update issue-triager.yml --- .github/workflows/issue-triager.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/issue-triager.yml b/.github/workflows/issue-triager.yml index 41eb3c813..06eb9144b 100644 --- a/.github/workflows/issue-triager.yml +++ b/.github/workflows/issue-triager.yml @@ -25,7 +25,7 @@ jobs: github-token: ${{secrets.GITHUB_TOKEN}} script: | github.issues.addLabels({ - issue_number: context.issue, + issue_number: context.issue.number, owner: context.owner, repo: context.repo, labels: ['needs triage'] From 7bb78afa9cf30790fc6966537e81a2b88aa9580c Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov Date: Tue, 31 Mar 2020 10:47:49 +0300 Subject: [PATCH 103/111] fix environment path --- images/win/scripts/Installers/Install-DotnetSDK.ps1 | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/images/win/scripts/Installers/Install-DotnetSDK.ps1 b/images/win/scripts/Installers/Install-DotnetSDK.ps1 index d5a414114..5fe03e9b6 100644 --- a/images/win/scripts/Installers/Install-DotnetSDK.ps1 +++ b/images/win/scripts/Installers/Install-DotnetSDK.ps1 @@ -100,16 +100,10 @@ function RunPostInstallationSteps() { Add-MachinePathItem "C:\Program Files\dotnet" # Run script at startup for all users - $cmdDotNetPath = @' -@echo off -powershell -executionpolicy bypass -noprofile -command "[System.Environment]::SetEnvironmentVariable('PATH',"""$env:USERPROFILE\.dotnet\tools;$env:PATH""", 'USER')" -'@ - - $cmdPath = "C:\Program Files\dotnet\userpath.bat" - $cmdDotNetPath | Out-File -Encoding ascii -FilePath $cmdPath + $cmdDotNet = 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -Command "[System.Environment]::SetEnvironmentVariable(''PATH'',"""$env:USERPROFILE\.dotnet\tools;$env:PATH""", ''USER'')"' # Update Run key to run a script at logon - Set-ItemProperty -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Run" -Name "DOTNETUSERPATH" -Value $cmdPath + Set-ItemProperty -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Run" -Name "DOTNETUSERPATH" -Value $cmdDotNet } InstallAllValidSdks From 3a87a5707033511434fd896411e9df897253f833 Mon Sep 17 00:00:00 2001 From: Maxim Lobanov Date: Tue, 31 Mar 2020 10:48:18 +0300 Subject: [PATCH 104/111] Update issue-triager.yml --- .github/workflows/issue-triager.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/issue-triager.yml b/.github/workflows/issue-triager.yml index 06eb9144b..12d04db5a 100644 --- a/.github/workflows/issue-triager.yml +++ b/.github/workflows/issue-triager.yml @@ -26,7 +26,7 @@ jobs: script: | github.issues.addLabels({ issue_number: context.issue.number, - owner: context.owner, - repo: context.repo, + owner: context.repo.owner, + repo: context.repo.repo, labels: ['needs triage'] }) \ No newline at end of file From e0555df69af4009660ef49c22562014e08ad5c06 Mon Sep 17 00:00:00 2001 From: Maxim Lobanov Date: Tue, 31 Mar 2020 10:50:18 +0300 Subject: [PATCH 105/111] Update triage-rules.yml --- triage-rules.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/triage-rules.yml b/triage-rules.yml index 1894fa574..f56e910f7 100644 --- a/triage-rules.yml +++ b/triage-rules.yml @@ -157,10 +157,3 @@ nomatches: addLabels: ['Area: Packages'] - contains: 'Docker' addLabels: ['Area: Deployment/Release'] - -# always runs after rules. look for missing or invalid sets of tags -tags: -- noneIn: ['bug', 'enhancement', 'question'] - addLabels: ['needs triage'] -- noneMatch: '\s*Area:\s*([^]*)' - addLabels: ['needs triage'] From 1201c933b6593a25c6fbf4b3367cd1d1d6e77041 Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov Date: Tue, 31 Mar 2020 12:22:38 +0300 Subject: [PATCH 106/111] install root ca --- .../win/scripts/Installers/Install-RootCA.ps1 | 32 +++++++++---------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/images/win/scripts/Installers/Install-RootCA.ps1 b/images/win/scripts/Installers/Install-RootCA.ps1 index 824b2b465..cd3a46425 100644 --- a/images/win/scripts/Installers/Install-RootCA.ps1 +++ b/images/win/scripts/Installers/Install-RootCA.ps1 @@ -2,23 +2,21 @@ $sstFile = "$env:TEMP\roots.sst" # Generate SST from Windows Update $result = certutil.exe -generateSSTFromWU $sstFile -if ($LASTEXITCODE -eq 0) { - # Dump certificates - $result = certutil.exe -dump $sstFile - if ($LASTEXITCODE -eq 0) { - # Import Root CA into "Trusted Root Certification Authority" - try { - Import-Certificate -FilePath $sstFile -CertStoreLocation Cert:\LocalMachine\Root - } catch { - Write-Host "[Error]: failed to import ROOT CA`n$_" - } - } - else { - Write-Host "[Error]: failed to dump $sstFile sst file`n$result" - } -} -else { +if ($LASTEXITCODE -ne 0) { Write-Host "[Error]: failed to generate $sstFile sst file`n$result" + exit $LASTEXITCODE +} + +$result = certutil.exe -dump $sstFile +if ($LASTEXITCODE -ne 0) { + Write-Host "[Error]: failed to dump $sstFile sst file`n$result" + exit $LASTEXITCODE +} + +try { + Import-Certificate -FilePath $sstFile -CertStoreLocation Cert:\LocalMachine\Root +} catch { + Write-Host "[Error]: failed to import ROOT CA`n$_" + exit 1 } -exit $LASTEXITCODE \ No newline at end of file From 7bf4e367030b7ccb85e044474cc7c61af04db2e1 Mon Sep 17 00:00:00 2001 From: Image generation service account Date: Tue, 31 Mar 2020 13:34:45 +0000 Subject: [PATCH 107/111] Updating readme file for AzP.20200323.ubuntu18.1 version 20200323 --- images/linux/Ubuntu1804-README.md | 51 +++++++++++++++++-------------- 1 file changed, 28 insertions(+), 23 deletions(-) diff --git a/images/linux/Ubuntu1804-README.md b/images/linux/Ubuntu1804-README.md index 61577a940..73e7ddc39 100644 --- a/images/linux/Ubuntu1804-README.md +++ b/images/linux/Ubuntu1804-README.md @@ -1,5 +1,5 @@ # Ubuntu 18.04.4 LTS -The following software is installed on machines with the 20200316.1 update. +The following software is installed on machines with the 20200323.1 update. *** - 7-Zip 16.02 - Ansible (ansible 2.9.6) @@ -32,7 +32,7 @@ The following software is installed on machines with the 20200316.1 update. - wget - zip - zstd -- AWS CLI (aws-cli/1.18.21 Python/2.7.17 Linux/5.0.0-1032-azure botocore/1.15.21) +- AWS CLI (aws-cli/1.18.26 Python/2.7.17 Linux/5.0.0-1032-azure botocore/1.15.26) - build-essential - Clang 6.0 (6.0.1) - Clang 8 (8.0.1) @@ -41,6 +41,7 @@ The following software is installed on machines with the 20200316.1 update. - Docker Compose (docker-compose version 1.25.4, build 8d51620a) - Docker-Moby (Docker version 3.0.11+azure, build eb310fca49568dccd87c6136f774ef6fff2a1b51) - .NET Core SDK: + - 3.1.200 - 3.1.101 - 3.1.100 - 3.0.103 @@ -100,7 +101,7 @@ The following software is installed on machines with the 20200316.1 update. - 2.1.302 - 2.1.301 - 2.1.300 -- Erlang (Erlang (SMP,ASYNC_THREADS,HIPE) (BEAM) emulator version 10.6.4) +- Erlang (Erlang (SMP,ASYNC_THREADS,HIPE) (BEAM) emulator version 10.7) - Firefox (Mozilla Firefox 74.0) - Geckodriver (0.26.0); Gecko Driver is available via GECKOWEBDRIVER environment variable - GNU C++ 7.5.0 @@ -108,11 +109,12 @@ The following software is installed on machines with the 20200316.1 update. - GNU C++ 9.2.1 - GNU Fortran 8.3.0 - GNU Fortran 9.2.1 -- Git (2.25.1) +- Git (2.25.2) - Git Large File Storage (LFS) (2.10.0) -- Google Chrome (Google Chrome 80.0.3987.132 ) +- Hub CLI (2.14.2) +- Google Chrome (Google Chrome 80.0.3987.149 ) - ChromeDriver 80.0.3987.106 (f68069574609230cf9b635cd784cfb1bf81bb53a-refs/branch-heads/3987@{#882}); Chrome Driver is available via CHROMEWEBDRIVER environment variable -- Google Cloud SDK (284.0.0) +- Google Cloud SDK (285.0.1) - Haskell Cabal (cabal-install version 2.0.0.1 compiled using version 2.0.1.1 of the Cabal library ) - Haskell Cabal (cabal-install version 2.2.0.0 @@ -132,20 +134,21 @@ compiled using version 3.0.2.0 of the Cabal library ) - GHC (The Glorious Glasgow Haskell Compilation System, version 8.8.2) - GHC (The Glorious Glasgow Haskell Compilation System, version 8.8.3) - Haskell Stack (Version 2.1.3, Git revision 636e3a759d51127df2b62f90772def126cdf6d1f (7735 commits) x86_64 hpack-0.31.2) -- Heroku (heroku/7.39.0 linux-x64 node-v12.13.0) -- HHVM (HipHop VM 4.48.0 (rel)) +- Heroku (heroku/7.39.1 linux-x64 node-v12.13.0) +- HHVM (HipHop VM 4.49.0 (rel)) - ImageMagick -- Azul Zulu OpenJDK (7) (openjdk version "1.7.0_252") -- Azul Zulu OpenJDK (8) (openjdk version "1.8.0_242") -- Azul Zulu OpenJDK (11) (openjdk version "11.0.6" 2020-01-14 LTS) -- Azul Zulu OpenJDK (12) (openjdk version "12.0.2" 2019-07-16) +- Azul Zulu OpenJDK: + - 7 (openjdk version "1.7.0_252") + - 8 (openjdk version "1.8.0_242") (default) + - 11 (openjdk version "11.0.6" 2020-01-14 LTS) + - 12 (openjdk version "12.0.2" 2019-07-16) - Ant (Apache Ant(TM) version 1.10.5 compiled on March 28 2019) - Gradle 6.2.2 - Maven (Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)) - Kind (kind v0.7.0 go1.13.6 linux/amd64) - kubectl (Client Version: v1.17.4) - helm (v3.1.2+gd878d4d) -- Leiningen (Leiningen 2.9.1 on Java 1.8.0_242 OpenJDK 64-Bit Server VM) +- Leiningen (Leiningen 2.9.3 on Java 1.8.0_242 OpenJDK 64-Bit Server VM) - Mercurial (Mercurial Distributed SCM (version 4.5.3)) - Miniconda (conda 4.8.2) - Mono (Mono JIT compiler version 6.8.0.105 (tarball Tue Feb 4 21:20:20 UTC 2020)) @@ -165,10 +168,10 @@ Local version: Unknown) - Bazel (bazel 2.2.0) - Bazelisk (1.3.0) - PhantomJS (2.1.1) -- PHP 7.1 (PHP 7.1.33-12+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Feb 23 2020 07:22:16) ( NTS )) -- PHP 7.2 (PHP 7.2.28-3+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Feb 23 2020 07:23:25) ( NTS )) -- PHP 7.3 (PHP 7.3.15-3+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Feb 23 2020 07:23:33) ( NTS )) -- PHP 7.4 (PHP 7.4.3 (cli) (built: Feb 23 2020 07:24:28) ( NTS )) +- PHP 7.1 (PHP 7.1.33-14+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Mar 20 2020 13:57:43) ( NTS )) +- PHP 7.2 (PHP 7.2.29-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Mar 20 2020 13:54:39) ( NTS )) +- PHP 7.3 (PHP 7.3.16-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Mar 20 2020 13:51:46) ( NTS )) +- PHP 7.4 (PHP 7.4.4 (cli) (built: Mar 20 2020 13:47:45) ( NTS )) - Composer (Composer version 1.10.1 2020-03-13 20:34:27) - PHPUnit (PHPUnit 7.5.20 by Sebastian Bergmann and contributors.) - Pollinate @@ -183,27 +186,28 @@ Local version: Unknown) - clippy (0.0.212) - rustdoc (1.42.0) - bindgen (0.53.2) -- cbindgen (0.13.1) -- Julia (julia version 1.3.1) +- cbindgen (0.13.2) +- Julia (julia version 1.4.0) - sbt (1.3.8) - Selenium server standalone (available via SELENIUM_JAR_PATH environment variable) - Sphinx Open Source Search Server - Subversion (svn, version 1.9.7 (r1800392)) -- Terraform (Terraform v0.12.23) +- Terraform (Terraform v0.12.24) - Packer (1.5.4) - Vcpkg 2020.02.04-unknownhash - Zeit Now CLI (17.0.4) - Go 1.11 (go version go1.11.13 linux/amd64) - Go 1.12 (go version go1.12.17 linux/amd64) -- Go 1.13 (go version go1.13.8 linux/amd64) -- Go 1.14 (go version go1.14 linux/amd64) +- Go 1.13 (go version go1.13.9 linux/amd64) +- Go 1.14 (go version go1.14.1 linux/amd64) - Google Repository 58 - Google Play services 49 - Google APIs 24 - Google APIs 23 - Google APIs 22 - Google APIs 21 -- CMake 3.6.4111459 +- CMake 3.10.2.4988404 +3.6.4111459 - Android Support Repository 47.0.0 - Android SDK Platform-Tools 29.0.6 - Android SDK Platform 29 @@ -290,3 +294,4 @@ Local version: Unknown) - Python3 (Python 3.6.9) - pip3 (pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6)) - Boost C++ Libraries 1.69.0 +- Boost C++ Libraries 1.72.0 From e0708b884fadbbf6cffd28549667512680f2b173 Mon Sep 17 00:00:00 2001 From: Image generation service account Date: Tue, 31 Mar 2020 15:45:40 +0000 Subject: [PATCH 108/111] Updating readme file for AzP.20200323.ubuntu16.1 version 20200323 --- images/linux/Ubuntu1604-README.md | 55 +++++++++++++++++-------------- 1 file changed, 30 insertions(+), 25 deletions(-) diff --git a/images/linux/Ubuntu1604-README.md b/images/linux/Ubuntu1604-README.md index 8af4c531d..6195b68e7 100644 --- a/images/linux/Ubuntu1604-README.md +++ b/images/linux/Ubuntu1604-README.md @@ -1,5 +1,5 @@ # Ubuntu 16.04.6 LTS -The following software is installed on machines with the 20200315.1 update. +The following software is installed on machines with the 20200323.1 update. *** - 7-Zip 9.20 - Ansible (ansible 2.9.6) @@ -34,7 +34,7 @@ The following software is installed on machines with the 20200315.1 update. - wget - zip - zstd -- AWS CLI (aws-cli/1.18.21 Python/2.7.12 Linux/4.15.0-1071-azure botocore/1.15.21) +- AWS CLI (aws-cli/1.18.26 Python/2.7.12 Linux/4.15.0-1071-azure botocore/1.15.26) - build-essential - Clang 6.0 (6.0.1) - Clang 8 (8.0.1) @@ -43,6 +43,7 @@ The following software is installed on machines with the 20200315.1 update. - Docker Compose (docker-compose version 1.25.4, build 8d51620a) - Docker-Moby (Docker version 3.0.11+azure, build eb310fca49568dccd87c6136f774ef6fff2a1b51) - .NET Core SDK: + - 3.1.200 - 3.1.101 - 3.1.100 - 3.0.103 @@ -102,7 +103,7 @@ The following software is installed on machines with the 20200315.1 update. - 2.1.302 - 2.1.301 - 2.1.300 -- Erlang (Erlang (SMP,ASYNC_THREADS,HIPE) (BEAM) emulator version 10.6.4) +- Erlang (Erlang (SMP,ASYNC_THREADS,HIPE) (BEAM) emulator version 10.7) - Firefox (Mozilla Firefox 74.0) - Geckodriver (0.26.0); Gecko Driver is available via GECKOWEBDRIVER environment variable - GNU C++ 7.4.0 @@ -110,11 +111,12 @@ The following software is installed on machines with the 20200315.1 update. - GNU C++ 9.2.1 - GNU Fortran 8.3.0 - GNU Fortran 9.2.1 -- Git (2.25.1) +- Git (2.25.2) - Git Large File Storage (LFS) (2.10.0) -- Google Chrome (Google Chrome 80.0.3987.132 ) +- Hub CLI (2.14.2) +- Google Chrome (Google Chrome 80.0.3987.149 ) - ChromeDriver 80.0.3987.106 (f68069574609230cf9b635cd784cfb1bf81bb53a-refs/branch-heads/3987@{#882}); Chrome Driver is available via CHROMEWEBDRIVER environment variable -- Google Cloud SDK (284.0.0) +- Google Cloud SDK (285.0.1) - Haskell Cabal (cabal-install version 2.0.0.1 compiled using version 2.0.1.1 of the Cabal library ) - Haskell Cabal (cabal-install version 2.2.0.0 @@ -134,20 +136,21 @@ compiled using version 3.0.2.0 of the Cabal library ) - GHC (The Glorious Glasgow Haskell Compilation System, version 8.8.2) - GHC (The Glorious Glasgow Haskell Compilation System, version 8.8.3) - Haskell Stack (Version 2.1.3, Git revision 636e3a759d51127df2b62f90772def126cdf6d1f (7735 commits) x86_64 hpack-0.31.2) -- Heroku (heroku/7.39.0 linux-x64 node-v12.13.0) -- HHVM (HipHop VM 4.48.0 (rel)) +- Heroku (heroku/7.39.1 linux-x64 node-v12.13.0) +- HHVM (HipHop VM 4.49.0 (rel)) - ImageMagick -- Azul Zulu OpenJDK (7) (openjdk version "1.7.0_252") -- Azul Zulu OpenJDK (8) (openjdk version "1.8.0_242") -- Azul Zulu OpenJDK (11) (openjdk version "11.0.6" 2020-01-14 LTS) -- Azul Zulu OpenJDK (12) (openjdk version "12.0.2" 2019-07-16) +- Azul Zulu OpenJDK: + - 7 (openjdk version "1.7.0_252") + - 8 (openjdk version "1.8.0_242") (default) + - 11 (openjdk version "11.0.6" 2020-01-14 LTS) + - 12 (openjdk version "12.0.2" 2019-07-16) - Ant (Apache Ant(TM) version 1.9.6 compiled on July 20 2018) - Gradle 6.2.2 - Maven (Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)) - Kind (kind v0.7.0 go1.13.6 linux/amd64) - kubectl (Client Version: v1.17.4) - helm (v3.1.2+gd878d4d) -- Leiningen (Leiningen 2.9.1 on Java 1.8.0_242 OpenJDK 64-Bit Server VM) +- Leiningen (Leiningen 2.9.3 on Java 1.8.0_242 OpenJDK 64-Bit Server VM) - Mercurial (Mercurial Distributed SCM (version 4.4.1)) - Miniconda (conda 4.8.2) - Mono (Mono JIT compiler version 6.8.0.105 (tarball Tue Feb 4 21:20:35 UTC 2020)) @@ -167,12 +170,12 @@ Local version: Unknown) - Bazel (bazel 2.2.0) - Bazelisk (1.3.0) - PhantomJS (2.1.1) -- PHP 5.6 (PHP 5.6.40-24+ubuntu16.04.1+deb.sury.org+1 (cli) ) -- PHP 7.0 (PHP 7.0.33-23+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Feb 23 2020 07:20:42) ( NTS )) -- PHP 7.1 (PHP 7.1.33-12+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Feb 23 2020 07:21:57) ( NTS )) -- PHP 7.2 (PHP 7.2.28-3+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Feb 23 2020 07:23:01) ( NTS )) -- PHP 7.3 (PHP 7.3.15-3+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Feb 23 2020 07:23:10) ( NTS )) -- PHP 7.4 (PHP 7.4.3 (cli) (built: Feb 23 2020 07:24:02) ( NTS )) +- PHP 5.6 (PHP 5.6.40-26+ubuntu16.04.1+deb.sury.org+1 (cli) ) +- PHP 7.0 (PHP 7.0.33-26+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Mar 20 2020 15:00:31) ( NTS )) +- PHP 7.1 (PHP 7.1.33-14+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Mar 20 2020 13:57:17) ( NTS )) +- PHP 7.2 (PHP 7.2.29-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Mar 20 2020 13:54:16) ( NTS )) +- PHP 7.3 (PHP 7.3.16-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Mar 20 2020 13:51:21) ( NTS )) +- PHP 7.4 (PHP 7.4.4 (cli) (built: Mar 20 2020 13:47:17) ( NTS )) - Composer (Composer version 1.10.1 2020-03-13 20:34:27) - PHPUnit (PHPUnit 7.5.20 by Sebastian Bergmann and contributors.) - Pollinate @@ -187,27 +190,28 @@ Local version: Unknown) - clippy (0.0.212) - rustdoc (1.42.0) - bindgen (0.53.2) -- cbindgen (0.13.1) -- Julia (julia version 1.3.1) +- cbindgen (0.13.2) +- Julia (julia version 1.4.0) - sbt (1.3.8) - Selenium server standalone (available via SELENIUM_JAR_PATH environment variable) - Sphinx Open Source Search Server - Subversion (svn, version 1.9.3 (r1718519)) -- Terraform (Terraform v0.12.23) +- Terraform (Terraform v0.12.24) - Packer (1.5.4) - Vcpkg 2020.02.04-unknownhash - Zeit Now CLI (17.0.4) - Go 1.11 (go version go1.11.13 linux/amd64) - Go 1.12 (go version go1.12.17 linux/amd64) -- Go 1.13 (go version go1.13.8 linux/amd64) -- Go 1.14 (go version go1.14 linux/amd64) +- Go 1.13 (go version go1.13.9 linux/amd64) +- Go 1.14 (go version go1.14.1 linux/amd64) - Google Repository 58 - Google Play services 49 - Google APIs 24 - Google APIs 23 - Google APIs 22 - Google APIs 21 -- CMake 3.6.4111459 +- CMake 3.10.2.4988404 +3.6.4111459 - Android Support Repository 47.0.0 - Android Solver for ConstraintLayout 1.0.2 - Android Solver for ConstraintLayout 1.0.1 @@ -300,3 +304,4 @@ Local version: Unknown) - Python3 (Python 3.5.2) - pip3 (pip 8.1.1 from /usr/lib/python3/dist-packages (python 3.5)) - Boost C++ Libraries 1.69.0 +- Boost C++ Libraries 1.72.0 From 4348e23367d47b705d6661f9aae252a4e17374e2 Mon Sep 17 00:00:00 2001 From: Mikhail Timofeev Date: Wed, 1 Apr 2020 16:39:53 +0300 Subject: [PATCH 109/111] software updates week 14 --- images/macos/macos-10.15-Readme.md | 89 ++++++++++++++++-------------- 1 file changed, 47 insertions(+), 42 deletions(-) diff --git a/images/macos/macos-10.15-Readme.md b/images/macos/macos-10.15-Readme.md index ec7f0a4ee..62a849314 100644 --- a/images/macos/macos-10.15-Readme.md +++ b/images/macos/macos-10.15-Readme.md @@ -1,10 +1,10 @@ -# macOS Catalina 10.15.3 (19D76) -The following software is installed on machines with the 20200321.1 update. +# macOS Catalina 10.15.4 (19E266) +The following software is installed on machines with the 20200328.1 update. #### Xcode 11.3.1 set by default ## Operating System -- OS X 10.15.3 (19D76) **Catalina** +- OS X 10.15.4 (19E266) **Catalina** ## Installed Software ### Language and Runtime @@ -22,13 +22,13 @@ The following software is installed on machines with the 20200321.1 update. - GNU Fortran (Homebrew GCC 9.3.0) 9.3.0 - Node.js v12.16.1 - NVM 0.33.11 -- NVM - Cached node versions: v6.17.1 v8.17.0 v10.19.0 v12.16.1 v13.11.0 +- NVM - Cached node versions: v6.17.1 v8.17.0 v10.19.0 v12.16.1 v13.12.0 - PowerShell 7.0.0 - Python 2.7.17 - Python 3.7.7 - Ruby 2.6.5p114 -- .NET SDK 2.0.0 3.0.100 3.0.101 3.0.102 3.0.103 3.1.100 3.1.101 3.1.200 -- Go 1.14 +- .NET SDK 2.0.0 3.0.100 3.0.101 3.0.102 3.0.103 3.1.100 3.1.101 3.1.200 3.1.201 +- Go 1.14.1 - PHP 7.4.4 - julia 1.4.0 @@ -38,10 +38,10 @@ The following software is installed on machines with the 20200321.1 update. - Bundler version 2.1.4 - Carthage 0.34.0 - CocoaPods 1.9.1 -- Homebrew 2.2.10 +- Homebrew 2.2.11 - NPM 6.13.4 - Yarn 1.22.4 -- NuGet 5.4.0.6315 +- NuGet 5.5.0.6382 - Pip 19.3.1 (python 2.7) - Pip 20.0.2 (python 3.7) - Miniconda 4.8.2 @@ -49,20 +49,20 @@ The following software is installed on machines with the 20200321.1 update. ### Project Management - Apache Maven 3.6.3 -- Gradle 6.2.2 +- Gradle 6.3 ### Utilities - Curl 7.69.1 -- Git: 2.25.2 +- Git: 2.26.0 - Git LFS: 2.10.0 - Hub CLI: 2.14.2 - GNU Wget 1.20.3 - Subversion (SVN) 1.13.0 -- Packer 1.5.4 -- GNU parallel 20200222 +- Packer 1.5.5 +- GNU parallel 20200322 - OpenSSL 1.0.2t 10 Sep 2019 - jq 1.6 -- gpg (GnuPG) 2.2.19 +- gpg (GnuPG) 2.2.20 - psql (PostgreSQL) 12.2 - aria2 1.35.0 - azcopy 10.3.4 @@ -75,16 +75,17 @@ The following software is installed on machines with the 20200321.1 update. - docker-compose 1.25.4 ### Tools -- Fastlane 2.143.0 -- Cmake 3.16.5 -- App Center CLI 2.3.4 +- Fastlane 2.144.0 +- Cmake 3.17.0 +- App Center CLI 2.3.5 - Azure CLI 2.2.0 +- AWS CLI 2.0.5 ### Browsers - Google Chrome 80.0.3987.149 - ChromeDriver 80.0.3987.106 - Microsoft Edge 80.0.361.69 -- MSEdgeDriver 80.0.361.66 +- MSEdgeDriver 80.0.361.69 - Mozilla Firefox 74.0 - geckodriver 0.26.0 @@ -108,25 +109,29 @@ The following software is installed on machines with the 20200321.1 update. ### Xamarin #### Visual Studio for Mac -- 8.4.8.2 +- 8.5.0.3183 #### Mono +- 6.8.0.123 - 6.6.0.166 - 6.4.0.208 #### Xamarin.iOS +- 13.14.1.39 - 13.10.0.21 - 13.8.3.0 - 13.6.0.12 - 13.4.0.2 #### Xamarin.Mac +- 6.14.1.39 - 6.10.0.21 - 6.8.3.0 - 6.6.0.12 - 6.4.0.2 #### Xamarin.Android +- 10.2.0 - 10.1.3 - 10.0.6 @@ -134,15 +139,15 @@ The following software is installed on machines with the 20200321.1 update. - NUnit 3.6.1 ### Xcode -| Version | Build | Path | -| ---------------- | ------- | --------------------------------- | -| 11.4 (beta) | 11N132i | /Applications/Xcode_11.4_beta.app | -| 11.3.1 (default) | 11C505 | /Applications/Xcode_11.3.1.app | -| 11.3 | 11C29 | /Applications/Xcode_11.3.app | -| 11.2.1 | 11B500 | /Applications/Xcode_11.2.1.app | -| 11.2 | 11B52 | /Applications/Xcode_11.2.app | -| 11.1 | 11A1027 | /Applications/Xcode_11.1.app | -| 11.0 | 11A420a | /Applications/Xcode_11.app | +| Version | Build | Path | +| ---------------- | ------- | ------------------------------ | +| 11.4 | 11E146 | /Applications/Xcode_11.4.app | +| 11.3.1 (default) | 11C505 | /Applications/Xcode_11.3.1.app | +| 11.3 | 11C29 | /Applications/Xcode_11.3.app | +| 11.2.1 | 11B500 | /Applications/Xcode_11.2.1.app | +| 11.2 | 11B52 | /Applications/Xcode_11.2.app | +| 11.1 | 11A1027 | /Applications/Xcode_11.1.app | +| 11.0 | 11A420a | /Applications/Xcode_11.app | #### Xcode Support Tools - Nomad CLI 3.1.2 @@ -178,20 +183,20 @@ The following software is installed on machines with the 20200321.1 update. | DriverKit 19.0 | driverkit.macosx19.0 | 11.0, 11.1, 11.2, 11.2.1, 11.3, 11.3.1, 11.4 | #### Installed Simulators -| OS | Xcode Version | Simulators | -| ----------- | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| iOS 13.0 | 11.0 | iPhone 8
iPhone 8 Plus
iPhone 11
iPhone 11 Pro
iPhone 11 Pro Max
iPad Pro (9.7-inch)
iPad Pro (11-inch)
iPad Pro (12.9-inch) (3rd generation)
iPad Air (3rd generation) | -| iOS 13.1 | 11.1 | iPhone 8
iPhone 8 Plus
iPhone 11
iPhone 11 Pro
iPhone 11 Pro Max
iPad Pro (9.7-inch)
iPad Pro (11-inch)
iPad Pro (12.9-inch) (3rd generation)
iPad Air (3rd generation) | -| iOS 13.2 | 11.2
11.2.1 | iPhone 8
iPhone 8 Plus
iPhone 11
iPhone 11 Pro
iPhone 11 Pro Max
iPad Pro (9.7-inch)
iPad Pro (11-inch)
iPad Pro (12.9-inch) (3rd generation)
iPad Air (3rd generation) | -| iOS 13.3 | 11.3
11.3.1 | iPhone 8
iPhone 8 Plus
iPhone 11
iPhone 11 Pro
iPhone 11 Pro Max
iPad Pro (9.7-inch)
iPad (7th generation)
iPad Pro (11-inch)
iPad Pro (12.9-inch) (3rd generation)
iPad Air (3rd generation) | -| iOS 13.4 | 11.4 | iPhone 8
iPhone 8 Plus
iPhone 11
iPhone 11 Pro
iPhone 11 Pro Max
iPad Pro (9.7-inch)
iPad (7th generation)
iPad Pro (11-inch)
iPad Pro (12.9-inch) (3rd generation)
iPad Air (3rd generation) | -| tvOS 13.0 | 11.0
11.1 | Apple TV
Apple TV 4K
Apple TV 4K (at 1080p) | -| tvOS 13.2 | 11.2
11.2.1 | Apple TV
Apple TV 4K
Apple TV 4K (at 1080p) | -| tvOS 13.3 | 11.3
11.3.1 | Apple TV
Apple TV 4K
Apple TV 4K (at 1080p) | -| tvOS 13.4 | 11.4 | Apple TV
Apple TV 4K
Apple TV 4K (at 1080p) | -| watchOS 6.0 | 11.0
11.1 | Apple Watch Series 4 - 40mm
Apple Watch Series 4 - 44mm
Apple Watch Series 5 - 40mm
Apple Watch Series 5 - 44mm | -| watchOS 6.1 | 11.2
11.2.1
11.3
11.3.1 | Apple Watch Series 4 - 40mm
Apple Watch Series 4 - 44mm
Apple Watch Series 5 - 40mm
Apple Watch Series 5 - 44mm | -| watchOS 6.2 | 11.4 | Apple Watch Series 4 - 40mm
Apple Watch Series 4 - 44mm
Apple Watch Series 5 - 40mm
Apple Watch Series 5 - 44mm | +| OS | Xcode Version | Simulators | +| ----------- | -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| iOS 13.0 | 11.0 | iPhone 8
iPhone 8 Plus
iPhone 11
iPhone 11 Pro
iPhone 11 Pro Max
iPad Pro (9.7-inch)
iPad Pro (11-inch)
iPad Pro (12.9-inch) (3rd generation)
iPad Air (3rd generation) | +| iOS 13.1 | 11.1 | iPhone 8
iPhone 8 Plus
iPhone 11
iPhone 11 Pro
iPhone 11 Pro Max
iPad Pro (9.7-inch)
iPad Pro (11-inch)
iPad Pro (12.9-inch) (3rd generation)
iPad Air (3rd generation) | +| iOS 13.2 | 11.2
11.2.1 | iPhone 8
iPhone 8 Plus
iPhone 11
iPhone 11 Pro
iPhone 11 Pro Max
iPad Pro (9.7-inch)
iPad Pro (11-inch)
iPad Pro (12.9-inch) (3rd generation)
iPad Air (3rd generation) | +| iOS 13.3 | 11.3
11.3.1 | iPhone 8
iPhone 8 Plus
iPhone 11
iPhone 11 Pro
iPhone 11 Pro Max
iPad Pro (9.7-inch)
iPad (7th generation)
iPad Pro (11-inch)
iPad Pro (12.9-inch) (3rd generation)
iPad Air (3rd generation)
iPad Pro (11-inch) (1st generation) | +| iOS 13.4 | 11.4 | iPhone 8
iPhone 8 Plus
iPhone 11
iPhone 11 Pro
iPhone 11 Pro Max
iPad Pro (9.7-inch)
iPad (7th generation)
iPad Pro (11-inch) (2nd generation)
iPad Pro (12.9-inch) (4th generation)
iPad Air (3rd generation) | +| tvOS 13.0 | 11.0
11.1 | Apple TV
Apple TV 4K
Apple TV 4K (at 1080p) | +| tvOS 13.2 | 11.2
11.2.1 | Apple TV
Apple TV 4K
Apple TV 4K (at 1080p) | +| tvOS 13.3 | 11.3
11.3.1 | Apple TV
Apple TV 4K
Apple TV 4K (at 1080p) | +| tvOS 13.4 | 11.4 | Apple TV
Apple TV 4K
Apple TV 4K (at 1080p) | +| watchOS 6.0 | 11.0
11.1 | Apple Watch Series 4 - 40mm
Apple Watch Series 4 - 44mm
Apple Watch Series 5 - 40mm
Apple Watch Series 5 - 44mm | +| watchOS 6.1 | 11.2
11.2.1
11.3
11.3.1 | Apple Watch Series 4 - 40mm
Apple Watch Series 4 - 44mm
Apple Watch Series 5 - 40mm
Apple Watch Series 5 - 44mm | +| watchOS 6.2 | 11.4 | Apple Watch Series 4 - 40mm
Apple Watch Series 4 - 44mm
Apple Watch Series 5 - 40mm
Apple Watch Series 5 - 44mm | ### Android #### Android SDK Tools @@ -249,7 +254,7 @@ The following software is installed on machines with the 20200321.1 update. | cmake | 3.6.4111459 | | lldb | 3.1.4508709 | | ndk-bundle | 18.1.5063045 | -| Android Emulator | 30.0.0 | +| Android Emulator | 30.0.5 | #### Android Google APIs | Package Name | Description | From dc85a393269ff49d3305ed66d1bd2579dbee68ad Mon Sep 17 00:00:00 2001 From: Andy Mishechkin Date: Wed, 1 Apr 2020 19:41:16 +0400 Subject: [PATCH 110/111] [Cmake] has been changed to [CMake] --- images/win/scripts/Installers/Validate-Cmake.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/images/win/scripts/Installers/Validate-Cmake.ps1 b/images/win/scripts/Installers/Validate-Cmake.ps1 index 1d887d359..bacd0d2f0 100644 --- a/images/win/scripts/Installers/Validate-Cmake.ps1 +++ b/images/win/scripts/Installers/Validate-Cmake.ps1 @@ -5,11 +5,11 @@ if(Get-Command -Name 'cmake') { - Write-Host "Cmake $(cmake -version) on path" + Write-Host "CMake $(cmake -version) on path" } else { - Write-Host 'cmake not on path' + Write-Host 'CMake not on path' exit 1 } @@ -20,7 +20,7 @@ if( $( $(cmake -version) | Out-String) -match 'cmake version (?.*).*' } # Adding description of the software to Markdown -$SoftwareName = "Cmake" +$SoftwareName = "CMake" $Description = @" _Version:_ $cmakeVersion
From 955b38c196d09d73493ab38dc3c275ac185871c6 Mon Sep 17 00:00:00 2001 From: Sergey Dolin Date: Thu, 2 Apr 2020 18:14:11 +0500 Subject: [PATCH 111/111] Add MongoDB 4.2 to linux images (#591) * Add MongoDB 4.2 to linux images * use the same installation script for all versions * Add helpers to get Ubuntu version * Improve helper functions * Rename install.sh to os.sh Co-authored-by: Sergey Dolin --- images/linux/scripts/helpers/os.sh | 20 ++++++++++++++++ images/linux/scripts/installers/mongodb.sh | 27 ++++++++++++++++++++++ images/linux/ubuntu1604.json | 3 ++- images/linux/ubuntu1804.json | 3 ++- 4 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 images/linux/scripts/helpers/os.sh create mode 100644 images/linux/scripts/installers/mongodb.sh diff --git a/images/linux/scripts/helpers/os.sh b/images/linux/scripts/helpers/os.sh new file mode 100644 index 000000000..fa2d4cf44 --- /dev/null +++ b/images/linux/scripts/helpers/os.sh @@ -0,0 +1,20 @@ +#!/bin/bash +################################################################################ +## File: install-helpers.sh +## Desc: Helper functions for installing tools +################################################################################ + +function isUbuntu16 +{ + lsb_release -d|grep 'Ubuntu 16' > /dev/null +} + +function isUbuntu18 +{ + lsb_release -d|grep 'Ubuntu 18' > /dev/null +} + +function getOSVersionLabel +{ + isUbuntu16 && echo xenial || echo bionic +} \ No newline at end of file diff --git a/images/linux/scripts/installers/mongodb.sh b/images/linux/scripts/installers/mongodb.sh new file mode 100644 index 000000000..545253e5a --- /dev/null +++ b/images/linux/scripts/installers/mongodb.sh @@ -0,0 +1,27 @@ +#!/bin/bash +################################################################################ +## File: homebrew.sh +## Desc: Installs Mongo DB +################################################################################ + +# Source the helpers +source $HELPER_SCRIPTS/os.sh +source $HELPER_SCRIPTS/document.sh + +# Install Mongo DB +wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add - +version=$(getOSVersionLabel) +echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu $version/mongodb-org/4.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.2.list +sudo apt-get update +sudo apt-get install -y mongodb-org + +# Validate the installation +echo "Validate the installation" +if ! command -v mongod; then + echo "mongodb was not installed" + exit 1 +fi + +# Document the installed version +echo "Document the installed version" +DocumentInstalledItem "MongoDB on Linux ($(mongod -v|grep -i version 2>&1))" diff --git a/images/linux/ubuntu1604.json b/images/linux/ubuntu1604.json index 78a0d8041..e5a28b64a 100644 --- a/images/linux/ubuntu1604.json +++ b/images/linux/ubuntu1604.json @@ -187,7 +187,8 @@ "{{template_dir}}/scripts/installers/vcpkg.sh", "{{template_dir}}/scripts/installers/zeit-now.sh", "{{template_dir}}/scripts/installers/updatepath.sh", - "{{template_dir}}/scripts/installers/dpkg-config.sh" + "{{template_dir}}/scripts/installers/dpkg-config.sh", + "{{template_dir}}/scripts/installers/mongodb.sh" ], "environment_vars": [ diff --git a/images/linux/ubuntu1804.json b/images/linux/ubuntu1804.json index 70ab724ab..222bc8cdd 100644 --- a/images/linux/ubuntu1804.json +++ b/images/linux/ubuntu1804.json @@ -190,7 +190,8 @@ "{{template_dir}}/scripts/installers/vcpkg.sh", "{{template_dir}}/scripts/installers/zeit-now.sh", "{{template_dir}}/scripts/installers/updatepath.sh", - "{{template_dir}}/scripts/installers/dpkg-config.sh" + "{{template_dir}}/scripts/installers/dpkg-config.sh", + "{{template_dir}}/scripts/installers/mongodb.sh" ], "environment_vars": [ "METADATA_FILE={{user `metadata_file`}}",