From 02060533d38161f2e07dcbc5e56d9101a7bbba82 Mon Sep 17 00:00:00 2001 From: Sergey Dolin Date: Wed, 29 Apr 2020 12:46:23 +0500 Subject: [PATCH 01/16] Don\'t create backup sed file (#792) Co-authored-by: Sergey Dolin --- images/linux/scripts/helpers/etc-environment.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/linux/scripts/helpers/etc-environment.sh b/images/linux/scripts/helpers/etc-environment.sh index 9637f242..24801723 100644 --- a/images/linux/scripts/helpers/etc-environment.sh +++ b/images/linux/scripts/helpers/etc-environment.sh @@ -26,7 +26,7 @@ function replaceEtcEnvironmentVariable { variable_value="$2" # modify /etc/environemnt in place by replacing a string that begins with variable_name - sudo sed -ie "s%^${variable_name}=.*$%${variable_name}=\"${variable_value}\"%" /etc/environment + sudo sed -i -e "s%^${variable_name}=.*$%${variable_name}=\"${variable_value}\"%" /etc/environment } function setEtcEnvironmentVariable { From 7b8624f6911573fea1c86788b14e5ade31ae4760 Mon Sep 17 00:00:00 2001 From: Alena Sviridenko Date: Wed, 29 Apr 2020 10:47:27 +0300 Subject: [PATCH 02/16] Updated README with new rules of tool installation. (#793) * Update README with new rules of tool installation. * fixed typo * fix notes * another minor fix * fixed articles * fixed license line --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 5ccfdf2e..69b0c920 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,11 @@ In general, these are the guidelines we consider when deciding what to pre-insta - Tools and versions will typically be removed 6 months after they are deprecated or have reached end-of-life. - If a tool can be installed during the build, we will evaluate how much time is saved and how much space is used by having the tool pre-installed. +- MIT, Apache, and GNU licenses are ok, anything else we'll have to check with lawyers. +- If a tool takes much space we will evaluate space usage and provide a decision if this tool can be pre-installed. +- If a tool requires the support of more than one version, we will consider the cost of this maintenance, how often new versions bring dangerous updates. + +**Note:** For new tools, please, create an issue and get an approval from us to add this tool to the image before creating the pull request. ## Updates to virtual environments *Cadence* From 5cfbfcb2e6dd94aa5b4eef5572a775b52ec36176 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Wed, 29 Apr 2020 13:00:56 +0300 Subject: [PATCH 03/16] Add Python toolcache installation from Github releases for Ubuntu (#704) Change logic to install Python to Ubuntu images to use GitHub releases from https://github.com/actions/python-versions --- .../scripts/installers/Install-Toolset.ps1 | 55 ++++++++++++++++ .../scripts/installers/Validate-Toolset.ps1 | 62 +++++++++++++++++++ .../scripts/installers/hosted-tool-cache.sh | 6 -- .../scripts/installers/test-toolcache.sh | 1 - images/linux/toolcache-1604.json | 3 - images/linux/toolcache-1804.json | 3 - images/linux/toolset-1604.json | 18 ++++++ images/linux/toolset-1804.json | 18 ++++++ images/linux/ubuntu1604.json | 18 ++++++ images/linux/ubuntu1804.json | 18 ++++++ 10 files changed, 189 insertions(+), 13 deletions(-) create mode 100644 images/linux/scripts/installers/Install-Toolset.ps1 create mode 100644 images/linux/scripts/installers/Validate-Toolset.ps1 create mode 100644 images/linux/toolset-1604.json create mode 100644 images/linux/toolset-1804.json diff --git a/images/linux/scripts/installers/Install-Toolset.ps1 b/images/linux/scripts/installers/Install-Toolset.ps1 new file mode 100644 index 00000000..518a1f9b --- /dev/null +++ b/images/linux/scripts/installers/Install-Toolset.ps1 @@ -0,0 +1,55 @@ +################################################################################ +## File: Install-Toolset.ps1 +## Team: CI-Build +## Desc: Install toolset +################################################################################ + +Function Install-Asset { + param( + [Parameter(Mandatory = $true)] + [object] $ReleaseAsset + ) + + Write-Host "Download $($ReleaseAsset.filename)" + wget $ReleaseAsset.download_url -nv --retry-connrefused --tries=10 + + Write-Host "Extract $($ReleaseAsset.filename) content..." + $assetFolderPath = Join-Path $env:INSTALLER_SCRIPT_FOLDER $($ReleaseAsset.filename) + New-Item -ItemType Directory -Path $assetFolderPath + tar -xzf $ReleaseAsset.filename -C $assetFolderPath + + Write-Host "Invoke installation script..." + Push-Location -Path $assetFolderPath + Invoke-Expression "bash ./setup.sh" + Pop-Location +} + +$ErrorActionPreference = "Stop" + +# Get toolset content +$toolsetJson = Get-Content -Path "$env:INSTALLER_SCRIPT_FOLDER/toolset.json" -Raw +$tools = ConvertFrom-Json -InputObject $toolsetJson | Select-Object -ExpandProperty toolcache + +foreach ($tool in $tools) { + # Get versions manifest for current tool + $assets = Invoke-RestMethod $tool.url + + # Get github release asset for each version + foreach ($toolVersion in $tool.versions) { + $asset = $assets | Where-Object version -like $toolVersion ` + | Select-Object -ExpandProperty files ` + | Where-Object { ($_.platform -eq $tool.platform) -and ($_.platform_version -eq $tool.platform_version)} ` + | Select-Object -First 1 + + Write-Host "Installing $($tool.name) $toolVersion $($tool.arch)..." + if ($asset -ne $null) { + Install-Asset -ReleaseAsset $asset + } + else { + Write-Host "Asset was not found in versions manifest" + exit 1 + } + } +} + +chown -R "$($env:SUDO_USER):$($env:SUDO_USER)" /opt/hostedtoolcache/Python \ No newline at end of file diff --git a/images/linux/scripts/installers/Validate-Toolset.ps1 b/images/linux/scripts/installers/Validate-Toolset.ps1 new file mode 100644 index 00000000..13847465 --- /dev/null +++ b/images/linux/scripts/installers/Validate-Toolset.ps1 @@ -0,0 +1,62 @@ +################################################################################ +## File: Validate-Toolset.ps1 +## Team: CI-Build +## Desc: Validate Toolset +################################################################################ + +function Run-ExecutableTests { + param ( + [Parameter(Mandatory)] [string[]] $Executables, + [Parameter(Mandatory)] [string] $ToolPath + ) + + foreach ($executable in $Executables) { + $executablePath = Join-Path $ToolPath $executable + + Write-Host "Check $executable..." + if (Test-Path $executablePath) { + Write-Host "$executable is successfully installed: $(& $executablePath --version)" + } else { + Write-Host "$executablePath is not installed!" + exit 1 + } + } +} + +$ErrorActionPreference = "Stop" + +# Define executables for cached tools +$toolsExecutables = @{ Python = @("python", "bin/pip") } + +# Get toolset content +$toolsetJson = Get-Content -Path "$env:INSTALLER_SCRIPT_FOLDER/toolset.json" -Raw +$tools = ConvertFrom-Json -InputObject $toolsetJson | Select-Object -ExpandProperty toolcache + +foreach($tool in $tools) { + Invoke-Expression "bash -c `"source $env:HELPER_SCRIPTS/document.sh; DocumentInstalledItem '$($tool.name):'`"" + + $toolPath = Join-Path $env:AGENT_TOOLSDIRECTORY $tool.name + # Get executables for current tool + $toolExecs = $toolsExecutables[$tool.name] + + foreach ($version in $tool.versions) { + # Check if version folder exists + $expectedVersionPath = Join-Path $toolPath $version + if (-not (Test-Path $expectedVersionPath)) { + Write-Host "Expected $($tool.name) $version folder is not found!" + exit 1 + } + + # Take latest installed version in case if toolset version contains wildcards + $foundVersion = Get-Item $expectedVersionPath ` + | Sort-Object -Property {[version]$_.name} -Descending ` + | Select-Object -First 1 + $foundVersionPath = Join-Path $foundVersion $tool.arch + + Write-Host "Run validation test for $($tool.name)($($tool.arch)) $($foundVersion.name) executables..." + Run-ExecutableTests -Executables $toolExecs -ToolPath $foundVersionPath + + # Add tool version to documentation + Invoke-Expression "bash -c `"source $env:HELPER_SCRIPTS/document.sh; DocumentInstalledItemIndent '$($tool.name) $($foundVersion.name)'`"" + } +} \ No newline at end of file diff --git a/images/linux/scripts/installers/hosted-tool-cache.sh b/images/linux/scripts/installers/hosted-tool-cache.sh index f9e5b918..a0ff4466 100644 --- a/images/linux/scripts/installers/hosted-tool-cache.sh +++ b/images/linux/scripts/installers/hosted-tool-cache.sh @@ -49,12 +49,6 @@ done; popd -DocumentInstalledItem "Python:" -pythons=$(ls $AGENT_TOOLSDIRECTORY/Python) -for python in $pythons; do - DocumentInstalledItemIndent "Python $python" -done; - DocumentInstalledItem "Ruby:" rubys=$(ls $AGENT_TOOLSDIRECTORY/Ruby) for ruby in $rubys; do diff --git a/images/linux/scripts/installers/test-toolcache.sh b/images/linux/scripts/installers/test-toolcache.sh index 2601db4b..53ed0715 100644 --- a/images/linux/scripts/installers/test-toolcache.sh +++ b/images/linux/scripts/installers/test-toolcache.sh @@ -69,6 +69,5 @@ done; AGENT_TOOLSDIRECTORY=/opt/hostedtoolcache -Test_Hostedtoolcache_Tool "Python" "x64/python -c 'import sys;print(sys.version)'| head -1 | egrep -o '[0-9]+\.[0-9]+'" Test_Hostedtoolcache_Tool "Ruby" "x64/bin/ruby -e 'puts RUBY_VERSION' | egrep -o '[0-9]+\.[0-9]+'" Test_Hostedtoolcache_Tool "PyPy" "x64/bin/python -c 'import sys;print(sys.version)'| head -1 | egrep -o '[0-9]+\.[0-9]+' | cut -d '.' -f 1" diff --git a/images/linux/toolcache-1604.json b/images/linux/toolcache-1604.json index 40f4cd9d..96638f0f 100644 --- a/images/linux/toolcache-1604.json +++ b/images/linux/toolcache-1604.json @@ -1,7 +1,4 @@ { - "@actions/toolcache-python-ubuntu-1604-x64": [ - "2.7", "3.5", "3.6", "3.7", "3.8" - ], "@actions/toolcache-ruby-ubuntu-1604-x64": [ "2.4", "2.5", "2.6", "2.7" ], diff --git a/images/linux/toolcache-1804.json b/images/linux/toolcache-1804.json index 26ad4d98..13c69785 100644 --- a/images/linux/toolcache-1804.json +++ b/images/linux/toolcache-1804.json @@ -1,7 +1,4 @@ { - "@actions/toolcache-python-ubuntu-1804-x64": [ - "2.7", "3.5", "3.6", "3.7", "3.8" - ], "@actions/toolcache-ruby-ubuntu-1804-x64": [ "2.4", "2.5", "2.6", "2.7" ], diff --git a/images/linux/toolset-1604.json b/images/linux/toolset-1604.json new file mode 100644 index 00000000..e3953f81 --- /dev/null +++ b/images/linux/toolset-1604.json @@ -0,0 +1,18 @@ +{ + "toolcache": [ + { + "name": "Python", + "url" : "https://raw.githubusercontent.com/actions/python-versions/master/versions-manifest.json", + "platform" : "linux", + "platform_version": "16.04", + "arch": "x64", + "versions": [ + "2.7.*", + "3.5.*", + "3.6.*", + "3.7.*", + "3.8.*" + ] + } + ] +} \ No newline at end of file diff --git a/images/linux/toolset-1804.json b/images/linux/toolset-1804.json new file mode 100644 index 00000000..a854ae6b --- /dev/null +++ b/images/linux/toolset-1804.json @@ -0,0 +1,18 @@ +{ + "toolcache": [ + { + "name": "Python", + "url" : "https://raw.githubusercontent.com/actions/python-versions/master/versions-manifest.json", + "platform" : "linux", + "platform_version": "18.04", + "arch": "x64", + "versions": [ + "2.7.*", + "3.5.*", + "3.6.*", + "3.7.*", + "3.8.*" + ] + } + ] +} \ No newline at end of file diff --git a/images/linux/ubuntu1604.json b/images/linux/ubuntu1604.json index 62081af5..cc4eb8f5 100644 --- a/images/linux/ubuntu1604.json +++ b/images/linux/ubuntu1604.json @@ -269,6 +269,11 @@ "source": "{{template_dir}}/toolcache-1604.json", "destination": "{{user `installer_script_folder`}}/toolcache.json" }, + { + "type": "file", + "source": "{{template_dir}}/toolset-1604.json", + "destination": "{{user `installer_script_folder`}}/toolset.json" + }, { "type": "shell", "scripts":[ @@ -287,6 +292,19 @@ ], "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" }, + { + "type": "shell", + "scripts":[ + "{{template_dir}}/scripts/installers/Install-Toolset.ps1", + "{{template_dir}}/scripts/installers/Validate-Toolset.ps1" + ], + "environment_vars": [ + "METADATA_FILE={{user `metadata_file`}}", + "HELPER_SCRIPTS={{user `helper_script_folder`}}", + "INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}" + ], + "execute_command": "sudo sh -c '{{ .Vars }} pwsh -f {{ .Path }}'" + }, { "type": "shell", "scripts":[ diff --git a/images/linux/ubuntu1804.json b/images/linux/ubuntu1804.json index 41b75897..b50efb28 100644 --- a/images/linux/ubuntu1804.json +++ b/images/linux/ubuntu1804.json @@ -273,6 +273,11 @@ "source": "{{template_dir}}/toolcache-1804.json", "destination": "{{user `installer_script_folder`}}/toolcache.json" }, + { + "type": "file", + "source": "{{template_dir}}/toolset-1804.json", + "destination": "{{user `installer_script_folder`}}/toolset.json" + }, { "type": "shell", "scripts":[ @@ -291,6 +296,19 @@ ], "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" }, + { + "type": "shell", + "scripts":[ + "{{template_dir}}/scripts/installers/Install-Toolset.ps1", + "{{template_dir}}/scripts/installers/Validate-Toolset.ps1" + ], + "environment_vars": [ + "METADATA_FILE={{user `metadata_file`}}", + "HELPER_SCRIPTS={{user `helper_script_folder`}}", + "INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}" + ], + "execute_command": "sudo sh -c '{{ .Vars }} pwsh -f {{ .Path }}'" + }, { "type": "shell", "scripts":[ From 612ed30d53df8627dfb365ca501afdbee9867b37 Mon Sep 17 00:00:00 2001 From: Dariy Nurgaleev <50947177+Darleev@users.noreply.github.com> Date: Wed, 29 Apr 2020 22:11:58 +0700 Subject: [PATCH 04/16] Software list: "do not change" label. (#796) * added_advises * change place for hided stirng. * changed to more direct message. --- images/linux/scripts/installers/1604/preparemetadata.sh | 1 + images/linux/scripts/installers/1804/preparemetadata.sh | 3 ++- images/win/scripts/Installers/Windows2016/Initialize-VM.ps1 | 1 + images/win/scripts/Installers/Windows2019/Initialize-VM.ps1 | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/images/linux/scripts/installers/1604/preparemetadata.sh b/images/linux/scripts/installers/1604/preparemetadata.sh index 45cfcabf..a26e1096 100644 --- a/images/linux/scripts/installers/1604/preparemetadata.sh +++ b/images/linux/scripts/installers/1604/preparemetadata.sh @@ -7,6 +7,7 @@ source $HELPER_SCRIPTS/document.sh +WriteItem "" AddTitle "$(lsb_release -ds)" WriteItem "The following software is installed on machines with the $IMAGE_VERSION update." WriteItem "***" diff --git a/images/linux/scripts/installers/1804/preparemetadata.sh b/images/linux/scripts/installers/1804/preparemetadata.sh index 45cfcabf..e3304945 100644 --- a/images/linux/scripts/installers/1804/preparemetadata.sh +++ b/images/linux/scripts/installers/1804/preparemetadata.sh @@ -7,6 +7,7 @@ source $HELPER_SCRIPTS/document.sh +WriteItem "" AddTitle "$(lsb_release -ds)" WriteItem "The following software is installed on machines with the $IMAGE_VERSION update." -WriteItem "***" +WriteItem "***" \ No newline at end of file diff --git a/images/win/scripts/Installers/Windows2016/Initialize-VM.ps1 b/images/win/scripts/Installers/Windows2016/Initialize-VM.ps1 index d8fa7a05..1bc8fbe9 100644 --- a/images/win/scripts/Installers/Windows2016/Initialize-VM.ps1 +++ b/images/win/scripts/Installers/Windows2016/Initialize-VM.ps1 @@ -135,6 +135,7 @@ wmic logicaldisk get size,freespace,caption # Adding description of the software to Markdown $Content = @" + # Windows Server 2016 The following software is installed on machines with the $env:ImageVersion update. diff --git a/images/win/scripts/Installers/Windows2019/Initialize-VM.ps1 b/images/win/scripts/Installers/Windows2019/Initialize-VM.ps1 index 92e153d7..d32c0dc4 100644 --- a/images/win/scripts/Installers/Windows2019/Initialize-VM.ps1 +++ b/images/win/scripts/Installers/Windows2019/Initialize-VM.ps1 @@ -129,6 +129,7 @@ wmic logicaldisk get size,freespace,caption # Adding description of the software to Markdown $Content = @" + # Windows Server 2019 The following software is installed on machines with the $env:ImageVersion update. From b58720bb05a6b38a52f2c12617056a4729eeaa99 Mon Sep 17 00:00:00 2001 From: Nikita Bykov <49442273+nikita-bykov@users.noreply.github.com> Date: Thu, 30 Apr 2020 09:26:06 +0300 Subject: [PATCH 05/16] Fail fast in image generation if not enough disk space for customers (#767) * added checking free disk space Co-authored-by: Nikita Bykov --- .../scripts/installers/validate-disk-space.sh | 14 ++++++++++++++ images/linux/ubuntu1604.json | 6 ++++++ images/linux/ubuntu1804.json | 6 ++++++ images/win/Windows2016-Azure.json | 6 ++++++ images/win/Windows2019-Azure.json | 6 ++++++ .../win/scripts/Installers/Validate-DiskSpace.ps1 | 14 ++++++++++++++ 6 files changed, 52 insertions(+) create mode 100644 images/linux/scripts/installers/validate-disk-space.sh create mode 100644 images/win/scripts/Installers/Validate-DiskSpace.ps1 diff --git a/images/linux/scripts/installers/validate-disk-space.sh b/images/linux/scripts/installers/validate-disk-space.sh new file mode 100644 index 00000000..208a0e0f --- /dev/null +++ b/images/linux/scripts/installers/validate-disk-space.sh @@ -0,0 +1,14 @@ +#!/bin/bash +################################################################################ +## File: validate-disk-space.sh +## Desc: Validate free disk space +################################################################################ + +availableSpaceMB=$(df / -hm | sed 1d | awk '{ print $4}') +minimumFreeSpaceMB=$(( 18*1024 )) + +echo "Available disk space: $availableSpaceMB MB" +if [ $availableSpaceMB -le $minimumFreeSpaceMB ]; then + echo "Not enough disk space on the image (minimum available space: $minimumFreeSpaceMB MB)" + exit 1 +fi \ No newline at end of file diff --git a/images/linux/ubuntu1604.json b/images/linux/ubuntu1604.json index cc4eb8f5..a4f138db 100644 --- a/images/linux/ubuntu1604.json +++ b/images/linux/ubuntu1604.json @@ -324,6 +324,12 @@ ], "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" }, + { + "type": "shell", + "scripts":[ + "{{template_dir}}/scripts/installers/validate-disk-space.sh" + ] + }, { "type": "file", "source": "{{user `metadata_file`}}", diff --git a/images/linux/ubuntu1804.json b/images/linux/ubuntu1804.json index b50efb28..f72233e6 100644 --- a/images/linux/ubuntu1804.json +++ b/images/linux/ubuntu1804.json @@ -328,6 +328,12 @@ ], "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" }, + { + "type": "shell", + "scripts":[ + "{{template_dir}}/scripts/installers/validate-disk-space.sh" + ] + }, { "type": "file", "source": "{{user `metadata_file`}}", diff --git a/images/win/Windows2016-Azure.json b/images/win/Windows2016-Azure.json index 55a1e611..dce3ccd6 100644 --- a/images/win/Windows2016-Azure.json +++ b/images/win/Windows2016-Azure.json @@ -883,6 +883,12 @@ "{{ template_dir }}/scripts/Installers/Validate-Kind.ps1" ] }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-DiskSpace.ps1" + ] + }, { "type": "file", "source": "C:\\InstalledSoftware.md", diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index ab28c810..8dc78665 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -886,6 +886,12 @@ "{{ template_dir }}/scripts/Installers/Validate-AliyunCli.ps1" ] }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-DiskSpace.ps1" + ] + }, { "type": "file", "source": "C:\\InstalledSoftware.md", diff --git a/images/win/scripts/Installers/Validate-DiskSpace.ps1 b/images/win/scripts/Installers/Validate-DiskSpace.ps1 new file mode 100644 index 00000000..d5b4f996 --- /dev/null +++ b/images/win/scripts/Installers/Validate-DiskSpace.ps1 @@ -0,0 +1,14 @@ +################################################################################ +## File: Validate-DiskSpace.ps1 +## Desc: Validate free disk space +################################################################################ + +$availableSpaceMB = [math]::Round((Get-PSDrive -Name C).Free / 1MB) +$minimumFreeSpaceMB = 15 * 1024 + +Write-Host "Available disk space: $availableSpaceMB MB" +if ($availableSpaceMB -le $minimumFreeSpaceMB) +{ + Write-Host "Not enough disk space on the image (minimum available space: $minimumFreeSpaceMB MB)" + exit 1 +} From 6d188447960163702be27246d3f7a2844748ea5f Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov <47745270+al-cheb@users.noreply.github.com> Date: Thu, 30 Apr 2020 10:53:49 +0300 Subject: [PATCH 06/16] Add FS-iSCSITarget-Server (#805) --- .../win/scripts/Installers/Windows2016/Initialize-VM.ps1 | 9 +++++++++ .../win/scripts/Installers/Windows2019/Initialize-VM.ps1 | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/images/win/scripts/Installers/Windows2016/Initialize-VM.ps1 b/images/win/scripts/Installers/Windows2016/Initialize-VM.ps1 index 1bc8fbe9..202c9b48 100644 --- a/images/win/scripts/Installers/Windows2016/Initialize-VM.ps1 +++ b/images/win/scripts/Installers/Windows2016/Initialize-VM.ps1 @@ -61,6 +61,15 @@ Install-WindowsFeature -Name NET-Framework-45-Features -IncludeAllSubFeature Install-WindowsFeature -Name BITS -IncludeAllSubFeature Install-WindowsFeature -Name DSC-Service +# Install FS-iSCSITarget-Server +$fsResult = Install-WindowsFeature -Name FS-iSCSITarget-Server -IncludeAllSubFeature -IncludeManagementTools +if ( $fsResult.Success ) { + Write-Host "FS-iSCSITarget-Server has been successfully installed" +} else { + Write-Host "Failed to install FS-iSCSITarget-Server" + exit 1 +} + Write-Host "Disable UAC" Disable-UserAccessControl diff --git a/images/win/scripts/Installers/Windows2019/Initialize-VM.ps1 b/images/win/scripts/Installers/Windows2019/Initialize-VM.ps1 index d32c0dc4..12feeabe 100644 --- a/images/win/scripts/Installers/Windows2019/Initialize-VM.ps1 +++ b/images/win/scripts/Installers/Windows2019/Initialize-VM.ps1 @@ -57,6 +57,14 @@ Install-WindowsFeature -Name NET-Framework-Features -IncludeAllSubFeature # Explicitly install all 4.7 sub features to include ASP.Net. # As of 1/16/2019, WinServer 19 lists .Net 4.7 as NET-Framework-45-Features Install-WindowsFeature -Name NET-Framework-45-Features -IncludeAllSubFeature +# Install FS-iSCSITarget-Server +$fsResult = Install-WindowsFeature -Name FS-iSCSITarget-Server -IncludeAllSubFeature -IncludeManagementTools +if ( $fsResult.Success ) { + Write-Host "FS-iSCSITarget-Server has been successfully installed" +} else { + Write-Host "Failed to install FS-iSCSITarget-Server" + exit 1 +} Write-Host "Disable UAC" Disable-UserAccessControl From 42fefbe9fe7709df12fca3e4c84407c6684937cd Mon Sep 17 00:00:00 2001 From: Image generation service account Date: Thu, 30 Apr 2020 10:44:57 +0000 Subject: [PATCH 07/16] Updating readme file for win19 version 20200426.1 --- images/win/Windows2019-Readme.md | 43 +++++++++++++++++++------------- 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/images/win/Windows2019-Readme.md b/images/win/Windows2019-Readme.md index c6d678e4..bee43de2 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 20200416.1 update. +The following software is installed on machines with the 20200426.1 update. Components marked with **\*** have been upgraded since the previous version of the image. @@ -25,7 +25,7 @@ _Environment:_ ## Helm -_Version:_ v3.1.2+gd878d4d
+_Version:_ v3.2.0+ge11b7ce
_Environment:_ * PATH: contains location of helm @@ -145,8 +145,8 @@ _Environment:_ ## Microsoft SSDT Visual Studio 2019 Extensions -_Microsoft Analysis Services Projects Version:_ 2.9.7
-_SQL Server Integration Services Projects Version:_ 3.5
+_Microsoft Analysis Services Projects Version:_ 2.9.8
+_SQL Server Integration Services Projects Version:_ 3.6
_Microsoft Reporting Services Projects Version:_ 2.6.5
## .NET 4.8 @@ -161,8 +161,8 @@ _WDK Visual Studio Extension Version:_ 10.0.18346.0
## Azure Service Fabric -_SDK Version:_ 4.0.470.9590
-_Runtime Version:_ 7.0.470.9590 +_SDK Version:_ 4.1.409.9590
+_Runtime Version:_ 7.1.409.9590 ## WinAppDriver @@ -170,7 +170,7 @@ _Version:_ 1.1.1809.18001
## AWS CLI -_Version:_ aws-cli 2.0.7
+_Version:_ aws-cli 2.0.9
## Android SDK Build Tools @@ -421,10 +421,14 @@ _Description:_ .NET has been configured to use TLS 1.2 by default ## Azure CLI -_Version:_ 2.3.1 +_Version:_ 2.4.0 _Environment:_ * PATH: contains location of az.cmd +## AWS SAM CLI + +_Version:_ 0.47.0
+ ## Azure DevOps Cli extension _Version:_ azure-devops 0.18.0 @@ -439,7 +443,7 @@ _Version:_ 2.7.13 (x86)
_Version:_ 3.6.9 (x86)
## Ruby -_Version:_ 2.4.10 (x64)
_Version:_ 2.5.8 (x64)
_Version:_ 2.6.6 (x64)
_Version:_ 2.7.1 (x64)

__System default version:__ Ruby 2.5.8p224
_Environment:_
* Location: C:\hostedtoolcache\windows\Ruby\2.5.8\x64\bin
* PATH: contains the location of Ruby 2.5.8p224
* Gem Version: 2.7.6.2
+_Version:_ 2.4.10 (x64)
_Version:_ 2.5.8 (x64)
_Version:_ 2.6.6 (x64)
_Version:_ 2.7.1 (x64)

__System default version:__ Ruby 2.5.8p224
_Environment:_
* Location: C:\hostedtoolcache\windows\Ruby\2.5.8\x64\bin
* PATH: contains the location of Ruby 2.5.8p224
* Gem Version: 3.1.2
## OpenSSL @@ -451,7 +455,7 @@ _Version:_ v5.30.2
## Git -_Version:_ 2.26.1
+_Version:_ 2.26.2
_Environment:_ * PATH: contains location of git.exe @@ -515,14 +519,14 @@ _Environment:_ ## Rust (64-bit) -#### 1.42.0 +#### 1.43.0 _Location:_ C:\Rust\.cargo\bin _Environment:_ * PATH: contains the location of rustc.exe ## Julia (x64) -_Version:_ 1.4.0
+_Version:_ 1.4.1
## Subversion @@ -537,12 +541,12 @@ _Environment:_ ## Google Chrome _version:_ -81.0.4044.113 +81.0.4044.122 ## Microsoft Edge _version:_ -81.0.416.53 +81.0.416.64 ## Mozilla Firefox @@ -579,7 +583,7 @@ _Environment:_ #### Microsoft Edge Driver _version:_ -81.0.416.53 +81.0.416.64 _Environment:_ * EdgeWebDriver: location of msedgedriver.exe @@ -659,7 +663,9 @@ _Environment:_ _SDK:_ * 3.1.201 C:\Program Files\dotnet\sdk\3.1.201 +* 3.1.200 C:\Program Files\dotnet\sdk\3.1.200 * 3.1.103 C:\Program Files\dotnet\sdk\3.1.103 +* 3.1.102 C:\Program Files\dotnet\sdk\3.1.102 * 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 @@ -721,6 +727,7 @@ _SDK:_ _Runtime:_ * 3.1.3 C:\Program Files\dotnet\shared\Microsoft.NETCore.App\3.1.3 +* 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 @@ -836,7 +843,7 @@ _Version_: 2.8.4+ff0de50053 - shim 0.8.1
## Kubectl -_Version:_ Client Version: v1.18.1
+_Version:_ Client Version: v1.18.2
_Environment:_ * PATH: contains location of kubectl.exe @@ -848,11 +855,11 @@ _Environment:_ ## bazel -_Version:_ bazel 3.0.0
+_Version:_ bazel 3.1.0
## bazelisk -_Version:_ 1.3.0
+_Version:_ 1.4.0
## Alibaba Cloud CLI From 0413a02d9a610b9989d6abe171affc4d27833730 Mon Sep 17 00:00:00 2001 From: Maksim Petrov <47208721+vmapetr@users.noreply.github.com> Date: Thu, 30 Apr 2020 18:11:40 +0300 Subject: [PATCH 08/16] Add Python tools installation from Github releases for Windows (#705) * Add Toolset provision for Windows Co-authored-by: MaksimZhukov --- images/win/Windows2016-Azure.json | 24 ++++ images/win/Windows2019-Azure.json | 24 ++++ .../scripts/ImageHelpers/ImageHelpers.psm1 | 1 + .../scripts/ImageHelpers/InstallHelpers.ps1 | 5 + .../scripts/Installers/Download-ToolCache.ps1 | 16 --- .../scripts/Installers/Install-Toolset.ps1 | 76 ++++++++++++ .../scripts/Installers/Validate-ToolCache.ps1 | 33 ------ .../scripts/Installers/Validate-Toolset.ps1 | 111 ++++++++++++++++++ images/win/toolcache-2016.json | 6 - images/win/toolcache-2019.json | 6 - images/win/toolset-2016.json | 31 +++++ images/win/toolset-2019.json | 31 +++++ 12 files changed, 303 insertions(+), 61 deletions(-) create mode 100644 images/win/scripts/Installers/Install-Toolset.ps1 create mode 100644 images/win/scripts/Installers/Validate-Toolset.ps1 create mode 100644 images/win/toolset-2016.json create mode 100644 images/win/toolset-2019.json diff --git a/images/win/Windows2016-Azure.json b/images/win/Windows2016-Azure.json index dce3ccd6..834de3af 100644 --- a/images/win/Windows2016-Azure.json +++ b/images/win/Windows2016-Azure.json @@ -18,6 +18,7 @@ "run_scan_antivirus": "false", "root_folder": "C:", + "toolset_json_path": "{{env `TEMP`}}\\toolset.json", "image_folder": "C:\\image", "commit_file": "C:\\image\\commit.txt", "imagedata_file": "C:\\imagedata.json", @@ -318,6 +319,11 @@ "source": "{{template_dir}}/toolcache-2016.json", "destination": "{{user `root_folder`}}/toolcache.json" }, + { + "type": "file", + "source": "{{template_dir}}/toolset-2016.json", + "destination": "{{user `toolset_json_path`}}" + }, { "type": "powershell", "environment_vars":[ @@ -328,6 +334,15 @@ "{{ template_dir }}/scripts/Installers/Download-ToolCache.ps1" ] }, + { + "type": "powershell", + "environment_vars":[ + "TOOLSET_JSON_PATH={{user `toolset_json_path`}}" + ], + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-Toolset.ps1" + ] + }, { "type": "powershell", "scripts":[ @@ -642,6 +657,15 @@ "{{ template_dir }}/scripts/Installers/Validate-ToolCache.ps1" ] }, + { + "type": "powershell", + "environment_vars":[ + "TOOLSET_JSON_PATH={{user `toolset_json_path`}}" + ], + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-Toolset.ps1" + ] + }, { "type": "powershell", "scripts":[ diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index 8dc78665..1b3e5f74 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -18,6 +18,7 @@ "run_scan_antivirus": "false", "root_folder": "C:", + "toolset_json_path": "{{env `TEMP`}}\\toolset.json", "image_folder": "C:\\image", "commit_file": "C:\\image\\commit.txt", "imagedata_file": "C:\\imagedata.json", @@ -291,6 +292,11 @@ "source": "{{template_dir}}/toolcache-2019.json", "destination": "{{user `root_folder`}}/toolcache.json" }, + { + "type": "file", + "source": "{{template_dir}}/toolset-2019.json", + "destination": "{{user `toolset_json_path`}}" + }, { "type": "powershell", "environment_vars":[ @@ -301,6 +307,15 @@ "{{ template_dir }}/scripts/Installers/Download-ToolCache.ps1" ] }, + { + "type": "powershell", + "environment_vars":[ + "TOOLSET_JSON_PATH={{user `toolset_json_path`}}" + ], + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-Toolset.ps1" + ] + }, { "type": "powershell", "scripts":[ @@ -639,6 +654,15 @@ "{{ template_dir }}/scripts/Installers/Validate-ToolCache.ps1" ] }, + { + "type": "powershell", + "environment_vars":[ + "TOOLSET_JSON_PATH={{user `toolset_json_path`}}" + ], + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-Toolset.ps1" + ] + }, { "type": "powershell", "scripts":[ diff --git a/images/win/scripts/ImageHelpers/ImageHelpers.psm1 b/images/win/scripts/ImageHelpers/ImageHelpers.psm1 index f979659d..2b716880 100644 --- a/images/win/scripts/ImageHelpers/ImageHelpers.psm1 +++ b/images/win/scripts/ImageHelpers/ImageHelpers.psm1 @@ -15,6 +15,7 @@ Export-ModuleMember -Function @( 'Set-SystemVariable' 'Install-Binary' 'Get-ToolcachePackages' + 'Get-ToolsetContent' 'Get-ToolsByName' 'Add-ContentToMarkdown' 'Add-SoftwareDetailsToMarkdown' diff --git a/images/win/scripts/ImageHelpers/InstallHelpers.ps1 b/images/win/scripts/ImageHelpers/InstallHelpers.ps1 index ee528780..c8d70c8b 100644 --- a/images/win/scripts/ImageHelpers/InstallHelpers.ps1 +++ b/images/win/scripts/ImageHelpers/InstallHelpers.ps1 @@ -283,6 +283,11 @@ function Get-ToolcachePackages { Get-Content -Raw $toolcachePath | ConvertFrom-Json } +function Get-ToolsetContent { + $toolsetJson = Get-Content -Path $env:TOOLSET_JSON_PATH -Raw + ConvertFrom-Json -InputObject $toolsetJson +} + function Get-ToolsByName { param ( [Parameter(Mandatory = $True)] diff --git a/images/win/scripts/Installers/Download-ToolCache.ps1 b/images/win/scripts/Installers/Download-ToolCache.ps1 index 4749a3f3..6c93e380 100644 --- a/images/win/scripts/Installers/Download-ToolCache.ps1 +++ b/images/win/scripts/Installers/Download-ToolCache.ps1 @@ -44,21 +44,6 @@ Function NPMFeed-AuthSetup { $npmrcContent | Out-File -FilePath "$($env:TEMP)/.npmrc" -Encoding utf8 } -Function Set-DefaultPythonVersion { - param( - [Parameter(Mandatory=$true)] - [System.Version] $Version, - [System.String] $Arch = "x64" - ) - - $pythonPath = $Env:AGENT_TOOLSDIRECTORY + "/Python/${Version}*/${Arch}" - $pythonDir = Get-Item -Path $pythonPath - - Write-Host "Use Python ${Version} as a system Python" - Add-MachinePathItem -PathItem $pythonDir.FullName - Add-MachinePathItem -PathItem "$($pythonDir.FullName)\Scripts" -} - Function Set-DefaultRubyVersion { param( [Parameter(Mandatory=$true)] @@ -106,5 +91,4 @@ $ToolVersions.PSObject.Properties | ForEach-Object { } } -Set-DefaultPythonVersion -Version "3.7" Set-DefaultRubyVersion -Version "2.5" \ No newline at end of file diff --git a/images/win/scripts/Installers/Install-Toolset.ps1 b/images/win/scripts/Installers/Install-Toolset.ps1 new file mode 100644 index 00000000..25bfe58e --- /dev/null +++ b/images/win/scripts/Installers/Install-Toolset.ps1 @@ -0,0 +1,76 @@ +################################################################################ +## File: Install-Toolset.ps1 +## Team: CI-Build +## Desc: Install toolset +################################################################################ + +Function Install-Asset { + param( + [Parameter(Mandatory=$true)] + [object] $ReleaseAsset + ) + + $releaseAssetName = [System.IO.Path]::GetFileNameWithoutExtension($ReleaseAsset.filename) + $assetFolderPath = Join-Path $env:TEMP $releaseAssetName + $assetArchivePath = Start-DownloadWithRetry -Url $ReleaseAsset.download_url -Name $ReleaseAsset.filename + + Write-Host "Extract $($ReleaseAsset.filename) content..." + 7z.exe x $assetArchivePath -o"$assetFolderPath" -y | Out-Null + + Write-Host "Invoke installation script..." + Push-Location -Path $assetFolderPath + Invoke-Expression .\setup.ps1 + Pop-Location +} + +Function Set-DefaultPythonVersion { + param( + [Parameter(Mandatory=$true)] + [object[]] $Toolset + ) + + $python = $Toolset | Where-Object { ($_.name -eq "Python") -and ($_.default -ne "") } ` + | Select-Object default, arch -First 1 + + if ($python.default -ne $null) { + $pythonPath = Join-Path $Env:AGENT_TOOLSDIRECTORY "/Python/$($python.default)/$($python.arch)" -Resolve + + Write-Host "Use Python $($python.default) as a system Python" + Add-MachinePathItem -PathItem $pythonPath + Add-MachinePathItem -PathItem "$pythonPath\Scripts" + } else { + Write-Host "Default Python version not found in toolset file!" + } +} + +$ErrorActionPreference = "Stop" + +Import-Module -Name ImageHelpers -Force + +# Get toolcache content from toolset +$tools = Get-ToolsetContent | Select-Object -ExpandProperty toolcache + +foreach ($tool in $tools) { + # Get versions manifest for current tool + $assets = Invoke-RestMethod $tool.url + + # Get github release asset for each version + foreach ($toolVersion in $tool.versions) { + $asset = $assets | Where-Object version -like $toolVersion ` + | Sort-Object -Property {[version]$_.version} -Descending ` + | Select-Object -ExpandProperty files ` + | Where-Object { ($_.platform -eq $tool.platform) -and ($_.arch -eq $tool.arch) } ` + | Select-Object -First 1 + + Write-Host "Installing $($tool.name) $toolVersion $($tool.arch)..." + if ($asset -ne $null) { + Install-Asset -ReleaseAsset $asset + } else { + Write-Host "Asset was not found in versions manifest" + exit 1 + } + } +} + +# Install default python version +Set-DefaultPythonVersion -Toolset $tools \ No newline at end of file diff --git a/images/win/scripts/Installers/Validate-ToolCache.ps1 b/images/win/scripts/Installers/Validate-ToolCache.ps1 index 5ad500bf..526254e2 100644 --- a/images/win/scripts/Installers/Validate-ToolCache.ps1 +++ b/images/win/scripts/Installers/Validate-ToolCache.ps1 @@ -63,32 +63,6 @@ function RunTestsByPath { } } -function Get-SystemDefaultPython { - Write-Host "Validate system Python..." - - if (Get-Command -Name 'python') - { - Write-Host "Python $(& python -V 2>&1) on path" - } - else - { - Write-Host "Python is not on path" - exit 1 - } - - $pythonBinVersion = $(& python -V 2>&1) - if ($pythonBinVersion -notlike "Python 3.*") - { - Write-Error "Python 3 is not in the PATH" - exit 1 - } - - $pythonBinOnPath = Split-Path -Path (Get-Command -Name 'python').Path - $description = GetDefaultToolDescription -SoftwareVersion $pythonBinVersion -SoftwareLocation $pythonBinOnPath - - return $description -} - function Get-SystemDefaultRuby { Write-Host "Validate system Ruby..." @@ -196,9 +170,6 @@ function ToolcacheTest { } } - if ($SoftwareName -contains "Python") { - $markdownDescription += Get-SystemDefaultPython - } if ($SoftwareName -contains "Ruby") { $markdownDescription += Get-SystemDefaultRuby } @@ -206,10 +177,6 @@ function ToolcacheTest { Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $markdownDescription } -# Python test -$PythonTests = @("python.exe", "Scripts\pip.exe") -ToolcacheTest -SoftwareName "Python" -ExecTests $PythonTests - # PyPy test $PyPyTests = @("python.exe", "bin\pip.exe") ToolcacheTest -SoftwareName "PyPy" -ExecTests $PyPyTests diff --git a/images/win/scripts/Installers/Validate-Toolset.ps1 b/images/win/scripts/Installers/Validate-Toolset.ps1 new file mode 100644 index 00000000..28963b12 --- /dev/null +++ b/images/win/scripts/Installers/Validate-Toolset.ps1 @@ -0,0 +1,111 @@ +################################################################################ +## File: Validate-Toolset.ps1 +## Team: CI-Build +## Desc: Validate Toolset +################################################################################ + +function Run-ExecutableTests { + param ( + [Parameter(Mandatory)] [string[]] $Executables, + [Parameter(Mandatory)] [string] $ToolPath + ) + + foreach ($executable in $Executables) { + $executablePath = Join-Path $ToolPath $executable + + Write-Host "Check $executable..." + if (Test-Path $executablePath) { + Write-Host "$executable is successfully installed: $(& $executablePath --version)" + } else { + Write-Host "$executablePath is not installed!" + exit 1 + } + } +} + +function Validate-SystemDefaultTool { + param ( + [Parameter(Mandatory)] [string] $ToolName, + [Parameter(Mandatory)] [string] $ExpectedVersion + ) + + $binName = $ToolName.ToLower() + + # Check if tool on path + if (Get-Command -Name $binName) { + $versionOnPath = $(& $binName --version 2>&1) | Select-String -Pattern ".*(\d+\.\d+\.\d+)" + $versionBinPath = Split-Path -Path (Get-Command -Name $binName).Path + + # Check if version is correct + if ($versionOnPath.matches.Groups[1].Value -notlike $ExpectedVersion) { + Write-Error "$ToolName $ExpectedVersion is not in the PATH" + exit 1 + } + + Write-Host "$ToolName $versionOnPath on path" + } else { + Write-Host "$ToolName is not on path" + exit 1 + } + + # Add default version description to markdown + $description = "
__System default version:__ $versionOnPath
" + $description += "_Environment:_
" + $description += "* Location: $versionBinPath
" + $description += "* PATH: contains the location of $versionOnPath
" + + return $description +} + +$ErrorActionPreference = "Stop" + +Import-Module -Name ImageHelpers -Force + +# Define executables for cached tools +$toolsExecutables = @{ Python = @("python.exe", "Scripts\pip.exe") } + +# Get toolcache content from toolset +$tools = Get-ToolsetContent | Select-Object -ExpandProperty toolcache + +foreach($tool in $tools) { + $markdownDescription = "" + + $toolPath = Join-Path $env:AGENT_TOOLSDIRECTORY $tool.name + # Get executables for current tool + $toolExecs = $toolsExecutables[$tool.name] + + foreach ($version in $tool.versions) { + # Check if version folder exists + $expectedVersionPath = Join-Path $toolPath $version + if (-not (Test-Path $expectedVersionPath)) { + Write-Host "Expected $($tool.name) $version folder is not found!" + exit 1 + } + + # Take latest installed version in case if toolset version contains wildcards + $foundVersion = Get-Item $expectedVersionPath ` + | Sort-Object -Property {[version]$_.name} -Descending ` + | Select-Object -First 1 + + # Check for required architecture folder + $foundVersionArchPath = Join-Path $foundVersion $tool.arch + if (-not (Test-Path $foundVersionArchPath)) { + Write-Host "Expected $($tool.name)($($tool.arch)) $($foundVersion.name) architecture folder is not found!" + exit 1 + } + + Write-Host "Run validation test for $($tool.name)($($tool.arch)) $($foundVersion.name) executables..." + Run-ExecutableTests -Executables $toolExecs -ToolPath $foundVersionArchPath + + # Add to tool version to markdown + $markdownDescription += "_Version:_ $($foundVersion.name)
" + } + + # Create markdown description for system default tool + if (-not ([string]::IsNullOrEmpty($tool.default))) { + Write-Host "Validate system default $($tool.name)($($tool.arch)) $($tool.default)..." + $markdownDescription += Validate-SystemDefaultTool -ToolName $tool.name -ExpectedVersion $tool.default + } + + Add-SoftwareDetailsToMarkdown -SoftwareName "$($tool.name) ($($tool.arch))" -DescriptionMarkdown $markdownDescription +} \ No newline at end of file diff --git a/images/win/toolcache-2016.json b/images/win/toolcache-2016.json index 8db575c2..1b4f1a6c 100644 --- a/images/win/toolcache-2016.json +++ b/images/win/toolcache-2016.json @@ -1,10 +1,4 @@ { - "@actions/toolcache-python-windows-x64": [ - "2.7", "3.5", "3.6", "3.7", "3.8" - ], - "@actions/toolcache-python-windows-x86": [ - "2.7", "3.5", "3.6", "3.7", "3.8" - ], "@actions/toolcache-ruby-windows-x64": [ "2.4", "2.5", "2.6", "2.7" ], diff --git a/images/win/toolcache-2019.json b/images/win/toolcache-2019.json index 4f946cfa..6873c14e 100644 --- a/images/win/toolcache-2019.json +++ b/images/win/toolcache-2019.json @@ -1,10 +1,4 @@ { - "@actions/toolcache-python-windows-x64": [ - "2.7", "3.5", "3.6", "3.7", "3.8" - ], - "@actions/toolcache-python-windows-x86": [ - "2.7", "3.5", "3.6", "3.7", "3.8" - ], "@actions/toolcache-ruby-windows-x64": [ "2.4", "2.5", "2.6", "2.7" ], diff --git a/images/win/toolset-2016.json b/images/win/toolset-2016.json new file mode 100644 index 00000000..da372c49 --- /dev/null +++ b/images/win/toolset-2016.json @@ -0,0 +1,31 @@ +{ + "toolcache": [ + { + "name": "Python", + "url" : "https://raw.githubusercontent.com/actions/python-versions/master/versions-manifest.json", + "arch": "x64", + "platform" : "win32", + "versions": [ + "2.7.*", + "3.5.*", + "3.6.*", + "3.7.*", + "3.8.*" + ], + "default": "3.7.*" + }, + { + "name": "Python", + "url" : "https://raw.githubusercontent.com/actions/python-versions/master/versions-manifest.json", + "arch": "x86", + "platform" : "win32", + "versions": [ + "2.7.*", + "3.5.*", + "3.6.*", + "3.7.*", + "3.8.*" + ] + } + ] +} \ No newline at end of file diff --git a/images/win/toolset-2019.json b/images/win/toolset-2019.json new file mode 100644 index 00000000..da372c49 --- /dev/null +++ b/images/win/toolset-2019.json @@ -0,0 +1,31 @@ +{ + "toolcache": [ + { + "name": "Python", + "url" : "https://raw.githubusercontent.com/actions/python-versions/master/versions-manifest.json", + "arch": "x64", + "platform" : "win32", + "versions": [ + "2.7.*", + "3.5.*", + "3.6.*", + "3.7.*", + "3.8.*" + ], + "default": "3.7.*" + }, + { + "name": "Python", + "url" : "https://raw.githubusercontent.com/actions/python-versions/master/versions-manifest.json", + "arch": "x86", + "platform" : "win32", + "versions": [ + "2.7.*", + "3.5.*", + "3.6.*", + "3.7.*", + "3.8.*" + ] + } + ] +} \ No newline at end of file From d3b4d6b4d1fb00e6c50ed79bacc4aca7767714a3 Mon Sep 17 00:00:00 2001 From: Mikhail Timofeev <48208649+miketimofeev@users.noreply.github.com> Date: Thu, 30 Apr 2020 15:26:55 +0000 Subject: [PATCH 09/16] Updating readme file for macOS version 20200425.1 (#801) --- images/macos/macos-10.15-Readme.md | 93 +++++++++++++++++------------- 1 file changed, 52 insertions(+), 41 deletions(-) diff --git a/images/macos/macos-10.15-Readme.md b/images/macos/macos-10.15-Readme.md index 118cc7b6..e708126b 100644 --- a/images/macos/macos-10.15-Readme.md +++ b/images/macos/macos-10.15-Readme.md @@ -1,10 +1,8 @@ -# 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.4 (19E287) **Catalina** +# OS X info +- System Version: macOS 10.15.4 (19E287) +- Kernel Version: Darwin 19.4.0 +- System Integrity Protection: Enabled +- Image Version: 20200425.1 # Installed Software ## Language and Runtime @@ -14,7 +12,7 @@ The following software is installed on machines with the 20200328.1 update. - Java 12: Zulu12.3+11-CA (build 12.0.2+3) - Java 13: Zulu13.31+11-CA (build 13.0.3+3-MTS) - Java 14: Zulu14.28+21-CA (build 14.0.1+8) -- Rust 1.42.0 +- Rust 1.43.0 - Clang/LLVM 10.0.0 - gcc-8 (Homebrew GCC 8.4.0_1) 8.4.0 - gcc-9 (Homebrew GCC 9.3.0_1) 9.3.0 @@ -22,7 +20,7 @@ The following software is installed on machines with the 20200328.1 update. - GNU Fortran (Homebrew GCC 9.3.0_1) 9.3.0 - Node.js v12.16.2 - NVM 0.33.11 -- NVM - Cached node versions: v6.17.1 v8.17.0 v10.20.0 v12.16.2 v13.13.0 +- NVM - Cached node versions: v6.17.1 v8.17.0 v10.20.1 v12.16.2 v13.13.0 - PowerShell 7.0.0 - Python 2.7.17 - Python 3.7.7 @@ -53,43 +51,43 @@ The following software is installed on machines with the 20200328.1 update. ## Utilities - Curl 7.69.1 -- Git: 2.26.1 +- Git: 2.26.2 - Git LFS: 2.10.0 - Hub CLI: 2.14.2 - GNU Wget 1.20.3 - Subversion (SVN) 1.13.0 - Packer 1.5.5 -- GNU parallel 20200322 +- GNU parallel 20200422 - OpenSSL 1.0.2t 10 Sep 2019 - jq 1.6 - gpg (GnuPG) 2.2.20 - psql (PostgreSQL) 12.2 - PostgreSQL 12.2 - aria2 1.35.0 -- azcopy 10.4.0 +- azcopy 10.4.1 - zstd 1.4.4 -- bazel 3.0.0 +- bazel 3.1.0 - bazelisk v1.4.0 -- helm v3.1.2+gd878d4d +- helm v3.2.0+ge11b7ce - virtualbox 6.1.6r137129 - Vagrant 2.2.7 ## Tools -- Fastlane 2.145.0 +- Fastlane 2.146.1 - Cmake 3.17.1 -- App Center CLI 2.4.1 -- Azure CLI 2.3.1 -- AWS CLI 2.0.8 +- App Center CLI 2.5.0 +- Azure CLI 2.4.0 +- AWS CLI 2.0.9 - AWS SAM CLI 0.47.0 -- Aliyun CLI 3.0.37 +- Aliyun CLI 3.0.39 ## Browsers - Safari 13.1 (15609.1.20.111.8) - SafariDriver 13.1 (15609.1.20.111.8) -- Google Chrome 81.0.4044.113 +- Google Chrome 81.0.4044.122 - ChromeDriver 81.0.4044.69 -- Microsoft Edge 81.0.416.53 -- MSEdgeDriver 81.0.416.58 +- Microsoft Edge 81.0.416.64 +- MSEdgeDriver 81.0.416.64 - Mozilla Firefox 75.0 - geckodriver 0.26.0 @@ -113,7 +111,7 @@ The following software is installed on machines with the 20200328.1 update. ## Xamarin ### Visual Studio for Mac -- 8.5.3.16 +- 8.5.4.12 ### Mono - 6.8.0.123 @@ -149,14 +147,15 @@ The following software is installed on machines with the 20200328.1 update. ## Xcode | Version | Build | Path | | ---------------- | ------- | ------------------------------ | -| 11.4.1 | 11E503a | /Applications/Xcode_11.4.1.app | +| 11.4.1 (default) | 11E503a | /Applications/Xcode_11.4.1.app | | 11.4 | 11E146 | /Applications/Xcode_11.4.app | -| 11.3.1 (default) | 11C505 | /Applications/Xcode_11.3.1.app | +| 11.3.1 | 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 | +| 10.3 | 10G8 | /Applications/Xcode_10.3.app | ### Xcode Support Tools - Nomad CLI 3.1.2 @@ -168,44 +167,54 @@ The following software is installed on machines with the 20200328.1 update. ### Installed SDKs | SDK | SDK Name | Xcode Version | | ----------------------- | -------------------- | ---------------------------------------------------- | +| macOS 10.14 | macosx10.14 | 10.3 | | macOS 10.15 | macosx10.15 | 11.0, 11.1, 11.2, 11.2.1, 11.3, 11.3.1, 11.4, 11.4.1 | +| iOS 12.4 | iphoneos12.4 | 10.3 | | iOS 13.0 | iphoneos13.0 | 11.0 | | iOS 13.1 | iphoneos13.1 | 11.1 | | iOS 13.2 | iphoneos13.2 | 11.2, 11.2.1, 11.3, 11.3.1 | | iOS 13.4 | iphoneos13.4 | 11.4, 11.4.1 | +| Simulator - iOS 12.4 | iphonesimulator12.4 | 10.3 | | Simulator - iOS 13.0 | iphonesimulator13.0 | 11.0 | | Simulator - iOS 13.1 | iphonesimulator13.1 | 11.1 | | Simulator - iOS 13.2 | iphonesimulator13.2 | 11.2, 11.2.1, 11.3, 11.3.1 | | Simulator - iOS 13.4 | iphonesimulator13.4 | 11.4, 11.4.1 | +| tvOS 12.4 | appletvos12.4 | 10.3 | | tvOS 13.0 | appletvos13.0 | 11.0, 11.1 | | tvOS 13.2 | appletvos13.2 | 11.2, 11.2.1, 11.3, 11.3.1 | | tvOS 13.4 | appletvos13.4 | 11.4, 11.4.1 | +| Simulator - tvOS 12.4 | appletvsimulator12.4 | 10.3 | | Simulator - tvOS 13.0 | appletvsimulator13.0 | 11.0, 11.1 | | Simulator - tvOS 13.2 | appletvsimulator13.2 | 11.2, 11.2.1, 11.3, 11.3.1 | | Simulator - tvOS 13.4 | appletvsimulator13.4 | 11.4, 11.4.1 | +| watchOS 5.3 | watchos5.3 | 10.3 | | watchOS 6.0 | watchos6.0 | 11.0, 11.1 | | watchOS 6.1 | watchos6.1 | 11.2, 11.2.1, 11.3, 11.3.1 | | watchOS 6.2 | watchos6.2 | 11.4, 11.4.1 | +| Simulator - watchOS 5.3 | watchsimulator5.3 | 10.3 | | Simulator - watchOS 6.0 | watchsimulator6.0 | 11.0, 11.1 | | Simulator - watchOS 6.1 | watchsimulator6.1 | 11.2, 11.2.1, 11.3, 11.3.1 | | Simulator - watchOS 6.2 | watchsimulator6.2 | 11.4, 11.4.1 | | DriverKit 19.0 | driverkit.macosx19.0 | 11.0, 11.1, 11.2, 11.2.1, 11.3, 11.3.1, 11.4, 11.4.1 | ### 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
11.4.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) (2nd generation)
iPad Pro (12.9-inch) (4th generation)
iPad Air (3rd generation)
iPhone SE (2nd 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
11.4.1 | 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
11.4.1 | 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 12.4 | 10.3 | iPhone 5s
iPhone 6 Plus
iPhone 6
iPhone 6s
iPhone 6s Plus
iPhone SE
iPhone 7
iPhone 7 Plus
iPhone 8
iPhone 8 Plus
iPhone X
iPhone Xs
iPhone Xs Max
iPhone Xʀ
iPad Air
iPad Air 2
iPad Pro (9.7-inch)
iPad Pro (12.9-inch)
iPad (5th generation)
iPad Pro (12.9-inch) (2nd generation)
iPad Pro (10.5-inch)
iPad (6th generation)
iPad Pro (11-inch)
iPad Pro (12.9-inch) (3rd generation)
iPad Air (3rd generation) | +| 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 Pro (11-inch)
iPad Pro (12.9-inch) (3rd generation)
iPad Air (3rd generation) | +| iOS 13.4 | 11.4
11.4.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) (2nd generation)
iPad Pro (12.9-inch) (4th generation)
iPad Air (3rd generation)
iPhone SE (2nd generation) | +| tvOS 12.4 | 10.3 | Apple TV
Apple TV 4K
Apple TV 4K (at 1080p) | +| 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
11.4.1 | Apple TV
Apple TV 4K
Apple TV 4K (at 1080p) | +| watchOS 5.3 | 10.3 | Apple Watch Series 2 - 38mm
Apple Watch Series 2 - 42mm
Apple Watch Series 3 - 38mm
Apple Watch Series 3 - 42mm
Apple Watch Series 4 - 40mm
Apple Watch Series 4 - 44mm | +| 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
11.4.1 | Apple Watch Series 4 - 40mm
Apple Watch Series 4 - 44mm
Apple Watch Series 5 - 40mm
Apple Watch Series 5 - 44mm | ## Android ### Android SDK Tools @@ -216,7 +225,7 @@ The following software is installed on machines with the 20200328.1 update. ### Android SDK Platform-Tools | Package Name | Description | | -------------- | ------------------------------------------- | -| platform-tools | Android SDK Platform-Tools, Revision 29.0.6 | +| platform-tools | Android SDK Platform-Tools, Revision 30.0.0 | ### Android SDK Platforms | Package Name | Description | @@ -262,7 +271,7 @@ The following software is installed on machines with the 20200328.1 update. | ---------------- | ------------ | | cmake | 3.6.4111459 | | lldb | 3.1.4508709 | -| ndk-bundle | 21.0.6113669 | +| ndk-bundle | 21.1.6352462 | | Android Emulator | 30.0.5 | ### Android Google APIs @@ -280,3 +289,5 @@ The following software is installed on machines with the 20200328.1 update. | Google Play services | 49 | | Google Repository | 58 | | Intel x86 Emulator Accelerator (HAXM installer) | 7.5.1 | + + From 9256cc49b41be699dbfedcc2672b0615b1a44952 Mon Sep 17 00:00:00 2001 From: Image generation service account Date: Thu, 30 Apr 2020 15:35:21 +0000 Subject: [PATCH 10/16] Updating readme file for win16 version 20200426.1 --- images/win/Windows2016-Readme.md | 39 +++++++++++++++++++------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/images/win/Windows2016-Readme.md b/images/win/Windows2016-Readme.md index 7c522462..36540bef 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 20200416.1 update. +The following software is installed on machines with the 20200426.1 update. Components marked with **\*** have been upgraded since the previous version of the image. @@ -25,7 +25,7 @@ _Environment:_ ## Helm -_Version:_ v3.1.2+gd878d4d
+_Version:_ v3.2.0+ge11b7ce
_Environment:_ * PATH: contains location of helm @@ -168,8 +168,8 @@ _WDK Visual Studio Extension Version:_ 10.0.17740.0
## Azure Service Fabric -_SDK Version:_ 4.0.470.9590
-_Runtime Version:_ 7.0.470.9590 +_SDK Version:_ 4.1.409.9590
+_Runtime Version:_ 7.1.409.9590 ## WinAppDriver @@ -177,7 +177,7 @@ _Version:_ 1.1.1809.18001
## AWS CLI -_Version:_ aws-cli 2.0.7
+_Version:_ aws-cli 2.0.9
## Android SDK Build Tools @@ -428,10 +428,14 @@ _Description:_ .NET has been configured to use TLS 1.2 by default ## Azure CLI -_Version:_ 2.3.1 +_Version:_ 2.4.0 _Environment:_ * PATH: contains location of az.cmd +## AWS SAM CLI + +_Version:_ 0.47.0
+ ## Azure DevOps Cli extension _Version:_ azure-devops 0.18.0 @@ -446,7 +450,7 @@ _Version:_ 2.7.13 (x86)
_Version:_ 3.6.9 (x86)
## Ruby -_Version:_ 2.4.10 (x64)
_Version:_ 2.5.8 (x64)
_Version:_ 2.6.6 (x64)
_Version:_ 2.7.1 (x64)

__System default version:__ Ruby 2.5.8p224
_Environment:_
* Location: C:\hostedtoolcache\windows\Ruby\2.5.8\x64\bin
* PATH: contains the location of Ruby 2.5.8p224
* Gem Version: 2.7.6.2
+_Version:_ 2.4.10 (x64)
_Version:_ 2.5.8 (x64)
_Version:_ 2.6.6 (x64)
_Version:_ 2.7.1 (x64)

__System default version:__ Ruby 2.5.8p224
_Environment:_
* Location: C:\hostedtoolcache\windows\Ruby\2.5.8\x64\bin
* PATH: contains the location of Ruby 2.5.8p224
* Gem Version: 3.1.2
## OpenSSL @@ -458,7 +462,7 @@ _Version:_ v5.30.2
## Git -_Version:_ 2.26.1
+_Version:_ 2.26.2
_Environment:_ * PATH: contains location of git.exe @@ -522,14 +526,14 @@ _Environment:_ ## Rust (64-bit) -#### 1.42.0 +#### 1.43.0 _Location:_ C:\Rust\.cargo\bin _Environment:_ * PATH: contains the location of rustc.exe ## Julia (x64) -_Version:_ 1.4.0
+_Version:_ 1.4.1
## sbt @@ -544,12 +548,12 @@ _Environment:_ ## Google Chrome _version:_ -81.0.4044.113 +81.0.4044.122 ## Microsoft Edge _version:_ -81.0.416.53 +81.0.416.64 ## Mozilla Firefox @@ -586,7 +590,7 @@ _Environment:_ #### Microsoft Edge Driver _version:_ -81.0.416.53 +81.0.416.64 _Environment:_ * EdgeWebDriver: location of msedgedriver.exe @@ -611,11 +615,11 @@ _Environment:_ ## bazel -_Version:_ bazel 3.0.0
+_Version:_ bazel 3.1.0
## bazelisk -_Version:_ 1.3.0
+_Version:_ 1.4.0
## Alibaba Cloud CLI @@ -678,7 +682,9 @@ _Environment:_ _SDK:_ * 3.1.201 C:\Program Files\dotnet\sdk\3.1.201 +* 3.1.200 C:\Program Files\dotnet\sdk\3.1.200 * 3.1.103 C:\Program Files\dotnet\sdk\3.1.103 +* 3.1.102 C:\Program Files\dotnet\sdk\3.1.102 * 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 @@ -742,6 +748,7 @@ _SDK:_ _Runtime:_ * 3.1.3 C:\Program Files\dotnet\shared\Microsoft.NETCore.App\3.1.3 +* 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 @@ -855,7 +862,7 @@ _Environment:_ ## Kubectl -_Version:_ Client Version: v1.18.1
+_Version:_ Client Version: v1.18.2
_Environment:_ * PATH: contains location of kubectl.exe From 4ff58941560c0f4b2b9ff844549a57f49f660753 Mon Sep 17 00:00:00 2001 From: Mikhail Timofeev <48208649+miketimofeev@users.noreply.github.com> Date: Thu, 30 Apr 2020 16:54:22 +0000 Subject: [PATCH 11/16] change min free space to 18000Mb (#814) --- images/linux/scripts/installers/validate-disk-space.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/linux/scripts/installers/validate-disk-space.sh b/images/linux/scripts/installers/validate-disk-space.sh index 208a0e0f..5201848d 100644 --- a/images/linux/scripts/installers/validate-disk-space.sh +++ b/images/linux/scripts/installers/validate-disk-space.sh @@ -5,7 +5,7 @@ ################################################################################ availableSpaceMB=$(df / -hm | sed 1d | awk '{ print $4}') -minimumFreeSpaceMB=$(( 18*1024 )) +minimumFreeSpaceMB=18000 echo "Available disk space: $availableSpaceMB MB" if [ $availableSpaceMB -le $minimumFreeSpaceMB ]; then From fd9138e6b141d3144265af4219c672512525270c Mon Sep 17 00:00:00 2001 From: Jorgen Thelin Date: Thu, 30 Apr 2020 17:04:38 -0700 Subject: [PATCH 12/16] Fix minor glitch in installer message echo "cmake is already installed" --- images/linux/scripts/installers/cmake.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/linux/scripts/installers/cmake.sh b/images/linux/scripts/installers/cmake.sh index 340df3ee..0fd839a5 100644 --- a/images/linux/scripts/installers/cmake.sh +++ b/images/linux/scripts/installers/cmake.sh @@ -10,7 +10,7 @@ source $HELPER_SCRIPTS/document.sh # Test to see if the software in question is already installed, if not install it echo "Checking to see if the installer script has already been run" if command -v cmake; then - echo "Example variable already set to $EXAMPLE_VAR" + echo "cmake is already installed" else curl -sL https://cmake.org/files/v3.17/cmake-3.17.0-Linux-x86_64.sh -o cmakeinstall.sh \ && chmod +x cmakeinstall.sh \ From 38ec51131da95040b6b01c55026cdf605a014f2a Mon Sep 17 00:00:00 2001 From: Sima Zhu <48036328+sima-zhu@users.noreply.github.com> Date: Fri, 1 May 2020 08:58:16 -0700 Subject: [PATCH 13/16] Added java 13 package in VM (#795) * Added java 13 package in VM * Fixed var name * Make changes from 11 to 13 * added java 13 for validate-javatool --- images/win/scripts/Installers/Install-JavaTools.ps1 | 8 ++++++++ images/win/scripts/Installers/Validate-JavaTools.ps1 | 10 ++++++++++ 2 files changed, 18 insertions(+) diff --git a/images/win/scripts/Installers/Install-JavaTools.ps1 b/images/win/scripts/Installers/Install-JavaTools.ps1 index e88fc745..96282371 100644 --- a/images/win/scripts/Installers/Install-JavaTools.ps1 +++ b/images/win/scripts/Installers/Install-JavaTools.ps1 @@ -8,22 +8,26 @@ $azulJDK7Uri = 'https://repos.azul.com/azure-only/zulu/packages/zulu-7/7u232/zulu-7-azure-jdk_7.31.0.5-7.0.232-win_x64.zip' $azulJDK8Uri = 'https://repos.azul.com/azure-only/zulu/packages/zulu-8/8u222/zulu-8-azure-jdk_8.40.0.25-8.0.222-win_x64.zip' $azulJDK11Uri = 'https://repos.azul.com/azure-only/zulu/packages/zulu-11/11.0.4/zulu-11-azure-jdk_11.33.15-11.0.4-win_x64.zip' +$azulJDK13Uri = 'https://repos.azul.com/azure-only/zulu/packages/zulu-13/13.0.3/zulu-13-azure-jdk_13.31.11-13.0.3-win_x64.zip' cd $env:TEMP Invoke-WebRequest -UseBasicParsing -Uri $azulJDK7Uri -OutFile azulJDK7.zip Invoke-WebRequest -UseBasicParsing -Uri $azulJDK8Uri -OutFile azulJDK8.zip Invoke-WebRequest -UseBasicParsing -Uri $azulJDK11Uri -OutFile azulJDK11.zip +Invoke-WebRequest -UseBasicParsing -Uri $azulJDK13Uri -OutFile azulJDK13.zip # Expand the zips Expand-Archive -Path azulJDK7.zip -DestinationPath "C:\Program Files\Java\" -Force Expand-Archive -Path azulJDK8.zip -DestinationPath "C:\Program Files\Java\" -Force Expand-Archive -Path azulJDK11.zip -DestinationPath "C:\Program Files\Java\" -Force +Expand-Archive -Path azulJDK13.zip -DestinationPath "C:\Program Files\Java\" -Force # Deleting zip folders Remove-Item -Recurse -Force azulJDK7.zip Remove-Item -Recurse -Force azulJDK8.zip Remove-Item -Recurse -Force azulJDK11.zip +Remove-Item -Recurse -Force azulJDK13.zip Import-Module -Name ImageHelpers -Force @@ -49,6 +53,9 @@ $latestJava8Install = $java8Installs.FullName; $java11Installs = Get-ChildItem -Path 'C:\Program Files\Java' -Filter '*azure-jdk*11*' | Sort-Object -Property Name -Descending | Select-Object -First 1 $latestJava11Install = $java11Installs.FullName; +$java13Installs = Get-ChildItem -Path 'C:\Program Files\Java' -Filter '*azure-jdk*13*' | Sort-Object -Property Name -Descending | Select-Object -First 1 +$latestJava13Install = $java13Installs.FullName; + $newPath = [string]::Join(';', $newPathSegments) $newPath = $latestJava8Install + '\bin;' + $newPath @@ -58,6 +65,7 @@ setx JAVA_HOME $latestJava8Install /M setx JAVA_HOME_7_X64 $latestJava7Install /M setx JAVA_HOME_8_X64 $latestJava8Install /M setx JAVA_HOME_11_X64 $latestJava11Install /M +setx JAVA_HOME_13_X64 $latestJava13Install /M # Install Java tools # Force chocolatey to ignore dependencies on Ant and Maven or else they will download the Oracle JDK diff --git a/images/win/scripts/Installers/Validate-JavaTools.ps1 b/images/win/scripts/Installers/Validate-JavaTools.ps1 index 71477689..33f90694 100644 --- a/images/win/scripts/Installers/Validate-JavaTools.ps1 +++ b/images/win/scripts/Installers/Validate-JavaTools.ps1 @@ -36,6 +36,12 @@ if( $( $(& $env:comspec "/s /c java -version 2>&1") | Out-String) -match '^(?&1") | Out-String) -match '^(?.+) version "(?.+)".*' ) +{ + $java13Version = $Matches.version +} if( $(ant -version) -match 'Apache Ant\(TM\) version (?.*) compiled.*' ) { @@ -69,6 +75,10 @@ _Location:_ $env:JAVA_HOME_7_X64 #### $java11Version _Location:_ $env:JAVA_HOME_11_X64 + +#### $java13Version + +_Location:_ $env:JAVA_HOME_13_X64 "@ Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description From ec71ad77e3af7e30e812a92ce46bca21f298dabc Mon Sep 17 00:00:00 2001 From: phozzy Date: Mon, 4 May 2020 09:50:20 +0000 Subject: [PATCH 14/16] Fix documentation for containertools --- images/linux/scripts/installers/1804/containers.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/images/linux/scripts/installers/1804/containers.sh b/images/linux/scripts/installers/1804/containers.sh index 0ccf746a..547707e2 100644 --- a/images/linux/scripts/installers/1804/containers.sh +++ b/images/linux/scripts/installers/1804/containers.sh @@ -18,7 +18,9 @@ echo -e "[registries.search]\nregistries = ['docker.io', 'quay.io']" | tee /etc/ ## Add version information to the metadata file echo "Documenting container tools version" -PODMAN_VERSION='podman --version' -BUILDAH_VERSION='buildah --version' -SKOPEO_VERSION='skopeo --version' -DocumentInstalledItem "Podman ($PODMAN_VERSION)\nBuildah ($BUILDAH_VERSION)\nSkopeo ($SKOPEO_VERSION)" +PODMAN_VERSION="$(podman --version | cut -d " " -f 3)" +BUILDAH_VERSION="$(buildah --version | cut -d " " -f 3)" +SKOPEO_VERSION="$(skopeo --version | cut -d " " -f 3)" +DocumentInstalledItem "Podman ($PODMAN_VERSION)" +DocumentInstalledItem "Buildah ($BUILDAH_VERSION)" +DocumentInstalledItem "Skopeo ($SKOPEO_VERSION)" From 58acdc3f681cc8b4dc3b53c6eb6b0bada57fe1ed Mon Sep 17 00:00:00 2001 From: Darii Nurgaleev Date: Tue, 5 May 2020 00:16:21 +0700 Subject: [PATCH 15/16] pre-create .composer folder to preserve permission --- images/linux/scripts/installers/1604/php.sh | 3 +++ images/linux/scripts/installers/1804/php.sh | 3 +++ 2 files changed, 6 insertions(+) diff --git a/images/linux/scripts/installers/1604/php.sh b/images/linux/scripts/installers/1604/php.sh index 44f2ad3b..d2209041 100644 --- a/images/linux/scripts/installers/1604/php.sh +++ b/images/linux/scripts/installers/1604/php.sh @@ -283,6 +283,9 @@ prependEtcEnvironmentPath /home/runner/.config/composer/vendor/bin # Add composer bin folder to path echo 'export PATH="$PATH:$HOME/.config/composer/vendor/bin"' >> /etc/skel/.bashrc +#Create composer folder for user to preserve folder permissions +mkdir -p /etc/skel/.composer + # Install phpunit (for PHP) wget -q -O phpunit https://phar.phpunit.de/phpunit-7.phar chmod +x phpunit diff --git a/images/linux/scripts/installers/1804/php.sh b/images/linux/scripts/installers/1804/php.sh index 8ab10d78..cbf25393 100644 --- a/images/linux/scripts/installers/1804/php.sh +++ b/images/linux/scripts/installers/1804/php.sh @@ -200,6 +200,9 @@ prependEtcEnvironmentPath /home/runner/.config/composer/vendor/bin # Add composer bin folder to path echo 'export PATH="$PATH:$HOME/.config/composer/vendor/bin"' >> /etc/skel/.bashrc +#Create composer folder for user to preserve folder permissions +mkdir -p /etc/skel/.composer + # Install phpunit (for PHP) wget -q -O phpunit https://phar.phpunit.de/phpunit-7.phar chmod +x phpunit From 365d106302deb6f52e6dfc45264e5918fb778007 Mon Sep 17 00:00:00 2001 From: Dariy Nurgaleev <50947177+Darleev@users.noreply.github.com> Date: Tue, 5 May 2020 18:01:04 +0700 Subject: [PATCH 16/16] added workaround for default DNS (#819) --- images/linux/scripts/installers/1804/basic.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/images/linux/scripts/installers/1804/basic.sh b/images/linux/scripts/installers/1804/basic.sh index 29cb15b4..36a316f4 100644 --- a/images/linux/scripts/installers/1804/basic.sh +++ b/images/linux/scripts/installers/1804/basic.sh @@ -139,6 +139,10 @@ for cmd in curl file ftp jq netcat ssh parallel rsync shellcheck sudo telnet tim fi done +# Workaround for systemd-resolve, since sometimes stub resolver does not work properly. Details: https://github.com/actions/virtual-environments/issues/798 +echo "Create resolv.conf link." +ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf + # Document what was added to the image echo "Lastly, documenting what we added to the metadata file" DocumentInstalledItem "Basic CLI:"