From 7d791a5e0655ff365bfb62ec9fcee6a1b1215118 Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov Date: Thu, 3 Sep 2020 11:32:09 +0300 Subject: [PATCH 01/55] add and set clang-10 as the default for Ubuntu 20 --- images/linux/scripts/installers/clang.sh | 41 +++++++++++++++--------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/images/linux/scripts/installers/clang.sh b/images/linux/scripts/installers/clang.sh index eb508493b..076892954 100644 --- a/images/linux/scripts/installers/clang.sh +++ b/images/linux/scripts/installers/clang.sh @@ -1,17 +1,18 @@ #!/bin/bash ################################################################################ ## File: clang.sh -## Desc: Installs Clang compiler (versions: 6, 8 and 9) +## Desc: Installs Clang compiler ################################################################################ # Source the helpers for use with the script source $HELPER_SCRIPTS/document.sh +source $HELPER_SCRIPTS/os.sh function InstallClang { - version=$1 + local version=$1 echo "Installing clang-$version..." - if [[ $version =~ 9 ]]; then + if [[ $version =~ (9|10) ]]; then ./llvm.sh $version apt-get install -y "clang-format-$version" else @@ -29,27 +30,35 @@ function InstallClang { # Document what was added to the image echo "Documenting clang-$version..." - DocumentInstalledItem "Clang $version ($(clang-$version --version | head -n 1 | cut -d ' ' -f 3 | cut -d '-' -f 1))" + DocumentInstalledItem "Clang $version ($(clang-$version --version | head -n 1 | cut -d '-' -f 1 | awk '{print $NF}'))" +} + +function SetDefaultClang { + local version=$1 + + echo "Make Clang ${version} default" + update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${version} 100 + update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${version} 100 + update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-${version} 100 } # Download script for automatic installation wget https://apt.llvm.org/llvm.sh chmod +x llvm.sh -versions=( - "6.0" - "8" - "9" -) +if isUbuntu16 || isUbuntu18; then + versions=( "6.0" "8" "9" ) + default_clang_version="9" +fi -for version in ${versions[*]} -do +if isUbuntu20 ; then + versions=( "8" "9" "10" ) + default_clang_version="10" +fi + +for version in ${versions[*]}; do InstallClang $version done +SetDefaultClang $default_clang_version rm llvm.sh - -# Make Clang 9 default -update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-9 100 -update-alternatives --install /usr/bin/clang clang /usr/bin/clang-9 100 -update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-9 100 From ece0348c18ecf9d0e0650a6c0c930e63fccc5238 Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Mon, 7 Sep 2020 17:05:11 +0400 Subject: [PATCH 02/55] InstallerProjets scripts have been added --- .../Windows2019/Install-InstallerProjects.ps1 | 11 +++++++++++ images/win/scripts/Tests/InstallerProjects.Tests.ps1 | 7 +++++++ 2 files changed, 18 insertions(+) create mode 100644 images/win/scripts/Installers/Windows2019/Install-InstallerProjects.ps1 create mode 100644 images/win/scripts/Tests/InstallerProjects.Tests.ps1 diff --git a/images/win/scripts/Installers/Windows2019/Install-InstallerProjects.ps1 b/images/win/scripts/Installers/Windows2019/Install-InstallerProjects.ps1 new file mode 100644 index 000000000..5c4628d57 --- /dev/null +++ b/images/win/scripts/Installers/Windows2019/Install-InstallerProjects.ps1 @@ -0,0 +1,11 @@ +################################################################################ +## File: Install-InstallerProjects.ps1 +## Desc: Install the InstallerProjects Visual Studio Extension +################################################################################ + +Import-Module -Name ImageHelpers -Force + +$InstallerProjectsUrl = 'https://marketplace.visualstudio.com/_apis/public/gallery/publishers/VisualStudioClient/vsextensions/MicrosoftVisualStudio2017InstallerProjects/0.9.8/vspackage' +Install-VsixExtension -Url $InstallerProjectsUrl -name "InstallerProjects.vsix" -VSversion "2019" + +Invoke-PesterTests -TestFile "InstallerProjects" \ No newline at end of file diff --git a/images/win/scripts/Tests/InstallerProjects.Tests.ps1 b/images/win/scripts/Tests/InstallerProjects.Tests.ps1 new file mode 100644 index 000000000..4552cd346 --- /dev/null +++ b/images/win/scripts/Tests/InstallerProjects.Tests.ps1 @@ -0,0 +1,7 @@ +Import-Module -Name VsSetup -Force +Describe "InstallProjects" { + It "InstallProjects exists" { + $InstallProjects = (Get-VSSetupInstance | Select-VsSetupInstance -Product *).Packages | Where-Object {$_.id -eq 'VSInstallerProjects' } + $InstallProjects | Should -Not -BeNullOrEmpty + } +} \ No newline at end of file From 86faddeb95538d29bfe7f3b7f1b968ce88cbc6b1 Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Tue, 8 Sep 2020 11:01:42 +0400 Subject: [PATCH 03/55] Installer project URL has been corrected --- .../Installers/Windows2019/Install-InstallerProjects.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/win/scripts/Installers/Windows2019/Install-InstallerProjects.ps1 b/images/win/scripts/Installers/Windows2019/Install-InstallerProjects.ps1 index 5c4628d57..b4871038c 100644 --- a/images/win/scripts/Installers/Windows2019/Install-InstallerProjects.ps1 +++ b/images/win/scripts/Installers/Windows2019/Install-InstallerProjects.ps1 @@ -5,7 +5,7 @@ Import-Module -Name ImageHelpers -Force -$InstallerProjectsUrl = 'https://marketplace.visualstudio.com/_apis/public/gallery/publishers/VisualStudioClient/vsextensions/MicrosoftVisualStudio2017InstallerProjects/0.9.8/vspackage' +$InstallerProjectsUrl = 'https://marketplace.visualstudio.com/_apis/public/gallery/publishers/VisualStudioClient/vsextensions/MicrosoftVisualStudio2017InstallerProjects/latest/vspackage' Install-VsixExtension -Url $InstallerProjectsUrl -name "InstallerProjects.vsix" -VSversion "2019" Invoke-PesterTests -TestFile "InstallerProjects" \ No newline at end of file From 40333f6adf0aefc6c82101f192325492811956c7 Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Wed, 9 Sep 2020 08:55:15 +0400 Subject: [PATCH 04/55] Install-Vsix.ps1 has been created --- images/win/Windows2019-Azure.json | 2 +- .../win/scripts/Installers/Install-Vsix.ps1 | 21 +++++++++++++++++++ images/win/toolsets/toolset-2019.json | 18 ++++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 images/win/scripts/Installers/Install-Vsix.ps1 diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index b66d64c50..76412fd82 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -92,7 +92,7 @@ { "type": "file", "source": "{{template_dir}}/toolsets/toolset-2019.json", - "destination": "{{user `toolset_json_path`}}" + "destination": "{{user `tonolset_jso_path`}}" }, { "type": "windows-shell", diff --git a/images/win/scripts/Installers/Install-Vsix.ps1 b/images/win/scripts/Installers/Install-Vsix.ps1 new file mode 100644 index 000000000..3524fa7d4 --- /dev/null +++ b/images/win/scripts/Installers/Install-Vsix.ps1 @@ -0,0 +1,21 @@ +################################################################################### +## File: Install-Vsix.ps1 +## Desc: Install the Visual Studio Extensions from toolset.json +################################################################################### + +Import-Module -Name ImageHelpers -Force +$ErrorActionPreference = "Stop" + +$toolset = Get-ToolsetContent +$requiredVsixs = $toolset.visualStudio.vsix + +if (Test-IsWin19) { + $VsVersion = '2019' +} +else { + $VsVersion = '2017' +} + +$requiredVsixs | ForEach-Object { + Install-VsixExtension -url $_.url -name $_.name -VsVersion $VsVersion +} \ No newline at end of file diff --git a/images/win/toolsets/toolset-2019.json b/images/win/toolsets/toolset-2019.json index a2a7ec4a5..040a09fe6 100644 --- a/images/win/toolsets/toolset-2019.json +++ b/images/win/toolsets/toolset-2019.json @@ -259,6 +259,24 @@ "Microsoft.VisualStudio.Workload.VisualStudioExtension", "Component.MDD.Linux", "Component.MDD.Linux.GCC.arm" + ], + "vsix": [ + { + "name": "Microsoft.DataTools.AnalysisServices.vsix", + "url": "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ProBITools/vsextensions/MicrosoftAnalysisServicesModelingProjects/latest/vspackage" + }, + { + "name": "Microsoft.DataTools.IntegrationServices.exe", + "url": "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/SSIS/vsextensions/SqlServerIntegrationServicesProjects/latest/vspackage" + }, + { + "name": "Microsoft.DataTools.ReportingServices.vsix", + "url": "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ProBITools/vsextensions/MicrosoftReportProjectsforVisualStudio/latest/vspackage" + }, + { + "name": "Microsoft.VisualStudio.Installer.Projects.vsix", + "url": "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/VisualStudioClient/vsextensions/MicrosoftVisualStudio2017InstallerProjects/latest/vspackage" + } ] } } From feaef58222d3c2bac15ab6953cd06b1e05073175 Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Fri, 11 Sep 2020 12:42:29 +0400 Subject: [PATCH 05/55] Vsix Tests have been created. Old files have been removed --- .../win/scripts/Installers/Install-Vsix.ps1 | 4 +++- .../Windows2019/Install-InstallerProjects.ps1 | 11 ---------- .../Windows2019/Install-SSDTExtensions.ps1 | 12 ----------- .../scripts/Tests/InstallerProjects.Tests.ps1 | 7 ------- .../scripts/Tests/SSDTExtensions.Tests.ps1 | 21 ------------------- images/win/scripts/Tests/Vsix.Tests.ps1 | 12 +++++++++++ images/win/toolsets/toolset-2019.json | 12 +++++++---- 7 files changed, 23 insertions(+), 56 deletions(-) delete mode 100644 images/win/scripts/Installers/Windows2019/Install-InstallerProjects.ps1 delete mode 100644 images/win/scripts/Installers/Windows2019/Install-SSDTExtensions.ps1 delete mode 100644 images/win/scripts/Tests/InstallerProjects.Tests.ps1 delete mode 100644 images/win/scripts/Tests/SSDTExtensions.Tests.ps1 create mode 100644 images/win/scripts/Tests/Vsix.Tests.ps1 diff --git a/images/win/scripts/Installers/Install-Vsix.ps1 b/images/win/scripts/Installers/Install-Vsix.ps1 index 3524fa7d4..9c913196b 100644 --- a/images/win/scripts/Installers/Install-Vsix.ps1 +++ b/images/win/scripts/Installers/Install-Vsix.ps1 @@ -18,4 +18,6 @@ else { $requiredVsixs | ForEach-Object { Install-VsixExtension -url $_.url -name $_.name -VsVersion $VsVersion -} \ No newline at end of file +} + +Invoke-PesterTests -TestFile "Vsix" \ No newline at end of file diff --git a/images/win/scripts/Installers/Windows2019/Install-InstallerProjects.ps1 b/images/win/scripts/Installers/Windows2019/Install-InstallerProjects.ps1 deleted file mode 100644 index b4871038c..000000000 --- a/images/win/scripts/Installers/Windows2019/Install-InstallerProjects.ps1 +++ /dev/null @@ -1,11 +0,0 @@ -################################################################################ -## File: Install-InstallerProjects.ps1 -## Desc: Install the InstallerProjects Visual Studio Extension -################################################################################ - -Import-Module -Name ImageHelpers -Force - -$InstallerProjectsUrl = 'https://marketplace.visualstudio.com/_apis/public/gallery/publishers/VisualStudioClient/vsextensions/MicrosoftVisualStudio2017InstallerProjects/latest/vspackage' -Install-VsixExtension -Url $InstallerProjectsUrl -name "InstallerProjects.vsix" -VSversion "2019" - -Invoke-PesterTests -TestFile "InstallerProjects" \ No newline at end of file diff --git a/images/win/scripts/Installers/Windows2019/Install-SSDTExtensions.ps1 b/images/win/scripts/Installers/Windows2019/Install-SSDTExtensions.ps1 deleted file mode 100644 index f678ab544..000000000 --- a/images/win/scripts/Installers/Windows2019/Install-SSDTExtensions.ps1 +++ /dev/null @@ -1,12 +0,0 @@ -################################################################################### -## File: Install-SSDTExtensions.ps1 -## Desc: Install the extensions previously known as SSDT package -################################################################################### - -Import-Module -Name ImageHelpers -Force - -Install-VsixExtension -Url 'https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ProBITools/vsextensions/MicrosoftAnalysisServicesModelingProjects/2.9.5/vspackage' -Name 'Microsoft.DataTools.AnalysisServices.vsix' -VSversion "2019" -Install-VsixExtension -Url 'https://marketplace.visualstudio.com/_apis/public/gallery/publishers/SSIS/vsextensions/SqlServerIntegrationServicesProjects/3.4/vspackage' -Name 'Microsoft.DataTools.IntegrationServices.exe' -VSversion "2019" -Install-VsixExtension -Url 'https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ProBITools/vsextensions/MicrosoftReportProjectsforVisualStudio/2.6.3/vspackage' -Name 'Microsoft.DataTools.ReportingServices.vsix' -VSversion "2019" - -Invoke-PesterTests -TestFile "SSDTExtensions" diff --git a/images/win/scripts/Tests/InstallerProjects.Tests.ps1 b/images/win/scripts/Tests/InstallerProjects.Tests.ps1 deleted file mode 100644 index 4552cd346..000000000 --- a/images/win/scripts/Tests/InstallerProjects.Tests.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -Import-Module -Name VsSetup -Force -Describe "InstallProjects" { - It "InstallProjects exists" { - $InstallProjects = (Get-VSSetupInstance | Select-VsSetupInstance -Product *).Packages | Where-Object {$_.id -eq 'VSInstallerProjects' } - $InstallProjects | Should -Not -BeNullOrEmpty - } -} \ No newline at end of file diff --git a/images/win/scripts/Tests/SSDTExtensions.Tests.ps1 b/images/win/scripts/Tests/SSDTExtensions.Tests.ps1 deleted file mode 100644 index 7d1c6ee0b..000000000 --- a/images/win/scripts/Tests/SSDTExtensions.Tests.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -Describe "SSDTExtensions" { -#These extensions don't have any proper name in the state.packages.json file, only id is available, which can be found on extension marketplace download page - - if (Test-isWin19) { - $testExtenions = @( - @{id = "04a86fc2-dbd5-4222-848e-911638e487fe"} - @{id = "851E7A09-7B2B-4F06-A15D-BABFCB26B970"} - @{id = "717ad572-c4b7-435c-c166-c2969777f718"} - ) - - It "Extensions id=" -TestCases $testExtenions { - $version = Get-VSExtensionVersion -packageName "${id}" - $version | Should -Not -BeNullOrEmpty - } - } else { - It "Extension SSDT" { - $version = Get-VSExtensionVersion -packageName "SSDT" - $version | Should -Not -BeNullOrEmpty - } - } -} diff --git a/images/win/scripts/Tests/Vsix.Tests.ps1 b/images/win/scripts/Tests/Vsix.Tests.ps1 new file mode 100644 index 000000000..c10f55712 --- /dev/null +++ b/images/win/scripts/Tests/Vsix.Tests.ps1 @@ -0,0 +1,12 @@ +Describe "VsixTests" { + $toolset = Get-ToolsetContent + $requiredVsixs = $toolset.visualStudio.vsix + + $allPackages = (Get-VSSetupInstance | Select-VsSetupInstance -Product *).Packages + $testCases = $requiredVsixs | ForEach-Object { @{ VsixId = $_.Id; AllPackages = $allPackages }} + + It "" -TestCases $testCases { + $objVsix = $AllPackages | Where-Object {$_.id -eq $VsixId } | Select-Object Id, Version + $objVsix | Should -Not -BeNullOrEmpty + } +} \ No newline at end of file diff --git a/images/win/toolsets/toolset-2019.json b/images/win/toolsets/toolset-2019.json index 040a09fe6..5e41bd2b2 100644 --- a/images/win/toolsets/toolset-2019.json +++ b/images/win/toolsets/toolset-2019.json @@ -263,19 +263,23 @@ "vsix": [ { "name": "Microsoft.DataTools.AnalysisServices.vsix", - "url": "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ProBITools/vsextensions/MicrosoftAnalysisServicesModelingProjects/latest/vspackage" + "url": "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ProBITools/vsextensions/MicrosoftAnalysisServicesModelingProjects/latest/vspackage", + "id": "04a86fc2-dbd5-4222-848e-911638e487fe" }, { "name": "Microsoft.DataTools.IntegrationServices.exe", - "url": "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/SSIS/vsextensions/SqlServerIntegrationServicesProjects/latest/vspackage" + "url": "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/SSIS/vsextensions/SqlServerIntegrationServicesProjects/latest/vspackage", + "id": "851E7A09-7B2B-4F06-A15D-BABFCB26B970" }, { "name": "Microsoft.DataTools.ReportingServices.vsix", - "url": "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ProBITools/vsextensions/MicrosoftReportProjectsforVisualStudio/latest/vspackage" + "url": "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ProBITools/vsextensions/MicrosoftReportProjectsforVisualStudio/latest/vspackage", + "id": "717ad572-c4b7-435c-c166-c2969777f718" }, { "name": "Microsoft.VisualStudio.Installer.Projects.vsix", - "url": "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/VisualStudioClient/vsextensions/MicrosoftVisualStudio2017InstallerProjects/latest/vspackage" + "url": "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/VisualStudioClient/vsextensions/MicrosoftVisualStudio2017InstallerProjects/latest/vspackage", + "id": "VSInstallerProjects" } ] } From ffc68fcc474d499a9b6dc476613749f379be4764 Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Fri, 11 Sep 2020 13:04:58 +0400 Subject: [PATCH 06/55] Small bug fixing in json file --- 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 76412fd82..f9c54a438 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -92,7 +92,7 @@ { "type": "file", "source": "{{template_dir}}/toolsets/toolset-2019.json", - "destination": "{{user `tonolset_jso_path`}}" + "destination": "{{user `toolset_jso_path`}}" }, { "type": "windows-shell", From d56d5a4b0668eb916326e5d15fff6b462f38c269 Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Fri, 11 Sep 2020 13:08:26 +0400 Subject: [PATCH 07/55] Windows2019-Azure.json has been reverted from main branch --- 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 f9c54a438..b66d64c50 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -92,7 +92,7 @@ { "type": "file", "source": "{{template_dir}}/toolsets/toolset-2019.json", - "destination": "{{user `toolset_jso_path`}}" + "destination": "{{user `toolset_json_path`}}" }, { "type": "windows-shell", From 10252c3fc3c4a4aa2ad26c86676f9f3d380f6537 Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Fri, 11 Sep 2020 13:25:22 +0400 Subject: [PATCH 08/55] Checking the VSIX has been added --- images/win/scripts/Installers/Install-Vsix.ps1 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/images/win/scripts/Installers/Install-Vsix.ps1 b/images/win/scripts/Installers/Install-Vsix.ps1 index 9c913196b..e36a7b4d7 100644 --- a/images/win/scripts/Installers/Install-Vsix.ps1 +++ b/images/win/scripts/Installers/Install-Vsix.ps1 @@ -8,6 +8,10 @@ $ErrorActionPreference = "Stop" $toolset = Get-ToolsetContent $requiredVsixs = $toolset.visualStudio.vsix +if(-not $requiredVsixs) { + Write-Host "No requiered VSIX" + exit 1 +} if (Test-IsWin19) { $VsVersion = '2019' From fd7f9cc9fddf90769a43ed336749cc8445bc7b8d Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Fri, 11 Sep 2020 13:38:58 +0400 Subject: [PATCH 09/55] exit 1 -> exit 0 --- images/win/scripts/Installers/Install-Vsix.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/win/scripts/Installers/Install-Vsix.ps1 b/images/win/scripts/Installers/Install-Vsix.ps1 index e36a7b4d7..9cd148ce6 100644 --- a/images/win/scripts/Installers/Install-Vsix.ps1 +++ b/images/win/scripts/Installers/Install-Vsix.ps1 @@ -10,7 +10,7 @@ $toolset = Get-ToolsetContent $requiredVsixs = $toolset.visualStudio.vsix if(-not $requiredVsixs) { Write-Host "No requiered VSIX" - exit 1 + exit 0 } if (Test-IsWin19) { From 0bf0a04ef612b874be0a692c6918209bd1018e7c Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Fri, 11 Sep 2020 14:05:55 +0400 Subject: [PATCH 10/55] Empty VSIX array has been added --- images/win/toolsets/toolset-2016.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/images/win/toolsets/toolset-2016.json b/images/win/toolsets/toolset-2016.json index a76246e60..c764e0802 100644 --- a/images/win/toolsets/toolset-2016.json +++ b/images/win/toolsets/toolset-2016.json @@ -227,6 +227,8 @@ "Microsoft.VisualStudio.Component.VC.Runtimes.ARM64.Spectre", "Microsoft.VisualStudio.Component.Workflow", "Microsoft.VisualStudio.Workload.Office" + ], + "vsix": [ ] } } From 00b1f4c3c903602d9ce9388c057f0c2a084b6ca8 Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Fri, 11 Sep 2020 14:11:15 +0400 Subject: [PATCH 11/55] Import-Module has been removed --- images/win/scripts/Installers/Install-Vsix.ps1 | 1 - 1 file changed, 1 deletion(-) diff --git a/images/win/scripts/Installers/Install-Vsix.ps1 b/images/win/scripts/Installers/Install-Vsix.ps1 index 9cd148ce6..6d43516cc 100644 --- a/images/win/scripts/Installers/Install-Vsix.ps1 +++ b/images/win/scripts/Installers/Install-Vsix.ps1 @@ -3,7 +3,6 @@ ## Desc: Install the Visual Studio Extensions from toolset.json ################################################################################### -Import-Module -Name ImageHelpers -Force $ErrorActionPreference = "Stop" $toolset = Get-ToolsetContent From 5587930568a5408473ca8381c7bb7f1e9e697f46 Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Fri, 11 Sep 2020 14:43:21 +0400 Subject: [PATCH 12/55] $VsVersion now is got from toolset --- images/win/scripts/Installers/Install-Vsix.ps1 | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/images/win/scripts/Installers/Install-Vsix.ps1 b/images/win/scripts/Installers/Install-Vsix.ps1 index 6d43516cc..af710dd90 100644 --- a/images/win/scripts/Installers/Install-Vsix.ps1 +++ b/images/win/scripts/Installers/Install-Vsix.ps1 @@ -12,13 +12,7 @@ if(-not $requiredVsixs) { exit 0 } -if (Test-IsWin19) { - $VsVersion = '2019' -} -else { - $VsVersion = '2017' -} - +$VsVersion = $toolset.visualStudio.Version $requiredVsixs | ForEach-Object { Install-VsixExtension -url $_.url -name $_.name -VsVersion $VsVersion } From 29362bcc5c5d2e26477c759c1df2fd7eb1c91f50 Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Fri, 11 Sep 2020 14:47:36 +0400 Subject: [PATCH 13/55] nitpick - message has been changed --- images/win/scripts/Installers/Install-Vsix.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/win/scripts/Installers/Install-Vsix.ps1 b/images/win/scripts/Installers/Install-Vsix.ps1 index af710dd90..664ced944 100644 --- a/images/win/scripts/Installers/Install-Vsix.ps1 +++ b/images/win/scripts/Installers/Install-Vsix.ps1 @@ -8,7 +8,7 @@ $ErrorActionPreference = "Stop" $toolset = Get-ToolsetContent $requiredVsixs = $toolset.visualStudio.vsix if(-not $requiredVsixs) { - Write-Host "No requiered VSIX" + Write-Host "No requiered VSIX extensions" exit 0 } From daed7d9fc5368b42d9f57be5fe4e10ddb5e51659 Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Fri, 11 Sep 2020 15:00:12 +0400 Subject: [PATCH 14/55] hardcoded vesrions has been reverted --- images/win/toolsets/toolset-2019.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/images/win/toolsets/toolset-2019.json b/images/win/toolsets/toolset-2019.json index 5e41bd2b2..7184dc037 100644 --- a/images/win/toolsets/toolset-2019.json +++ b/images/win/toolsets/toolset-2019.json @@ -263,17 +263,17 @@ "vsix": [ { "name": "Microsoft.DataTools.AnalysisServices.vsix", - "url": "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ProBITools/vsextensions/MicrosoftAnalysisServicesModelingProjects/latest/vspackage", + "url": "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ProBITools/vsextensions/MicrosoftAnalysisServicesModelingProjects/2.9.5/vspackage", "id": "04a86fc2-dbd5-4222-848e-911638e487fe" }, { "name": "Microsoft.DataTools.IntegrationServices.exe", - "url": "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/SSIS/vsextensions/SqlServerIntegrationServicesProjects/latest/vspackage", + "url": "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/SSIS/vsextensions/SqlServerIntegrationServicesProjects/3.4/vspackage", "id": "851E7A09-7B2B-4F06-A15D-BABFCB26B970" }, { "name": "Microsoft.DataTools.ReportingServices.vsix", - "url": "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ProBITools/vsextensions/MicrosoftReportProjectsforVisualStudio/latest/vspackage", + "url": "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ProBITools/vsextensions/MicrosoftReportProjectsforVisualStudio/2.6.3/vspackage", "id": "717ad572-c4b7-435c-c166-c2969777f718" }, { From c6e7cc46fa0dbca372e4c2e21df2de5ab2c83da6 Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Fri, 11 Sep 2020 15:05:02 +0400 Subject: [PATCH 15/55] Windows templates have been modified --- images/win/Windows2016-Azure.json | 3 ++- images/win/Windows2019-Azure.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/images/win/Windows2016-Azure.json b/images/win/Windows2016-Azure.json index bb871b3cd..7a3b76337 100644 --- a/images/win/Windows2016-Azure.json +++ b/images/win/Windows2016-Azure.json @@ -185,7 +185,8 @@ "scripts":[ "{{ template_dir }}/scripts/Installers/Install-Nuget.ps1", "{{ template_dir }}/scripts/Installers/Install-Wix.ps1", - "{{ template_dir }}/scripts/Installers/Install-WDK.ps1" + "{{ template_dir }}/scripts/Installers/Install-WDK.ps1", + "{{ template_dir }}/scripts/Installers/Install-Vsix.ps1" ] }, { diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index b66d64c50..2d58ce238 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -192,8 +192,8 @@ "scripts":[ "{{ template_dir }}/scripts/Installers/Install-Nuget.ps1", "{{ template_dir }}/scripts/Installers/Install-Wix.ps1", - "{{ template_dir }}/scripts/Installers/Windows2019/Install-SSDTExtensions.ps1", "{{ template_dir }}/scripts/Installers/Install-WDK.ps1", + "{{ template_dir }}/scripts/Installers/Install-Vsix.ps1", "{{ template_dir }}/scripts/Installers/Install-AzureCli.ps1", "{{ template_dir }}/scripts/Installers/Install-AzureDevOpsCli.ps1", "{{ template_dir }}/scripts/Installers/Install-AzCopy.ps1", From 8169d5efd40dd727e2fab8fdd591af91f0577430 Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Fri, 11 Sep 2020 15:06:03 +0400 Subject: [PATCH 16/55] VsixTests -> Vsix --- images/win/scripts/Tests/Vsix.Tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/win/scripts/Tests/Vsix.Tests.ps1 b/images/win/scripts/Tests/Vsix.Tests.ps1 index c10f55712..478188f75 100644 --- a/images/win/scripts/Tests/Vsix.Tests.ps1 +++ b/images/win/scripts/Tests/Vsix.Tests.ps1 @@ -1,4 +1,4 @@ -Describe "VsixTests" { +Describe "Vsix" { $toolset = Get-ToolsetContent $requiredVsixs = $toolset.visualStudio.vsix From 0c146bf19bc17de174cb23593575d8a823e19a99 Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Fri, 11 Sep 2020 15:07:47 +0400 Subject: [PATCH 17/55] Test name has been changed to "VSIX Extension " --- images/win/scripts/Tests/Vsix.Tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/win/scripts/Tests/Vsix.Tests.ps1 b/images/win/scripts/Tests/Vsix.Tests.ps1 index 478188f75..6d6ca22c6 100644 --- a/images/win/scripts/Tests/Vsix.Tests.ps1 +++ b/images/win/scripts/Tests/Vsix.Tests.ps1 @@ -5,7 +5,7 @@ Describe "Vsix" { $allPackages = (Get-VSSetupInstance | Select-VsSetupInstance -Product *).Packages $testCases = $requiredVsixs | ForEach-Object { @{ VsixId = $_.Id; AllPackages = $allPackages }} - It "" -TestCases $testCases { + It "VSIX Extension " -TestCases $testCases { $objVsix = $AllPackages | Where-Object {$_.id -eq $VsixId } | Select-Object Id, Version $objVsix | Should -Not -BeNullOrEmpty } From 3ea5c7d183c9d100fbb6e920142659829b151869 Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov Date: Fri, 11 Sep 2020 14:59:17 +0300 Subject: [PATCH 18/55] Add markdown file's generation to Ubuntu images --- .../SoftwareReport.Android.psm1 | 147 +++++++++ .../SoftwareReport.Browsers.psm1 | 19 ++ .../SoftwareReport.CachedTools.psm1 | 65 ++++ .../SoftwareReport/SoftwareReport.Common.psm1 | 296 ++++++++++++++++++ .../SoftwareReport.Databases.psm1 | 19 ++ .../SoftwareReport.Generator.ps1 | 221 +++++++++++++ .../SoftwareReport.Helpers.psm1 | 52 +++ .../SoftwareReport/SoftwareReport.Java.psm1 | 30 ++ .../SoftwareReport/SoftwareReport.Tools.psm1 | 249 +++++++++++++++ images/linux/ubuntu1604.json | 17 +- images/linux/ubuntu1804.json | 17 +- images/linux/ubuntu2004.json | 17 +- 12 files changed, 1146 insertions(+), 3 deletions(-) create mode 100644 images/linux/scripts/SoftwareReport/SoftwareReport.Android.psm1 create mode 100644 images/linux/scripts/SoftwareReport/SoftwareReport.Browsers.psm1 create mode 100644 images/linux/scripts/SoftwareReport/SoftwareReport.CachedTools.psm1 create mode 100644 images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 create mode 100644 images/linux/scripts/SoftwareReport/SoftwareReport.Databases.psm1 create mode 100644 images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 create mode 100644 images/linux/scripts/SoftwareReport/SoftwareReport.Helpers.psm1 create mode 100644 images/linux/scripts/SoftwareReport/SoftwareReport.Java.psm1 create mode 100644 images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Android.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Android.psm1 new file mode 100644 index 000000000..7f34143a9 --- /dev/null +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Android.psm1 @@ -0,0 +1,147 @@ +function Split-TableRowByColumns { + param( + [string] $Row + ) + return $Row.Split("|") | ForEach-Object { $_.trim() } +} + +function Get-AndroidSDKRoot { + return "/usr/local/lib/android/sdk" +} + +function Get-AndroidSDKManagerPath { + $androidSDKDir = Get-AndroidSDKRoot + return Join-Path $androidSDKDir "tools" "bin" "sdkmanager" +} + +function Get-AndroidInstalledPackages { + $androidSDKManagerPath = Get-AndroidSDKManagerPath + $androidSDKManagerList = Invoke-Expression "$androidSDKManagerPath --list --include_obsolete" + $androidInstalledPackages = @() + foreach($packageInfo in $androidSDKManagerList) { + if($packageInfo -Match "Available Packages:") { + break + } + + $androidInstalledPackages += $packageInfo + } + return $androidInstalledPackages +} + + +function Build-AndroidTable { + $packageInfo = Get-AndroidInstalledPackages + return @( + @{ + "Package" = "Android SDK Platform-Tools" + "Version" = Get-AndroidPackageVersions -PackageInfo $packageInfo -MatchedString "Android SDK Platform-Tools" + }, + @{ + "Package" = "Android SDK Tools" + "Version" = Get-AndroidPackageVersions -PackageInfo $packageInfo -MatchedString "Android SDK Tools" + }, + @{ + "Package" = "Android SDK Platforms" + "Version" = Get-AndroidPlatformVersions -PackageInfo $packageInfo + }, + @{ + "Package" = "Android SDK Build-tools" + "Version" = Get-AndroidBuildToolVersions -PackageInfo $packageInfo + }, + @{ + "Package" = "Google APIs" + "Version" = Get-AndroidGoogleAPIsVersions -PackageInfo $packageInfo + }, + @{ + "Package" = "Android Support Repository" + "Version" = Get-AndroidPackageVersions -PackageInfo $packageInfo -MatchedString "Android Support Repository" + }, + @{ + "Package" = "Google Play services" + "Version" = Get-AndroidPackageVersions -PackageInfo $packageInfo -MatchedString "Google Play services" + }, + @{ + "Package" = "Google Repository" + "Version" = Get-AndroidPackageVersions -PackageInfo $packageInfo -MatchedString "Google Repository" + }, + @{ + "Package" = "SDK Patch Applier v4" + "Version" = Get-AndroidPackageVersions -PackageInfo $packageInfo -MatchedString "SDK Patch Applier v4" + }, + @{ + "Package" = "CMake" + "Version" = Get-AndroidPackageVersions -PackageInfo $packageInfo -MatchedString "cmake" + }, + @{ + "Package" = "NDK" + "Version" = Get-AndroidPackageVersions -PackageInfo $packageInfo -MatchedString "ndk-bundle" + } + ) | Where-Object { $_.Version } | ForEach-Object { + [PSCustomObject] @{ + "Package Name" = $_.Package + "Version" = $_.Version + } + } +} + +function Get-AndroidPackageVersions { + param ( + [Parameter(Mandatory)] + [object] $PackageInfo, + [Parameter(Mandatory)] + [object] $MatchedString + ) + + $versions = $packageInfo | Where-Object { $_ -Match $MatchedString } | ForEach-Object { + $packageInfoParts = Split-TableRowByColumns $_ + return $packageInfoParts[1] + } + return ($versions -Join "
") +} + +function Get-AndroidPlatformVersions { + param ( + [Parameter(Mandatory)] + [object] $PackageInfo + ) + + $versions = $packageInfo | Where-Object { $_ -Match "Android SDK Platform " } | ForEach-Object { + $packageInfoParts = Split-TableRowByColumns $_ + $revision = $packageInfoParts[1] + $version = $packageInfoParts[0].split(";")[1] + return "$version, (rev $revision)" + } + [array]::Reverse($versions) + return ($versions -Join "
") +} + +function Get-AndroidBuildToolVersions { + param ( + [Parameter(Mandatory)] + [object] $PackageInfo + ) + + $versions = $packageInfo | Where-Object { $_ -Match "Android SDK Build-Tools" } | ForEach-Object { + $packageInfoParts = Split-TableRowByColumns $_ + return $packageInfoParts[1] + } + $groupVersions = @() + $versions | ForEach-Object { + $majorVersion = $_.Split(".")[0] + $groupVersions += $versions | Where-Object { $_.StartsWith($majorVersion) } | Join-String -Separator " " + } + return ($groupVersions | Sort-Object -Descending -Unique | Join-String -Separator "
") +} + +function Get-AndroidGoogleAPIsVersions { + param ( + [Parameter(Mandatory)] + [object] $PackageInfo + ) + + $versions = $packageInfo | Where-Object { $_ -Match "Google APIs" } | ForEach-Object { + $packageInfoParts = Split-TableRowByColumns $_ + return $packageInfoParts[0].split(";")[1] + } + return ($versions -Join "
") +} \ No newline at end of file diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Browsers.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Browsers.psm1 new file mode 100644 index 000000000..96d05ee08 --- /dev/null +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Browsers.psm1 @@ -0,0 +1,19 @@ +function Get-ChromeVersion { + $googleChromeVersion = google-chrome --version | Take-Part -Part 2 + return "Google Chrome $googleChromeVersion" +} + +function Get-ChromeDriverVersion { + $chromeDriverVersion = chromedriver --version | Take-Part -Part 1 + return "ChromeDriver $chromeDriverVersion" +} + +function Get-FirefoxVersion { + $firefoxVersion = firefox --version + return $firefoxVersion +} + +function Get-GeckodriverVersion { + $geckodriverVersion = geckodriver --version | Select-Object -First 1 | Take-Part -Part 1 + return "Geckodriver $geckodriverVersion" +} \ No newline at end of file diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.CachedTools.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.CachedTools.psm1 new file mode 100644 index 000000000..536b31255 --- /dev/null +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.CachedTools.psm1 @@ -0,0 +1,65 @@ +function Get-ToolcacheRubyVersions { + $toolcachePath = Join-Path $env:AGENT_TOOLSDIRECTORY "Ruby" + return Get-ChildItem $toolcachePath -Name | Sort-Object { [Version]$_ } +} + +function Get-ToolcachePythonVersions { + $toolcachePath = Join-Path $env:AGENT_TOOLSDIRECTORY "Python" + return Get-ChildItem $toolcachePath -Name | Sort-Object { [Version]$_ } +} + +function Get-ToolcachePyPyVersions { + $toolcachePath = Join-Path $env:AGENT_TOOLSDIRECTORY "PyPy" + Get-ChildItem -Path $toolcachePath -Name | Sort-Object { [Version] $_ } | ForEach-Object { + $pypyRootPath = Join-Path $toolcachePath $_ "x64" + [string]$pypyVersionOutput = & "$pypyRootPath/bin/python" -c "import sys;print(sys.version)" + $pypyVersionOutput -match "^([\d\.]+) \(.+\) \[PyPy ([\d\.]+) .+]$" | Out-Null + return "{0} [PyPy {1}]" -f $Matches[1], $Matches[2] + } +} + +function Get-ToolcacheNodeVersions { + $toolcachePath = Join-Path $env:AGENT_TOOLSDIRECTORY "node" + return Get-ChildItem $toolcachePath -Name | Sort-Object { [Version]$_ } +} + +function Get-ToolcacheGoVersions { + $toolcachePath = Join-Path $env:AGENT_TOOLSDIRECTORY "go" + return Get-ChildItem $toolcachePath -Name | Sort-Object { [Version]$_ } +} + +function Get-ToolcacheBoostVersions { + $toolcachePath = Join-Path $env:AGENT_TOOLSDIRECTORY "boost" + if (-not (Test-Path $toolcachePath)) { + return @() + } + return Get-ChildItem $toolcachePath -Name | Sort-Object { [Version]$_ } +} + +function Build-CachedToolsSection { + $output = "" + + $output += New-MDHeader "Ruby" -Level 4 + $output += New-MDList -Lines (Get-ToolcacheRubyVersions) -Style Unordered + + $output += New-MDHeader "Python" -Level 4 + $output += New-MDList -Lines (Get-ToolcachePythonVersions) -Style Unordered + + $output += New-MDHeader "PyPy" -Level 4 + $output += New-MDList -Lines (Get-ToolcachePyPyVersions) -Style Unordered + + $output += New-MDHeader "Node.js" -Level 4 + $output += New-MDList -Lines (Get-ToolcacheNodeVersions) -Style Unordered + + $output += New-MDHeader "Go" -Level 4 + $output += New-MDList -Lines (Get-ToolcacheGoVersions) -Style Unordered + + $boostVersions = Get-ToolcacheBoostVersions + if ($boostVersions.Count -gt 0) { + $output += New-MDHeader "Boost" -Level 4 + $output += New-MDList -Lines $boostVersions -Style Unordered + } + + + return $output +} \ No newline at end of file diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 new file mode 100644 index 000000000..1d96f5550 --- /dev/null +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 @@ -0,0 +1,296 @@ +Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Helpers.psm1") -DisableNameChecking + +function Get-OSName { + lsb_release -ds +} + +function Get-CPPVersions { + $cppVersions = & apt list --installed | Where-Object { $_ -match "g\+\+-\d+"} | ForEach-Object { + $_ -match "now (?\d+\.\d+\.\d+)-" | Out-Null + $Matches.version + } + return "GNU C++ " + ($cppVersions -Join ", ") +} + +function Get-FortranVersions { + $fortranVersions = & apt list --installed | Where-Object { $_ -match "^gfortran-\d+"} | ForEach-Object { + $_ -match "now (?\d+\.\d+\.\d+)-" | Out-Null + $Matches.version + } + return "GNU Fortran " + ($fortranVersions -Join ", ") +} + +function Get-ClangVersions { + $clangVersions = @() + $clangVersions = & apt list --installed | Where-Object { $_ -match "^clang-\d+"} | ForEach-Object { + $clangCommand = ($_ -Split "/")[0] + Invoke-Expression "$clangCommand --version" | Where-Object { $_ -match "clang version" } | ForEach-Object { + $_ -match "clang version (?\d+\.\d+\.\d+)-" | Out-Null + $Matches.version + } + } + return "Clang " + ($clangVersions -Join ", ") +} + +function Get-ErlangVersion { + $result = Get-CommandResult "erl -version" + $result.Output -match "version (?\d+\.\d+\.\d+)" | Out-Null + $version = $Matches.version + return "Erlang $version" +} + +function Get-MonoVersion { + $monoVersion = $(mono --version) | Out-String | Take-Part -Part 4 + return "Mono $monoVersion" +} + +function Get-NodeVersion { + $nodeVersion = $(node --version).Substring(1) + return "Node $nodeVersion" +} + +function Get-PythonVersion { + $result = Get-CommandResult "python --version" + $version = $result.Output | Take-Part -Part 1 + return "Python $version" +} + +function Get-Python3Version { + $result = Get-CommandResult "python3 --version" + $version = $result.Output | Take-Part -Part 1 + return "Python3 $version" +} + +function Get-PowershellVersion { + $(pwsh --version) +} + +function Get-RubyVersion { + $rubyVersion = $(ruby --version) | Out-String | Take-Part -Part 1 + return "Ruby $rubyVersion" +} + +function Get-SwiftVersion { + $swiftVersion = $(swift --version) | Out-String | Take-Part -Part 2 + return "Swift $swiftVersion" +} + +function Get-JuliaVersion { + $juliaVersion = $(julia --version) | Out-String | Take-Part -Part 2 + return "Julia $juliaVersion" +} + +function Get-HomebrewVersion { + $result = Get-CommandResult "brew -v" + $result.Output -match "Homebrew (?\d+\.\d+\.\d+)" | Out-Null + $version = $Matches.version + return "Homebrew $version" +} + +function Get-GemVersion { + $(gem --version) -match "(?\d+\.\d+\.\d+)" | Out-Null + $gemVersion = $Matches.version + return "Gem $gemVersion" +} + +function Get-MinicondaVersion { + $condaVersion = $(conda --version) + return "Mini$condaVersion" +} + +function Get-HelmVersion { + $(helm version) -match 'Version:"v(?\d+\.\d+\.\d+)"' | Out-Null + $helmVersion = $Matches.version + return "Helm $helmVersion" +} + +function Get-NpmVersion { + $npmVersion = $(npm --version) + return "Npm $npmVersion" +} + +function Get-YarnVersion { + $yarnVersion = $(yarn --version) + return "Yarn $yarnVersion" +} + +function Get-PipVersion { + $result = Get-CommandResult "pip --version" + $result.Output -match "pip (?\d+\.\d+\.\d+)" | Out-Null + $pipVersion = $Matches.version + return "Pip $pipVersion" +} + +function Get-Pip3Version { + $result = Get-CommandResult "pip3 --version" + $result.Output -match "pip (?\d+\.\d+\.\d+)" | Out-Null + $pipVersion = $Matches.version + return "Pip3 $pipVersion" +} + +function Get-VcpkgVersion { + $result = Get-CommandResult "vcpkg version" + $result.Output -match "version (?\d+\.\d+\.\d+)" | Out-Null + $vcpkgVersion = $Matches.version + return "Vcpkg $vcpkgVersion" +} + +function Get-AntVersion { + $result = $(ant -version) | Out-String + $result -match "version (?\d+\.\d+\.\d+)" | Out-Null + $antVersion = $Matches.version + return "Ant $antVersion" +} + +function Get-GradleVersion { + $result = $(gradle -v) | Out-String + $result -match "Gradle (?\d+\.\d+\.\d+)" | Out-Null + $gradleVersion = $Matches.version + return "Gradle $gradleVersion" +} +function Get-MavenVersion { + $result = $(mvn -version) | Out-String + $result -match "Apache Maven (?\d+\.\d+\.\d+)" | Out-Null + $mavenVersion = $Matches.version + return "Maven $mavenVersion" +} +function Get-SbtVersion { + $result = $(sbt -version) | Out-String + $result -match "sbt script version: (?\d+\.\d+\.\d+)" | Out-Null + $sbtVersion = $Matches.version + return "Sbt $sbtVersion" +} + +function Get-PHPVersions { + return $(apt list --installed) | Where-Object { $_ -match "^php\d+\.\d+/"} | ForEach-Object { + $_ -match "now (?\d+\.\d+\.\d+)-" | Out-Null + $Matches.version + } +} + +function Get-ComposerVersion { + $(composer --version) -match "Composer version (?\d+\.\d+\.\d+)\s" | Out-Null + return $Matches.version +} + +function Get-PHPUnitVersion { + $(phpunit --version | Out-String) -match "PHPUnit (?\d+\.\d+\.\d+)\s" | Out-Null + return $Matches.version +} + +function Build-PHPTable { + $php = @{ + "Tool" = "PHP" + "Version" = "$(Get-PHPVersions -Join '
')" + } + $composer = @{ + "Tool" = "Composer" + "Version" = Get-ComposerVersion + } + $phpunit = @{ + "Tool" = "PHPUnit" + "Version" = Get-PHPUnitVersion + } + return @($php, $composer, $phpunit) | ForEach-Object { + [PSCustomObject] @{ + "Tool" = $_.Tool + "Version" = $_.Version + } + } +} + +function Get-GHCVersion { + $(ghc --version) -match "version (?\d+\.\d+\.\d+)" | Out-Null + $ghcVersion = $Matches.version + return "GHC $ghcVersion" +} + +function Get-CabalVersion { + $(cabal --version | Out-String) -match "cabal-install version (?\d+\.\d+\.\d+\.\d+)" | Out-Null + $cabalVersion = $Matches.version + return "Cabal $cabalVersion" +} + +function Get-StackVersion { + $(stack --version | Out-String) -match "Version (?\d+\.\d+\.\d+)" | Out-Null + $stackVersion = $Matches.version + return "Stack $stackVersion" +} + +function Get-RustVersion { + $rustVersion = $(rustc --version) | Take-Part -Part 1 + return "Rust $rustVersion" +} + +function Get-BindgenVersion { + $bindgenVersion = $(bindgen --version) | Take-Part -Part 1 + return "Bindgen $bindgenVersion" +} + +function Get-CargoVersion { + $cargoVersion = $(cargo --version) | Take-Part -Part 1 + return "Cargo $cargoVersion" +} + +function Get-CargoAuditVersion { + $cargoAuditVersion = $(cargo audit --version) | Take-Part -Part 1 + return "Cargo audit $cargoAuditVersion" +} + +function Get-CargoOutdatedVersion { + $cargoOutdatedVersion = $(cargo outdated --version) | Take-Part -Part 1 -Delimiter "v" + return "Cargo outdated $cargoOutdatedVersion" +} + +function Get-CargoClippyVersion { + $cargoClippyVersion = $(cargo-clippy --version) | Take-Part -Part 1 + return "Cargo clippy $cargoClippyVersion" +} + +function Get-CbindgenVersion { + $cbindgenVersion = $(cbindgen --version) | Take-Part -Part 1 + return "Cbindgen $cbindgenVersion" +} + +function Get-RustupVersion { + $rustupVersion = $(rustup --version) | Take-Part -Part 1 + return "Rustup $rustupVersion" +} + +function Get-RustdocVersion { + $rustdocVersion = $(rustdoc --version) | Take-Part -Part 1 + return "Rustdoc $rustdocVersion" +} + +function Get-RustfmtVersion { + $rustfmtVersion = $(rustfmt --version) | Take-Part -Part 1 | Take-Part -Part 0 -Delimiter "-" + return "Rustfmt $rustfmtVersion" +} + +function Get-AzModuleVersions { + $azModuleVersions = Get-ChildItem /usr/share | Where-Object { $_ -match "az_\d+" } | Foreach-Object { + $_.Name.Split("_")[1] + } + + $azModuleVersions = $azModuleVersions -join " " + return $azModuleVersions +} + +function Get-DotNetCoreSdkVersions { + $unsortedDotNetCoreSdkVersion = dotnet --list-sdks list | ForEach-Object { $_ | Take-Part -Part 0 } + $dotNetCoreSdkVersion = $unsortedDotNetCoreSdkVersion -join " " + return $dotNetCoreSdkVersion +} + +function Get-CachedDockerImages { + $toolsetJson = Get-ToolsetContent + $images = $toolsetJson.docker.images + return $images +} + +function Get-AptPackages { + $toolsetJson = Get-ToolsetContent + $apt = $toolsetJson.apt + $pkgs = ($apt.common_packages + $apt.cmd_packages | Sort-Object) -join ", " + return $pkgs +} \ No newline at end of file diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Databases.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Databases.psm1 new file mode 100644 index 000000000..6c274184e --- /dev/null +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Databases.psm1 @@ -0,0 +1,19 @@ +function Get-PostgreSqlVersion { + $postgreSQLVersion = psql --version | Take-Part -Part 2 + return "Postgre SQL $postgreSQLVersion" +} + +function Get-MongoDbVersion { + $mongoDBVersion = mongod --version | Select-Object -First 1 | Take-Part -Part 2 -Delimiter "v" + return "MongoDB $mongoDBVersion" +} + +function Get-SqliteVersion { + $sqliteVersion = sqlite3 --version | Take-Part -Part 0 + return "sqlite3 $sqliteVersion" +} + +function Get-MySqlVersion { + $mySqlVersion = (mysql --version).Split("/usr/bin/")[1] + return "MySQL ($mySqlVersion)" +} \ No newline at end of file diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 new file mode 100644 index 000000000..e63f3719a --- /dev/null +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 @@ -0,0 +1,221 @@ +param ( + [Parameter(Mandatory)][string] + $OutputDirectory +) + +# Install MarkdownPS module for software report generation +Install-Module MarkdownPS -Force -Scope CurrentUser +Import-Module MarkdownPS +Import-Module (Join-Path $PSScriptRoot "SoftwareReport.CachedTools.psm1") -DisableNameChecking +Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Common.psm1") -DisableNameChecking +Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Helpers.psm1") -DisableNameChecking +Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Tools.psm1") -DisableNameChecking +Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Java.psm1") -DisableNameChecking +Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Databases.psm1") -DisableNameChecking +Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Browsers.psm1") -DisableNameChecking +Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Android.psm1") -DisableNameChecking + +$markdown = "" + +if ($env:ANNOUNCEMENTS) { + $markdown += $env:ANNOUNCEMENTS + $markdown += New-MDNewLine + $markdown += "***" + $markdown += New-MDNewLine +} + +$OSName = Get-OSName +$markdown += New-MDHeader "$OSName" -Level 1 + +$markdown += New-MDList -Style Unordered -Lines @( + "Image Version: $env:ImageVersion" +) + +$markdown += New-MDHeader "Installed Software" -Level 2 +$markdown += New-MDHeader "Language and Runtime" -Level 3 + +$markdown += New-MDList -Style Unordered -Lines @( + (Get-CPPVersions), + (Get-FortranVersions), + (Get-ClangVersions), + (Get-ErlangVersion), + (Get-MonoVersion), + (Get-NodeVersion), + (Get-PythonVersion), + (Get-Python3Version), + (Get-PowershellVersion), + (Get-RubyVersion), + (Get-SwiftVersion), + (Get-JuliaVersion) +) + +$markdown += New-MDHeader "Package Management" -Level 3 +$markdown += New-MDList -Style Unordered -Lines @( + (Get-HomebrewVersion), + (Get-GemVersion), + (Get-MinicondaVersion), + (Get-HelmVersion), + (Get-NpmVersion), + (Get-YarnVersion), + (Get-PipVersion), + (Get-Pip3Version), + (Get-VcpkgVersion) +) + +$markdown += New-MDHeader "Project Management" -Level 3 +$markdown += New-MDList -Style Unordered -Lines @( + (Get-AntVersion), + (Get-GradleVersion), + (Get-MavenVersion), + (Get-SbtVersion) +) + +$markdown += New-MDHeader "Tools" -Level 3 +$toolsList = @( + (Get-7zipVersion), + (Get-AnsibleVersion), + (Get-AzCopy7Version), + (Get-AzCopy10Version), + (Get-BazelVersion), + (Get-BazeliskVersion), + (Get-CMakeVersion), + (Get-CurlVersion), + (Get-DockerComposeVersion), + (Get-DockerMobyVersion), + (Get-DockerBuildxVersion), + (Get-GitVersion), + (Get-GitLFSVersion), + (Get-GitFTPVersion), + (Get-GoogleCloudSDKVersion), + (Get-HavegedVersion), + (Get-HerokuVersion), + (Get-HHVMVersion), + (Get-SVNVersion), + (Get-JqVersion), + (Get-KindVersion), + (Get-KubectlVersion), + (Get-KustomizeVersion), + (Get-LeiningenVersion), + (Get-M4Version), + (Get-HGVersion), + (Get-MinikubeVersion), + (Get-NewmanVersion), + (Get-NvmVersion), + (Get-PackerVersion), + (Get-PhantomJSVersion), + (Get-SwigVersion), + (Get-TerraformVersion), + (Get-UnZipVersion), + (Get-WgetVersion), + (Get-ZipVersion), + (Get-ZstdVersion) +) + +if (-not (Test-IsUbuntu16)) { + $toolsList += @( + (Get-PodManVersion), + (Get-BuildahVersion), + (Get-SkopeoVersion) + ) +} + +$markdown += New-MDList -Style Unordered -Lines ($toolsList | Sort-Object) + +$markdown += New-MDHeader "CLI Tools" -Level 3 +$markdown += New-MDList -Style Unordered -Lines @( + (Get-AlibabaCloudCliVersion), + (Get-AWSCliVersion), + (Get-AWSCliSessionManagerPluginVersion), + (Get-AWSSAMVersion), + (Get-AzureCliVersion), + (Get-AzureDevopsVersion), + (Get-GitHubCliVersion), + (Get-HubCliVersion), + (Get-NetlifyCliVersion), + (Get-OCCliVersion), + (Get-ORASCliVersion), + (Get-VerselCliversion) +) + +$markdown += New-MDHeader "Java" -Level 3 +$markdown += Get-JavaVersions | New-MDTable +$markdown += New-MDNewLine + +$markdown += New-MDHeader "PHP" -Level 3 +$markdown += Build-PHPTable | New-MDTable +$markdown += New-MDNewLine + +$markdown += New-MDHeader "Haskell" -Level 3 +$markdown += New-MDList -Style Unordered -Lines @( + (Get-GHCVersion), + (Get-CabalVersion), + (Get-StackVersion) +) + +$markdown += New-MDHeader "Rust Tools" -Level 3 +$markdown += New-MDList -Style Unordered -Lines @( + (Get-RustVersion), + (Get-RustupVersion), + (Get-RustdocVersion), + (Get-CargoVersion) +) + +$markdown += New-MDHeader "Packages" -Level 4 +$markdown += New-MDList -Style Unordered -Lines @( + (Get-BindgenVersion), + (Get-CargoAuditVersion), + (Get-CargoOutdatedVersion), + (Get-CargoClippyVersion), + (Get-CbindgenVersion), + (Get-RustfmtVersion) +) + +$markdown += New-MDHeader "Browsers and Drivers" -Level 3 +$markdown += New-MDList -Style Unordered -Lines @( + (Get-ChromeVersion), + (Get-ChromeDriverVersion), + (Get-FirefoxVersion), + (Get-GeckodriverVersion) +) + +$markdown += New-MDHeader ".NET Core SDK" -Level 3 +$markdown += New-MDList -Style Unordered -Lines @( + (Get-DotNetCoreSdkVersions) +) + +$markdown += New-MDHeader "Az Module" -Level 3 +$markdown += New-MDList -Style Unordered -Lines @( + (Get-AzModuleVersions) +) + +$markdown += New-MDHeader "Databases" -Level 3 +$markdown += New-MDList -Style Unordered -Lines @( + (Get-PostgreSqlVersion), + (Get-MongoDbVersion), + (Get-SqliteVersion) +) + +$markdown += New-MDHeader "MySQL" -Level 4 +$markdown += New-MDList -Style Unordered -Lines @( + (Get-MySqlVersion), + "MySQL Server (user:root password:root)", + "MS SQL Server Client Tools" +) +$markdown += New-MDCode -Lines @( + "MySQL service is disabled by default. Use the following command as a part of your job to start the service: 'sudo systemctl start mysql.service'" +) + +$markdown += New-MDHeader "Cached Tools" -Level 3 +$markdown += Build-CachedToolsSection + +$markdown += New-MDHeader "Android" -Level 3 +$markdown += Build-AndroidTable | New-MDTable +$markdown += New-MDNewLine + +$markdown += New-MDHeader "Cached Docker images" -Level 3 +$markdown += New-MDList -Style Unordered -Lines @(Get-CachedDockerImages) + +$markdown += New-MDHeader "Installed apt packages" -Level 3 +$markdown += New-MDList -Style Unordered -Lines @(Get-AptPackages) + +$markdown | Out-File -FilePath "${OutputDirectory}/Ubuntu-Readme.md" diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Helpers.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Helpers.psm1 new file mode 100644 index 000000000..6f2701c92 --- /dev/null +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Helpers.psm1 @@ -0,0 +1,52 @@ +function Get-CommandResult { + param ( + [Parameter(Mandatory=$true)] + [string] $Command, + [switch] $Multiline + ) + # Bash trick to suppress and show error output because some commands write to stderr (for example, "python --version") + $stdout = & bash -c "$Command 2>&1" + $exitCode = $LASTEXITCODE + return @{ + Output = If ($Multiline -eq $true) { $stdout } else { [string]$stdout } + ExitCode = $exitCode + } +} + +function Take-Part { + param ( + [Parameter(ValueFromPipeline)] + [string] $toolOutput, + [string] $Delimiter = " ", + [int[]] $Part + ) + $parts = $toolOutput.Split($Delimiter, [System.StringSplitOptions]::RemoveEmptyEntries) + $selectedParts = $parts[$Part] + return [string]::Join($Delimiter, $selectedParts) +} + +function Test-IsUbuntu16 { + return (lsb_release -rs) -eq "16.04" +} + +function Test-IsUbuntu18 { + return (lsb_release -rs) -eq "18.04" +} + +function Test-IsUbuntu20 { + return (lsb_release -rs) -eq "20.04" +} + +function Get-ToolsetContent +{ + $toolset = Join-Path $env:INSTALLER_SCRIPT_FOLDER "toolset.json" + Get-Content $toolset -Raw | ConvertFrom-Json +} + +function New-MDNewLine { + param ( + [int] $Count = 1 + ) + $newLineSymbol = [System.Environment]::NewLine + return $newLineSymbol * $Count +} diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Java.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Java.psm1 new file mode 100644 index 000000000..4e54661ab --- /dev/null +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Java.psm1 @@ -0,0 +1,30 @@ +function Get-JavaFullVersion { + param($JavaRootPath) + + $javaBinPath = Join-Path $javaRootPath "/bin/java" + $javaVersionOutput = (Get-CommandResult "$javaBinPath -version").Output + $matchResult = $javaVersionOutput | Select-String '^openjdk version \"([\d\._]+)\"' + return $matchResult.Matches.Groups[1].Value +} + +function Get-JavaVersions { + $defaultJavaPath = $env:JAVA_HOME + $javaVersions = Get-Item env:JAVA_HOME_*_X64 + $sortRules = @{ + Expression = { [Int32]$_.Name.Split("_")[2] } + Descending = $false + } + + return $javaVersions | Sort-Object $sortRules | ForEach-Object { + $javaPath = $_.Value + $version = Get-JavaFullVersion $javaPath + $vendor = $version.StartsWith("1.7") ? "Zulu" : "AdoptOpenJDK" + $defaultPostfix = ($javaPath -eq $defaultJavaPath) ? " (default)" : "" + + [PSCustomObject] @{ + "Version" = $version + $defaultPostfix + "Vendor" = $vendor + "Environment Variable" = $_.Name + } + } +} \ No newline at end of file diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 new file mode 100644 index 000000000..f66f2e4fc --- /dev/null +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 @@ -0,0 +1,249 @@ +function Get-7zipVersion { + $7zVersion = 7z i | Select-String "7-Zip" | Take-Part -Part 2 + return "7-Zip $7zVersion" +} + +function Get-AnsibleVersion { + $ansibleVersion = ansible --version | Select-Object -First 1 | Take-Part -Part 1 + return "Ansible $ansibleVersion" +} + +function Get-AzCopy7Version { + $azcopy7Version = azcopy --version | Take-Part -Part 1 | Take-Part -Part 0 -Delimiter "-" + return "AzCopy7 (available by azcopy alias) $azcopy7Version" +} + +function Get-AzCopy10Version { + $azcopy10Version = azcopy10 --version | Take-Part -Part 2 + return "AzCopy10 (available by azcopy10 alias) $azcopy10Version" +} + +function Get-BazelVersion { + $bazelVersion = bazel --version | Select-String "bazel" | Take-Part -Part 1 + return "Bazel $bazelVersion" +} + +function Get-BazeliskVersion { + $bazeliskVersion = bazelisk version 2>&1 | Select-String "Bazelisk version:" | Take-Part -Part 2 | Take-Part -Part 0 -Delimiter "v" + return "Bazelisk $bazeliskVersion" +} + +function Get-PodManVersion { + $podmanVersion = podman --version | Take-Part -Part 2 + return "Podman $podmanVersion" +} + +function Get-BuildahVersion { + $buildahVersion = buildah --version | Take-Part -Part 2 + return "Buildah $buildahVersion" +} + +function Get-SkopeoVersion { + $skopeoVersion = skopeo --version | Take-Part -Part 2 + return "Skopeo $skopeoVersion" +} + +function Get-CMakeVersion { + $cmakeVersion = cmake --version | Select-Object -First 1 | Take-Part -Part 2 + return "CMake $cmakeVersion" +} + +function Get-CurlVersion { + $curlVersion = curl --version | Select-Object -First 1 | Take-Part -Part 0,1 + return $curlVersion +} + +function Get-DockerComposeVersion { + $composeVersion = docker-compose -v | Take-Part -Part 2 | Take-Part -Part 0 -Delimiter "," + return "Docker Compose $composeVersion" +} + +function Get-DockerMobyVersion { + $dockerVersion = docker -v | Take-Part -Part 2 | Take-Part -Part 0 -Delimiter "+" + return "Docker-Moby $dockerVersion" +} + +function Get-DockerBuildxVersion { + $buildxVersion = docker buildx version | Take-Part -Part 1 | Take-Part -Part 0 -Delimiter "+" + return "Docker-Buildx $buildxVersion" +} + +function Get-GitVersion { + $gitVersion = git --version 2>&1 | Take-Part -Part 2 + return "Git $gitVersion" +} + +function Get-GitLFSVersion { + $gitlfsversion = git-lfs --version 2>&1 | Take-Part -Part 0 | Take-Part -Part 1 -Delimiter "/" + return "Git LFS $gitlfsversion" +} + +function Get-GitFTPVersion { + $gitftpVersion = git-ftp --version | Take-Part -Part 2 + return "Git-ftp $gitftpVersion" +} + +function Get-GoogleCloudSDKVersion { + return "$(gcloud --version | Select-Object -First 1)" +} + +function Get-HavegedVersion { + $havegedVersion = dpkg-query --showformat='${Version}' --show haveged | Take-Part -Part 0 -Delimiter "-" + return "Haveged $havegedVersion" +} + +function Get-HerokuVersion { + $herokuVersion = heroku version | Take-Part -Part 0 | Take-Part -Part 1 -Delimiter "/" + return "Heroku $herokuVersion" +} + +function Get-HHVMVersion { + $hhvmVersion = hhvm --version | Select-Object -First 1 | Take-Part -Part 2 + return "HHVM (HipHop VM) $hhvmVersion" +} + +function Get-SVNVersion { + $svnVersion = svn --version | Select-Object -First 1 | Take-Part -Part 2 + return "SVN $svnVersion" +} + +function Get-KustomizeVersion { + $kustomizeVersion = kustomize version --short | Take-Part -Part 0 | Take-Part -Part 1 -Delimiter "v" + return "Kustomize $kustomizeVersion" +} + +function Get-KindVersion { + $kindVersion = kind version | Take-Part -Part 1 | Take-Part -Part 0 -Delimiter "v" + return "Kind $kindVersion" +} + +function Get-KubectlVersion { + $kubectlVersion = kubectl version --client --short | Take-Part -Part 2 | Take-Part -Part 0 -Delimiter "v" + return "Kubectl $kubectlVersion" +} + +function Get-MinikubeVersion { + $minikubeVersion = minikube version --short | Take-Part -Part 2 | Take-Part -Part 0 -Delimiter "v" + return "Minikube $minikubeVersion" +} + +function Get-HGVersion { + $hgVersion = hg --version | Select-Object -First 1 | Take-Part -Part -1 | Take-Part -Part 0 -Delimiter ")" + return "Mercurial $hgVersion" +} + +function Get-M4Version { + $m4Version = m4 --version | Select-Object -First 1 | Take-Part -Part -1 + return "m4 $m4Version" +} + +function Get-LeiningenVersion { + return "$(lein -v | Take-Part -Part 0,1)" +} + +function Get-NewmanVersion { + return "Newman $(newman --version)" +} + +function Get-NvmVersion { + $nvmVersion = bash -c "source $HOME/.nvm/nvm.sh && nvm --version" + return "nvm $nvmVersion" +} + +function Get-PackerVersion { + return "Packer $(packer --version)" +} + +function Get-PhantomJSVersion { + return "PhantomJS $(phantomjs --version)" +} + +function Get-SwigVersion { + $swigVersion = swig -version | Select-String "SWIG Version" | Take-Part -Part 2 + return "Swig $swigVersion" +} + +function Get-TerraformVersion { + return (terraform version | Select-String "^Terraform").Line.Replace('v','') +} + +function Get-UnZipVersion { + $unzipVersion = unzip -v | Select-Object -First 1 | Take-Part -Part 1 + return "unzip $unzipVersion" +} + +function Get-WgetVersion { + $wgetVersion = wget --version | Select-Object -First 1 | Take-Part -Part 2 + return "wget $wgetVersion" +} + +function Get-ZipVersion { + $zipVersion = zip -v | Select-String "This is Zip" | Take-Part -Part 3 + return "zip $zipVersion" +} + +function Get-ZstdVersion { + $zstdVersion = (zstd --version).Split() -match "v\d+" | ForEach-Object {$_.Replace("v","").Replace(",","")} + return "zstd $zstdVersion" +} + +function Get-JqVersion { + $jqVersion = jq --version | Take-Part -Part 1 -Delimiter "-" + return "jq $jqVersion" +} + +function Get-AzureCliVersion { + $azcliVersion = az -v | Select-String "azure-cli" | Take-Part -Part -1 + return "Azure CLI (azure-cli) $azcliVersion" +} + +function Get-AzureDevopsVersion { + $azdevopsVersion = az -v | Select-String "azure-devops" | Take-Part -Part -1 + return "Azure CLI (azure-devops) $azdevopsVersion" +} + +function Get-AlibabaCloudCliVersion { + return "Alibaba Cloud CLI $(aliyun version)" +} + +function Get-AWSCliVersion { + $awsVersion = aws --version 2>&1 | Take-Part -Part 0 | Take-Part -Part 1 -Delimiter "/" + return "AWS CLI $awsVersion" +} + +function Get-AWSCliSessionManagerPluginVersion { + return "AWS CLI Session manager plugin $(session-manager-plugin --version 2>&1)" +} + +function Get-AWSSAMVersion { + return "AWS SAM CLI $(sam --version | Take-Part -Part -1)" +} + +function Get-HubCliVersion { + $hubVersion = hub --version | Select-String "hub version" | Take-Part -Part 2 + return "Hub CLI $hubVersion" +} + +function Get-GitHubCliVersion { + $ghVersion = gh --version | Select-String "gh version" | Take-Part -Part 2 + return "GitHub CLI $ghVersion" +} + +function Get-NetlifyCliVersion { + $netlifyVersion = netlify --version | Take-Part -Part 0 | Take-Part -Part 1 -Delimiter "/" + return "Netlify CLI $netlifyVersion" +} + +function Get-OCCliVersion { + $ocVersion = oc version | Take-Part -Part 2 | Take-Part -Part 0 -Delimiter "-" + return "oc CLI $ocVersion" +} + +function Get-ORASCliVersion { + $orasVersion = oras version | Select-String "^Version:" | Take-Part -Part 1 + return "ORAS CLI $orasVersion" +} + +function Get-VerselCliversion { + return "$(vercel --version 2>&1 | Select-Object -First 1)" +} diff --git a/images/linux/ubuntu1604.json b/images/linux/ubuntu1604.json index 9d8a11ba7..7ef3122a6 100644 --- a/images/linux/ubuntu1604.json +++ b/images/linux/ubuntu1604.json @@ -88,6 +88,11 @@ "source": "{{template_dir}}/scripts/installers", "destination": "{{user `installer_script_folder`}}" }, + { + "type": "file", + "source": "{{ template_dir }}/scripts/SoftwareReport", + "destination": "{{user `image_folder`}}" + }, { "type": "file", "source": "{{template_dir}}/toolsets/toolcache-1604.json", @@ -287,9 +292,19 @@ ], "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" }, + { + "type": "powershell", + "inline": [ + "pwsh -File '{{user `image_folder`}}/SoftwareReport/SoftwareReport.Generator.ps1' -OutputDirectory '{{user `image_folder`}}'" + ], + "environment_vars":[ + "INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}", + "ANNOUNCEMENTS={{user `announcements`}}" + ] + }, { "type": "file", - "source": "{{user `metadata_file`}}", + "source": "{{user `image_folder`}}/Ubuntu-Readme.md", "destination": "{{template_dir}}/Ubuntu1604-README.md", "direction": "download" }, diff --git a/images/linux/ubuntu1804.json b/images/linux/ubuntu1804.json index aacfe4eea..5f280636d 100644 --- a/images/linux/ubuntu1804.json +++ b/images/linux/ubuntu1804.json @@ -91,6 +91,11 @@ "source": "{{template_dir}}/scripts/installers", "destination": "{{user `installer_script_folder`}}" }, + { + "type": "file", + "source": "{{ template_dir }}/scripts/SoftwareReport", + "destination": "{{user `image_folder`}}" + }, { "type": "file", "source": "{{template_dir}}/toolsets/toolcache-1804.json", @@ -291,9 +296,19 @@ ], "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" }, + { + "type": "powershell", + "inline": [ + "pwsh -File '{{user `image_folder`}}/SoftwareReport/SoftwareReport.Generator.ps1' -OutputDirectory '{{user `image_folder`}}'" + ], + "environment_vars":[ + "INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}", + "ANNOUNCEMENTS={{user `announcements`}}" + ] + }, { "type": "file", - "source": "{{user `metadata_file`}}", + "source": "{{user `image_folder`}}/Ubuntu-Readme.md", "destination": "{{template_dir}}/Ubuntu1804-README.md", "direction": "download" }, diff --git a/images/linux/ubuntu2004.json b/images/linux/ubuntu2004.json index 17e9143d2..604b863a2 100644 --- a/images/linux/ubuntu2004.json +++ b/images/linux/ubuntu2004.json @@ -93,6 +93,11 @@ "source": "{{template_dir}}/scripts/installers", "destination": "{{user `installer_script_folder`}}" }, + { + "type": "file", + "source": "{{ template_dir }}/scripts/SoftwareReport", + "destination": "{{user `image_folder`}}" + }, { "type": "file", "source": "{{template_dir}}/toolsets/toolcache-2004.json", @@ -293,9 +298,19 @@ ], "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" }, + { + "type": "powershell", + "inline": [ + "pwsh -File '{{user `image_folder`}}/SoftwareReport/SoftwareReport.Generator.ps1' -OutputDirectory '{{user `image_folder`}}'" + ], + "environment_vars":[ + "INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}", + "ANNOUNCEMENTS={{user `announcements`}}" + ] + }, { "type": "file", - "source": "{{user `metadata_file`}}", + "source": "{{user `image_folder`}}/Ubuntu-Readme.md", "destination": "{{template_dir}}/Ubuntu2004-README.md", "direction": "download" }, From ed1663db186daf145da10b7f1055fb8b50160e83 Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Fri, 11 Sep 2020 16:19:27 +0400 Subject: [PATCH 19/55] minor fixing in Install-Vsix.ps1 --- images/win/scripts/Installers/Install-Vsix.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/images/win/scripts/Installers/Install-Vsix.ps1 b/images/win/scripts/Installers/Install-Vsix.ps1 index 664ced944..ec955b4e9 100644 --- a/images/win/scripts/Installers/Install-Vsix.ps1 +++ b/images/win/scripts/Installers/Install-Vsix.ps1 @@ -6,14 +6,14 @@ $ErrorActionPreference = "Stop" $toolset = Get-ToolsetContent -$requiredVsixs = $toolset.visualStudio.vsix -if(-not $requiredVsixs) { - Write-Host "No requiered VSIX extensions" +$vsixPackagesList = $toolset.visualStudio.vsix +if(-not $vsixPackagesList) { + Write-Host "No extensions to install" exit 0 } $VsVersion = $toolset.visualStudio.Version -$requiredVsixs | ForEach-Object { +$vsixPackagesList | ForEach-Object { Install-VsixExtension -url $_.url -name $_.name -VsVersion $VsVersion } From 493aec5cabe7689c0d4c548eacc11481c0f87825 Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Fri, 11 Sep 2020 19:10:05 +0400 Subject: [PATCH 20/55] minor bugfixing --- images/win/scripts/Installers/Install-Vsix.ps1 | 2 +- images/win/scripts/Tests/Vsix.Tests.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/images/win/scripts/Installers/Install-Vsix.ps1 b/images/win/scripts/Installers/Install-Vsix.ps1 index ec955b4e9..e8bfbb05b 100644 --- a/images/win/scripts/Installers/Install-Vsix.ps1 +++ b/images/win/scripts/Installers/Install-Vsix.ps1 @@ -7,7 +7,7 @@ $ErrorActionPreference = "Stop" $toolset = Get-ToolsetContent $vsixPackagesList = $toolset.visualStudio.vsix -if(-not $vsixPackagesList) { +if (-not $vsixPackagesList) { Write-Host "No extensions to install" exit 0 } diff --git a/images/win/scripts/Tests/Vsix.Tests.ps1 b/images/win/scripts/Tests/Vsix.Tests.ps1 index 6d6ca22c6..19edf15ae 100644 --- a/images/win/scripts/Tests/Vsix.Tests.ps1 +++ b/images/win/scripts/Tests/Vsix.Tests.ps1 @@ -6,7 +6,7 @@ Describe "Vsix" { $testCases = $requiredVsixs | ForEach-Object { @{ VsixId = $_.Id; AllPackages = $allPackages }} It "VSIX Extension " -TestCases $testCases { - $objVsix = $AllPackages | Where-Object {$_.id -eq $VsixId } | Select-Object Id, Version + $objVsix = $AllPackages | Where-Object { $_.id -eq $VsixId } $objVsix | Should -Not -BeNullOrEmpty } } \ No newline at end of file From cbb93facbc0c9cccfae806654f5cdc316ec36f6c Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Fri, 11 Sep 2020 19:20:28 +0400 Subject: [PATCH 21/55] nitpic --- images/win/scripts/Installers/Install-Vsix.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/images/win/scripts/Installers/Install-Vsix.ps1 b/images/win/scripts/Installers/Install-Vsix.ps1 index e8bfbb05b..fbbc7d1b3 100644 --- a/images/win/scripts/Installers/Install-Vsix.ps1 +++ b/images/win/scripts/Installers/Install-Vsix.ps1 @@ -6,14 +6,14 @@ $ErrorActionPreference = "Stop" $toolset = Get-ToolsetContent -$vsixPackagesList = $toolset.visualStudio.vsix -if (-not $vsixPackagesList) { +$VsixPackagesList = $toolset.visualStudio.vsix +if (-not $VsixPackagesList) { Write-Host "No extensions to install" exit 0 } $VsVersion = $toolset.visualStudio.Version -$vsixPackagesList | ForEach-Object { +$VsixPackagesList | ForEach-Object { Install-VsixExtension -url $_.url -name $_.name -VsVersion $VsVersion } From 63fe681d98384821d374b3423b505e7f747fed86 Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Fri, 11 Sep 2020 19:40:28 +0400 Subject: [PATCH 22/55] Case has been fixed --- images/win/scripts/Installers/Install-Vsix.ps1 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/images/win/scripts/Installers/Install-Vsix.ps1 b/images/win/scripts/Installers/Install-Vsix.ps1 index fbbc7d1b3..4e6062a28 100644 --- a/images/win/scripts/Installers/Install-Vsix.ps1 +++ b/images/win/scripts/Installers/Install-Vsix.ps1 @@ -6,15 +6,15 @@ $ErrorActionPreference = "Stop" $toolset = Get-ToolsetContent -$VsixPackagesList = $toolset.visualStudio.vsix -if (-not $VsixPackagesList) { +$vsixPackagesList = $toolset.visualStudio.vsix +if (-not $vsixPackagesList) { Write-Host "No extensions to install" exit 0 } -$VsVersion = $toolset.visualStudio.Version -$VsixPackagesList | ForEach-Object { - Install-VsixExtension -url $_.url -name $_.name -VsVersion $VsVersion +$vsVersion = $toolset.visualStudio.Version +$vsixPackagesList | ForEach-Object { + Install-VsixExtension -Url $_.url -Name $_.name -VSversion $vsVersion } Invoke-PesterTests -TestFile "Vsix" \ No newline at end of file From a52de89923ba2f199b26cc4f13e7ce41188e1b0c Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Fri, 11 Sep 2020 19:55:05 +0400 Subject: [PATCH 23/55] SSDTExtensions.Tests.ps1 has been removed --- .../scripts/Tests/SSDTExtensions.Tests.ps1 | 21 ------------------- 1 file changed, 21 deletions(-) delete mode 100644 images/win/scripts/Tests/SSDTExtensions.Tests.ps1 diff --git a/images/win/scripts/Tests/SSDTExtensions.Tests.ps1 b/images/win/scripts/Tests/SSDTExtensions.Tests.ps1 deleted file mode 100644 index 7d1c6ee0b..000000000 --- a/images/win/scripts/Tests/SSDTExtensions.Tests.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -Describe "SSDTExtensions" { -#These extensions don't have any proper name in the state.packages.json file, only id is available, which can be found on extension marketplace download page - - if (Test-isWin19) { - $testExtenions = @( - @{id = "04a86fc2-dbd5-4222-848e-911638e487fe"} - @{id = "851E7A09-7B2B-4F06-A15D-BABFCB26B970"} - @{id = "717ad572-c4b7-435c-c166-c2969777f718"} - ) - - It "Extensions id=" -TestCases $testExtenions { - $version = Get-VSExtensionVersion -packageName "${id}" - $version | Should -Not -BeNullOrEmpty - } - } else { - It "Extension SSDT" { - $version = Get-VSExtensionVersion -packageName "SSDT" - $version | Should -Not -BeNullOrEmpty - } - } -} From d1ae794365db8871fae4743e20a6a364cf4ff0c8 Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Fri, 11 Sep 2020 20:14:21 +0400 Subject: [PATCH 24/55] minor fix in Vsix.Tests --- images/win/scripts/Tests/Vsix.Tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/win/scripts/Tests/Vsix.Tests.ps1 b/images/win/scripts/Tests/Vsix.Tests.ps1 index 19edf15ae..1539601b5 100644 --- a/images/win/scripts/Tests/Vsix.Tests.ps1 +++ b/images/win/scripts/Tests/Vsix.Tests.ps1 @@ -5,7 +5,7 @@ Describe "Vsix" { $allPackages = (Get-VSSetupInstance | Select-VsSetupInstance -Product *).Packages $testCases = $requiredVsixs | ForEach-Object { @{ VsixId = $_.Id; AllPackages = $allPackages }} - It "VSIX Extension " -TestCases $testCases { + It "Extension " -TestCases $testCases { $objVsix = $AllPackages | Where-Object { $_.id -eq $VsixId } $objVsix | Should -Not -BeNullOrEmpty } From 370986d0f0b09213b34b42c7e51f433e734eea55 Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov Date: Mon, 14 Sep 2020 10:09:05 +0300 Subject: [PATCH 25/55] rename Take-Part -> Take-OutputPart --- .../SoftwareReport.Browsers.psm1 | 6 +- .../SoftwareReport.CachedTools.psm1 | 5 +- .../SoftwareReport/SoftwareReport.Common.psm1 | 38 ++++----- .../SoftwareReport.Databases.psm1 | 22 ++++- .../SoftwareReport.Generator.ps1 | 10 +-- .../SoftwareReport.Helpers.psm1 | 2 +- .../SoftwareReport/SoftwareReport.Tools.psm1 | 84 +++++++++---------- 7 files changed, 87 insertions(+), 80 deletions(-) diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Browsers.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Browsers.psm1 index 96d05ee08..d65eb5536 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Browsers.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Browsers.psm1 @@ -1,10 +1,10 @@ function Get-ChromeVersion { - $googleChromeVersion = google-chrome --version | Take-Part -Part 2 + $googleChromeVersion = google-chrome --version | Take-OutputPart -Part 2 return "Google Chrome $googleChromeVersion" } function Get-ChromeDriverVersion { - $chromeDriverVersion = chromedriver --version | Take-Part -Part 1 + $chromeDriverVersion = chromedriver --version | Take-OutputPart -Part 1 return "ChromeDriver $chromeDriverVersion" } @@ -14,6 +14,6 @@ function Get-FirefoxVersion { } function Get-GeckodriverVersion { - $geckodriverVersion = geckodriver --version | Select-Object -First 1 | Take-Part -Part 1 + $geckodriverVersion = geckodriver --version | Select-Object -First 1 | Take-OutputPart -Part 1 return "Geckodriver $geckodriverVersion" } \ No newline at end of file diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.CachedTools.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.CachedTools.psm1 index 536b31255..24283ba64 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.CachedTools.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.CachedTools.psm1 @@ -36,7 +36,7 @@ function Get-ToolcacheBoostVersions { return Get-ChildItem $toolcachePath -Name | Sort-Object { [Version]$_ } } -function Build-CachedToolsSection { +function Build-CachedToolsSection { $output = "" $output += New-MDHeader "Ruby" -Level 4 @@ -44,7 +44,7 @@ function Build-CachedToolsSection { $output += New-MDHeader "Python" -Level 4 $output += New-MDList -Lines (Get-ToolcachePythonVersions) -Style Unordered - + $output += New-MDHeader "PyPy" -Level 4 $output += New-MDList -Lines (Get-ToolcachePyPyVersions) -Style Unordered @@ -59,7 +59,6 @@ function Build-CachedToolsSection { $output += New-MDHeader "Boost" -Level 4 $output += New-MDList -Lines $boostVersions -Style Unordered } - return $output } \ No newline at end of file diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 index 1d96f5550..5fafca0f1 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 @@ -40,7 +40,7 @@ function Get-ErlangVersion { } function Get-MonoVersion { - $monoVersion = $(mono --version) | Out-String | Take-Part -Part 4 + $monoVersion = $(mono --version) | Out-String | Take-OutputPart -Part 4 return "Mono $monoVersion" } @@ -51,13 +51,13 @@ function Get-NodeVersion { function Get-PythonVersion { $result = Get-CommandResult "python --version" - $version = $result.Output | Take-Part -Part 1 + $version = $result.Output | Take-OutputPart -Part 1 return "Python $version" } function Get-Python3Version { $result = Get-CommandResult "python3 --version" - $version = $result.Output | Take-Part -Part 1 + $version = $result.Output | Take-OutputPart -Part 1 return "Python3 $version" } @@ -66,17 +66,17 @@ function Get-PowershellVersion { } function Get-RubyVersion { - $rubyVersion = $(ruby --version) | Out-String | Take-Part -Part 1 + $rubyVersion = $(ruby --version) | Out-String | Take-OutputPart -Part 1 return "Ruby $rubyVersion" } function Get-SwiftVersion { - $swiftVersion = $(swift --version) | Out-String | Take-Part -Part 2 + $swiftVersion = $(swift --version) | Out-String | Take-OutputPart -Part 2 return "Swift $swiftVersion" } function Get-JuliaVersion { - $juliaVersion = $(julia --version) | Out-String | Take-Part -Part 2 + $juliaVersion = $(julia --version) | Out-String | Take-OutputPart -Part 2 return "Julia $juliaVersion" } @@ -195,7 +195,7 @@ function Build-PHPTable { [PSCustomObject] @{ "Tool" = $_.Tool "Version" = $_.Version - } + } } } @@ -218,52 +218,52 @@ function Get-StackVersion { } function Get-RustVersion { - $rustVersion = $(rustc --version) | Take-Part -Part 1 + $rustVersion = $(rustc --version) | Take-OutputPart -Part 1 return "Rust $rustVersion" } function Get-BindgenVersion { - $bindgenVersion = $(bindgen --version) | Take-Part -Part 1 + $bindgenVersion = $(bindgen --version) | Take-OutputPart -Part 1 return "Bindgen $bindgenVersion" } function Get-CargoVersion { - $cargoVersion = $(cargo --version) | Take-Part -Part 1 + $cargoVersion = $(cargo --version) | Take-OutputPart -Part 1 return "Cargo $cargoVersion" } function Get-CargoAuditVersion { - $cargoAuditVersion = $(cargo audit --version) | Take-Part -Part 1 + $cargoAuditVersion = $(cargo audit --version) | Take-OutputPart -Part 1 return "Cargo audit $cargoAuditVersion" } function Get-CargoOutdatedVersion { - $cargoOutdatedVersion = $(cargo outdated --version) | Take-Part -Part 1 -Delimiter "v" + $cargoOutdatedVersion = $(cargo outdated --version) | Take-OutputPart -Part 1 -Delimiter "v" return "Cargo outdated $cargoOutdatedVersion" } function Get-CargoClippyVersion { - $cargoClippyVersion = $(cargo-clippy --version) | Take-Part -Part 1 + $cargoClippyVersion = $(cargo-clippy --version) | Take-OutputPart -Part 1 return "Cargo clippy $cargoClippyVersion" } function Get-CbindgenVersion { - $cbindgenVersion = $(cbindgen --version) | Take-Part -Part 1 + $cbindgenVersion = $(cbindgen --version) | Take-OutputPart -Part 1 return "Cbindgen $cbindgenVersion" } function Get-RustupVersion { - $rustupVersion = $(rustup --version) | Take-Part -Part 1 + $rustupVersion = $(rustup --version) | Take-OutputPart -Part 1 return "Rustup $rustupVersion" } function Get-RustdocVersion { - $rustdocVersion = $(rustdoc --version) | Take-Part -Part 1 + $rustdocVersion = $(rustdoc --version) | Take-OutputPart -Part 1 return "Rustdoc $rustdocVersion" } function Get-RustfmtVersion { - $rustfmtVersion = $(rustfmt --version) | Take-Part -Part 1 | Take-Part -Part 0 -Delimiter "-" + $rustfmtVersion = $(rustfmt --version) | Take-OutputPart -Part 1 | Take-OutputPart -Part 0 -Delimiter "-" return "Rustfmt $rustfmtVersion" } @@ -271,13 +271,13 @@ function Get-AzModuleVersions { $azModuleVersions = Get-ChildItem /usr/share | Where-Object { $_ -match "az_\d+" } | Foreach-Object { $_.Name.Split("_")[1] } - + $azModuleVersions = $azModuleVersions -join " " return $azModuleVersions } function Get-DotNetCoreSdkVersions { - $unsortedDotNetCoreSdkVersion = dotnet --list-sdks list | ForEach-Object { $_ | Take-Part -Part 0 } + $unsortedDotNetCoreSdkVersion = dotnet --list-sdks list | ForEach-Object { $_ | Take-OutputPart -Part 0 } $dotNetCoreSdkVersion = $unsortedDotNetCoreSdkVersion -join " " return $dotNetCoreSdkVersion } diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Databases.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Databases.psm1 index 6c274184e..e6c14381e 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Databases.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Databases.psm1 @@ -1,19 +1,35 @@ function Get-PostgreSqlVersion { - $postgreSQLVersion = psql --version | Take-Part -Part 2 + $postgreSQLVersion = psql --version | Take-OutputPart -Part 2 return "Postgre SQL $postgreSQLVersion" } function Get-MongoDbVersion { - $mongoDBVersion = mongod --version | Select-Object -First 1 | Take-Part -Part 2 -Delimiter "v" + $mongoDBVersion = mongod --version | Select-Object -First 1 | Take-OutputPart -Part 2 -Delimiter "v" return "MongoDB $mongoDBVersion" } function Get-SqliteVersion { - $sqliteVersion = sqlite3 --version | Take-Part -Part 0 + $sqliteVersion = sqlite3 --version | Take-OutputPart -Part 0 return "sqlite3 $sqliteVersion" } function Get-MySqlVersion { $mySqlVersion = (mysql --version).Split("/usr/bin/")[1] return "MySQL ($mySqlVersion)" +} + +function Build-MySQLSection { + $output = "" + + $output += New-MDHeader "MySQL" -Level 4 + $output += New-MDList -Style Unordered -Lines @( + (Get-MySqlVersion), + "MySQL Server (user:root password:root)", + "MS SQL Server Client Tools" + ) + $output += New-MDCode -Lines @( + "MySQL service is disabled by default. Use the following command as a part of your job to start the service: 'sudo systemctl start mysql.service'" + ) + + return $output } \ No newline at end of file diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 index e63f3719a..6a252f407 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 @@ -195,15 +195,7 @@ $markdown += New-MDList -Style Unordered -Lines @( (Get-SqliteVersion) ) -$markdown += New-MDHeader "MySQL" -Level 4 -$markdown += New-MDList -Style Unordered -Lines @( - (Get-MySqlVersion), - "MySQL Server (user:root password:root)", - "MS SQL Server Client Tools" -) -$markdown += New-MDCode -Lines @( - "MySQL service is disabled by default. Use the following command as a part of your job to start the service: 'sudo systemctl start mysql.service'" -) +$markdown += Build-MySQLSection $markdown += New-MDHeader "Cached Tools" -Level 3 $markdown += Build-CachedToolsSection diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Helpers.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Helpers.psm1 index 6f2701c92..4bad753bd 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Helpers.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Helpers.psm1 @@ -13,7 +13,7 @@ function Get-CommandResult { } } -function Take-Part { +function Take-OutputPart { param ( [Parameter(ValueFromPipeline)] [string] $toolOutput, diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 index f66f2e4fc..05032cfb6 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 @@ -1,85 +1,85 @@ function Get-7zipVersion { - $7zVersion = 7z i | Select-String "7-Zip" | Take-Part -Part 2 + $7zVersion = 7z i | Select-String "7-Zip" | Take-OutputPart -Part 2 return "7-Zip $7zVersion" } function Get-AnsibleVersion { - $ansibleVersion = ansible --version | Select-Object -First 1 | Take-Part -Part 1 + $ansibleVersion = ansible --version | Select-Object -First 1 | Take-OutputPart -Part 1 return "Ansible $ansibleVersion" } function Get-AzCopy7Version { - $azcopy7Version = azcopy --version | Take-Part -Part 1 | Take-Part -Part 0 -Delimiter "-" + $azcopy7Version = azcopy --version | Take-OutputPart -Part 1 | Take-OutputPart -Part 0 -Delimiter "-" return "AzCopy7 (available by azcopy alias) $azcopy7Version" } function Get-AzCopy10Version { - $azcopy10Version = azcopy10 --version | Take-Part -Part 2 + $azcopy10Version = azcopy10 --version | Take-OutputPart -Part 2 return "AzCopy10 (available by azcopy10 alias) $azcopy10Version" } function Get-BazelVersion { - $bazelVersion = bazel --version | Select-String "bazel" | Take-Part -Part 1 + $bazelVersion = bazel --version | Select-String "bazel" | Take-OutputPart -Part 1 return "Bazel $bazelVersion" } function Get-BazeliskVersion { - $bazeliskVersion = bazelisk version 2>&1 | Select-String "Bazelisk version:" | Take-Part -Part 2 | Take-Part -Part 0 -Delimiter "v" + $bazeliskVersion = bazelisk version 2>&1 | Select-String "Bazelisk version:" | Take-OutputPart -Part 2 | Take-OutputPart -Part 0 -Delimiter "v" return "Bazelisk $bazeliskVersion" } function Get-PodManVersion { - $podmanVersion = podman --version | Take-Part -Part 2 + $podmanVersion = podman --version | Take-OutputPart -Part 2 return "Podman $podmanVersion" } function Get-BuildahVersion { - $buildahVersion = buildah --version | Take-Part -Part 2 + $buildahVersion = buildah --version | Take-OutputPart -Part 2 return "Buildah $buildahVersion" } function Get-SkopeoVersion { - $skopeoVersion = skopeo --version | Take-Part -Part 2 + $skopeoVersion = skopeo --version | Take-OutputPart -Part 2 return "Skopeo $skopeoVersion" } function Get-CMakeVersion { - $cmakeVersion = cmake --version | Select-Object -First 1 | Take-Part -Part 2 + $cmakeVersion = cmake --version | Select-Object -First 1 | Take-OutputPart -Part 2 return "CMake $cmakeVersion" } function Get-CurlVersion { - $curlVersion = curl --version | Select-Object -First 1 | Take-Part -Part 0,1 + $curlVersion = curl --version | Select-Object -First 1 | Take-OutputPart -Part 0,1 return $curlVersion } function Get-DockerComposeVersion { - $composeVersion = docker-compose -v | Take-Part -Part 2 | Take-Part -Part 0 -Delimiter "," + $composeVersion = docker-compose -v | Take-OutputPart -Part 2 | Take-OutputPart -Part 0 -Delimiter "," return "Docker Compose $composeVersion" } function Get-DockerMobyVersion { - $dockerVersion = docker -v | Take-Part -Part 2 | Take-Part -Part 0 -Delimiter "+" + $dockerVersion = docker -v | Take-OutputPart -Part 2 | Take-OutputPart -Part 0 -Delimiter "+" return "Docker-Moby $dockerVersion" } function Get-DockerBuildxVersion { - $buildxVersion = docker buildx version | Take-Part -Part 1 | Take-Part -Part 0 -Delimiter "+" + $buildxVersion = docker buildx version | Take-OutputPart -Part 1 | Take-OutputPart -Part 0 -Delimiter "+" return "Docker-Buildx $buildxVersion" } function Get-GitVersion { - $gitVersion = git --version 2>&1 | Take-Part -Part 2 + $gitVersion = git --version 2>&1 | Take-OutputPart -Part 2 return "Git $gitVersion" } function Get-GitLFSVersion { - $gitlfsversion = git-lfs --version 2>&1 | Take-Part -Part 0 | Take-Part -Part 1 -Delimiter "/" + $gitlfsversion = git-lfs --version 2>&1 | Take-OutputPart -Part 0 | Take-OutputPart -Part 1 -Delimiter "/" return "Git LFS $gitlfsversion" } function Get-GitFTPVersion { - $gitftpVersion = git-ftp --version | Take-Part -Part 2 + $gitftpVersion = git-ftp --version | Take-OutputPart -Part 2 return "Git-ftp $gitftpVersion" } @@ -88,57 +88,57 @@ function Get-GoogleCloudSDKVersion { } function Get-HavegedVersion { - $havegedVersion = dpkg-query --showformat='${Version}' --show haveged | Take-Part -Part 0 -Delimiter "-" + $havegedVersion = dpkg-query --showformat='${Version}' --show haveged | Take-OutputPart -Part 0 -Delimiter "-" return "Haveged $havegedVersion" } function Get-HerokuVersion { - $herokuVersion = heroku version | Take-Part -Part 0 | Take-Part -Part 1 -Delimiter "/" + $herokuVersion = heroku version | Take-OutputPart -Part 0 | Take-OutputPart -Part 1 -Delimiter "/" return "Heroku $herokuVersion" } function Get-HHVMVersion { - $hhvmVersion = hhvm --version | Select-Object -First 1 | Take-Part -Part 2 + $hhvmVersion = hhvm --version | Select-Object -First 1 | Take-OutputPart -Part 2 return "HHVM (HipHop VM) $hhvmVersion" } function Get-SVNVersion { - $svnVersion = svn --version | Select-Object -First 1 | Take-Part -Part 2 + $svnVersion = svn --version | Select-Object -First 1 | Take-OutputPart -Part 2 return "SVN $svnVersion" } function Get-KustomizeVersion { - $kustomizeVersion = kustomize version --short | Take-Part -Part 0 | Take-Part -Part 1 -Delimiter "v" + $kustomizeVersion = kustomize version --short | Take-OutputPart -Part 0 | Take-OutputPart -Part 1 -Delimiter "v" return "Kustomize $kustomizeVersion" } function Get-KindVersion { - $kindVersion = kind version | Take-Part -Part 1 | Take-Part -Part 0 -Delimiter "v" + $kindVersion = kind version | Take-OutputPart -Part 1 | Take-OutputPart -Part 0 -Delimiter "v" return "Kind $kindVersion" } function Get-KubectlVersion { - $kubectlVersion = kubectl version --client --short | Take-Part -Part 2 | Take-Part -Part 0 -Delimiter "v" + $kubectlVersion = kubectl version --client --short | Take-OutputPart -Part 2 | Take-OutputPart -Part 0 -Delimiter "v" return "Kubectl $kubectlVersion" } function Get-MinikubeVersion { - $minikubeVersion = minikube version --short | Take-Part -Part 2 | Take-Part -Part 0 -Delimiter "v" + $minikubeVersion = minikube version --short | Take-OutputPart -Part 2 | Take-OutputPart -Part 0 -Delimiter "v" return "Minikube $minikubeVersion" } function Get-HGVersion { - $hgVersion = hg --version | Select-Object -First 1 | Take-Part -Part -1 | Take-Part -Part 0 -Delimiter ")" + $hgVersion = hg --version | Select-Object -First 1 | Take-OutputPart -Part -1 | Take-OutputPart -Part 0 -Delimiter ")" return "Mercurial $hgVersion" } function Get-M4Version { - $m4Version = m4 --version | Select-Object -First 1 | Take-Part -Part -1 + $m4Version = m4 --version | Select-Object -First 1 | Take-OutputPart -Part -1 return "m4 $m4Version" } function Get-LeiningenVersion { - return "$(lein -v | Take-Part -Part 0,1)" + return "$(lein -v | Take-OutputPart -Part 0,1)" } function Get-NewmanVersion { @@ -159,7 +159,7 @@ function Get-PhantomJSVersion { } function Get-SwigVersion { - $swigVersion = swig -version | Select-String "SWIG Version" | Take-Part -Part 2 + $swigVersion = swig -version | Select-String "SWIG Version" | Take-OutputPart -Part 2 return "Swig $swigVersion" } @@ -168,17 +168,17 @@ function Get-TerraformVersion { } function Get-UnZipVersion { - $unzipVersion = unzip -v | Select-Object -First 1 | Take-Part -Part 1 + $unzipVersion = unzip -v | Select-Object -First 1 | Take-OutputPart -Part 1 return "unzip $unzipVersion" } function Get-WgetVersion { - $wgetVersion = wget --version | Select-Object -First 1 | Take-Part -Part 2 + $wgetVersion = wget --version | Select-Object -First 1 | Take-OutputPart -Part 2 return "wget $wgetVersion" } function Get-ZipVersion { - $zipVersion = zip -v | Select-String "This is Zip" | Take-Part -Part 3 + $zipVersion = zip -v | Select-String "This is Zip" | Take-OutputPart -Part 3 return "zip $zipVersion" } @@ -188,17 +188,17 @@ function Get-ZstdVersion { } function Get-JqVersion { - $jqVersion = jq --version | Take-Part -Part 1 -Delimiter "-" + $jqVersion = jq --version | Take-OutputPart -Part 1 -Delimiter "-" return "jq $jqVersion" } function Get-AzureCliVersion { - $azcliVersion = az -v | Select-String "azure-cli" | Take-Part -Part -1 + $azcliVersion = az -v | Select-String "azure-cli" | Take-OutputPart -Part -1 return "Azure CLI (azure-cli) $azcliVersion" } function Get-AzureDevopsVersion { - $azdevopsVersion = az -v | Select-String "azure-devops" | Take-Part -Part -1 + $azdevopsVersion = az -v | Select-String "azure-devops" | Take-OutputPart -Part -1 return "Azure CLI (azure-devops) $azdevopsVersion" } @@ -207,7 +207,7 @@ function Get-AlibabaCloudCliVersion { } function Get-AWSCliVersion { - $awsVersion = aws --version 2>&1 | Take-Part -Part 0 | Take-Part -Part 1 -Delimiter "/" + $awsVersion = aws --version 2>&1 | Take-OutputPart -Part 0 | Take-OutputPart -Part 1 -Delimiter "/" return "AWS CLI $awsVersion" } @@ -216,31 +216,31 @@ function Get-AWSCliSessionManagerPluginVersion { } function Get-AWSSAMVersion { - return "AWS SAM CLI $(sam --version | Take-Part -Part -1)" + return "AWS SAM CLI $(sam --version | Take-OutputPart -Part -1)" } function Get-HubCliVersion { - $hubVersion = hub --version | Select-String "hub version" | Take-Part -Part 2 + $hubVersion = hub --version | Select-String "hub version" | Take-OutputPart -Part 2 return "Hub CLI $hubVersion" } function Get-GitHubCliVersion { - $ghVersion = gh --version | Select-String "gh version" | Take-Part -Part 2 + $ghVersion = gh --version | Select-String "gh version" | Take-OutputPart -Part 2 return "GitHub CLI $ghVersion" } function Get-NetlifyCliVersion { - $netlifyVersion = netlify --version | Take-Part -Part 0 | Take-Part -Part 1 -Delimiter "/" + $netlifyVersion = netlify --version | Take-OutputPart -Part 0 | Take-OutputPart -Part 1 -Delimiter "/" return "Netlify CLI $netlifyVersion" } function Get-OCCliVersion { - $ocVersion = oc version | Take-Part -Part 2 | Take-Part -Part 0 -Delimiter "-" + $ocVersion = oc version | Take-OutputPart -Part 2 | Take-OutputPart -Part 0 -Delimiter "-" return "oc CLI $ocVersion" } function Get-ORASCliVersion { - $orasVersion = oras version | Select-String "^Version:" | Take-Part -Part 1 + $orasVersion = oras version | Select-String "^Version:" | Take-OutputPart -Part 1 return "ORAS CLI $orasVersion" } From c8633ce4c48e0e5bbd42423ce1e3447010c3bda3 Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Mon, 14 Sep 2020 12:31:15 +0400 Subject: [PATCH 26/55] SSDTExtensions.Tests.ps1 has been reverted --- .../scripts/Tests/SSDTExtensions.Tests.ps1 | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 images/win/scripts/Tests/SSDTExtensions.Tests.ps1 diff --git a/images/win/scripts/Tests/SSDTExtensions.Tests.ps1 b/images/win/scripts/Tests/SSDTExtensions.Tests.ps1 new file mode 100644 index 000000000..7d1c6ee0b --- /dev/null +++ b/images/win/scripts/Tests/SSDTExtensions.Tests.ps1 @@ -0,0 +1,21 @@ +Describe "SSDTExtensions" { +#These extensions don't have any proper name in the state.packages.json file, only id is available, which can be found on extension marketplace download page + + if (Test-isWin19) { + $testExtenions = @( + @{id = "04a86fc2-dbd5-4222-848e-911638e487fe"} + @{id = "851E7A09-7B2B-4F06-A15D-BABFCB26B970"} + @{id = "717ad572-c4b7-435c-c166-c2969777f718"} + ) + + It "Extensions id=" -TestCases $testExtenions { + $version = Get-VSExtensionVersion -packageName "${id}" + $version | Should -Not -BeNullOrEmpty + } + } else { + It "Extension SSDT" { + $version = Get-VSExtensionVersion -packageName "SSDT" + $version | Should -Not -BeNullOrEmpty + } + } +} From 3e90bb832a481b3ef1539a1d2b8238f9af78acce Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov Date: Mon, 14 Sep 2020 11:31:41 +0300 Subject: [PATCH 27/55] fix environment variable --- .../scripts/SoftwareReport/SoftwareReport.Databases.psm1 | 4 ++-- .../scripts/SoftwareReport/SoftwareReport.Generator.ps1 | 4 ++-- images/linux/ubuntu1604.json | 5 +++-- images/linux/ubuntu1804.json | 5 +++-- images/linux/ubuntu2004.json | 5 +++-- 5 files changed, 13 insertions(+), 10 deletions(-) diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Databases.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Databases.psm1 index e6c14381e..7c1605ccc 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Databases.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Databases.psm1 @@ -13,7 +13,7 @@ function Get-SqliteVersion { return "sqlite3 $sqliteVersion" } -function Get-MySqlVersion { +function Get-MySQLVersion { $mySqlVersion = (mysql --version).Split("/usr/bin/")[1] return "MySQL ($mySqlVersion)" } @@ -23,7 +23,7 @@ function Build-MySQLSection { $output += New-MDHeader "MySQL" -Level 4 $output += New-MDList -Style Unordered -Lines @( - (Get-MySqlVersion), + (Get-MySQLVersion ), "MySQL Server (user:root password:root)", "MS SQL Server Client Tools" ) diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 index 6a252f407..ac23a6deb 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 @@ -4,7 +4,7 @@ param ( ) # Install MarkdownPS module for software report generation -Install-Module MarkdownPS -Force -Scope CurrentUser +Install-Module MarkdownPS -Force Import-Module MarkdownPS Import-Module (Join-Path $PSScriptRoot "SoftwareReport.CachedTools.psm1") -DisableNameChecking Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Common.psm1") -DisableNameChecking @@ -28,7 +28,7 @@ $OSName = Get-OSName $markdown += New-MDHeader "$OSName" -Level 1 $markdown += New-MDList -Style Unordered -Lines @( - "Image Version: $env:ImageVersion" + "Image Version: $env:IMAGE_VERSION" ) $markdown += New-MDHeader "Installed Software" -Level 2 diff --git a/images/linux/ubuntu1604.json b/images/linux/ubuntu1604.json index 7ef3122a6..7d180a0a4 100644 --- a/images/linux/ubuntu1604.json +++ b/images/linux/ubuntu1604.json @@ -293,11 +293,12 @@ "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" }, { - "type": "powershell", + "type": "shell", "inline": [ - "pwsh -File '{{user `image_folder`}}/SoftwareReport/SoftwareReport.Generator.ps1' -OutputDirectory '{{user `image_folder`}}'" + "sudo pwsh -File {{user `image_folder`}}/SoftwareReport/SoftwareReport.Generator.ps1 -OutputDirectory {{user `image_folder`}}" ], "environment_vars":[ + "IMAGE_VERSION={{user `image_version`}}", "INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}", "ANNOUNCEMENTS={{user `announcements`}}" ] diff --git a/images/linux/ubuntu1804.json b/images/linux/ubuntu1804.json index 5f280636d..c5265b9fa 100644 --- a/images/linux/ubuntu1804.json +++ b/images/linux/ubuntu1804.json @@ -297,11 +297,12 @@ "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" }, { - "type": "powershell", + "type": "shell", "inline": [ - "pwsh -File '{{user `image_folder`}}/SoftwareReport/SoftwareReport.Generator.ps1' -OutputDirectory '{{user `image_folder`}}'" + "sudo pwsh -File {{user `image_folder`}}/SoftwareReport/SoftwareReport.Generator.ps1 -OutputDirectory {{user `image_folder`}}" ], "environment_vars":[ + "IMAGE_VERSION={{user `image_version`}}", "INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}", "ANNOUNCEMENTS={{user `announcements`}}" ] diff --git a/images/linux/ubuntu2004.json b/images/linux/ubuntu2004.json index 604b863a2..eccace5ff 100644 --- a/images/linux/ubuntu2004.json +++ b/images/linux/ubuntu2004.json @@ -299,11 +299,12 @@ "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" }, { - "type": "powershell", + "type": "shell", "inline": [ - "pwsh -File '{{user `image_folder`}}/SoftwareReport/SoftwareReport.Generator.ps1' -OutputDirectory '{{user `image_folder`}}'" + "sudo pwsh -File {{user `image_folder`}}/SoftwareReport/SoftwareReport.Generator.ps1 -OutputDirectory {{user `image_folder`}}" ], "environment_vars":[ + "IMAGE_VERSION={{user `image_version`}}", "INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}", "ANNOUNCEMENTS={{user `announcements`}}" ] From d3956d48eb72ab93131f2366299852ff41397595 Mon Sep 17 00:00:00 2001 From: Image generation service account Date: Mon, 14 Sep 2020 09:35:05 +0000 Subject: [PATCH 28/55] Updating readme file for win16 version 20200913.0 --- images/win/Windows2016-Readme.md | 93 ++++++++++++++++---------------- 1 file changed, 47 insertions(+), 46 deletions(-) diff --git a/images/win/Windows2016-Readme.md b/images/win/Windows2016-Readme.md index 67117884d..c7bffc4fc 100644 --- a/images/win/Windows2016-Readme.md +++ b/images/win/Windows2016-Readme.md @@ -1,10 +1,10 @@ | Announcements | |-| -| [Replace SVN (1.8.17) by TortoiseSVN (1.14.x) on Windows images](https://github.com/actions/virtual-environments/issues/1318) | +| [[In Discussion] Git internal tools will be removed from PATH Windows images](https://github.com/actions/virtual-environments/issues/1525) | *** # Microsoft Windows Server 2016 Datacenter -- OS Version: 10.0.14393 Build 3866 -- Image Version: 20200827.1 +- OS Version: 10.0.14393 Build 3930 +- Image Version: 20200913.0 ## Installed Software ### Language and Runtime @@ -14,26 +14,26 @@ - Java 13.0.2 - Python 3.7.9 - Ruby 2.5.8p224 -- Go 1.14.7 +- Go 1.14.9 - PHP 7.4.9 - Julia 1.5.1 -- Perl 5.30.3 +- Perl 5.32.0 - Node 12.18.3 ### Package Management - Chocolatey 0.10.15 - Vcpkg 2020.06.15 - NPM 6.14.6 -- Yarn 1.22.4 -- pip 20.2.2 (python 3.7) +- Yarn 1.22.5 +- pip 20.2.3 (python 3.7) - Miniconda 4.6.14 - RubyGems 3.1.4 -- Helm 3.3.0 -- Composer 1.10.10 +- Helm 3.3.1 +- Composer 1.10.13 - NuGet 5.7.0.6726 ### Project Management -- Ant 1.10.5 +- Ant 1.10.8 - Maven 3.6.3 - Gradle 6.6 - sbt 1.3.13 @@ -41,7 +41,7 @@ ### Tools - Azure CosmosDb Emulator 2.11.5.0 - azcopy 10.6.0 -- Bazel 3.4.1 +- Bazel 3.5.0 - Bazelisk 1.6.1 - CMake 3.18.2 - R 4.0.2 @@ -49,18 +49,19 @@ - Docker-compose 1.26.2 - Git 2.28.0 - Git LFS 2.11.0 -- Google Cloud SDK 307.0.0 +- Google Cloud SDK 309.0.0 - InnoSetup 6.0.5 - jq 1.6 -- Kubectl 1.18.8 +- Kubectl 1.19.1 - Kind 0.8.1 - Mingw-w64 8.1.0 - MySQL 5.7.21.0 - Mercurial 5.0 - NSIS v3.06.1 -- Newman 5.1.2 +- Newman 5.2.0 - OpenSSL 1.1.1 -- Packer 1.6.1 +- Packer 1.6.2 +- Pulumi v2.10.0 - SQLPS 1.0 - SQLServer PS 21.1.18226 - Subversion (SVN) 1.14.0 @@ -68,24 +69,24 @@ - Cabal 3.2.0.0 - Stack 2.3.3 - WinAppDriver 1.1.1809.18001 -- zstd 1.4.0 +- zstd 1.4.5 - VSWhere 2.8.4 - 7zip 19.00 - yamllint 1.24.2 ### CLI Tools -- Azure CLI 2.11.0 +- Azure CLI 2.11.1 - Azure DevOps CLI extension 0.18.0 -- AWS CLI 2.0.43 -- AWS SAM CLI 1.1.0 +- AWS CLI 2.0.48 +- AWS SAM CLI 1.2.0 - AWS Session Manager CLI 1.1.61.0 - Alibaba Cloud CLI 3.0.56 - Cloud Foundry CLI 6.52.0 - Hub CLI 2.14.2 -- GitHub CLI gh version 0.11.1 (2020-07-28) https://github.com/cli/cli/releases/tag/v0.11.1 +- GitHub CLI 0.12.0 ### Rust Tools -- Rust 1.45.2 +- Rust 1.46.0 #### Packages - bindgen 0.55.1 @@ -94,11 +95,11 @@ - cargo-outdated v0.9.11 ### Browsers and webdrivers -- Google Chrome 85.0.4183.83 -- Chrome Driver 85.0.4183.83 -- Microsoft Edge 84.0.522.63 -- Microsoft Edge Driver 84.0.522.63 -- Mozilla Firefox 80.0 +- Google Chrome 85.0.4183.102 +- Chrome Driver 85.0.4183.87 +- Microsoft Edge 85.0.564.51 +- Microsoft Edge Driver 85.0.564.51 +- Mozilla Firefox 80.0.1 - Gecko Driver 0.27.0 - IE Driver 3.150.1.0 @@ -138,8 +139,8 @@ Note: MSYS2 is pre-installed on image but not added to PATH. | 1.11.13 | x64 | GOROOT_1_11_X64 | | 1.12.17 | x64 | GOROOT_1_12_X64 | | 1.13.15 | x64 | GOROOT_1_13_X64 | -| 1.14.7 (Default) | x64 | GOROOT_1_14_X64 | -| 1.15.0 | x64 | GOROOT_1_15_X64 | +| 1.14.9 (Default) | x64 | GOROOT_1_14_X64 | +| 1.15.2 | x64 | GOROOT_1_15_X64 | #### Node @@ -148,7 +149,7 @@ Note: MSYS2 is pre-installed on image but not added to PATH. | 8.17.0 | x64 | | 10.22.0 | x64 | | 12.18.3 | x64 | -| 14.8.0 | x64 | +| 14.10.1 | x64 | #### Python @@ -173,8 +174,8 @@ Note: MSYS2 is pre-installed on image but not added to PATH. #### PyPy | Python Version | Architecture | PyPy Version | | -------------- | ------------ | ------------ | -| 2.7.13 | x86 | PyPy 7.3.1 with MSC v.1912 32 bit | -| 3.6.9 | x86 | PyPy 7.3.1 with MSC v.1912 32 bit | +| 2.7.13 | x86 | PyPy 7.3.2 with MSC v.1927 32 bit | +| 3.6.9 | x86 | PyPy 7.3.2 with MSC v.1927 32 bit | @@ -195,14 +196,14 @@ Note: MSYS2 is pre-installed on image but not added to PATH. #### MongoDB | Version | ServiceName | ServiceStatus | ServiceStartType | | ------- | ----------- | ------------- | ---------------- | -| 4.4.0.0 | MongoDB | Running | Automatic | +| 4.4.1.0 | MongoDB | Running | Automatic | ### Visual Studio Enterprise 2017 | Name | Version | Path | | ----------------------------- | --------------- | -------------------------------------------------------------- | -| Visual Studio Enterprise 2017 | 15.9.28307.1234 | C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise | +| Visual Studio Enterprise 2017 | 15.9.28307.1259 | C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise | #### Workloads, components and extensions: @@ -277,9 +278,9 @@ Note: MSYS2 is pre-installed on image but not added to PATH. | Microsoft.Net.ComponentGroup.4.7.DeveloperTools | 15.6.27406.0 | | Microsoft.Net.ComponentGroup.DevelopmentPrerequisites | 15.8.27825.0 | | Microsoft.Net.ComponentGroup.TargetingPacks.Common | 15.6.27406.0 | -| Microsoft.Net.Core.Component.SDK.1x | 15.9.28307.1209 | +| Microsoft.Net.Core.Component.SDK.1x | 15.9.28307.1259 | | Microsoft.Net.Core.Component.SDK.2.1 | 15.8.27924.0 | -| Microsoft.NetCore.1x.ComponentGroup.Web | 15.9.28307.1209 | +| Microsoft.NetCore.1x.ComponentGroup.Web | 15.9.28307.1259 | | Microsoft.NetCore.ComponentGroup.DevelopmentTools.2.1 | 15.8.27924.0 | | Microsoft.NetCore.ComponentGroup.Web.2.1 | 15.8.27924.0 | | Microsoft.VisualStudio.Component.AppInsights.Tools | 15.8.27825.0 | @@ -471,20 +472,20 @@ Note: MSYS2 is pre-installed on image but not added to PATH. ### .NET Core SDK `Location C:\Program Files\dotnet\sdk` -- 1.1.14 2.1.300 2.1.301 2.1.302 2.1.401 2.1.402 2.1.403 2.1.500 2.1.502 2.1.503 2.1.504 2.1.505 2.1.506 2.1.507 2.1.508 2.1.509 2.1.510 2.1.511 2.1.512 2.1.513 2.1.514 2.1.515 2.1.516 2.1.517 2.1.602 2.1.603 2.1.604 2.1.605 2.1.606 2.1.607 2.1.608 2.1.609 2.1.610 2.1.611 2.1.612 2.1.613 2.1.614 2.1.700 2.1.701 2.1.801 2.1.802 2.1.803 2.1.804 2.1.805 2.1.806 2.1.807 2.1.808 2.1.809 3.1.100 3.1.101 3.1.102 3.1.103 3.1.104 3.1.105 3.1.106 3.1.107 3.1.200 3.1.201 3.1.202 3.1.300 3.1.301 3.1.302 3.1.401 +- 1.1.14 2.1.300 2.1.301 2.1.302 2.1.401 2.1.402 2.1.403 2.1.500 2.1.502 2.1.503 2.1.504 2.1.505 2.1.506 2.1.507 2.1.508 2.1.509 2.1.510 2.1.511 2.1.512 2.1.513 2.1.514 2.1.515 2.1.516 2.1.517 2.1.518 2.1.602 2.1.603 2.1.604 2.1.605 2.1.606 2.1.607 2.1.608 2.1.609 2.1.610 2.1.611 2.1.612 2.1.613 2.1.614 2.1.615 2.1.700 2.1.701 2.1.801 2.1.802 2.1.803 2.1.804 2.1.805 2.1.806 2.1.807 2.1.808 2.1.809 2.1.810 3.1.100 3.1.101 3.1.102 3.1.103 3.1.104 3.1.105 3.1.106 3.1.107 3.1.108 3.1.200 3.1.201 3.1.202 3.1.300 3.1.301 3.1.302 3.1.401 3.1.402 ### .NET Core Runtime `Location: C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All` -- 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.16 2.1.17 2.1.18 2.1.19 2.1.20 2.1.21 +- 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.16 2.1.17 2.1.18 2.1.19 2.1.20 2.1.21 2.1.22 `Location: C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App` -- 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.16 2.1.17 2.1.18 2.1.19 2.1.20 2.1.21 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 +- 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.16 2.1.17 2.1.18 2.1.19 2.1.20 2.1.21 2.1.22 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 `Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.App` -- 1.0.16 1.1.13 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.16 2.1.17 2.1.18 2.1.19 2.1.20 2.1.21 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 +- 1.0.16 1.1.13 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.16 2.1.17 2.1.18 2.1.19 2.1.20 2.1.21 2.1.22 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 `Location: C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App` -- 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 +- 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 ### .NET Framework `Type: Developer Pack` @@ -495,11 +496,11 @@ Note: MSYS2 is pre-installed on image but not added to PATH. - PowerShell 7.0.3 #### Azure Powershell Modules -| Module | Version | Path | -| ------- | ----------------------------------------------------------------------------- | ------------------------------ | -| Az | 1.0.0
1.6.0
2.3.2
2.6.0
3.1.0
3.5.0
3.8.0
4.3.0
4.4.0 | C:\Modules\az_\ | -| Azure | 2.1.0 [Installed]
3.8.0
4.2.1
5.1.1
5.3.0 | C:\Modules\azure_\ | -| AzureRM | 2.1.0 [Installed]
3.8.0
4.2.1
5.1.1
6.7.0
6.13.1 | C:\Modules\azurerm_\ | +| Module | Version | Path | +| ------- | -------------------------------------------------------------------------------------- | ------------------------------ | +| Az | 1.0.0
1.6.0
2.3.2
2.6.0
3.1.0
3.5.0
3.8.0
4.3.0
4.4.0
4.6.0 | C:\Modules\az_\ | +| Azure | 2.1.0 [Installed]
3.8.0
4.2.1
5.1.1
5.3.0 | C:\Modules\azure_\ | +| AzureRM | 2.1.0 [Installed]
3.8.0
4.2.1
5.1.1
6.7.0
6.13.1 | C:\Modules\azurerm_\ | ``` Azure PowerShell module 2.1.0 and AzureRM PowerShell module 2.1.0 are installed and are available via 'Get-Module -ListAvailable'. @@ -510,7 +511,7 @@ All other versions are saved but not installed. | ------------------ | ------------------ | | DockerMsftProvider | 1.0.0.8 | | MarkdownPS | 1.9 | -| Pester | 3.4.0
5.0.3 | +| Pester | 3.4.0
5.0.4 | | PowerShellGet | 1.0.0.1
2.2.4.1 | | PSWindowsUpdate | 2.2.0.2 | | SqlServer | 21.1.18226 | From 1df53d8a67ae7c39e495401d7fc6bb9a81bcba73 Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Mon, 14 Sep 2020 15:33:51 +0400 Subject: [PATCH 29/55] "buildtools_workloads" section has been removed --- images/win/toolsets/toolset-2016.json | 3 --- images/win/toolsets/toolset-2019.json | 3 --- 2 files changed, 6 deletions(-) diff --git a/images/win/toolsets/toolset-2016.json b/images/win/toolsets/toolset-2016.json index d9e1ca471..c764e0802 100644 --- a/images/win/toolsets/toolset-2016.json +++ b/images/win/toolsets/toolset-2016.json @@ -229,9 +229,6 @@ "Microsoft.VisualStudio.Workload.Office" ], "vsix": [ - ], - "buildtools_workloads": [ - "Microsoft.VisualStudio.Workload.WebBuildTools" ] } } diff --git a/images/win/toolsets/toolset-2019.json b/images/win/toolsets/toolset-2019.json index 45fd78ea3..7184dc037 100644 --- a/images/win/toolsets/toolset-2019.json +++ b/images/win/toolsets/toolset-2019.json @@ -281,9 +281,6 @@ "url": "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/VisualStudioClient/vsextensions/MicrosoftVisualStudio2017InstallerProjects/latest/vspackage", "id": "VSInstallerProjects" } - ], - "buildtools_workloads": [ - "Microsoft.VisualStudio.Workload.WebBuildTools" ] } } From e7a8e6a597779e21fb24f5032fa2645285f9ec1a Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov Date: Mon, 14 Sep 2020 16:25:33 +0300 Subject: [PATCH 30/55] install powershell modules --- .../SoftwareReport.Databases.psm1 | 4 +-- .../installers/Install-PowerShellModules.ps1 | 31 +++++++++++++++++++ images/linux/toolsets/toolset-1604.json | 4 +++ images/linux/toolsets/toolset-1804.json | 4 +++ images/linux/toolsets/toolset-2004.json | 4 +++ images/linux/ubuntu1604.json | 12 ++++++- images/linux/ubuntu1804.json | 12 ++++++- images/linux/ubuntu2004.json | 12 ++++++- 8 files changed, 78 insertions(+), 5 deletions(-) create mode 100644 images/linux/scripts/installers/Install-PowerShellModules.ps1 diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Databases.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Databases.psm1 index 7c1605ccc..47f04de24 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Databases.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Databases.psm1 @@ -14,8 +14,8 @@ function Get-SqliteVersion { } function Get-MySQLVersion { - $mySqlVersion = (mysql --version).Split("/usr/bin/")[1] - return "MySQL ($mySqlVersion)" + $mySQLVersion = mysqld --version | Take-OutputPart -Part 2 | Take-OutputPart -Part 0 -Delimiter "-" + return "MySQL ($mySQLVersion)" } function Build-MySQLSection { diff --git a/images/linux/scripts/installers/Install-PowerShellModules.ps1 b/images/linux/scripts/installers/Install-PowerShellModules.ps1 new file mode 100644 index 000000000..ed100e3c4 --- /dev/null +++ b/images/linux/scripts/installers/Install-PowerShellModules.ps1 @@ -0,0 +1,31 @@ +$ErrorActionPreference = "Stop" + +function Get-ToolsetContent +{ + $toolset = Join-Path $env:INSTALLER_SCRIPT_FOLDER "toolset.json" + Get-Content $toolset -Raw | ConvertFrom-Json +} + +# Specifies the installation policy +Set-PSRepository -InstallationPolicy Trusted -Name PSGallery + +# Install PowerShell modules +$modules = (Get-ToolsetContent).powershellModules + +foreach($module in $modules) +{ + $moduleName = $module.name + Write-Host "Installing ${moduleName} module" + + if ($module.versions) + { + foreach ($version in $module.versions) + { + Write-Host " - $version" + Install-Module -Name $moduleName -RequiredVersion $version -Scope AllUsers -SkipPublisherCheck -Force + } + continue + } + + Install-Module -Name $moduleName -Scope AllUsers -SkipPublisherCheck -Force +} diff --git a/images/linux/toolsets/toolset-1604.json b/images/linux/toolsets/toolset-1604.json index 1204f2a86..c8b2b1510 100644 --- a/images/linux/toolsets/toolset-1604.json +++ b/images/linux/toolsets/toolset-1604.json @@ -91,6 +91,10 @@ "platform-tools" ] }, + "powershellModules": [ + {"name": "MarkdownPS"}, + {"name": "Pester"} + ], "azureModules": [ { "name": "az", diff --git a/images/linux/toolsets/toolset-1804.json b/images/linux/toolsets/toolset-1804.json index 2c399c8fc..6311cc1a1 100644 --- a/images/linux/toolsets/toolset-1804.json +++ b/images/linux/toolsets/toolset-1804.json @@ -87,6 +87,10 @@ "platform-tools" ] }, + "powershellModules": [ + {"name": "MarkdownPS"}, + {"name": "Pester"} + ], "azureModules": [ { "name": "az", diff --git a/images/linux/toolsets/toolset-2004.json b/images/linux/toolsets/toolset-2004.json index 1162b713f..5ac230255 100644 --- a/images/linux/toolsets/toolset-2004.json +++ b/images/linux/toolsets/toolset-2004.json @@ -68,6 +68,10 @@ "platform-tools" ] }, + "powershellModules": [ + {"name": "MarkdownPS"}, + {"name": "Pester"} + ], "apt": { "common_packages": [ "dbus", diff --git a/images/linux/ubuntu1604.json b/images/linux/ubuntu1604.json index 7d180a0a4..27cc6b0bd 100644 --- a/images/linux/ubuntu1604.json +++ b/images/linux/ubuntu1604.json @@ -292,10 +292,20 @@ ], "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" }, + { + "type": "shell", + "scripts":[ + "{{template_dir}}/scripts/installers/Install-PowerShellModules.ps1" + ], + "environment_vars": [ + "INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}" + ], + "execute_command": "sudo sh -c '{{ .Vars }} pwsh -f {{ .Path }}'" + }, { "type": "shell", "inline": [ - "sudo pwsh -File {{user `image_folder`}}/SoftwareReport/SoftwareReport.Generator.ps1 -OutputDirectory {{user `image_folder`}}" + "pwsh -File {{user `image_folder`}}/SoftwareReport/SoftwareReport.Generator.ps1 -OutputDirectory {{user `image_folder`}}" ], "environment_vars":[ "IMAGE_VERSION={{user `image_version`}}", diff --git a/images/linux/ubuntu1804.json b/images/linux/ubuntu1804.json index c5265b9fa..05f4a2691 100644 --- a/images/linux/ubuntu1804.json +++ b/images/linux/ubuntu1804.json @@ -296,10 +296,20 @@ ], "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" }, + { + "type": "shell", + "scripts":[ + "{{template_dir}}/scripts/installers/Install-PowerShellModules.ps1" + ], + "environment_vars": [ + "INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}" + ], + "execute_command": "sudo sh -c '{{ .Vars }} pwsh -f {{ .Path }}'" + }, { "type": "shell", "inline": [ - "sudo pwsh -File {{user `image_folder`}}/SoftwareReport/SoftwareReport.Generator.ps1 -OutputDirectory {{user `image_folder`}}" + "pwsh -File {{user `image_folder`}}/SoftwareReport/SoftwareReport.Generator.ps1 -OutputDirectory {{user `image_folder`}}" ], "environment_vars":[ "IMAGE_VERSION={{user `image_version`}}", diff --git a/images/linux/ubuntu2004.json b/images/linux/ubuntu2004.json index eccace5ff..4a4ff5c5f 100644 --- a/images/linux/ubuntu2004.json +++ b/images/linux/ubuntu2004.json @@ -298,10 +298,20 @@ ], "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" }, + { + "type": "shell", + "scripts":[ + "{{template_dir}}/scripts/installers/Install-PowerShellModules.ps1" + ], + "environment_vars": [ + "INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}" + ], + "execute_command": "sudo sh -c '{{ .Vars }} pwsh -f {{ .Path }}'" + }, { "type": "shell", "inline": [ - "sudo pwsh -File {{user `image_folder`}}/SoftwareReport/SoftwareReport.Generator.ps1 -OutputDirectory {{user `image_folder`}}" + "pwsh -File {{user `image_folder`}}/SoftwareReport/SoftwareReport.Generator.ps1 -OutputDirectory {{user `image_folder`}}" ], "environment_vars":[ "IMAGE_VERSION={{user `image_version`}}", From 8d517bf1884b2ae8b6f7b024c0363e8a7f2e8c4d Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov Date: Mon, 14 Sep 2020 16:27:20 +0300 Subject: [PATCH 31/55] remove () --- .../linux/scripts/SoftwareReport/SoftwareReport.Databases.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Databases.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Databases.psm1 index 47f04de24..973257b10 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Databases.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Databases.psm1 @@ -15,7 +15,7 @@ function Get-SqliteVersion { function Get-MySQLVersion { $mySQLVersion = mysqld --version | Take-OutputPart -Part 2 | Take-OutputPart -Part 0 -Delimiter "-" - return "MySQL ($mySQLVersion)" + return "MySQL $mySQLVersion" } function Build-MySQLSection { From bcca2214d94907e77af8276d1dc09b8ec76320e5 Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov Date: Mon, 14 Sep 2020 16:39:49 +0300 Subject: [PATCH 32/55] remove module MarkdownPS installation --- .../linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 | 2 -- 1 file changed, 2 deletions(-) diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 index ac23a6deb..1cd951f3a 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 @@ -3,8 +3,6 @@ param ( $OutputDirectory ) -# Install MarkdownPS module for software report generation -Install-Module MarkdownPS -Force Import-Module MarkdownPS Import-Module (Join-Path $PSScriptRoot "SoftwareReport.CachedTools.psm1") -DisableNameChecking Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Common.psm1") -DisableNameChecking From 6ed38287599a3bfbcae4e50f8988c75ece2a0517 Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov Date: Mon, 14 Sep 2020 21:47:31 +0300 Subject: [PATCH 33/55] fix azcopy and rust --- .../SoftwareReport/SoftwareReport.Common.psm1 | 50 ----------------- .../SoftwareReport.Generator.ps1 | 11 ++-- .../SoftwareReport.Helpers.psm1 | 3 +- .../SoftwareReport/SoftwareReport.Rust.psm1 | 54 +++++++++++++++++++ .../SoftwareReport/SoftwareReport.Tools.psm1 | 18 +++---- images/linux/scripts/installers/azcopy.sh | 1 + 6 files changed, 71 insertions(+), 66 deletions(-) create mode 100644 images/linux/scripts/SoftwareReport/SoftwareReport.Rust.psm1 diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 index 5fafca0f1..64c828424 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 @@ -217,56 +217,6 @@ function Get-StackVersion { return "Stack $stackVersion" } -function Get-RustVersion { - $rustVersion = $(rustc --version) | Take-OutputPart -Part 1 - return "Rust $rustVersion" -} - -function Get-BindgenVersion { - $bindgenVersion = $(bindgen --version) | Take-OutputPart -Part 1 - return "Bindgen $bindgenVersion" -} - -function Get-CargoVersion { - $cargoVersion = $(cargo --version) | Take-OutputPart -Part 1 - return "Cargo $cargoVersion" -} - -function Get-CargoAuditVersion { - $cargoAuditVersion = $(cargo audit --version) | Take-OutputPart -Part 1 - return "Cargo audit $cargoAuditVersion" -} - -function Get-CargoOutdatedVersion { - $cargoOutdatedVersion = $(cargo outdated --version) | Take-OutputPart -Part 1 -Delimiter "v" - return "Cargo outdated $cargoOutdatedVersion" -} - -function Get-CargoClippyVersion { - $cargoClippyVersion = $(cargo-clippy --version) | Take-OutputPart -Part 1 - return "Cargo clippy $cargoClippyVersion" -} - -function Get-CbindgenVersion { - $cbindgenVersion = $(cbindgen --version) | Take-OutputPart -Part 1 - return "Cbindgen $cbindgenVersion" -} - -function Get-RustupVersion { - $rustupVersion = $(rustup --version) | Take-OutputPart -Part 1 - return "Rustup $rustupVersion" -} - -function Get-RustdocVersion { - $rustdocVersion = $(rustdoc --version) | Take-OutputPart -Part 1 - return "Rustdoc $rustdocVersion" -} - -function Get-RustfmtVersion { - $rustfmtVersion = $(rustfmt --version) | Take-OutputPart -Part 1 | Take-OutputPart -Part 0 -Delimiter "-" - return "Rustfmt $rustfmtVersion" -} - function Get-AzModuleVersions { $azModuleVersions = Get-ChildItem /usr/share | Where-Object { $_ -match "az_\d+" } | Foreach-Object { $_.Name.Split("_")[1] diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 index 1cd951f3a..e0acc6bde 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 @@ -4,14 +4,15 @@ param ( ) Import-Module MarkdownPS +Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Android.psm1") -DisableNameChecking +Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Browsers.psm1") -DisableNameChecking Import-Module (Join-Path $PSScriptRoot "SoftwareReport.CachedTools.psm1") -DisableNameChecking Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Common.psm1") -DisableNameChecking -Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Helpers.psm1") -DisableNameChecking -Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Tools.psm1") -DisableNameChecking -Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Java.psm1") -DisableNameChecking Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Databases.psm1") -DisableNameChecking -Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Browsers.psm1") -DisableNameChecking -Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Android.psm1") -DisableNameChecking +Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Helpers.psm1") -DisableNameChecking +Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Java.psm1") -DisableNameChecking +Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Rust.psm1") -DisableNameChecking +Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Tools.psm1") -DisableNameChecking $markdown = "" diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Helpers.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Helpers.psm1 index 4bad753bd..45ab44948 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Helpers.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Helpers.psm1 @@ -37,8 +37,7 @@ function Test-IsUbuntu20 { return (lsb_release -rs) -eq "20.04" } -function Get-ToolsetContent -{ +function Get-ToolsetContent { $toolset = Join-Path $env:INSTALLER_SCRIPT_FOLDER "toolset.json" Get-Content $toolset -Raw | ConvertFrom-Json } diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Rust.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Rust.psm1 new file mode 100644 index 000000000..640ad2cf8 --- /dev/null +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Rust.psm1 @@ -0,0 +1,54 @@ +function Initialize-RustEnvironment { + ln -sf "/usr/share/rust/.rustup" $HOME/.rustup + ln -sf "/usr/share/rust/.cargo" $HOME/.cargo +} +function Get-RustVersion { + Initialize-RustEnvironment + $rustVersion = $(rustc --version) | Take-OutputPart -Part 1 + return "Rust $rustVersion" +} + +function Get-BindgenVersion { + $bindgenVersion = $(bindgen --version) | Take-OutputPart -Part 1 + return "Bindgen $bindgenVersion" +} + +function Get-CargoVersion { + $cargoVersion = $(cargo --version) | Take-OutputPart -Part 1 + return "Cargo $cargoVersion" +} + +function Get-CargoAuditVersion { + $cargoAuditVersion = $(cargo audit --version) | Take-OutputPart -Part 1 + return "Cargo audit $cargoAuditVersion" +} + +function Get-CargoOutdatedVersion { + $cargoOutdatedVersion = $(cargo outdated --version) | Take-OutputPart -Part 1 -Delimiter "v" + return "Cargo outdated $cargoOutdatedVersion" +} + +function Get-CargoClippyVersion { + $cargoClippyVersion = $(cargo-clippy --version) | Take-OutputPart -Part 1 + return "Cargo clippy $cargoClippyVersion" +} + +function Get-CbindgenVersion { + $cbindgenVersion = $(cbindgen --version) | Take-OutputPart -Part 1 + return "Cbindgen $cbindgenVersion" +} + +function Get-RustupVersion { + $rustupVersion = $(rustup --version) | Take-OutputPart -Part 1 + return "Rustup $rustupVersion" +} + +function Get-RustdocVersion { + $rustdocVersion = $(rustdoc --version) | Take-OutputPart -Part 1 + return "Rustdoc $rustdocVersion" +} + +function Get-RustfmtVersion { + $rustfmtVersion = $(rustfmt --version) | Take-OutputPart -Part 1 | Take-OutputPart -Part 0 -Delimiter "-" + return "Rustfmt $rustfmtVersion" +} \ No newline at end of file diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 index 05032cfb6..a76c17f9b 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 @@ -4,7 +4,7 @@ function Get-7zipVersion { } function Get-AnsibleVersion { - $ansibleVersion = ansible --version | Select-Object -First 1 | Take-OutputPart -Part 1 + $ansibleVersion = sudo ansible --version | Select-Object -First 1 | Take-OutputPart -Part 1 return "Ansible $ansibleVersion" } @@ -19,12 +19,12 @@ function Get-AzCopy10Version { } function Get-BazelVersion { - $bazelVersion = bazel --version | Select-String "bazel" | Take-OutputPart -Part 1 + $bazelVersion = sudo bazel --version | Select-String "bazel" | Take-OutputPart -Part 1 return "Bazel $bazelVersion" } function Get-BazeliskVersion { - $bazeliskVersion = bazelisk version 2>&1 | Select-String "Bazelisk version:" | Take-OutputPart -Part 2 | Take-OutputPart -Part 0 -Delimiter "v" + $bazeliskVersion = sudo bazelisk version 2>&1 | Select-String "Bazelisk version:" | Take-OutputPart -Part 2 | Take-OutputPart -Part 0 -Delimiter "v" return "Bazelisk $bazeliskVersion" } @@ -84,7 +84,7 @@ function Get-GitFTPVersion { } function Get-GoogleCloudSDKVersion { - return "$(gcloud --version | Select-Object -First 1)" + return "$(sudo gcloud --version | Select-Object -First 1)" } function Get-HavegedVersion { @@ -93,7 +93,7 @@ function Get-HavegedVersion { } function Get-HerokuVersion { - $herokuVersion = heroku version | Take-OutputPart -Part 0 | Take-OutputPart -Part 1 -Delimiter "/" + $herokuVersion = sudo heroku version | Take-OutputPart -Part 0 | Take-OutputPart -Part 1 -Delimiter "/" return "Heroku $herokuVersion" } @@ -146,7 +146,7 @@ function Get-NewmanVersion { } function Get-NvmVersion { - $nvmVersion = bash -c "source $HOME/.nvm/nvm.sh && nvm --version" + $nvmVersion = bash -c "source /etc/skel/.nvm/nvm.sh && nvm --version" return "nvm $nvmVersion" } @@ -193,12 +193,12 @@ function Get-JqVersion { } function Get-AzureCliVersion { - $azcliVersion = az -v | Select-String "azure-cli" | Take-OutputPart -Part -1 + $azcliVersion = sudo az -v | Select-String "azure-cli" | Take-OutputPart -Part -1 return "Azure CLI (azure-cli) $azcliVersion" } function Get-AzureDevopsVersion { - $azdevopsVersion = az -v | Select-String "azure-devops" | Take-OutputPart -Part -1 + $azdevopsVersion = sudo az -v | Select-String "azure-devops" | Take-OutputPart -Part -1 return "Azure CLI (azure-devops) $azdevopsVersion" } @@ -230,7 +230,7 @@ function Get-GitHubCliVersion { } function Get-NetlifyCliVersion { - $netlifyVersion = netlify --version | Take-OutputPart -Part 0 | Take-OutputPart -Part 1 -Delimiter "/" + $netlifyVersion = sudo netlify --version | Take-OutputPart -Part 0 | Take-OutputPart -Part 1 -Delimiter "/" return "Netlify CLI $netlifyVersion" } diff --git a/images/linux/scripts/installers/azcopy.sh b/images/linux/scripts/installers/azcopy.sh index 3efe54d11..9d15d37af 100644 --- a/images/linux/scripts/installers/azcopy.sh +++ b/images/linux/scripts/installers/azcopy.sh @@ -17,6 +17,7 @@ rm azcopy.tar.gz wget -O /tmp/azcopy.tar.gz https://aka.ms/downloadazcopy-v10-linux tar zxvf /tmp/azcopy.tar.gz --strip-components=1 -C /tmp mv /tmp/azcopy /usr/local/bin/azcopy10 +chmod +x /usr/local/bin/azcopy10 # 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 ef96becdb646ab93999161d763c41c1bd475bba3 Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov Date: Mon, 14 Sep 2020 22:15:25 +0300 Subject: [PATCH 34/55] fix warnings --- .../SoftwareReport/SoftwareReport.Common.psm1 | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 index 64c828424..14c6db9c0 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 @@ -5,7 +5,7 @@ function Get-OSName { } function Get-CPPVersions { - $cppVersions = & apt list --installed | Where-Object { $_ -match "g\+\+-\d+"} | ForEach-Object { + $cppVersions = apt list --installed 2>&1 | Where-Object { $_ -match "g\+\+-\d+"} | ForEach-Object { $_ -match "now (?\d+\.\d+\.\d+)-" | Out-Null $Matches.version } @@ -13,7 +13,7 @@ function Get-CPPVersions { } function Get-FortranVersions { - $fortranVersions = & apt list --installed | Where-Object { $_ -match "^gfortran-\d+"} | ForEach-Object { + $fortranVersions = apt list --installed 2>&1 | Where-Object { $_ -match "^gfortran-\d+"} | ForEach-Object { $_ -match "now (?\d+\.\d+\.\d+)-" | Out-Null $Matches.version } @@ -22,7 +22,7 @@ function Get-FortranVersions { function Get-ClangVersions { $clangVersions = @() - $clangVersions = & apt list --installed | Where-Object { $_ -match "^clang-\d+"} | ForEach-Object { + $clangVersions = apt list --installed 2>&1 | Where-Object { $_ -match "^clang-\d+"} | ForEach-Object { $clangCommand = ($_ -Split "/")[0] Invoke-Expression "$clangCommand --version" | Where-Object { $_ -match "clang version" } | ForEach-Object { $_ -match "clang version (?\d+\.\d+\.\d+)-" | Out-Null @@ -40,7 +40,7 @@ function Get-ErlangVersion { } function Get-MonoVersion { - $monoVersion = $(mono --version) | Out-String | Take-OutputPart -Part 4 + $monoVersion = mono --version | Out-String | Take-OutputPart -Part 4 return "Mono $monoVersion" } @@ -62,16 +62,16 @@ function Get-Python3Version { } function Get-PowershellVersion { - $(pwsh --version) + return $(pwsh --version) } function Get-RubyVersion { - $rubyVersion = $(ruby --version) | Out-String | Take-OutputPart -Part 1 + $rubyVersion = ruby --version | Out-String | Take-OutputPart -Part 1 return "Ruby $rubyVersion" } function Get-SwiftVersion { - $swiftVersion = $(swift --version) | Out-String | Take-OutputPart -Part 2 + $swiftVersion = swift --version | Out-String | Take-OutputPart -Part 2 return "Swift $swiftVersion" } @@ -88,13 +88,13 @@ function Get-HomebrewVersion { } function Get-GemVersion { - $(gem --version) -match "(?\d+\.\d+\.\d+)" | Out-Null + $(gem --version 2>&1) -match "(?\d+\.\d+\.\d+)" | Out-Null $gemVersion = $Matches.version return "Gem $gemVersion" } function Get-MinicondaVersion { - $condaVersion = $(conda --version) + $condaVersion = conda --version return "Mini$condaVersion" } @@ -105,12 +105,12 @@ function Get-HelmVersion { } function Get-NpmVersion { - $npmVersion = $(npm --version) + $npmVersion = npm --version return "Npm $npmVersion" } function Get-YarnVersion { - $yarnVersion = $(yarn --version) + $yarnVersion = yarn --version return "Yarn $yarnVersion" } @@ -136,33 +136,33 @@ function Get-VcpkgVersion { } function Get-AntVersion { - $result = $(ant -version) | Out-String + $result = ant -version | Out-String $result -match "version (?\d+\.\d+\.\d+)" | Out-Null $antVersion = $Matches.version return "Ant $antVersion" } function Get-GradleVersion { - $result = $(gradle -v) | Out-String + $result = gradle -v | Out-String $result -match "Gradle (?\d+\.\d+\.\d+)" | Out-Null $gradleVersion = $Matches.version return "Gradle $gradleVersion" } function Get-MavenVersion { - $result = $(mvn -version) | Out-String + $result = mvn -version | Out-String $result -match "Apache Maven (?\d+\.\d+\.\d+)" | Out-Null $mavenVersion = $Matches.version return "Maven $mavenVersion" } function Get-SbtVersion { - $result = $(sbt -version) | Out-String + $result = sbt -version 2>&1 | Out-String $result -match "sbt script version: (?\d+\.\d+\.\d+)" | Out-Null $sbtVersion = $Matches.version return "Sbt $sbtVersion" } function Get-PHPVersions { - return $(apt list --installed) | Where-Object { $_ -match "^php\d+\.\d+/"} | ForEach-Object { + return $(apt list --installed 2>&1) | Where-Object { $_ -match "^php\d+\.\d+/"} | ForEach-Object { $_ -match "now (?\d+\.\d+\.\d+)-" | Out-Null $Matches.version } From 5b009f290af6e135c838bc109a742d2649a5d2d6 Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov Date: Mon, 14 Sep 2020 22:22:58 +0300 Subject: [PATCH 35/55] julia remove trailing line --- images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 index 14c6db9c0..f36ab2b20 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 @@ -76,7 +76,7 @@ function Get-SwiftVersion { } function Get-JuliaVersion { - $juliaVersion = $(julia --version) | Out-String | Take-OutputPart -Part 2 + $juliaVersion = julia --version | Take-OutputPart -Part 2 return "Julia $juliaVersion" } From 4a07ea61a8d7d558b29ad088e4621561426859b6 Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov Date: Tue, 15 Sep 2020 09:20:45 +0300 Subject: [PATCH 36/55] fix gem output --- images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 | 3 ++- images/linux/scripts/SoftwareReport/SoftwareReport.Rust.psm1 | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 index f36ab2b20..64a9d1c3f 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 @@ -88,7 +88,8 @@ function Get-HomebrewVersion { } function Get-GemVersion { - $(gem --version 2>&1) -match "(?\d+\.\d+\.\d+)" | Out-Null + $result = Get-CommandResult "gem --version" + $result.Output -match "(?\d+\.\d+\.\d+)" | Out-Null $gemVersion = $Matches.version return "Gem $gemVersion" } diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Rust.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Rust.psm1 index 640ad2cf8..e822a5c38 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Rust.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Rust.psm1 @@ -2,6 +2,7 @@ function Initialize-RustEnvironment { ln -sf "/usr/share/rust/.rustup" $HOME/.rustup ln -sf "/usr/share/rust/.cargo" $HOME/.cargo } + function Get-RustVersion { Initialize-RustEnvironment $rustVersion = $(rustc --version) | Take-OutputPart -Part 1 From 8a03bd9376c8c78f7ae96005acc5b26ae09460a5 Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Tue, 15 Sep 2020 12:22:05 +0400 Subject: [PATCH 37/55] toolset_json_path has been added to section with Install-Vsix --- images/win/Windows2016-Azure.json | 3 +++ images/win/Windows2019-Azure.json | 3 +++ 2 files changed, 6 insertions(+) diff --git a/images/win/Windows2016-Azure.json b/images/win/Windows2016-Azure.json index 7a3b76337..6aa1423c6 100644 --- a/images/win/Windows2016-Azure.json +++ b/images/win/Windows2016-Azure.json @@ -182,6 +182,9 @@ }, { "type": "powershell", + "environment_vars":[ + "TOOLSET_JSON_PATH={{user `toolset_json_path`}}" + ], "scripts":[ "{{ template_dir }}/scripts/Installers/Install-Nuget.ps1", "{{ template_dir }}/scripts/Installers/Install-Wix.ps1", diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index 2d58ce238..515caba9d 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -189,6 +189,9 @@ }, { "type": "powershell", + "environment_vars":[ + "TOOLSET_JSON_PATH={{user `toolset_json_path`}}" + ], "scripts":[ "{{ template_dir }}/scripts/Installers/Install-Nuget.ps1", "{{ template_dir }}/scripts/Installers/Install-Wix.ps1", From 46fdad5e60e1895f97b10436f35e1ab7202d2efe Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov Date: Wed, 16 Sep 2020 10:42:16 +0300 Subject: [PATCH 38/55] fix android and docker sections --- .../SoftwareReport/SoftwareReport.Android.psm1 | 12 ++++++------ .../SoftwareReport/SoftwareReport.Generator.ps1 | 2 +- .../scripts/SoftwareReport/SoftwareReport.Tools.psm1 | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Android.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Android.psm1 index 7f34143a9..a3504171c 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Android.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Android.psm1 @@ -52,6 +52,10 @@ function Build-AndroidTable { "Package" = "Google APIs" "Version" = Get-AndroidGoogleAPIsVersions -PackageInfo $packageInfo }, + @{ + "Package" = "NDK" + "Version" = Get-AndroidPackageVersions -PackageInfo $packageInfo -MatchedString "ndk-bundle" + }, @{ "Package" = "Android Support Repository" "Version" = Get-AndroidPackageVersions -PackageInfo $packageInfo -MatchedString "Android Support Repository" @@ -71,16 +75,12 @@ function Build-AndroidTable { @{ "Package" = "CMake" "Version" = Get-AndroidPackageVersions -PackageInfo $packageInfo -MatchedString "cmake" - }, - @{ - "Package" = "NDK" - "Version" = Get-AndroidPackageVersions -PackageInfo $packageInfo -MatchedString "ndk-bundle" } ) | Where-Object { $_.Version } | ForEach-Object { [PSCustomObject] @{ "Package Name" = $_.Package "Version" = $_.Version - } + } } } @@ -109,7 +109,7 @@ function Get-AndroidPlatformVersions { $packageInfoParts = Split-TableRowByColumns $_ $revision = $packageInfoParts[1] $version = $packageInfoParts[0].split(";")[1] - return "$version, (rev $revision)" + return "$version (rev $revision)" } [array]::Reverse($versions) return ($versions -Join "
") diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 index e0acc6bde..73a8d63e7 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 @@ -79,8 +79,8 @@ $toolsList = @( (Get-BazeliskVersion), (Get-CMakeVersion), (Get-CurlVersion), - (Get-DockerComposeVersion), (Get-DockerMobyVersion), + (Get-DockerComposeVersion), (Get-DockerBuildxVersion), (Get-GitVersion), (Get-GitLFSVersion), diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 index a76c17f9b..dcb121f61 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 @@ -10,12 +10,12 @@ function Get-AnsibleVersion { function Get-AzCopy7Version { $azcopy7Version = azcopy --version | Take-OutputPart -Part 1 | Take-OutputPart -Part 0 -Delimiter "-" - return "AzCopy7 (available by azcopy alias) $azcopy7Version" + return "AzCopy7 $azcopy7Version (available by ``azcopy`` alias)" } function Get-AzCopy10Version { $azcopy10Version = azcopy10 --version | Take-OutputPart -Part 2 - return "AzCopy10 (available by azcopy10 alias) $azcopy10Version" + return "AzCopy10 $azcopy10Version (available by ``azcopy10`` alias)" } function Get-BazelVersion { From 2d3a3d4f3d51db151893250736dbfd6cb25a8c0c Mon Sep 17 00:00:00 2001 From: Maxim Lobanov Date: Wed, 16 Sep 2020 11:43:50 +0300 Subject: [PATCH 39/55] update documentation --- .github/pull_request_template.md | 2 ++ CONTRIBUTING.md | 3 ++- README.md | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 54085c9b9..d0997a0c2 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -3,6 +3,8 @@ New tool, Bug fixing, or Improvement? Please include a summary of the change and which issue is fixed. Also include relevant motivation and context. **For new tools, please provide total size and installation time.** + + #### Related issue: ## Check list diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index af608840b..e35a3c829 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -51,7 +51,8 @@ Add `Invoke-PesterTests -TestFile [-TestName ]` at - Use `DocumentInstalledItem ""` helper for building documentation. ### macOS -We are in the process of preparing our macOS source to live in this repo so we can take contributions from the community. Until then, we appreciate your patience and ask you continue to make tool requests by filing issues. +MacOS source lives in this repository and available for everyone. However, MacOS image-generation CI doesn't support external contributions yet so we are not ready to accept pull-requests for now. +We are in the process of preparing MacOS CI to accept contributions. Until then, we appreciate your patience and ask you continue to make tool requests by filing issues. ## Resources diff --git a/README.md b/README.md index dc30f2668..1df8ea4ed 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,8 @@ The "ubuntu-latest" YAML workflow label still uses the Ubuntu 18.04 virtual envi ***Looking for other Linux distributions?*** We do not plan to offer other Linux distributions. We recommend using Docker if you'd like to build using other distributions with the hosted virtual environments. Alternatively, you can leverage [self-hosted runners] and fully customize your environment to your needs. -***Where is the macOS source?*** We are in the process of preparing our macOS source to live in this repo so we can take contributions from the community. Until then, we appreciate your patience and ask you continue to make tool requests by filing issues. +***How to contribute to macOS source?*** MacOS source lives in this repository and available for everyone. However, MacOS image-generation CI doesn't support external contributions yet so we are not ready to accept pull-requests for now. +We are in the process of preparing MacOS CI to accept contributions. Until then, we appreciate your patience and ask you continue to make tool requests by filing issues. ## Software Guidelines In general, these are the guidelines we consider when deciding what to pre-install: From 15b5f5fe6759e428d837399596c5966403f22cc1 Mon Sep 17 00:00:00 2001 From: Maxim Lobanov Date: Wed, 16 Sep 2020 13:25:16 +0300 Subject: [PATCH 40/55] MacOS -> macOS --- CONTRIBUTING.md | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e35a3c829..021fbc2fa 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -51,7 +51,7 @@ Add `Invoke-PesterTests -TestFile [-TestName ]` at - Use `DocumentInstalledItem ""` helper for building documentation. ### macOS -MacOS source lives in this repository and available for everyone. However, MacOS image-generation CI doesn't support external contributions yet so we are not ready to accept pull-requests for now. +macOS source lives in this repository and available for everyone. However, MacOS image-generation CI doesn't support external contributions yet so we are not ready to accept pull-requests for now. We are in the process of preparing MacOS CI to accept contributions. Until then, we appreciate your patience and ask you continue to make tool requests by filing issues. ## Resources diff --git a/README.md b/README.md index 1df8ea4ed..934fcb446 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ The "ubuntu-latest" YAML workflow label still uses the Ubuntu 18.04 virtual envi ***Looking for other Linux distributions?*** We do not plan to offer other Linux distributions. We recommend using Docker if you'd like to build using other distributions with the hosted virtual environments. Alternatively, you can leverage [self-hosted runners] and fully customize your environment to your needs. -***How to contribute to macOS source?*** MacOS source lives in this repository and available for everyone. However, MacOS image-generation CI doesn't support external contributions yet so we are not ready to accept pull-requests for now. +***How to contribute to macOS source?*** macOS source lives in this repository and available for everyone. However, MacOS image-generation CI doesn't support external contributions yet so we are not ready to accept pull-requests for now. We are in the process of preparing MacOS CI to accept contributions. Until then, we appreciate your patience and ask you continue to make tool requests by filing issues. ## Software Guidelines From 6e62e32b9713809bfa0a7f13a373d45a734ebd19 Mon Sep 17 00:00:00 2001 From: Maxim Lobanov Date: Wed, 16 Sep 2020 13:41:49 +0300 Subject: [PATCH 41/55] Update CONTRIBUTING.md --- CONTRIBUTING.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 021fbc2fa..927ae8724 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -31,7 +31,7 @@ Here are a few things you can do that will increase the likelihood of your pull ## How to add new tool ### General rules - For every new tool add validation scripts and update software report script to make sure that it is included to documentation -- If the tool is available in other platforms (MacOS, Windows, Linux), make sure you include it in as many as possible. +- If the tool is available in other platforms (macOS, Windows, Linux), make sure you include it in as many as possible. - If installing a few versions of the tool, consider putting the list of versions in the corresponding `toolset.json` file. It will help other customers to configure their builds flexibly. See [toolset-windows-2016.json](images/win/toolsets/toolset-2019.json) as example. - Use consistent naming across all files - Validation scripts should be simple and shouldn't change image content @@ -51,8 +51,8 @@ Add `Invoke-PesterTests -TestFile [-TestName ]` at - Use `DocumentInstalledItem ""` helper for building documentation. ### macOS -macOS source lives in this repository and available for everyone. However, MacOS image-generation CI doesn't support external contributions yet so we are not ready to accept pull-requests for now. -We are in the process of preparing MacOS CI to accept contributions. Until then, we appreciate your patience and ask you continue to make tool requests by filing issues. +macOS source lives in this repository and available for everyone. However, macOS image-generation CI doesn't support external contributions yet so we are not ready to accept pull-requests for now. +We are in the process of preparing macOS CI to accept contributions. Until then, we appreciate your patience and ask you continue to make tool requests by filing issues. ## Resources From 219bfe0d1f60f456e5e992d7224a34a5a4d97d3b Mon Sep 17 00:00:00 2001 From: Maxim Lobanov Date: Wed, 16 Sep 2020 16:37:30 +0300 Subject: [PATCH 42/55] fix comments --- .github/pull_request_template.md | 2 +- CONTRIBUTING.md | 2 +- README.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index d0997a0c2..d815d34fd 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -3,7 +3,7 @@ New tool, Bug fixing, or Improvement? Please include a summary of the change and which issue is fixed. Also include relevant motivation and context. **For new tools, please provide total size and installation time.** - + #### Related issue: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 927ae8724..f0d8d4ec7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -51,7 +51,7 @@ Add `Invoke-PesterTests -TestFile [-TestName ]` at - Use `DocumentInstalledItem ""` helper for building documentation. ### macOS -macOS source lives in this repository and available for everyone. However, macOS image-generation CI doesn't support external contributions yet so we are not ready to accept pull-requests for now. +macOS source lives in this repository and available for everyone. However, macOS image-generation CI doesn't support external contributions yet so we are not able to accept pull-requests for now. We are in the process of preparing macOS CI to accept contributions. Until then, we appreciate your patience and ask you continue to make tool requests by filing issues. ## Resources diff --git a/README.md b/README.md index 934fcb446..b3c596491 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ The "ubuntu-latest" YAML workflow label still uses the Ubuntu 18.04 virtual envi ***Looking for other Linux distributions?*** We do not plan to offer other Linux distributions. We recommend using Docker if you'd like to build using other distributions with the hosted virtual environments. Alternatively, you can leverage [self-hosted runners] and fully customize your environment to your needs. -***How to contribute to macOS source?*** macOS source lives in this repository and available for everyone. However, MacOS image-generation CI doesn't support external contributions yet so we are not ready to accept pull-requests for now. +***How to contribute to macOS source?*** macOS source lives in this repository and available for everyone. However, MacOS image-generation CI doesn't support external contributions yet so we are not able to accept pull-requests for now. We are in the process of preparing MacOS CI to accept contributions. Until then, we appreciate your patience and ask you continue to make tool requests by filing issues. ## Software Guidelines From f0f5024ec9c84605ce8d7fc10328433527daf8a8 Mon Sep 17 00:00:00 2001 From: "Andrey Mishechkin (GITHUB INC)" Date: Wed, 16 Sep 2020 19:16:22 +0400 Subject: [PATCH 43/55] Vsix.Tests.ps1 - condition has been added --- images/win/scripts/Tests/Vsix.Tests.ps1 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/images/win/scripts/Tests/Vsix.Tests.ps1 b/images/win/scripts/Tests/Vsix.Tests.ps1 index 1539601b5..b92f862ea 100644 --- a/images/win/scripts/Tests/Vsix.Tests.ps1 +++ b/images/win/scripts/Tests/Vsix.Tests.ps1 @@ -4,9 +4,10 @@ Describe "Vsix" { $allPackages = (Get-VSSetupInstance | Select-VsSetupInstance -Product *).Packages $testCases = $requiredVsixs | ForEach-Object { @{ VsixId = $_.Id; AllPackages = $allPackages }} - - It "Extension " -TestCases $testCases { - $objVsix = $AllPackages | Where-Object { $_.id -eq $VsixId } - $objVsix | Should -Not -BeNullOrEmpty + if ($testCases.Count -gt 0) { + It "Extension " -TestCases $testCases { + $objVsix = $AllPackages | Where-Object { $_.id -eq $VsixId } + $objVsix | Should -Not -BeNullOrEmpty + } } } \ No newline at end of file From a8a908b63ee3ae03f1b7a8921c06873c1a830907 Mon Sep 17 00:00:00 2001 From: MaksimZhukov Date: Wed, 16 Sep 2020 19:44:58 +0300 Subject: [PATCH 44/55] Implement public CI for MacOS builds --- .../azure-pipelines/image-generation.yml | 8 +- .../azure-pipelines/ubuntu1604.yml | 0 .../azure-pipelines/ubuntu1804.yml | 0 .../azure-pipelines/ubuntu2004.yml | 0 .../azure-pipelines/windows2016.yml | 0 .../azure-pipelines/windows2019.yml | 0 images.CI/{ => linux-and-win}/build-image.ps1 | 0 images.CI/{ => linux-and-win}/cleanup.ps1 | 0 .../{ => linux-and-win}/create-release.ps1 | 0 .../azure-pipelines/image-generation.yml | 105 ++++++++++++++++++ images.CI/macos/azure-pipelines/macos1013.yml | 23 ++++ images.CI/macos/azure-pipelines/macos1014.yml | 23 ++++ images.CI/macos/azure-pipelines/macos1015.yml | 23 ++++ images.CI/macos/azure-pipelines/macos110.yml | 23 ++++ images.CI/macos/validate-contributor.ps1 | 63 +++++++++++ 15 files changed, 264 insertions(+), 4 deletions(-) rename images.CI/{ => linux-and-win}/azure-pipelines/image-generation.yml (93%) rename images.CI/{ => linux-and-win}/azure-pipelines/ubuntu1604.yml (100%) rename images.CI/{ => linux-and-win}/azure-pipelines/ubuntu1804.yml (100%) rename images.CI/{ => linux-and-win}/azure-pipelines/ubuntu2004.yml (100%) rename images.CI/{ => linux-and-win}/azure-pipelines/windows2016.yml (100%) rename images.CI/{ => linux-and-win}/azure-pipelines/windows2019.yml (100%) rename images.CI/{ => linux-and-win}/build-image.ps1 (100%) rename images.CI/{ => linux-and-win}/cleanup.ps1 (100%) rename images.CI/{ => linux-and-win}/create-release.ps1 (100%) create mode 100644 images.CI/macos/azure-pipelines/image-generation.yml create mode 100644 images.CI/macos/azure-pipelines/macos1013.yml create mode 100644 images.CI/macos/azure-pipelines/macos1014.yml create mode 100644 images.CI/macos/azure-pipelines/macos1015.yml create mode 100644 images.CI/macos/azure-pipelines/macos110.yml create mode 100644 images.CI/macos/validate-contributor.ps1 diff --git a/images.CI/azure-pipelines/image-generation.yml b/images.CI/linux-and-win/azure-pipelines/image-generation.yml similarity index 93% rename from images.CI/azure-pipelines/image-generation.yml rename to images.CI/linux-and-win/azure-pipelines/image-generation.yml index 70db48f1c..38aabd142 100644 --- a/images.CI/azure-pipelines/image-generation.yml +++ b/images.CI/linux-and-win/azure-pipelines/image-generation.yml @@ -20,13 +20,13 @@ jobs: targetType: 'filePath' filePath: ./images.CI/download-repo.ps1 arguments: -RepoUrl $(CUSTOM_REPOSITORY_URL) ` - -RepoBranch $(CUSTOM_REPOSITORY_BRANCH) + -RepoBranch $(CUSTOM_REPOSITORY_BRANCH) - task: PowerShell@2 displayName: 'Build VM' inputs: targetType: filePath - filePath: ./images.CI/build-image.ps1 + filePath: ./images.CI/linux-and-win/build-image.ps1 arguments: -ResourcesNamePrefix $(Build.BuildId) ` -ClientId $(CLIENT_ID) ` -ClientSecret $(CLIENT_SECRET) ` @@ -45,7 +45,7 @@ jobs: displayName: 'Create release for VM deployment' inputs: targetType: filePath - filePath: ./images.CI/create-release.ps1 + filePath: ./images.CI/linux-and-win/create-release.ps1 arguments: -BuildId $(Build.BuildId) ` -Organization $(RELEASE_TARGET_ORGANIZATION) ` -DefinitionId $(RELEASE_TARGET_DEFINITION_ID) ` @@ -66,7 +66,7 @@ jobs: condition: always() inputs: targetType: filePath - filePath: ./images.CI/cleanup.ps1 + filePath: ./images.CI/linux-and-win/cleanup.ps1 arguments: -ResourcesNamePrefix $(Build.BuildId) ` -ClientId $(CLIENT_ID) ` -ClientSecret $(CLIENT_SECRET) ` diff --git a/images.CI/azure-pipelines/ubuntu1604.yml b/images.CI/linux-and-win/azure-pipelines/ubuntu1604.yml similarity index 100% rename from images.CI/azure-pipelines/ubuntu1604.yml rename to images.CI/linux-and-win/azure-pipelines/ubuntu1604.yml diff --git a/images.CI/azure-pipelines/ubuntu1804.yml b/images.CI/linux-and-win/azure-pipelines/ubuntu1804.yml similarity index 100% rename from images.CI/azure-pipelines/ubuntu1804.yml rename to images.CI/linux-and-win/azure-pipelines/ubuntu1804.yml diff --git a/images.CI/azure-pipelines/ubuntu2004.yml b/images.CI/linux-and-win/azure-pipelines/ubuntu2004.yml similarity index 100% rename from images.CI/azure-pipelines/ubuntu2004.yml rename to images.CI/linux-and-win/azure-pipelines/ubuntu2004.yml diff --git a/images.CI/azure-pipelines/windows2016.yml b/images.CI/linux-and-win/azure-pipelines/windows2016.yml similarity index 100% rename from images.CI/azure-pipelines/windows2016.yml rename to images.CI/linux-and-win/azure-pipelines/windows2016.yml diff --git a/images.CI/azure-pipelines/windows2019.yml b/images.CI/linux-and-win/azure-pipelines/windows2019.yml similarity index 100% rename from images.CI/azure-pipelines/windows2019.yml rename to images.CI/linux-and-win/azure-pipelines/windows2019.yml diff --git a/images.CI/build-image.ps1 b/images.CI/linux-and-win/build-image.ps1 similarity index 100% rename from images.CI/build-image.ps1 rename to images.CI/linux-and-win/build-image.ps1 diff --git a/images.CI/cleanup.ps1 b/images.CI/linux-and-win/cleanup.ps1 similarity index 100% rename from images.CI/cleanup.ps1 rename to images.CI/linux-and-win/cleanup.ps1 diff --git a/images.CI/create-release.ps1 b/images.CI/linux-and-win/create-release.ps1 similarity index 100% rename from images.CI/create-release.ps1 rename to images.CI/linux-and-win/create-release.ps1 diff --git a/images.CI/macos/azure-pipelines/image-generation.yml b/images.CI/macos/azure-pipelines/image-generation.yml new file mode 100644 index 000000000..490cbda6d --- /dev/null +++ b/images.CI/macos/azure-pipelines/image-generation.yml @@ -0,0 +1,105 @@ +jobs: +- job: Image_generation + displayName: Image Generation (${{ parameters.image_label }}) + timeoutInMinutes: 720 + pool: + name: Mac-Cloud Image Generation + variables: + - group: Mac-Cloud Image Generation + - group: Mac-Cloud Image Generation Key Vault + + steps: + - checkout: self + clean: true + fetchDepth: 1 + + - task: PowerShell@2 + displayName: 'Validate contributor permissions' + condition: startsWith(variables['Build.SourceBranch'], 'refs/pull/') + inputs: + targetType: 'filePath' + filePath: ./images.CI/macos/validate-contributor.ps1 + pwsh: true + arguments: -RepositoryName "$(Build.Repository.Name)" ` + -AccessToken "$(github-feed-token)" ` + -SourceBranch "$(Build.SourceBranch)" ` + -ContributorAllowList "$(CONTRIBUTOR_ALLOWLIST)" + + - task: PowerShell@2 + displayName: 'Download custom repository' + condition: and(ne(variables['CUSTOM_REPOSITORY_URL'], ''), ne(variables['CUSTOM_REPOSITORY_BRANCH'], '')) + inputs: + targetType: 'filePath' + filePath: ./images.CI/download-repo.ps1 + arguments: -RepoUrl $(CUSTOM_REPOSITORY_URL) ` + -RepoBranch $(CUSTOM_REPOSITORY_BRANCH) + + - task: DeleteFiles@1 + displayName: Clean up self-hosted machine + inputs: + SourceFolder: 'images/macos/provision/log/' + RemoveSourceFolder: true + + - pwsh: | + $SensitiveData = @( + 'IP address:', + 'Using ssh communicator to connect:' + ) + + packer build -on-error=abort ` + -var="vcenter_server=$(vcenter-server-v2)" ` + -var="vcenter_username=$(vcenter-username-v2)" ` + -var="vcenter_password=$(vcenter-password-v2)" ` + -var="vcenter_datacenter=$(vcenter-datacenter-v2)" ` + -var="cluster_or_esxi_host=$(esxi-cluster-v2)" ` + -var="esxi_datastore=${{ parameters.target_datastore }}" ` + -var="output_folder=$(output-folder)" ` + -var="vm_username=$(vm-username)" ` + -var="vm_password=$(vm-password)" ` + -var="build_id=$(Build.BuildNumber)" ` + -var="baseimage_name=${{ parameters.base_image_name }}" ` + -var="github_feed_token=$(github-feed-token)" ` + -var="xcode_install_user=$(xcode-installation-user)" ` + -var="xcode_install_password=$(xcode-installation-password)" ` + -color=false ` + ${{ parameters.template_path }} ` + | Where-Object { + #Filter sensitive data from Packer logs + $currentString = $_ + $sensitiveString = $SensitiveData | Where-Object { $currentString -match $_ } + $sensitiveString -eq $null + } + displayName: 'Build VM' + env: + PACKER_LOG: 0 + workingDirectory: 'images/macos' + + - bash: | + echo "Copy image output files" + cp -R "images/image-output/software-report/." "$(Build.ArtifactStagingDirectory)/" + + echo "Copy test results" + cp -R "images/image-output/tests/." "$(Common.TestResultsDirectory)/" + ls $(Common.TestResultsDirectory) + + echo "Put VM name to 'VM_Done_Name' file" + echo "$(Build.BuildNumber)" > "$(Build.ArtifactStagingDirectory)/VM_Done_Name" + displayName: Prepare artifact + + - bash: | + cat "$(Build.ArtifactStagingDirectory)/systeminfo.md" + displayName: Print software report + + - task: PublishBuildArtifacts@1 + inputs: + ArtifactName: 'Built_VM_Artifacts' + displayName: Publish Artifacts + + - task: PublishTestResults@2 + inputs: + testResultsFiles: '*.xml' + testResultsFormat: NUnit + searchFolder: '$(Common.TestResultsDirectory)' + failTaskOnFailedTests: true + displayName: Publish test results + condition: always() diff --git a/images.CI/macos/azure-pipelines/macos1013.yml b/images.CI/macos/azure-pipelines/macos1013.yml new file mode 100644 index 000000000..a7b9a4a19 --- /dev/null +++ b/images.CI/macos/azure-pipelines/macos1013.yml @@ -0,0 +1,23 @@ +name: macOS-10.13_$(date:yyyyMMdd)$(rev:.r)_unstable +schedules: +- cron: "0 0 * * *" + displayName: Daily + branches: + include: + - main + always: true + +trigger: none +pr: + autoCancel: true + branches: + include: + - main + +jobs: +- template: image-generation.yml + parameters: + image_label: 'macOS High Sierra' + base_image_name: 'clean-macOS-10.13.6-380Gb-SIPoff_runner' + template_path: 'templates/macOS-10.13.json' + target_datastore: 'ds-image' diff --git a/images.CI/macos/azure-pipelines/macos1014.yml b/images.CI/macos/azure-pipelines/macos1014.yml new file mode 100644 index 000000000..21f7e48c1 --- /dev/null +++ b/images.CI/macos/azure-pipelines/macos1014.yml @@ -0,0 +1,23 @@ +name: macOS-10.14_$(date:yyyyMMdd)$(rev:.r)_unstable +schedules: +- cron: "0 0 * * *" + displayName: Daily + branches: + include: + - main + always: true + +trigger: none +pr: + autoCancel: true + branches: + include: + - main + +jobs: +- template: image-generation.yml + parameters: + image_label: 'macOS Mojave' + base_image_name: 'clean-macOS-10.14-380Gb_runner' + template_path: 'templates/macOS-10.14.json' + target_datastore: 'ds-image' diff --git a/images.CI/macos/azure-pipelines/macos1015.yml b/images.CI/macos/azure-pipelines/macos1015.yml new file mode 100644 index 000000000..f42980cc4 --- /dev/null +++ b/images.CI/macos/azure-pipelines/macos1015.yml @@ -0,0 +1,23 @@ +name: macOS-10.15_$(date:yyyyMMdd)$(rev:.r)_unstable +schedules: +- cron: "0 0 * * *" + displayName: Daily + branches: + include: + - main + always: true + +trigger: none +pr: + autoCancel: true + branches: + include: + - main + +jobs: +- template: image-generation.yml + parameters: + image_label: 'macOS Catalina' + base_image_name: 'clean-macOS-10.15-380Gb-runner' + template_path: 'templates/macOS-10.15.json' + target_datastore: 'ds-image' diff --git a/images.CI/macos/azure-pipelines/macos110.yml b/images.CI/macos/azure-pipelines/macos110.yml new file mode 100644 index 000000000..ada6dcfe1 --- /dev/null +++ b/images.CI/macos/azure-pipelines/macos110.yml @@ -0,0 +1,23 @@ +name: macOS-11.0_$(date:yyyyMMdd)$(rev:.r)_unstable +schedules: +- cron: "0 0 * * *" + displayName: Daily + branches: + include: + - main + always: true + +trigger: none +pr: + autoCancel: true + branches: + include: + - main + +jobs: +- template: image-generation.yml + parameters: + image_label: 'macOS Big Sur' + base_image_name: 'clean-macOS-11.0-380Gb-runner' + template_path: 'templates/macOS-11.0.json' + target_datastore: 'ds-image' diff --git a/images.CI/macos/validate-contributor.ps1 b/images.CI/macos/validate-contributor.ps1 new file mode 100644 index 000000000..312a9ef7e --- /dev/null +++ b/images.CI/macos/validate-contributor.ps1 @@ -0,0 +1,63 @@ +param( + [Parameter(Mandatory)] [string] $RepositoryName, + [Parameter(Mandatory)] [string] $AccessToken, + [Parameter(Mandatory)] [string] $SourceBranch, + [Parameter(Mandatory)] [string] $ContributorAllowList +) + +function Build-AuthHeader { + param( + [Parameter(Mandatory)] [string] $AccessToken + ) + + $base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes("'':${AccessToken}")) + return "Basic ${base64AuthInfo}" +} + +function Get-PullRequest { + param( + [Parameter(Mandatory)] [string] $RepositoryName, + [Parameter(Mandatory)] [string] $AccessToken, + [Parameter(Mandatory)] [UInt32] $PullRequestNumber + ) + + $requestUrl = "https://api.github.com/repos/$RepositoryName/pulls/$PullRequestNumber" + $authHeader = Build-AuthHeader -AccessToken $AccessToken + + $params = @{ + Method = "GET" + ContentType = "application/json" + Uri = $requestUrl + Headers = @{ Authorization = $authHeader } + } + + return Invoke-RestMethod @params +} + +function Validate-ContributorPermissions { + param( + [Parameter(Mandatory)] [string] $ContributorAllowList, + [Parameter(Mandatory)] [string] $ContributorName + ) + + $allowedContributors = $ContributorAllowList.Split(",").Trim() + $validСontributor = $allowedContributors | Where-Object { $_ -eq $ContributorName } ` + | Select-Object -First 1 + + if (-not $validСontributor) { + Write-Host "Failed to start this build. '$ContributorName' is an unknown contributor" + Write-Host "Please add '$ContributorName' to the allowed list to run builds" + exit 1 + } +} + +$pullRequestNumber = $SourceBranch.Split("/")[2] + +$pullRequestInfo = Get-PullRequest -RepositoryName $RepositoryName ` + -AccessToken $AccessToken ` + -PullRequestNumber $pullRequestNumber + +$contributorName = $pullRequestInfo.user.login + +Validate-ContributorPermissions -ContributorAllowList $ContributorAllowList ` + -ContributorName $contributorName \ No newline at end of file From 063bc445b9275b1ab865ced0983a4b76be89b6c3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 17 Sep 2020 11:35:15 +0300 Subject: [PATCH 45/55] Updating readme file for macos-10.15 version 20200913.1 (#1597) Co-authored-by: no-reply@microsoft.com Co-authored-by: Actions service account --- images/macos/macos-10.15-Readme.md | 78 ++++++++++++++---------------- 1 file changed, 37 insertions(+), 41 deletions(-) diff --git a/images/macos/macos-10.15-Readme.md b/images/macos/macos-10.15-Readme.md index 3c57b80b5..e103a50e3 100644 --- a/images/macos/macos-10.15-Readme.md +++ b/images/macos/macos-10.15-Readme.md @@ -1,11 +1,7 @@ -| Announcements | -|-| -| [Xcode 11.7 will be set as a default one on September, 9](https://github.com/actions/virtual-environments/issues/1537) | -*** # macOS 10.15 info - System Version: macOS 10.15.6 (19G2021) - Kernel Version: Darwin 19.6.0 -- Image Version: 20200903.1 +- Image Version: 20200913.1 ## Installed Software ### Language and Runtime @@ -16,13 +12,13 @@ - GNU Fortran (Homebrew GCC 9.3.0) 9.3.0 — available by `gfortran-9` alias - Node.js v12.18.3 - NVM 0.35.3 -- NVM - Cached node versions: v6.17.1 v8.17.0 v10.22.0 v12.18.3 v13.14.0 v14.9.0 +- NVM - Cached node versions: v6.17.1 v8.17.0 v10.22.0 v12.18.3 v13.14.0 v14.10.1 - Python 2.7.17 - Python 3.8.5 - Ruby 2.6.6p146 -- .NET SDK 2.1.300 2.1.301 2.1.302 2.1.401 2.1.402 2.1.403 2.1.500 2.1.502 2.1.503 2.1.504 2.1.505 2.1.506 2.1.507 2.1.602 2.1.603 2.1.604 2.1.607 2.1.700 2.1.701 2.1.801 2.1.802 2.1.803 2.1.804 2.1.805 2.1.806 2.1.807 2.1.808 2.1.809 3.0.100 3.0.101 3.0.102 3.0.103 3.1.100 3.1.101 3.1.200 3.1.201 3.1.300 3.1.301 3.1.302 3.1.401 +- .NET SDK 2.1.300 2.1.301 2.1.302 2.1.401 2.1.402 2.1.403 2.1.500 2.1.502 2.1.503 2.1.504 2.1.505 2.1.506 2.1.507 2.1.602 2.1.603 2.1.604 2.1.607 2.1.700 2.1.701 2.1.801 2.1.802 2.1.803 2.1.804 2.1.805 2.1.806 2.1.807 2.1.808 2.1.809 2.1.810 3.0.100 3.0.101 3.0.102 3.0.103 3.1.100 3.1.101 3.1.200 3.1.201 3.1.300 3.1.301 3.1.302 3.1.401 3.1.402 - R 4.0.2 -- Go 1.15 +- Go 1.15.2 - PHP 7.4.10 - julia 1.5.1 @@ -31,7 +27,7 @@ - Bundler version 2.1.4 - Carthage 0.35.0 - CocoaPods 1.9.3 -- Homebrew 2.4.16 +- Homebrew 2.5.0 - NPM 6.14.6 - Yarn 1.22.5 - NuGet 5.6.0.6489 @@ -39,7 +35,7 @@ - Pip 20.1.1 (python 3.8) - Miniconda 4.8.3 - RubyGems 3.1.4 -- Composer 1.10.10 +- Composer 1.10.13 ### Project Management - Apache Maven 3.6.3 @@ -50,15 +46,15 @@ - Curl 7.72.0 - Git: 2.28.0 - Git LFS: 2.12.0 -- GitHub CLI: 0.11.1 +- GitHub CLI: 0.12.0 - Hub CLI: 2.14.2 - GNU Wget 1.20.3 - Subversion (SVN) 1.14.0 - Packer 1.6.2 - GNU parallel 20200722 -- OpenSSL 1.0.2t 10 Sep 2019 `(/usr/local/opt/openssl -> /usr/local/Cellar/openssl/1.0.2t)` +- OpenSSL 1.0.2t 10 Sep 2019 `(/usr/local/opt/openssl -> /usr/local/Cellar/openssl@1.0.2t/1.0.2t)` - jq 1.6 -- gpg (GnuPG) 2.2.22 +- gpg (GnuPG) 2.2.23 - psql (PostgreSQL) 12.4 - PostgreSQL 12.4 - aria2 1.35.0 @@ -67,7 +63,7 @@ - bazel 3.5.0 - bazelisk 1.6.1 - helm v3.3.1+g249e521 -- virtualbox 6.1.12r139181 +- virtualbox 6.1.14r140239 - mongo v4.4.0 - mongod v4.4.0 - Vagrant 2.2.10 @@ -76,30 +72,30 @@ ### Tools -- Fastlane 2.157.2 +- Fastlane 2.159.0 - Cmake 3.18.2 -- App Center CLI 2.6.7 +- App Center CLI 2.7.0 - Azure CLI 2.11.1 -- AWS CLI 2.0.44 +- AWS CLI 2.0.48 - AWS SAM CLI 1.2.0 - AWS Session Manager CLI 1.1.61.0 - Aliyun CLI 3.0.56 - GHCup v0.1.10 -- GHC 9.0.0 +- GHC 8.10.2 - Cabal 3.2.0.0 - Stack 2.3.3 ### Linters - yamllint 1.24.2 -- SwiftLint 0.40.1 +- SwiftLint 0.40.2 ### Browsers - Safari 13.1.2 (15609.3.5.1.3) - SafariDriver 13.1.2 (15609.3.5.1.3) -- Google Chrome 85.0.4183.83 +- Google Chrome 85.0.4183.102 - ChromeDriver 85.0.4183.87 -- Microsoft Edge 85.0.564.44 -- MSEdgeDriver 85.0.564.44 +- Microsoft Edge 85.0.564.51 +- MSEdgeDriver 85.0.564.51 - Mozilla Firefox 80.0.1 - geckodriver 0.27.0 @@ -121,7 +117,7 @@ #### Python - 2.7.18 -- 3.5.9 +- 3.5.10 - 3.6.12 - 3.7.9 - 3.8.5 @@ -134,14 +130,14 @@ - 8.17.0 - 10.22.0 - 12.18.3 -- 14.9.0 +- 14.10.1 #### Go - 1.11.13 - 1.12.17 - 1.13.15 -- 1.14.8 -- 1.15.1 +- 1.14.9 +- 1.15.2 ### Rust Tools - Rust 1.46.0 @@ -165,10 +161,10 @@ ### Xamarin #### Visual Studio for Mac -- 8.7.4.38 +- 8.7.5.19 #### Mono -- 6.12.0.90 +- 6.12.0.93 - 6.10.0.106 - 6.8.0.123 - 6.6.0.166 @@ -207,19 +203,19 @@ - NUnit 3.6.1 ### Xcode -| Version | Build | Path | -| -------------- | -------- | ------------------------------- | -| 12.0 (beta) | 12A8189n | /Applications/Xcode_12_beta.app | -| 11.7 (default) | 11E801a | /Applications/Xcode_11.7.app | -| 11.6 | 11E708 | /Applications/Xcode_11.6.app | -| 11.5 | 11E608c | /Applications/Xcode_11.5.app | -| 11.4.1 | 11E503a | /Applications/Xcode_11.4.1.app | -| 11.4 | 11E146 | /Applications/Xcode_11.4.app | -| 11.3.1 | 11C505 | /Applications/Xcode_11.3.1.app | -| 11.2.1 | 11B500 | /Applications/Xcode_11.2.1.app | -| 11.1 | 11A1027 | /Applications/Xcode_11.1.app | -| 11.0 | 11A420a | /Applications/Xcode_11.app | -| 10.3 | 10G8 | /Applications/Xcode_10.3.app | +| Version | Build | Path | +| -------------- | -------- | ------------------------------ | +| 12.0 | 12A8189n | /Applications/Xcode_12.app | +| 11.7 (default) | 11E801a | /Applications/Xcode_11.7.app | +| 11.6 | 11E708 | /Applications/Xcode_11.6.app | +| 11.5 | 11E608c | /Applications/Xcode_11.5.app | +| 11.4.1 | 11E503a | /Applications/Xcode_11.4.1.app | +| 11.4 | 11E146 | /Applications/Xcode_11.4.app | +| 11.3.1 | 11C505 | /Applications/Xcode_11.3.1.app | +| 11.2.1 | 11B500 | /Applications/Xcode_11.2.1.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.4 From 1abf54f6c1519fcc6cd665e58802b436421f7385 Mon Sep 17 00:00:00 2001 From: Alena Sviridenko Date: Thu, 17 Sep 2020 14:14:54 +0300 Subject: [PATCH 46/55] updated Ubuntu contribution guide (#1602) --- CONTRIBUTING.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f0d8d4ec7..cce174ef1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -38,17 +38,18 @@ Here are a few things you can do that will increase the likelihood of your pull ### Windows - Add a script that will install the tool and put the script in the `scripts/Installers` folder. -There are a bunch of helper functions that could simplify your code: `Choco-Install`, `Install-Binary`, `Install-VsixExtension`, ` Start-DownloadWithRetry`, `Test-IsWin16`, ` Test-IsWin19` (find the full list of helpers in [ImageHelpers.psm1](images/win/scripts/ImageHelpers/ImageHelpers.psm1)). +There are a bunch of helper functions that could simplify your code: `Choco-Install`, `Install-Binary`, `Install-VsixExtension`, `Start-DownloadWithRetry`, `Test-IsWin16`, `Test-IsWin19` (find the full list of helpers in [ImageHelpers.psm1](images/win/scripts/ImageHelpers/ImageHelpers.psm1)). - Add a script that will validate the tool installation and put the script in the `scripts/Tests` folder. We use [Pester v5](https://github.com/pester/pester) for validation scripts. If the tests for the tool are complex enough, create a separate `*.Tests.ps1`. Otherwise, use `Tools.Tests.ps1` for simple tests. Add `Invoke-PesterTests -TestFile [-TestName ]` at the end of the installation script to make sure that your tests will be run. - Add changes to the software report generator `images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1`. The software report generator is used to generate an image's README file, e.g. [Windows2019-Readme.md](images/win/Windows2019-Readme.md) and uses [MarkdownPS](https://github.com/Sarafian/MarkdownPS). ### Ubuntu -- Add a single script that will install, validate, and document the tool and put the script in the `script/Installers` folder. Use existing scripts such as [github-cli.sh](images/linux/scripts/installers/github-cli.sh) as a starting point. +- Add script that will install and validate the tool and put the script in the `scripts/installers` folder. +Use existing scripts such as [github-cli.sh](images/linux/scripts/installers/github-cli.sh) as a starting point. - Use [helpers](images/linux/scripts/helpers/install.sh) to simplify installation process. - Validation part should `exit 1` if any issue with installation. - - Use `DocumentInstalledItem ""` helper for building documentation. +- Add changes to the software report generator `images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1`. The software report generator is used to generate an image's README file, e.g. [Ubuntu1804-Readme.md](images/linux/Ubuntu1804-README.md) and it uses [MarkdownPS](https://github.com/Sarafian/MarkdownPS). ### macOS macOS source lives in this repository and available for everyone. However, macOS image-generation CI doesn't support external contributions yet so we are not able to accept pull-requests for now. From 7b3bfbdf61e1833e3409f1b44afc3cff42c36731 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 17 Sep 2020 14:15:31 +0300 Subject: [PATCH 47/55] [Ubuntu] Remove docs logic from Ubuntu provisioner (#1603) * Remove docs logic on Ubuntu * Cleanup templates * Fix oras-cli.sh * Remove announcements.md --- images/linux/announcements.md | 0 images/linux/scripts/helpers/document.sh | 42 ------------------- images/linux/scripts/installers/7-zip.sh | 6 --- .../scripts/installers/Validate-Toolset.ps1 | 4 -- images/linux/scripts/installers/aliyun-cli.sh | 7 ---- images/linux/scripts/installers/android.sh | 32 -------------- images/linux/scripts/installers/ansible.sh | 5 --- .../linux/scripts/installers/aws-sam-cli.sh | 6 --- images/linux/scripts/installers/aws.sh | 7 ---- images/linux/scripts/installers/azcopy.sh | 9 ---- .../linux/scripts/installers/azpowershell.sh | 7 ---- images/linux/scripts/installers/azure-cli.sh | 5 --- .../scripts/installers/azure-devops-cli.sh | 5 --- images/linux/scripts/installers/basic.sh | 9 ---- images/linux/scripts/installers/bazel.sh | 9 ---- .../scripts/installers/build-essential.sh | 7 +--- images/linux/scripts/installers/clang.sh | 6 --- images/linux/scripts/installers/cmake.sh | 6 --- images/linux/scripts/installers/containers.sh | 10 ----- .../scripts/installers/docker-compose.sh | 6 --- .../linux/scripts/installers/docker-moby.sh | 16 ------- .../scripts/installers/dotnetcore-sdk.sh | 3 -- images/linux/scripts/installers/erlang.sh | 7 ---- images/linux/scripts/installers/example.sh | 6 --- images/linux/scripts/installers/firefox.sh | 13 ------ images/linux/scripts/installers/gcc.sh | 6 --- images/linux/scripts/installers/gfortran.sh | 6 --- images/linux/scripts/installers/git.sh | 10 ----- images/linux/scripts/installers/github-cli.sh | 6 --- .../linux/scripts/installers/google-chrome.sh | 9 ---- .../scripts/installers/google-cloud-sdk.sh | 6 --- images/linux/scripts/installers/haskell.sh | 7 ---- images/linux/scripts/installers/heroku.sh | 6 --- images/linux/scripts/installers/hhvm.sh | 5 --- images/linux/scripts/installers/homebrew.sh | 5 --- .../scripts/installers/hosted-tool-cache.sh | 8 ---- .../linux/scripts/installers/image-magick.sh | 6 --- images/linux/scripts/installers/java-tools.sh | 18 -------- images/linux/scripts/installers/julia.sh | 6 --- images/linux/scripts/installers/kind.sh | 6 --- .../scripts/installers/kubernetes-tools.sh | 11 ----- images/linux/scripts/installers/leiningen.sh | 6 --- images/linux/scripts/installers/mercurial.sh | 5 --- images/linux/scripts/installers/miniconda.sh | 6 --- images/linux/scripts/installers/mongodb.sh | 5 --- images/linux/scripts/installers/mono.sh | 7 ---- images/linux/scripts/installers/mysql.sh | 9 ---- images/linux/scripts/installers/netlify.sh | 6 --- images/linux/scripts/installers/nodejs.sh | 15 ------- images/linux/scripts/installers/nvm.sh | 4 -- images/linux/scripts/installers/oc.sh | 7 +--- images/linux/scripts/installers/oras-cli.sh | 6 --- images/linux/scripts/installers/packer.sh | 7 +--- images/linux/scripts/installers/phantomjs.sh | 7 ---- images/linux/scripts/installers/php.sh | 16 ------- images/linux/scripts/installers/pollinate.sh | 6 --- images/linux/scripts/installers/postgresql.sh | 4 -- .../scripts/installers/powershellcore.sh | 5 --- .../scripts/installers/preparemetadata.sh | 20 --------- images/linux/scripts/installers/pulumi.sh | 5 --- images/linux/scripts/installers/pypy.sh | 2 - images/linux/scripts/installers/python.sh | 8 ---- images/linux/scripts/installers/r.sh | 3 -- .../linux/scripts/installers/rndgenerator.sh | 6 --- images/linux/scripts/installers/ruby.sh | 7 ---- images/linux/scripts/installers/rust.sh | 14 ------- images/linux/scripts/installers/sbt.sh | 6 --- images/linux/scripts/installers/selenium.sh | 5 --- images/linux/scripts/installers/sphinx.sh | 6 --- images/linux/scripts/installers/subversion.sh | 6 --- images/linux/scripts/installers/swift.sh | 6 --- images/linux/scripts/installers/swig.sh | 6 --- images/linux/scripts/installers/terraform.sh | 6 --- images/linux/scripts/installers/vcpkg.sh | 5 --- images/linux/scripts/installers/vercel.sh | 7 ---- images/linux/ubuntu1604.json | 18 -------- images/linux/ubuntu1804.json | 18 -------- images/linux/ubuntu2004.json | 18 -------- 78 files changed, 3 insertions(+), 644 deletions(-) delete mode 100644 images/linux/announcements.md delete mode 100644 images/linux/scripts/helpers/document.sh delete mode 100644 images/linux/scripts/installers/preparemetadata.sh diff --git a/images/linux/announcements.md b/images/linux/announcements.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/images/linux/scripts/helpers/document.sh b/images/linux/scripts/helpers/document.sh deleted file mode 100644 index 0e1793a44..000000000 --- a/images/linux/scripts/helpers/document.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash -################################################################################ -## File: document.sh -## Desc: Helper functions for writing information to the metadata document -################################################################################ - -function WriteItem { - if [ -z "$METADATA_FILE" ]; then - echo "METADATA_FILE environment variable must be set to output to Metadata Document!" - return 1; - else - echo -e "$1" | sudo tee -a "$METADATA_FILE" - fi -} - -function AddTitle { - WriteItem "# $1" -} - -function AddSubTitle { - WriteItem "## $1" -} - -function DocumentInstalledItem { - WriteItem "- $1" -} - -function DocumentInstalledItemIndent { - WriteItem " - $1" -} - -function AddBlockquote { - WriteItem "> $1" -} - -function StartCode { - WriteItem '```' -} - -function EndCode { - WriteItem '```' -} diff --git a/images/linux/scripts/installers/7-zip.sh b/images/linux/scripts/installers/7-zip.sh index 1baa00261..4b753de53 100644 --- a/images/linux/scripts/installers/7-zip.sh +++ b/images/linux/scripts/installers/7-zip.sh @@ -4,8 +4,6 @@ ## Desc: Installs 7-zip ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Install 7-Zip apt-get update -y @@ -17,7 +15,3 @@ if ! command -v 7z; then echo "7-Zip was not installed" exit 1 fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "7-Zip $(7z i | head --lines=2 | cut -d ' ' -f 3 | tr -d '\n')" diff --git a/images/linux/scripts/installers/Validate-Toolset.ps1 b/images/linux/scripts/installers/Validate-Toolset.ps1 index b5eb9a0a5..2af4fcf42 100644 --- a/images/linux/scripts/installers/Validate-Toolset.ps1 +++ b/images/linux/scripts/installers/Validate-Toolset.ps1 @@ -50,7 +50,6 @@ $toolset = Get-Content -Path "$env:INSTALLER_SCRIPT_FOLDER/toolset.json" -Raw $tools = ConvertFrom-Json -InputObject $toolset | 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 @@ -85,8 +84,5 @@ foreach($tool in $tools) { $pypyVersion = & "$foundVersionPath/bin/python" -c "import sys;print(sys.version.split('\n')[1])" $foundVersionName = "{0} {1}" -f $foundVersionName, $pypyVersion } - - # Add tool version to documentation - Invoke-Expression "bash -c `"source $env:HELPER_SCRIPTS/document.sh; DocumentInstalledItemIndent '$($tool.name) $foundVersionName'`"" } } \ No newline at end of file diff --git a/images/linux/scripts/installers/aliyun-cli.sh b/images/linux/scripts/installers/aliyun-cli.sh index ed826c90e..af45bd07c 100644 --- a/images/linux/scripts/installers/aliyun-cli.sh +++ b/images/linux/scripts/installers/aliyun-cli.sh @@ -4,8 +4,6 @@ ## Desc: Installs Alibaba Cloud CLI ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Install Alibaba Cloud CLI URL=$(curl -s https://api.github.com/repos/aliyun/aliyun-cli/releases/latest | jq -r '.assets[].browser_download_url | select(contains("aliyun-cli-linux"))') @@ -19,8 +17,3 @@ if ! command -v aliyun ; then echo "aliyun was not installed" exit 1 fi - -# Document what was added to the image -aliyun_version="$(aliyun version)" -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Alibaba Cloud CLI ($aliyun_version)" \ No newline at end of file diff --git a/images/linux/scripts/installers/android.sh b/images/linux/scripts/installers/android.sh index ed06f51ac..81f28ff7a 100644 --- a/images/linux/scripts/installers/android.sh +++ b/images/linux/scripts/installers/android.sh @@ -7,7 +7,6 @@ set -e # Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh source $HELPER_SCRIPTS/os.sh # Set env variable for SDK Root (https://developer.android.com/studio/command-line/variables) @@ -62,34 +61,3 @@ buildtools_versions_list=$(echo "$buildtools"|awk -F';' '{print $2}') # Add required permissions chmod -R a+rwx ${ANDROID_SDK_ROOT} - -echo "Lastly, document what was added to the metadata file" -DocumentInstalledItem "Google Repository $(cat ${ANDROID_SDK_ROOT}/extras/google/m2repository/source.properties 2>&1 | grep Pkg.Revision | cut -d '=' -f 2)" -DocumentInstalledItem "Google Play services $(cat ${ANDROID_SDK_ROOT}/extras/google/google_play_services/source.properties 2>&1 | grep Pkg.Revision | cut -d '=' -f 2)" - -for version in $google_api_versions_list; do - DocumentInstalledItem "Google APIs $version" -done - -DocumentInstalledItem "CMake $(ls ${ANDROID_SDK_ROOT}/cmake 2>&1)" - -for version in $constraint_layout_versions_list; do - DocumentInstalledItem "Android ConstraintLayout $version" -done - -for version in $constraint_layout_solver_versions_list; do - DocumentInstalledItem "Android ConstraintLayout Solver $version" -done - -DocumentInstalledItem "Android SDK Platform-Tools $(cat ${ANDROID_SDK_ROOT}/platform-tools/source.properties 2>&1 | grep Pkg.Revision | cut -d '=' -f 2)" -for version in $platform_versions_list; do - DocumentInstalledItem "Android SDK Platform $version" -done - -DocumentInstalledItem "Android SDK Patch Applier v4" - -for version in $buildtools_versions_list; do - DocumentInstalledItem "Android SDK Build-Tools $version" -done - -DocumentInstalledItem "Android NDK $(cat ${ANDROID_SDK_ROOT}/ndk-bundle/source.properties 2>&1 | grep Pkg.Revision | cut -d ' ' -f 3)" diff --git a/images/linux/scripts/installers/ansible.sh b/images/linux/scripts/installers/ansible.sh index fcf039308..9f41af7cb 100644 --- a/images/linux/scripts/installers/ansible.sh +++ b/images/linux/scripts/installers/ansible.sh @@ -5,7 +5,6 @@ ################################################################################ # Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh source $HELPER_SCRIPTS/os.sh # ppa:ansible/ansible doesn't contain packages for Ubuntu20.04 @@ -23,7 +22,3 @@ if ! command -v ansible; then echo "Ansible was not installed or found on PATH" exit 1 fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Ansible ($(ansible --version |& head -n 1))" diff --git a/images/linux/scripts/installers/aws-sam-cli.sh b/images/linux/scripts/installers/aws-sam-cli.sh index 97ceb2135..ac56144b3 100644 --- a/images/linux/scripts/installers/aws-sam-cli.sh +++ b/images/linux/scripts/installers/aws-sam-cli.sh @@ -5,8 +5,6 @@ ## Requires Python >=3.6, must be run as non-root user after toolset installation ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Download latest aws sam cli sources TarballUrl=$(curl -s https://api.github.com/repos/aws/aws-sam-cli/releases/latest | jq -r '.tarball_url') @@ -31,7 +29,3 @@ if ! sam --version; then echo "AWS SAM CLI was not installed" exit 1 fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "AWS $(sam --version)" \ No newline at end of file diff --git a/images/linux/scripts/installers/aws.sh b/images/linux/scripts/installers/aws.sh index edf9b1a5c..b2ab32fa1 100644 --- a/images/linux/scripts/installers/aws.sh +++ b/images/linux/scripts/installers/aws.sh @@ -4,8 +4,6 @@ ## Desc: Installs the AWS CLI ################################################################################ -# Source the helpers -source $HELPER_SCRIPTS/document.sh source $HELPER_SCRIPTS/os.sh # Install the AWS CLI v1 on Ubuntu16 and Ubuntu18, and AWS CLI v2 on Ubuntu20 @@ -41,8 +39,3 @@ if ! [[ $sessionPlugin == *"was installed successfully"* ]] then exit 1 fi - -# Document the installed version -echo "Document the installed version" -DocumentInstalledItem "AWS CLI ($(aws --version 2>&1))" -DocumentInstalledItem "AWS CLI Session manager plugin ($(session-manager-plugin --version 2>&1))" diff --git a/images/linux/scripts/installers/azcopy.sh b/images/linux/scripts/installers/azcopy.sh index 9d15d37af..9b57d2680 100644 --- a/images/linux/scripts/installers/azcopy.sh +++ b/images/linux/scripts/installers/azcopy.sh @@ -4,8 +4,6 @@ ## Desc: Installs AzCopy ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Install AzCopy7 wget -O azcopy.tar.gz https://aka.ms/downloadazcopylinux64 @@ -30,10 +28,3 @@ if ! command -v azcopy10; then echo "azcopy10 was not installed" exit 1 fi - -# Document what was added to the image -azcopy7Version=$(azcopy --version | awk '{print $2}' | cut -d '-' -f 1) -azcopy10Version=$(azcopy10 --version | awk '{print $3}') -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "AzCopy7 (available by azcopy alias) $azcopy7Version" -DocumentInstalledItem "AzCopy10 (available by azcopy10 alias) $azcopy10Version" diff --git a/images/linux/scripts/installers/azpowershell.sh b/images/linux/scripts/installers/azpowershell.sh index 2b7d703df..a4a159865 100644 --- a/images/linux/scripts/installers/azpowershell.sh +++ b/images/linux/scripts/installers/azpowershell.sh @@ -5,7 +5,6 @@ ################################################################################ # Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh source $HELPER_SCRIPTS/os.sh # List of versions @@ -36,9 +35,3 @@ for version in ${versions[@]}; do exit 1 fi done - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -for version in ${versions[@]}; do - DocumentInstalledItem "Az Module ($version)" -done diff --git a/images/linux/scripts/installers/azure-cli.sh b/images/linux/scripts/installers/azure-cli.sh index 713d23151..a33ee2f64 100644 --- a/images/linux/scripts/installers/azure-cli.sh +++ b/images/linux/scripts/installers/azure-cli.sh @@ -4,8 +4,6 @@ ## Desc: Installed Azure CLI (az) ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Install Azure CLI (instructions taken from https://docs.microsoft.com/en-us/cli/azure/install-azure-cli) curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash @@ -16,6 +14,3 @@ if ! command -v az; then echo "azure-cli was not installed" exit 1 fi - -# Document what was added to the image -DocumentInstalledItem "Azure CLI ($(az -v | head -n 1))" diff --git a/images/linux/scripts/installers/azure-devops-cli.sh b/images/linux/scripts/installers/azure-devops-cli.sh index e709243d6..d39761be6 100644 --- a/images/linux/scripts/installers/azure-devops-cli.sh +++ b/images/linux/scripts/installers/azure-devops-cli.sh @@ -4,8 +4,6 @@ ## Desc: Installed Azure DevOps CLI (az devops) ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # AZURE_EXTENSION_DIR shell variable defines where modules are installed # https://docs.microsoft.com/en-us/cli/azure/azure-cli-extensions-overview @@ -23,6 +21,3 @@ else echo "azure DevOps Cli extension was not installed" exit 1 fi - -# Document what was added to the image -DocumentInstalledItem "Azure CLI ($(az -v | grep azure-devops))" diff --git a/images/linux/scripts/installers/basic.sh b/images/linux/scripts/installers/basic.sh index 0772cf4ed..b8f3e10f6 100644 --- a/images/linux/scripts/installers/basic.sh +++ b/images/linux/scripts/installers/basic.sh @@ -5,8 +5,6 @@ ################################################################################ set -e -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh toolset="$INSTALLER_SCRIPT_FOLDER/toolset.json" common_packages=$(jq -r ".apt.common_packages[]" $toolset) @@ -24,10 +22,3 @@ for cmd in $cmd_packages; do exit 1 fi done - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Basic packages:" -for package in $common_packages $cmd_packages; do - DocumentInstalledItemIndent $package -done diff --git a/images/linux/scripts/installers/bazel.sh b/images/linux/scripts/installers/bazel.sh index d058d5764..2735df10c 100644 --- a/images/linux/scripts/installers/bazel.sh +++ b/images/linux/scripts/installers/bazel.sh @@ -4,8 +4,6 @@ ## Desc: Installs Bazel and Bazelisk (A user-friendly launcher for Bazel) ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Install bazel curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add - @@ -27,10 +25,3 @@ if ! command -v bazelisk; then echo "Bazelisk was not installed" exit 1 fi - -# Document what was added to the image -bazelisk_version="$(bazelisk version 2>null | grep "Bazelisk version:" | cut -d "v" -f 3)" - -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Bazel ($(bazel --version))" -DocumentInstalledItem "Bazelisk ($bazelisk_version)" diff --git a/images/linux/scripts/installers/build-essential.sh b/images/linux/scripts/installers/build-essential.sh index 34c2ac040..af711a1e9 100644 --- a/images/linux/scripts/installers/build-essential.sh +++ b/images/linux/scripts/installers/build-essential.sh @@ -4,8 +4,7 @@ ## Desc: Installs build-essential package ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh + source $HELPER_SCRIPTS/install.sh PACKAGE=build-essential @@ -18,7 +17,3 @@ if ! IsPackageInstalled $PACKAGE; then else echo "$PACKAGE is already installed" fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "$PACKAGE" diff --git a/images/linux/scripts/installers/clang.sh b/images/linux/scripts/installers/clang.sh index eb508493b..54e6a94f4 100644 --- a/images/linux/scripts/installers/clang.sh +++ b/images/linux/scripts/installers/clang.sh @@ -4,8 +4,6 @@ ## Desc: Installs Clang compiler (versions: 6, 8 and 9) ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh function InstallClang { version=$1 @@ -26,10 +24,6 @@ function InstallClang { exit 1 fi done - - # Document what was added to the image - echo "Documenting clang-$version..." - DocumentInstalledItem "Clang $version ($(clang-$version --version | head -n 1 | cut -d ' ' -f 3 | cut -d '-' -f 1))" } # Download script for automatic installation diff --git a/images/linux/scripts/installers/cmake.sh b/images/linux/scripts/installers/cmake.sh index 0fd839a50..2dbf4cf54 100644 --- a/images/linux/scripts/installers/cmake.sh +++ b/images/linux/scripts/installers/cmake.sh @@ -4,8 +4,6 @@ ## Desc: Installs CMake ################################################################################ -# Source the helpers for use with the script -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" @@ -24,7 +22,3 @@ if ! command -v cmake; then echo "cmake was not installed" exit 1 fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "CMake ($(cmake --version | head -n 1))" diff --git a/images/linux/scripts/installers/containers.sh b/images/linux/scripts/installers/containers.sh index 77e542286..a44d73fd7 100644 --- a/images/linux/scripts/installers/containers.sh +++ b/images/linux/scripts/installers/containers.sh @@ -4,7 +4,6 @@ ## Desc: Installs container tools: podman, buildah and skopeo onto the image ################################################################################ -source $HELPER_SCRIPTS/document.sh source /etc/os-release sh -c "echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/x${NAME}_${VERSION_ID}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list" @@ -14,12 +13,3 @@ apt-get update -qq apt-get -qq -y install podman buildah skopeo mkdir -p /etc/containers echo -e "[registries.search]\nregistries = ['docker.io', 'quay.io']" | tee /etc/containers/registries.conf - -## Add version information to the metadata file -echo "Documenting container tools 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)" diff --git a/images/linux/scripts/installers/docker-compose.sh b/images/linux/scripts/installers/docker-compose.sh index 76a5df7b9..d2698d5c0 100644 --- a/images/linux/scripts/installers/docker-compose.sh +++ b/images/linux/scripts/installers/docker-compose.sh @@ -4,7 +4,6 @@ ## Desc: Installs Docker Compose ################################################################################ -source $HELPER_SCRIPTS/document.sh URL=$(curl -s https://api.github.com/repos/docker/compose/releases/latest | jq -r '.assets[].browser_download_url | select(contains("docker-compose-Linux-x86_64"))' | head -1) @@ -18,8 +17,3 @@ if ! command -v docker-compose; then echo "docker-compose was not installed" exit 1 fi - -## Add version information to the metadata file -echo "Documenting Docker Compose version" -docker_compose_version=$(docker-compose -v) -DocumentInstalledItem "Docker Compose (${docker_compose_version})" diff --git a/images/linux/scripts/installers/docker-moby.sh b/images/linux/scripts/installers/docker-moby.sh index 6ce336718..49ef6a563 100644 --- a/images/linux/scripts/installers/docker-moby.sh +++ b/images/linux/scripts/installers/docker-moby.sh @@ -6,7 +6,6 @@ set -e # Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh source $HELPER_SCRIPTS/install.sh source $HELPER_SCRIPTS/os.sh @@ -54,18 +53,3 @@ images=$(jq -r '.docker.images[]' $toolset) for image in $images; do docker pull "$image" done - -# Add version information to the metadata file -echo "Documenting Docker version" -docker_version=$(docker -v) -DocumentInstalledItem "Docker-Moby ($docker_version)" - -echo "Documenting Docker-buildx version" -DOCKER_BUILDX_VERSION=$(docker buildx version | cut -d ' ' -f2) -DocumentInstalledItem "Docker-Buildx ($DOCKER_BUILDX_VERSION)" - -# Add container information to the metadata file -DocumentInstalledItem "Cached container images" -while read -r line; do - DocumentInstalledItemIndent "$line" -done <<< "$(docker images --digests --format '{{.Repository}}:{{.Tag}} (Digest: {{.Digest}})')" diff --git a/images/linux/scripts/installers/dotnetcore-sdk.sh b/images/linux/scripts/installers/dotnetcore-sdk.sh index e510f34c3..ee0a95b89 100644 --- a/images/linux/scripts/installers/dotnetcore-sdk.sh +++ b/images/linux/scripts/installers/dotnetcore-sdk.sh @@ -5,7 +5,6 @@ ################################################################################ source $HELPER_SCRIPTS/etc-environment.sh -source $HELPER_SCRIPTS/document.sh source $HELPER_SCRIPTS/install.sh source $HELPER_SCRIPTS/os.sh @@ -84,7 +83,6 @@ for tarball in *.tar.gz; do done rm urls -DocumentInstalledItem ".NET Core SDK:" # Smoke test each SDK for sdk in $sortedSdks; do mksamples "$sdk" "console" @@ -93,7 +91,6 @@ for sdk in $sortedSdks; do mksamples "$sdk" "web" mksamples "$sdk" "mvc" mksamples "$sdk" "webapi" - DocumentInstalledItemIndent "$sdk" done # NuGetFallbackFolder at /usr/share/dotnet/sdk/NuGetFallbackFolder is warmed up by smoke test diff --git a/images/linux/scripts/installers/erlang.sh b/images/linux/scripts/installers/erlang.sh index 31a3a3061..aa94e3a2b 100644 --- a/images/linux/scripts/installers/erlang.sh +++ b/images/linux/scripts/installers/erlang.sh @@ -4,8 +4,6 @@ ## Desc: Installs erlang ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh source_list=/etc/apt/sources.list.d/eslerlang.list @@ -29,10 +27,5 @@ for cmd in erl erlc rebar3; do fi done -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -erlang_version="$(erl -version 2>&1 | tr -d '\n' | tr -d '\r')" -DocumentInstalledItem "Erlang ($erlang_version)" - # Clean up source list rm $source_list diff --git a/images/linux/scripts/installers/example.sh b/images/linux/scripts/installers/example.sh index d0f3c5c3d..895de5d35 100644 --- a/images/linux/scripts/installers/example.sh +++ b/images/linux/scripts/installers/example.sh @@ -5,8 +5,6 @@ ## installer to the image ################################################################################ -# Source the helpers for use with the script -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" @@ -24,7 +22,3 @@ if [ -z $EXAMPLE_VAR ]; then else echo "EXAMPLE_VAR was set properly" fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Example Var ($EXAMPLE_VAR)" diff --git a/images/linux/scripts/installers/firefox.sh b/images/linux/scripts/installers/firefox.sh index e6f44cbf2..3287bf168 100644 --- a/images/linux/scripts/installers/firefox.sh +++ b/images/linux/scripts/installers/firefox.sh @@ -4,8 +4,6 @@ ## Desc: Installs Firefox ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Install Firefox apt-get install -y firefox @@ -20,13 +18,6 @@ fi # Default firefox local is en_GB echo 'pref("intl.locale.requested","en_US");' >> "/usr/lib/firefox/browser/defaults/preferences/syspref.js" -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -# Resolves: Running Firefox as root in a regular user's session is not supported. -# ($HOME is /home/packer which is owned by packer.) -HOME=/root -DocumentInstalledItem "Firefox ($(firefox --version))" - # Download and unpack latest release of geckodriver URL=$(curl -s https://api.github.com/repos/mozilla/geckodriver/releases/latest | jq -r '.assets[].browser_download_url | select(test("linux64.tar.gz$"))') echo "Downloading geckodriver $URL" @@ -50,7 +41,3 @@ if ! command -v geckodriver; then echo "geckodriver was not installed" exit 1 fi - -echo "Lastly, documenting what we added to the metadata file" -ver=`geckodriver --version | head -1 |awk '{print $2}'` -DocumentInstalledItem "Geckodriver (${ver}); Gecko Driver is available via GECKOWEBDRIVER environment variable" diff --git a/images/linux/scripts/installers/gcc.sh b/images/linux/scripts/installers/gcc.sh index 86575568c..7b1bd56ea 100644 --- a/images/linux/scripts/installers/gcc.sh +++ b/images/linux/scripts/installers/gcc.sh @@ -4,8 +4,6 @@ ## Desc: Installs GNU C++ ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh function InstallGcc { version=$1 @@ -19,10 +17,6 @@ function InstallGcc { echo "$version was not installed" exit 1 fi - - # Document what was added to the image - echo "Documenting $version..." - DocumentInstalledItem "GNU C++ $($version --version | head -n 1 | cut -d ' ' -f 4)" } # Install GNU C++ compiler diff --git a/images/linux/scripts/installers/gfortran.sh b/images/linux/scripts/installers/gfortran.sh index 1e392839d..c37fccf27 100644 --- a/images/linux/scripts/installers/gfortran.sh +++ b/images/linux/scripts/installers/gfortran.sh @@ -4,8 +4,6 @@ ## Desc: Installs GNU Fortran ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh function InstallFortran { version=$1 @@ -19,10 +17,6 @@ function InstallFortran { echo "$version was not installed" exit 1 fi - - # Document what was added to the image - echo "Documenting $version..." - DocumentInstalledItem "GNU Fortran $($version --version | head -n 1 | cut -d ' ' -f 5)" } # Install GNU Fortran compiler diff --git a/images/linux/scripts/installers/git.sh b/images/linux/scripts/installers/git.sh index ae497458d..331e5f813 100644 --- a/images/linux/scripts/installers/git.sh +++ b/images/linux/scripts/installers/git.sh @@ -6,7 +6,6 @@ set -e # Source the helpers for use with the script -source "$HELPER_SCRIPTS"/document.sh source "$HELPER_SCRIPTS"/install.sh ## Install git @@ -39,14 +38,6 @@ if ! command -v git-ftp; then exit 1 fi -# Document what was added to the image -echo "Lastly, document the installed versions" -# git version 2.20.1 -DocumentInstalledItem "Git ($(git --version 2>&1 | cut -d ' ' -f 3))" -# git-lfs/2.6.1 (GitHub; linux amd64; go 1.11.1) -DocumentInstalledItem "Git Large File Storage (LFS) ($(git-lfs --version 2>&1 | cut -d ' ' -f 1 | cut -d '/' -f 2))" -DocumentInstalledItem "Git-ftp ($(git-ftp --version | cut -d ' ' -f 3))" - #Install hub tmp_hub="/tmp/hub" mkdir -p "$tmp_hub" @@ -57,7 +48,6 @@ mv "$tmp_hub"/bin/hub /usr/local/bin if command -v hub; then echo "hub CLI was installed successfully" - DocumentInstalledItem "Hub CLI ($(hub --version | grep "hub version" | cut -d ' ' -f 3))" else echo "[!] Hub CLI was not installed" exit 1 diff --git a/images/linux/scripts/installers/github-cli.sh b/images/linux/scripts/installers/github-cli.sh index 5cc430948..c9bec1fc6 100644 --- a/images/linux/scripts/installers/github-cli.sh +++ b/images/linux/scripts/installers/github-cli.sh @@ -5,8 +5,6 @@ ## Must be run as non-root user after homebrew ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Install GitHub CLI url=$(curl -s https://api.github.com/repos/cli/cli/releases/latest | jq -r '.assets[].browser_download_url|select(contains("linux") and contains("amd64") and contains(".deb"))') @@ -20,7 +18,3 @@ if ! gh --version; then echo "GitHub CLI was not installed" exit 1 fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "GitHub CLI $(gh --version|awk 'FNR==1 {print $3}')" diff --git a/images/linux/scripts/installers/google-chrome.sh b/images/linux/scripts/installers/google-chrome.sh index 892380ce7..a6ace2f38 100644 --- a/images/linux/scripts/installers/google-chrome.sh +++ b/images/linux/scripts/installers/google-chrome.sh @@ -4,8 +4,6 @@ ## Desc: Installs google-chrome and chromedriver ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh LSB_RELEASE=$(lsb_release -rs) @@ -22,10 +20,6 @@ if ! command -v google-chrome; then exit 1 fi -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Google Chrome ($(google-chrome --version))" - CHROME_VERSION=$(google-chrome --product-version) CHROME_VERSION=${CHROME_VERSION%.*} @@ -54,6 +48,3 @@ if ! command -v chromedriver; then echo "chromedriver was not installed" exit 1 fi - -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "$(chromedriver --version); Chrome Driver is available via CHROMEWEBDRIVER environment variable" diff --git a/images/linux/scripts/installers/google-cloud-sdk.sh b/images/linux/scripts/installers/google-cloud-sdk.sh index 4293a85a4..147d8d4fb 100644 --- a/images/linux/scripts/installers/google-cloud-sdk.sh +++ b/images/linux/scripts/installers/google-cloud-sdk.sh @@ -4,8 +4,6 @@ ## Desc: Installs the Google Cloud SDK ################################################################################ -# Source the helpers -source $HELPER_SCRIPTS/document.sh # Install the Google Cloud SDK echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list @@ -19,7 +17,3 @@ if ! command -v gcloud; then echo "gcloud was not installed" exit 1 fi - -# Document the installed version -echo "Document the installed version" -DocumentInstalledItem "Google Cloud SDK ($(gcloud --version | head -n 1 | cut -d ' ' -f 4))" diff --git a/images/linux/scripts/installers/haskell.sh b/images/linux/scripts/installers/haskell.sh index 242a0f32c..b8bfa5efe 100644 --- a/images/linux/scripts/installers/haskell.sh +++ b/images/linux/scripts/installers/haskell.sh @@ -6,7 +6,6 @@ # Source the helpers for use with the script source $HELPER_SCRIPTS/etc-environment.sh -source $HELPER_SCRIPTS/document.sh # Install Herbert V. Riedel's PPA for managing multiple version of ghc on ubuntu. # https://launchpad.net/~hvr/+archive/ubuntu/ghc @@ -58,9 +57,3 @@ fi # Create symlink for ghc and cabal in /usr/bin ln -s "/opt/ghc/$defaultGHCVersion/bin/ghc" "/usr/bin/ghc" ln -s "/opt/cabal/$cabalVersion/bin/cabal" "/usr/bin/cabal" - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Haskell Cabal ($(cabal --version))" -DocumentInstalledItem "GHC ($(ghc --version))" -DocumentInstalledItem "Haskell Stack ($(stack --version))" diff --git a/images/linux/scripts/installers/heroku.sh b/images/linux/scripts/installers/heroku.sh index ff39be66c..c4c0e588c 100644 --- a/images/linux/scripts/installers/heroku.sh +++ b/images/linux/scripts/installers/heroku.sh @@ -4,8 +4,6 @@ ## Desc: Installs Heroku CLI ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Install Heroku CLI curl https://cli-assets.heroku.com/install-ubuntu.sh | sh @@ -15,7 +13,3 @@ echo "Testing to make sure that script performed as expected, and basic scenario if ! command -v heroku; then exit 1 fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Heroku ($(heroku version))" diff --git a/images/linux/scripts/installers/hhvm.sh b/images/linux/scripts/installers/hhvm.sh index e5f9079bc..3010db873 100644 --- a/images/linux/scripts/installers/hhvm.sh +++ b/images/linux/scripts/installers/hhvm.sh @@ -5,7 +5,6 @@ ################################################################################ # Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh source $HELPER_SCRIPTS/install.sh hhvm_package=hhvm @@ -31,7 +30,3 @@ fi if ! command -v hhvm; then exit 1 fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "HHVM ($(hhvm --version | head -n 1))" diff --git a/images/linux/scripts/installers/homebrew.sh b/images/linux/scripts/installers/homebrew.sh index 0a739e274..370d9d09d 100644 --- a/images/linux/scripts/installers/homebrew.sh +++ b/images/linux/scripts/installers/homebrew.sh @@ -6,7 +6,6 @@ ################################################################################ # Source the helpers -source $HELPER_SCRIPTS/document.sh source $HELPER_SCRIPTS/etc-environment.sh # Install the Homebrew on Linux @@ -31,7 +30,3 @@ if ! command -v brew; then echo "brew was not installed" exit 1 fi - -# Document the installed version -echo "Document the installed version" -DocumentInstalledItem "Homebrew on Linux ($(brew -v 2>&1))" diff --git a/images/linux/scripts/installers/hosted-tool-cache.sh b/images/linux/scripts/installers/hosted-tool-cache.sh index ef1553f2e..d40a4922a 100644 --- a/images/linux/scripts/installers/hosted-tool-cache.sh +++ b/images/linux/scripts/installers/hosted-tool-cache.sh @@ -4,8 +4,6 @@ ## Desc: Downloads and installs hosted tools cache ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Fail out if any setups fail set -e @@ -43,9 +41,3 @@ for PACKAGE_NAME in ${PACKAGE_LIST[@]}; do done; popd - -DocumentInstalledItem "Ruby:" -rubys=$(ls $AGENT_TOOLSDIRECTORY/Ruby) -for ruby in $rubys; do - DocumentInstalledItemIndent "Ruby $ruby" -done; diff --git a/images/linux/scripts/installers/image-magick.sh b/images/linux/scripts/installers/image-magick.sh index 39925fdfe..e01c933a7 100644 --- a/images/linux/scripts/installers/image-magick.sh +++ b/images/linux/scripts/installers/image-magick.sh @@ -4,8 +4,6 @@ ## Desc: Installs ImageMagick ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Install ImageMagick apt-get install -y --no-install-recommends --fix-missing \ @@ -13,7 +11,3 @@ apt-get install -y --no-install-recommends --fix-missing \ libmagickcore-dev \ libmagickwand-dev \ libmagic-dev - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "ImageMagick" diff --git a/images/linux/scripts/installers/java-tools.sh b/images/linux/scripts/installers/java-tools.sh index 7ec94b732..46aa8b285 100644 --- a/images/linux/scripts/installers/java-tools.sh +++ b/images/linux/scripts/installers/java-tools.sh @@ -4,8 +4,6 @@ ## Desc: Installs Java and related tooling (Ant, Gradle, Maven) ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh source $HELPER_SCRIPTS/os.sh set -e @@ -103,19 +101,3 @@ javaVersion=$(java -version |& head -n 1 | cut -d\" -f 2) javaTool "Java" $javaVersion javacVersion=$(javac -version |& cut -d" " -f2) javaTool "Javac" $javacVersion - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -if isUbuntu16 || isUbuntu18 ; then -DocumentInstalledItem "Azul Zulu OpenJDK:" -DocumentInstalledItemIndent "7 ($(/usr/lib/jvm/zulu-7-azure-amd64/bin/java -showversion |& head -n 1))" -fi -DocumentInstalledItem "Adopt OpenJDK:" -DocumentInstalledItemIndent "8 ($(/usr/lib/jvm/adoptopenjdk-8-hotspot-amd64/bin/java -showversion |& head -n 1)) $defaultLabel8" -DocumentInstalledItemIndent "11 ($(/usr/lib/jvm/adoptopenjdk-11-hotspot-amd64/bin/java -showversion |& head -n 1)) $defaultLabel11" -if isUbuntu16 || isUbuntu18 ; then -DocumentInstalledItemIndent "12 ($(/usr/lib/jvm/adoptopenjdk-12-hotspot-amd64/bin/java -showversion |& head -n 1))" -fi -DocumentInstalledItem "Ant ($(ant -version))" -DocumentInstalledItem "Gradle ${gradleVersion}" -DocumentInstalledItem "Maven ($(mvn -version | head -n 1))" diff --git a/images/linux/scripts/installers/julia.sh b/images/linux/scripts/installers/julia.sh index a576a5405..079890a19 100644 --- a/images/linux/scripts/installers/julia.sh +++ b/images/linux/scripts/installers/julia.sh @@ -4,8 +4,6 @@ ## Desc: Installs Julia, and adds Julia to the path ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # This function fetches the latest Julia release from the GitHub API # Based on https://gist.github.com/lukechilds/a83e1d7127b78fef38c2914c4ececc3c @@ -54,10 +52,6 @@ function InstallJulia () { echo "Julia was not installed correctly" exit 1 fi - - # Document what was added to the image - echo "Lastly, documenting what we added to the metadata file" - DocumentInstalledItem "Julia ($(julia --version))" } InstallJulia "$(GetLatestJuliaRelease)" true diff --git a/images/linux/scripts/installers/kind.sh b/images/linux/scripts/installers/kind.sh index 4fc7c0d42..3a312a2e3 100644 --- a/images/linux/scripts/installers/kind.sh +++ b/images/linux/scripts/installers/kind.sh @@ -4,8 +4,6 @@ ## Desc: Installs kind ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Install KIND URL=$(curl -s https://api.github.com/repos/kubernetes-sigs/kind/releases/latest | jq -r '.assets[].browser_download_url | select(contains("kind-linux-amd64"))') @@ -18,7 +16,3 @@ if ! command -v kind; then echo "Kind was not installed or found on PATH" exit 1 fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Kind ($(kind version))" diff --git a/images/linux/scripts/installers/kubernetes-tools.sh b/images/linux/scripts/installers/kubernetes-tools.sh index f86f8abaa..a25cb0f26 100644 --- a/images/linux/scripts/installers/kubernetes-tools.sh +++ b/images/linux/scripts/installers/kubernetes-tools.sh @@ -4,8 +4,6 @@ ## Desc: Installs kubectl, helm, kustomize ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh ## Install kubectl curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - @@ -52,12 +50,3 @@ if ! command -v kustomize; then echo "kustomize was not installed" exit 1 fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "kubectl ($(kubectl version --client --short |& head -n 1))" -DocumentInstalledItem "helm ($(helm version --short |& head -n 1))" -# minikube version output already has word minikube in it. example minikube version: v1.9.2 -DocumentInstalledItem "$(minikube version --short)" -# kustomize version output has "{} in it". example {kustomize/v3.8.1 2020-07-16T00:58:46Z } -DocumentInstalledItem "kustomize ($(kustomize version --short))" diff --git a/images/linux/scripts/installers/leiningen.sh b/images/linux/scripts/installers/leiningen.sh index 318f65ebc..56079a34d 100644 --- a/images/linux/scripts/installers/leiningen.sh +++ b/images/linux/scripts/installers/leiningen.sh @@ -4,8 +4,6 @@ ## Desc: Installs Leiningen ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh set -e @@ -29,7 +27,3 @@ if ! command -v lein; then else lein new app testapp && rm -rf testapp fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Leiningen ($(lein -v))" diff --git a/images/linux/scripts/installers/mercurial.sh b/images/linux/scripts/installers/mercurial.sh index af40bf817..ad972d74f 100644 --- a/images/linux/scripts/installers/mercurial.sh +++ b/images/linux/scripts/installers/mercurial.sh @@ -5,7 +5,6 @@ ################################################################################ # Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh source $HELPER_SCRIPTS/os.sh if isUbuntu16 ; then @@ -22,7 +21,3 @@ echo "Testing to make sure that script performed as expected, and basic scenario if ! command -v hg; then exit 1 fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Mercurial ($(hg --version | head -n 1))" diff --git a/images/linux/scripts/installers/miniconda.sh b/images/linux/scripts/installers/miniconda.sh index 8ec72635d..29eebd0ca 100644 --- a/images/linux/scripts/installers/miniconda.sh +++ b/images/linux/scripts/installers/miniconda.sh @@ -4,8 +4,6 @@ ## Desc: Installs miniconda ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Install Miniconda curl -sL https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -o miniconda.sh \ @@ -17,7 +15,3 @@ CONDA=/usr/share/miniconda echo "CONDA=$CONDA" | tee -a /etc/environment ln -s $CONDA/bin/conda /usr/bin/conda - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Miniconda ($($CONDA/bin/conda --version))" diff --git a/images/linux/scripts/installers/mongodb.sh b/images/linux/scripts/installers/mongodb.sh index 54aaa4075..2d012c61f 100644 --- a/images/linux/scripts/installers/mongodb.sh +++ b/images/linux/scripts/installers/mongodb.sh @@ -6,7 +6,6 @@ # 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.4.asc | sudo apt-key add - @@ -21,7 +20,3 @@ 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 --version | awk 'NR==1{print $3}')" diff --git a/images/linux/scripts/installers/mono.sh b/images/linux/scripts/installers/mono.sh index e0f84a11a..9e4968f36 100644 --- a/images/linux/scripts/installers/mono.sh +++ b/images/linux/scripts/installers/mono.sh @@ -4,8 +4,6 @@ ## Desc: Installs Mono ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh LSB_CODENAME=$(lsb_release -cs) @@ -27,8 +25,3 @@ if ! command -v nuget; then echo "nuget was not installed" exit 1 fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Mono ($(mono --version | head -n 1))" -DocumentInstalledItem "NuGet ($(nuget | tail -n +1 | head -n 1))" # Pipe to tail before piping to head because NuGet prints an ugly error if you close its stream before it's done writing. diff --git a/images/linux/scripts/installers/mysql.sh b/images/linux/scripts/installers/mysql.sh index a2869adb2..24cb5cf26 100644 --- a/images/linux/scripts/installers/mysql.sh +++ b/images/linux/scripts/installers/mysql.sh @@ -4,8 +4,6 @@ ## Desc: Installs MySQL Client ################################################################################ -## Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh export ACCEPT_EULA=Y @@ -51,13 +49,6 @@ mysql -vvv -e 'CREATE DATABASE smoke_test' -uroot -proot mysql -vvv -e 'DROP DATABASE smoke_test' -uroot -proot set +e -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "MySQL ($(mysql --version))" -DocumentInstalledItem "MySQL Server (user:root password:root)" -DocumentInstalledItem "MS SQL Server Client Tools" -DocumentInstalledItem "MySQL service is disabled by default. Use the following command as a part of your job to start the service: 'sudo systemctl start mysql.service'" - # Disable mysql.service systemctl is-active --quiet mysql.service && systemctl stop mysql.service systemctl disable mysql.service diff --git a/images/linux/scripts/installers/netlify.sh b/images/linux/scripts/installers/netlify.sh index 48afc4826..b737d4759 100644 --- a/images/linux/scripts/installers/netlify.sh +++ b/images/linux/scripts/installers/netlify.sh @@ -4,8 +4,6 @@ ## Desc: Installs the Netlify CLI ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Install the Netlify CLI npm i -g netlify-cli @@ -16,7 +14,3 @@ if ! command -v netlify; then echo "Netlify CLI was not installed" exit 1 fi - -# Document the installed version -echo "Document the installed version" -DocumentInstalledItem "Netlify CLI ($(netlify --version))" diff --git a/images/linux/scripts/installers/nodejs.sh b/images/linux/scripts/installers/nodejs.sh index 073061ed5..378236a8b 100644 --- a/images/linux/scripts/installers/nodejs.sh +++ b/images/linux/scripts/installers/nodejs.sh @@ -4,8 +4,6 @@ ## Desc: Installs Node.js LTS and related tooling (Gulp, Grunt) ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Install LTS Node.js and related build tools curl -sL https://raw.githubusercontent.com/mklement0/n-install/stable/bin/n-install | bash -s -- -ny - @@ -31,16 +29,3 @@ for cmd in node grunt gulp webpack parcel yarn newman; do exit 1 fi done - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Node.js ($(node --version))" -DocumentInstalledItem "Grunt ($(grunt --version))" -DocumentInstalledItem "Gulp ($(gulp --version))" -DocumentInstalledItem "n ($(n --version))" -DocumentInstalledItem "Parcel ($(parcel --version))" -DocumentInstalledItem "TypeScript ($(tsc --version))" -DocumentInstalledItem "Webpack ($(webpack --version))" -DocumentInstalledItem "Webpack CLI ($(webpack-cli --version))" -DocumentInstalledItem "Yarn ($(yarn --version))" -DocumentInstalledItem "Newman ($(newman --version))" diff --git a/images/linux/scripts/installers/nvm.sh b/images/linux/scripts/installers/nvm.sh index 817693076..74fed1f2a 100644 --- a/images/linux/scripts/installers/nvm.sh +++ b/images/linux/scripts/installers/nvm.sh @@ -4,8 +4,6 @@ ## Desc: Installs Nvm ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh export NVM_DIR="/etc/skel/.nvm" mkdir $NVM_DIR @@ -21,5 +19,3 @@ fi # set system node.js as default one nvm alias default system - -DocumentInstalledItem "nvm ($(nvm --version))" \ No newline at end of file diff --git a/images/linux/scripts/installers/oc.sh b/images/linux/scripts/installers/oc.sh index 31892f105..88894e3f5 100644 --- a/images/linux/scripts/installers/oc.sh +++ b/images/linux/scripts/installers/oc.sh @@ -4,8 +4,7 @@ ## Desc: Installs the OC CLI ################################################################################ -# Source the helpers -source $HELPER_SCRIPTS/document.sh + # Install the oc CLI curl "https://mirror.openshift.com/pub/openshift-v4/clients/oc/latest/linux/oc.tar.gz" > oc.tar.gz tar xvzf oc.tar.gz @@ -18,7 +17,3 @@ if ! command -v oc; then echo "oc was not installed" exit 1 fi - -# Document the installed version -echo "Document the installed version" -DocumentInstalledItem "oc CLI $(oc version)" diff --git a/images/linux/scripts/installers/oras-cli.sh b/images/linux/scripts/installers/oras-cli.sh index c4546ccbf..e615d25de 100644 --- a/images/linux/scripts/installers/oras-cli.sh +++ b/images/linux/scripts/installers/oras-cli.sh @@ -4,8 +4,6 @@ ## Desc: Installs ORAS CLI ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh source $HELPER_SCRIPTS/install.sh # Determine latest ORAS CLI version @@ -24,7 +22,3 @@ if ! oras version; then echo "ORAS CLI was not installed" exit 1 fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "ORAS CLI $(oras version | awk 'NR==1{print $2}')" \ No newline at end of file diff --git a/images/linux/scripts/installers/packer.sh b/images/linux/scripts/installers/packer.sh index d44dd9c02..25897a780 100644 --- a/images/linux/scripts/installers/packer.sh +++ b/images/linux/scripts/installers/packer.sh @@ -3,8 +3,7 @@ ## File: packer.sh ## Desc: Installs packer ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh + # Install Packer PACKER_VERSION=$(curl -s https://checkpoint-api.hashicorp.com/v1/check/packer | jq -r .current_version) @@ -18,7 +17,3 @@ if ! command -v packer; then echo "Packer was not installed or found on PATH" exit 1 fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Packer ($(packer --version))" diff --git a/images/linux/scripts/installers/phantomjs.sh b/images/linux/scripts/installers/phantomjs.sh index 9f333350c..093056db2 100644 --- a/images/linux/scripts/installers/phantomjs.sh +++ b/images/linux/scripts/installers/phantomjs.sh @@ -6,9 +6,6 @@ set -e -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh - # Install PhantomJS apt-get install -y chrpath libssl-dev libxft-dev libfreetype6 libfreetype6-dev libfontconfig1 libfontconfig1-dev PHANTOM_JS=phantomjs-2.1.1-linux-x86_64 @@ -23,7 +20,3 @@ if ! command -v phantomjs; then echo "phantomjs was not installed" exit 1 fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "PhantomJS ($(phantomjs --version))" diff --git a/images/linux/scripts/installers/php.sh b/images/linux/scripts/installers/php.sh index 3725f6ac5..35afa4a4f 100644 --- a/images/linux/scripts/installers/php.sh +++ b/images/linux/scripts/installers/php.sh @@ -6,7 +6,6 @@ # Source the helpers for use with the script source $HELPER_SCRIPTS/etc-environment.sh -source $HELPER_SCRIPTS/document.sh source $HELPER_SCRIPTS/os.sh set -e @@ -127,24 +126,9 @@ for cmd in php $php_versions composer phpunit; do fi done -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" - -for version in $php_versions; do - DocumentInstalledItem "PHP $version ($(php$version --version | head -n 1))" -done - # ubuntu 20.04 libzip-dev is libzip5 based and is not compatible libzip-dev of ppa:ondrej/php # see https://github.com/actions/virtual-environments/issues/1084 if isUbuntu20 ; then rm /etc/apt/sources.list.d/ondrej-ubuntu-php-focal.list apt-get update - AddBlockquote "To use ppa:ondrej/php APT repository On Ubuntu 20.04 it is necessary to add it to the APT sources" - StartCode - WriteItem "apt-add-repository ppa:ondrej/php -y" - WriteItem "apt-get update" - EndCode fi - -DocumentInstalledItem "Composer ($(composer --version))" -DocumentInstalledItem "PHPUnit ($(phpunit --version))" diff --git a/images/linux/scripts/installers/pollinate.sh b/images/linux/scripts/installers/pollinate.sh index 97d0d23ab..bdb2ce36c 100644 --- a/images/linux/scripts/installers/pollinate.sh +++ b/images/linux/scripts/installers/pollinate.sh @@ -4,8 +4,6 @@ ## Desc: Installs Pollinate ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Install Pollinate apt-get install -y --no-install-recommends pollinate @@ -16,7 +14,3 @@ if ! command -v pollinate; then echo "pollinate was not installed" exit 1 fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Pollinate" diff --git a/images/linux/scripts/installers/postgresql.sh b/images/linux/scripts/installers/postgresql.sh index 7c1c89cc0..ae5ffbb25 100644 --- a/images/linux/scripts/installers/postgresql.sh +++ b/images/linux/scripts/installers/postgresql.sh @@ -4,8 +4,6 @@ ## Desc: Installs Postgresql ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh #Preparing repo for PostgreSQL 12. wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - @@ -25,8 +23,6 @@ apt-get install libpq-dev # connection timeout - 2 pg_isready -DocumentInstalledItem "$(psql -V 2>&1 | cut -d ' ' -f 1,2,3)" - # Disable postgresql.service systemctl is-active --quiet postgresql.service && systemctl stop postgresql.service systemctl disable postgresql.service \ No newline at end of file diff --git a/images/linux/scripts/installers/powershellcore.sh b/images/linux/scripts/installers/powershellcore.sh index abd5d751d..e0c19ba7c 100644 --- a/images/linux/scripts/installers/powershellcore.sh +++ b/images/linux/scripts/installers/powershellcore.sh @@ -5,7 +5,6 @@ ################################################################################ # Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh source $HELPER_SCRIPTS/os.sh # Install Powershell @@ -27,7 +26,3 @@ if ! pwsh -c 'Write-Host Hello world'; then echo "pwsh failed to run" exit 1 fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Powershell ($(pwsh --version))" diff --git a/images/linux/scripts/installers/preparemetadata.sh b/images/linux/scripts/installers/preparemetadata.sh deleted file mode 100644 index 9e8aef1e1..000000000 --- a/images/linux/scripts/installers/preparemetadata.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -################################################################################ -## File: preparemetadata.sh -## Desc: This script adds a image title information to the metadata -## document -################################################################################ - -source $HELPER_SCRIPTS/document.sh - -WriteItem "" - -if [ -n "$ANNOUNCEMENTS" ]; then - WriteItem "$ANNOUNCEMENTS" - WriteItem "***" -fi - - -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/pulumi.sh b/images/linux/scripts/installers/pulumi.sh index e041c2b7c..bfdad2d13 100644 --- a/images/linux/scripts/installers/pulumi.sh +++ b/images/linux/scripts/installers/pulumi.sh @@ -5,7 +5,6 @@ ################################################################################ # Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh source $HELPER_SCRIPTS/install.sh # Install Pulumi @@ -20,7 +19,3 @@ if ! command -v pulumi ; then echo "Pulumi was not installed" exit 1 fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Pulumi $(pulumi version)" diff --git a/images/linux/scripts/installers/pypy.sh b/images/linux/scripts/installers/pypy.sh index b859eb4e1..cc707a3e4 100644 --- a/images/linux/scripts/installers/pypy.sh +++ b/images/linux/scripts/installers/pypy.sh @@ -4,8 +4,6 @@ ## Desc: Installs PyPy ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh source $HELPER_SCRIPTS/install.sh # This function installs PyPy using the specified arguments: diff --git a/images/linux/scripts/installers/python.sh b/images/linux/scripts/installers/python.sh index 7081c5e7d..3f6361e16 100644 --- a/images/linux/scripts/installers/python.sh +++ b/images/linux/scripts/installers/python.sh @@ -5,7 +5,6 @@ ################################################################################ # Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh source $HELPER_SCRIPTS/os.sh # Install Python, Python 3, pip, pip3 @@ -28,10 +27,3 @@ for cmd in python pip python3 pip3; do exit 1 fi done - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Python ($(python --version 2>&1))" -DocumentInstalledItem "pip ($(pip --version))" -DocumentInstalledItem "Python3 ($(python3 --version))" -DocumentInstalledItem "pip3 ($(pip3 --version))" \ No newline at end of file diff --git a/images/linux/scripts/installers/r.sh b/images/linux/scripts/installers/r.sh index 4eaa14160..cca86e1bb 100644 --- a/images/linux/scripts/installers/r.sh +++ b/images/linux/scripts/installers/r.sh @@ -1,7 +1,6 @@ #!/bin/bash # Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh source $HELPER_SCRIPTS/os.sh # install R @@ -13,5 +12,3 @@ sudo add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $osLab sudo apt update sudo apt install r-base version=$(R --version | grep "R version" | cut -d " " -f 3) - -DocumentInstalledItem "R $version" diff --git a/images/linux/scripts/installers/rndgenerator.sh b/images/linux/scripts/installers/rndgenerator.sh index c25759893..cdb78edf1 100644 --- a/images/linux/scripts/installers/rndgenerator.sh +++ b/images/linux/scripts/installers/rndgenerator.sh @@ -4,8 +4,6 @@ ## Desc: Install random number generator ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Install haveged apt-get -y install haveged @@ -18,7 +16,3 @@ for cmd in haveged; do exit 1 fi done - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Haveged $(dpkg-query --showformat='${Version}' --show haveged)" \ No newline at end of file diff --git a/images/linux/scripts/installers/ruby.sh b/images/linux/scripts/installers/ruby.sh index 0cbea36d1..8be6d0fa9 100644 --- a/images/linux/scripts/installers/ruby.sh +++ b/images/linux/scripts/installers/ruby.sh @@ -4,16 +4,9 @@ ## Desc: Installs Ruby requirements ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh sudo apt-get install ruby-full sudo gem update --system # Install Ruby requirements apt-get install -y libz-dev openssl libssl-dev - -DocumentInstalledItem "ruby ($(ruby --version 2>&1 | cut -d ' ' -f 2))" -DocumentInstalledItem "gem ($(gem -v 2>&1 | tail -n 1))" -DocumentInstalledItem "$(openssl version)" -DocumentInstalledItem "Libssl $(dpkg -l libssl-dev | grep '^ii' | awk '{print $3}')" diff --git a/images/linux/scripts/installers/rust.sh b/images/linux/scripts/installers/rust.sh index 088cc9aa1..a211e791b 100644 --- a/images/linux/scripts/installers/rust.sh +++ b/images/linux/scripts/installers/rust.sh @@ -6,7 +6,6 @@ # Source the helpers for use with the script source $HELPER_SCRIPTS/etc-environment.sh -source $HELPER_SCRIPTS/document.sh export RUSTUP_HOME=/usr/share/rust/.rustup export CARGO_HOME=/usr/share/rust/.cargo @@ -45,16 +44,3 @@ pushd /etc/skel ln -sf $RUSTUP_HOME .rustup ln -sf $CARGO_HOME .cargo popd - -# Document what was added to the image -echo "Lastly, document what was added to the metadata file" -DocumentInstalledItem "rustup ($(rustup --version 2>&1 | cut -d ' ' -f 2))" -DocumentInstalledItem "rust ($(rustc --version 2>&1 | cut -d ' ' -f 2))" -DocumentInstalledItem "cargo ($(cargo --version 2>&1 | cut -d ' ' -f 2))" -DocumentInstalledItem "rustfmt ($(rustfmt --version 2>&1 | cut -d ' ' -f 2))" -DocumentInstalledItem "clippy ($(cargo-clippy --version 2>&1 | cut -d ' ' -f 2))" -DocumentInstalledItem "rustdoc ($(rustdoc --version 2>&1 | cut -d ' ' -f 2))" -DocumentInstalledItem "bindgen ($(bindgen --version 2>&1 | cut -d ' ' -f 2))" -DocumentInstalledItem "cbindgen ($(cbindgen --version 2>&1 | cut -d ' ' -f 2))" -DocumentInstalledItem "cargo audit ($(cargo audit --version 2>&1 | cut -d ' ' -f 2))" -DocumentInstalledItem "cargo outdated ($(cargo outdated --version 2>&1 | cut -d ' ' -f 2))" \ No newline at end of file diff --git a/images/linux/scripts/installers/sbt.sh b/images/linux/scripts/installers/sbt.sh index adc74daaf..166dc18b5 100644 --- a/images/linux/scripts/installers/sbt.sh +++ b/images/linux/scripts/installers/sbt.sh @@ -4,8 +4,6 @@ ## Desc: Installs sbt ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Install sbt # https://www.scala-sbt.org/1.x/docs/Installing-sbt-on-Linux.html @@ -13,7 +11,3 @@ echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.li curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | apt-key add apt-get -q update apt-get -y install sbt - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "sbt ($(sbt --script-version))" diff --git a/images/linux/scripts/installers/selenium.sh b/images/linux/scripts/installers/selenium.sh index 3cb7c315c..d9b5e2794 100644 --- a/images/linux/scripts/installers/selenium.sh +++ b/images/linux/scripts/installers/selenium.sh @@ -4,8 +4,6 @@ ## Desc: Installs selenium server ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Determine latest selenium standalone server version SELENIUM_LATEST_VERSION_URL=https://api.github.com/repos/SeleniumHQ/selenium/releases/latest @@ -26,6 +24,3 @@ fi SELENIUM_JAR_PATH="/usr/share/java/selenium-server-standalone.jar" mv $SELENIUM_JAR_NAME $SELENIUM_JAR_PATH echo "SELENIUM_JAR_PATH=$SELENIUM_JAR_PATH" | tee -a /etc/environment - -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Selenium server standalone (available via SELENIUM_JAR_PATH environment variable)" \ No newline at end of file diff --git a/images/linux/scripts/installers/sphinx.sh b/images/linux/scripts/installers/sphinx.sh index 844d145a2..425bb7fd3 100644 --- a/images/linux/scripts/installers/sphinx.sh +++ b/images/linux/scripts/installers/sphinx.sh @@ -4,12 +4,6 @@ ## Desc: Installs Sphinx ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Install Sphinx apt-get install -y sphinxsearch - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Sphinx Open Source Search Server" diff --git a/images/linux/scripts/installers/subversion.sh b/images/linux/scripts/installers/subversion.sh index 66540704c..3f51d46a0 100644 --- a/images/linux/scripts/installers/subversion.sh +++ b/images/linux/scripts/installers/subversion.sh @@ -4,8 +4,6 @@ ## Desc: Installs Subversion client ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Install Subversion apt-get install -y --no-install-recommends subversion @@ -16,7 +14,3 @@ if ! command -v svn; then echo "Subversion (svn) was not installed" exit 1 fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Subversion ($(svn --version | head -n 1))" diff --git a/images/linux/scripts/installers/swift.sh b/images/linux/scripts/installers/swift.sh index ca97606e9..318d3973f 100644 --- a/images/linux/scripts/installers/swift.sh +++ b/images/linux/scripts/installers/swift.sh @@ -4,8 +4,6 @@ ## Desc: Installs Swift ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Install image_label="$(lsb_release -rs)" @@ -26,7 +24,3 @@ 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/scripts/installers/swig.sh b/images/linux/scripts/installers/swig.sh index 2d9164741..7972e8827 100644 --- a/images/linux/scripts/installers/swig.sh +++ b/images/linux/scripts/installers/swig.sh @@ -1,7 +1,5 @@ #!/bin/bash -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Install Swig sudo apt-get install -y swig @@ -12,7 +10,3 @@ if ! command -v swig; then echo "Swig was not installed" exit 1 fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Swig $(swig -version | sed -n 2p | cut -d ' ' -f 3)" diff --git a/images/linux/scripts/installers/terraform.sh b/images/linux/scripts/installers/terraform.sh index 8cbd026a0..4c7e6e762 100644 --- a/images/linux/scripts/installers/terraform.sh +++ b/images/linux/scripts/installers/terraform.sh @@ -4,8 +4,6 @@ ## Desc: Installs terraform ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Install Terraform TERRAFORM_VERSION=$(curl -s https://checkpoint-api.hashicorp.com/v1/check/terraform | jq -r .current_version) @@ -19,7 +17,3 @@ if ! command -v terraform; then echo "Terraform was not installed or found on PATH" exit 1 fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Terraform ($(terraform --version))" diff --git a/images/linux/scripts/installers/vcpkg.sh b/images/linux/scripts/installers/vcpkg.sh index 69f50c5e7..ba7cd01cf 100644 --- a/images/linux/scripts/installers/vcpkg.sh +++ b/images/linux/scripts/installers/vcpkg.sh @@ -5,7 +5,6 @@ ################################################################################ # Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh source $HELPER_SCRIPTS/os.sh # Set env variable for vcpkg @@ -36,7 +35,3 @@ if ! command -v vcpkg; then echo "vcpkg was not installed" exit 1 fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Vcpkg $(vcpkg version | head -n 1 | cut -d ' ' -f 6)" diff --git a/images/linux/scripts/installers/vercel.sh b/images/linux/scripts/installers/vercel.sh index 13fb39155..4e0d41ae6 100644 --- a/images/linux/scripts/installers/vercel.sh +++ b/images/linux/scripts/installers/vercel.sh @@ -4,9 +4,6 @@ ## Desc: Installs the Vercel CLI ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh - # Install the Vercel CLI npm i -g vercel @@ -25,7 +22,3 @@ if ! command -v now; then echo "[Now] symlink to Vercel CLI was not created" exit 1 fi - -# Document the installed version -echo "Document the installed version" -DocumentInstalledItem "Vercel CLI ($(vercel --version))" diff --git a/images/linux/ubuntu1604.json b/images/linux/ubuntu1604.json index 27cc6b0bd..33263345a 100644 --- a/images/linux/ubuntu1604.json +++ b/images/linux/ubuntu1604.json @@ -14,7 +14,6 @@ "private_virtual_network_with_public_ip": "{{env `PRIVATE_VIRTUAL_NETWORK_WITH_PUBLIC_IP`}}", "image_folder": "/imagegeneration", "imagedata_file": "/imagegeneration/imagedata.json", - "metadata_file": "/imagegeneration/metadatafile", "installer_script_folder": "/imagegeneration/installers", "helper_script_folder": "/imagegeneration/helpers", "vm_size": "Standard_DS2_v2", @@ -103,19 +102,6 @@ "source": "{{template_dir}}/toolsets/toolset-1604.json", "destination": "{{user `installer_script_folder`}}/toolset.json" }, - { - "type": "shell", - "execute_command": "chmod +x {{ .Path }}; sudo {{ .Vars }} {{ .Path }}", - "scripts":[ - "{{template_dir}}/scripts/installers/preparemetadata.sh" - ], - "environment_vars": [ - "IMAGE_VERSION={{user `image_version`}}", - "METADATA_FILE={{user `metadata_file`}}", - "HELPER_SCRIPTS={{user `helper_script_folder`}}", - "ANNOUNCEMENTS={{user `announcements`}}" - ] - }, { "type": "shell", "scripts":[ @@ -222,7 +208,6 @@ "{{template_dir}}/scripts/installers/test-toolcache.sh" ], "environment_vars": [ - "METADATA_FILE={{user `metadata_file`}}", "HELPER_SCRIPTS={{user `helper_script_folder`}}", "INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}", "GITHUB_FEED_TOKEN={{user `github_feed_token`}}", @@ -238,7 +223,6 @@ "{{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`}}" ], @@ -250,7 +234,6 @@ "{{template_dir}}/scripts/installers/aws-sam-cli.sh" ], "environment_vars": [ - "METADATA_FILE={{user `metadata_file`}}", "HELPER_SCRIPTS={{user `helper_script_folder`}}" ], "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" @@ -261,7 +244,6 @@ "{{template_dir}}/scripts/installers/homebrew.sh" ], "environment_vars": [ - "METADATA_FILE={{user `metadata_file`}}", "HELPER_SCRIPTS={{user `helper_script_folder`}}", "DEBIAN_FRONTEND=noninteractive" ], diff --git a/images/linux/ubuntu1804.json b/images/linux/ubuntu1804.json index 05f4a2691..1dd62bc2d 100644 --- a/images/linux/ubuntu1804.json +++ b/images/linux/ubuntu1804.json @@ -14,7 +14,6 @@ "private_virtual_network_with_public_ip": "{{env `PRIVATE_VIRTUAL_NETWORK_WITH_PUBLIC_IP`}}", "image_folder": "/imagegeneration", "imagedata_file": "/imagegeneration/imagedata.json", - "metadata_file": "/imagegeneration/metadatafile", "installer_script_folder": "/imagegeneration/installers", "helper_script_folder": "/imagegeneration/helpers", "vm_size": "Standard_DS2_v2", @@ -106,19 +105,6 @@ "source": "{{template_dir}}/toolsets/toolset-1804.json", "destination": "{{user `installer_script_folder`}}/toolset.json" }, - { - "type": "shell", - "execute_command": "chmod +x {{ .Path }}; sudo {{ .Vars }} {{ .Path }}", - "scripts":[ - "{{template_dir}}/scripts/installers/preparemetadata.sh" - ], - "environment_vars": [ - "IMAGE_VERSION={{user `image_version`}}", - "METADATA_FILE={{user `metadata_file`}}", - "HELPER_SCRIPTS={{user `helper_script_folder`}}", - "ANNOUNCEMENTS={{user `announcements`}}" - ] - }, { "type": "shell", "scripts":[ @@ -226,7 +212,6 @@ "{{template_dir}}/scripts/installers/test-toolcache.sh" ], "environment_vars": [ - "METADATA_FILE={{user `metadata_file`}}", "HELPER_SCRIPTS={{user `helper_script_folder`}}", "INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}", "GITHUB_FEED_TOKEN={{user `github_feed_token`}}", @@ -242,7 +227,6 @@ "{{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`}}" ], @@ -254,7 +238,6 @@ "{{template_dir}}/scripts/installers/aws-sam-cli.sh" ], "environment_vars": [ - "METADATA_FILE={{user `metadata_file`}}", "HELPER_SCRIPTS={{user `helper_script_folder`}}" ], "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" @@ -265,7 +248,6 @@ "{{template_dir}}/scripts/installers/homebrew.sh" ], "environment_vars": [ - "METADATA_FILE={{user `metadata_file`}}", "HELPER_SCRIPTS={{user `helper_script_folder`}}", "DEBIAN_FRONTEND=noninteractive" ], diff --git a/images/linux/ubuntu2004.json b/images/linux/ubuntu2004.json index 4a4ff5c5f..67d6e1d6a 100644 --- a/images/linux/ubuntu2004.json +++ b/images/linux/ubuntu2004.json @@ -14,7 +14,6 @@ "private_virtual_network_with_public_ip": "{{env `PRIVATE_VIRTUAL_NETWORK_WITH_PUBLIC_IP`}}", "image_folder": "/imagegeneration", "imagedata_file": "/imagegeneration/imagedata.json", - "metadata_file": "/imagegeneration/metadatafile", "installer_script_folder": "/imagegeneration/installers", "helper_script_folder": "/imagegeneration/helpers", "vm_size": "Standard_DS2_v2", @@ -108,19 +107,6 @@ "source": "{{template_dir}}/toolsets/toolset-2004.json", "destination": "{{user `installer_script_folder`}}/toolset.json" }, - { - "type": "shell", - "execute_command": "chmod +x {{ .Path }}; sudo {{ .Vars }} {{ .Path }}", - "scripts":[ - "{{template_dir}}/scripts/installers/preparemetadata.sh" - ], - "environment_vars": [ - "IMAGE_VERSION={{user `image_version`}}", - "METADATA_FILE={{user `metadata_file`}}", - "HELPER_SCRIPTS={{user `helper_script_folder`}}", - "ANNOUNCEMENTS={{user `announcements`}}" - ] - }, { "type": "shell", "scripts":[ @@ -228,7 +214,6 @@ "{{template_dir}}/scripts/installers/test-toolcache.sh" ], "environment_vars": [ - "METADATA_FILE={{user `metadata_file`}}", "HELPER_SCRIPTS={{user `helper_script_folder`}}", "INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}", "GITHUB_FEED_TOKEN={{user `github_feed_token`}}", @@ -244,7 +229,6 @@ "{{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`}}" ], @@ -256,7 +240,6 @@ "{{template_dir}}/scripts/installers/aws-sam-cli.sh" ], "environment_vars": [ - "METADATA_FILE={{user `metadata_file`}}", "HELPER_SCRIPTS={{user `helper_script_folder`}}" ], "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" @@ -267,7 +250,6 @@ "{{template_dir}}/scripts/installers/homebrew.sh" ], "environment_vars": [ - "METADATA_FILE={{user `metadata_file`}}", "HELPER_SCRIPTS={{user `helper_script_folder`}}", "DEBIAN_FRONTEND=noninteractive" ], From 2d0a86fefe9077de6ef8c02b88bf5882cc44eae0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 17 Sep 2020 16:33:26 +0300 Subject: [PATCH 48/55] Updating readme file for ubuntu16 version 20200914.1 (#1586) Co-authored-by: Image generation service account Co-authored-by: Actions service account --- images/linux/Ubuntu1604-README.md | 132 +++++++++++++++--------------- 1 file changed, 68 insertions(+), 64 deletions(-) diff --git a/images/linux/Ubuntu1604-README.md b/images/linux/Ubuntu1604-README.md index a3bc4bd9b..131c91441 100644 --- a/images/linux/Ubuntu1604-README.md +++ b/images/linux/Ubuntu1604-README.md @@ -1,6 +1,10 @@ +| Announcements | +|-| +| [Clang/LLVM 10 will be set as a default one and Clang/LLVM 6 will be deprecated for Ubuntu 20.04 on September, 23](https://github.com/actions/virtual-environments/issues/1536) | +*** # Ubuntu 16.04.7 LTS -The following software is installed on machines with the 20200908.1 update. +The following software is installed on machines with the 20200914.1 update. *** - 7-Zip 9.20 - Ansible (ansible 2.9.13) @@ -9,64 +13,64 @@ The following software is installed on machines with the 20200908.1 update. - Azure CLI (azure-cli 2.11.1) - Azure CLI (azure-devops 0.18.0) - Basic packages: + - dbus - dnsutils + - dpkg + - fakeroot + - gnupg2 - iproute2 - iputils-ping + - lib32z1 + - libc++abi-dev + - libc++-dev + - libcurl3 + - libgbm-dev + - libgconf-2-4 + - libgtk-3-0 + - libicu55 + - libsecret-1-dev + - libsqlite3-dev - libunwind8 + - libxkbfile-dev + - libxss1 - locales - openssh-client + - pkg-config + - rpm + - texinfo + - tk - tzdata - upx - - zstd - - libxkbfile-dev - - pkg-config - - libsecret-1-dev - - libxss1 - - libgconf-2-4 - - dbus - - xvfb - - libgbm-dev - - libgtk-3-0 - - tk - - fakeroot - - dpkg - - rpm - - xz-utils - xorriso + - xvfb + - xz-utils + - zstd - zsync - - gnupg2 - - lib32z1 - - texinfo - - libsqlite3-dev - - libc++-dev - - libc++abi-dev - - libicu55 + - bison + - brotli + - bzip2 - curl - file + - flex - ftp - jq + - m4 - netcat - - ssh - parallel + - patchelf - rsync - shellcheck + - sqlite3 + - ssh - sudo - telnet - time - unzip - - zip - wget - - m4 - - bison - - flex - - patchelf - - bzip2 - - sqlite3 - - brotli - yamllint - - libcurl3 + - zip - Alibaba Cloud CLI (3.0.56) -- AWS CLI (aws-cli/1.18.134 Python/2.7.12 Linux/4.15.0-1093-azure botocore/1.17.57) +- AWS CLI (aws-cli/1.18.137 Python/2.7.12 Linux/4.15.0-1095-azure botocore/1.17.60) - AWS CLI Session manager plugin (1.1.61.0) - build-essential - nvm (0.35.3) @@ -76,9 +80,25 @@ The following software is installed on machines with the 20200908.1 update. - Swift version 5.2.5 (swift-5.2.5-RELEASE) Target: x86_64-unknown-linux-gnu - CMake (cmake version 3.17.0) -- Docker Compose (docker-compose version 1.27.0, build 980ec85b) +- Docker Compose (docker-compose version 1.27.2, build 18f557f9) - Docker-Moby (Docker version 19.03.12+azure, build 0ed913b885c8919944a2e4c8d0b80a318a8dd48b) - Docker-Buildx (0.4.2+azure) +- Cached container images + - node:10 (Digest: sha256:ab6f988c514b5c5fb6d5a6d18afb216084b256719791c6cc61096da58e66c436) + - node:12 (Digest: sha256:20ffb04c1d35e273dc7aa68fe31ef136630d95128689283a8eb914329158022b) + - buildpack-deps:stretch (Digest: sha256:4f72cea5afa05e21bf2aec93b219b0843a10af5e2f407cc184f211e45f929ccc) + - buildpack-deps:buster (Digest: sha256:8a76b9f9ee417eb330e97d3129e373277515e98d0f3a95a89ab944b645190efd) + - debian:9 (Digest: sha256:bc125c699d736ac84c92b76ab7028741bbac69f207b7a8a4065bca6f79d5698e) + - debian:8 (Digest: sha256:e180975d5c1012518e711c92ab26a4ff98218f439a97d9adbcd503b0d3ad1c8a) + - jekyll/builder:latest (Digest: sha256:4bc6a3b6eddebef1652ef38ceb965fc9c1b06677f65f764e1e17b88dc2aa9934) + - node:12-alpine (Digest: sha256:9623cd396644f9b2e595d833dc0188a880333674488d939338ab5fde10ef7c43) + - node:10-alpine (Digest: sha256:2f202af4d6baba655fef9c93f41a914b33ee576b9f55a6e69ba23b49e3b62766) + - alpine:3.9 (Digest: sha256:414e0518bb9228d35e4cd5165567fb91d26c6a214e9c95899e1e056fcd349011) + - alpine:3.10 (Digest: sha256:f0e9534a598e501320957059cb2a23774b4d4072e37c7b2cf7e95b241f019e35) + - alpine:3.8 (Digest: sha256:2bb501e6173d9d006e56de5bce2720eb06396803300fe1687b58a7ff32bf4c14) + - ubuntu:14.04 (Digest: sha256:ffc76f71dd8be8c9e222d420dc96901a07b61616689a44c7b3ef6a10b7213de4) + - alpine:3.7 (Digest: sha256:8421d9a84432575381bfabd248f1eb56f3aa21d9d7cd2511583c68c9b7511d10) + - mcr.microsoft.com/azure-pipelines/node8-typescript:latest (Digest: sha256:e52e60b9f71183969830a3664279b5d8c799b4b0ec2c25a0686f7c02f6a9669a) - .NET Core SDK: - 3.1.402 - 3.1.401 @@ -166,7 +186,7 @@ Target: x86_64-unknown-linux-gnu - GitHub CLI 0.12.0 - Google Chrome (Google Chrome 85.0.4183.102 ) - ChromeDriver 85.0.4183.87 (cd6713ebf92fa1cacc0f1a598df280093af0c5d7-refs/branch-heads/4183@{#1689}); Chrome Driver is available via CHROMEWEBDRIVER environment variable -- Google Cloud SDK (308.0.0) +- Google Cloud SDK (309.0.0) - Haskell Cabal (cabal-install version 3.4.0.0 compiled using version 3.4.0.0 of the Cabal library ) - GHC (The Glorious Glasgow Haskell Compilation System, version 8.10.2) @@ -184,7 +204,7 @@ compiled using version 3.4.0.0 of the Cabal library ) - Gradle 6.6.1 - Maven (Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)) - Kind (kind v0.8.1 go1.14.2 linux/amd64) -- kubectl (Client Version: v1.19.0) +- kubectl (Client Version: v1.19.1) - helm (v3.3.1+g249e521) - minikube version: v1.13.0 - kustomize ({kustomize/v3.8.2 2020-08-29T17:44:01Z }) @@ -217,14 +237,14 @@ Local version: Unknown) - PHP 7.0 (PHP 7.0.33-30+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Aug 7 2020 14:46:59) ( NTS )) - PHP 7.1 (PHP 7.1.33-17+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Aug 7 2020 14:46:52) ( NTS )) - PHP 7.2 (PHP 7.2.33-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Aug 7 2020 14:43:59) ( NTS )) -- PHP 7.3 (PHP 7.3.21-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Aug 7 2020 14:43:42) ( NTS )) -- PHP 7.4 (PHP 7.4.9 (cli) (built: Aug 7 2020 14:29:10) ( NTS )) -- Composer (Composer version 1.10.12 2020-09-08 22:58:51) +- PHP 7.3 (PHP 7.3.22-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Sep 9 2020 06:46:12) ( NTS )) +- PHP 7.4 (PHP 7.4.10 (cli) (built: Sep 9 2020 06:35:57) ( NTS )) +- Composer (Composer version 1.10.13 2020-09-09 11:46:34) - PHPUnit (PHPUnit 7.5.20 by Sebastian Bergmann and contributors.) - Pollinate - psql (PostgreSQL) 12.4 - Powershell (PowerShell 7.0.3) -- Pulumi v2.9.2 +- Pulumi v2.10.0 - ruby (2.3.1p112) - gem (3.1.4) - OpenSSL 1.1.0h 27 Mar 2018 (Library: OpenSSL 1.1.1g 21 Apr 2020) @@ -249,10 +269,10 @@ Local version: Unknown) - Packer (1.6.2) - Vcpkg 2020.06.15-unknownhash - Vercel CLI (20.1.0) -- MongoDB on Linux v4.4.0 +- MongoDB on Linux v4.4.1 - Haveged 1.9.1-3 - Swig 3.0.8 -- Netlify CLI (netlify-cli/2.61.2 linux-x64 node-v12.18.3) +- Netlify CLI (netlify-cli/2.63.0 linux-x64 node-v12.18.3) - Google Repository 58 - Google Play services 49 - Google APIs 24 @@ -327,22 +347,6 @@ Local version: Unknown) - Az Module (4.3.0) - Az Module (4.4.0) - Az Module (4.6.0) -- Cached container images - - jekyll/builder:latest (Digest: sha256:4bc6a3b6eddebef1652ef38ceb965fc9c1b06677f65f764e1e17b88dc2aa9934) - - node:10 (Digest: sha256:304c59f827930ae1a4a9775aec5837c8f95c3d41b5e6d7c0a329b4eb8c4cc8a8) - - node:12 (Digest: sha256:099346a8e9c861b406c9bbb1f109125c7263868e5447cc57d6d564e1fec8a5cf) - - buildpack-deps:stretch (Digest: sha256:82a686ba95fdf2bf4a5f5264e8e55b8aa272ffcedaed7826777f08de0d9e1146) - - buildpack-deps:buster (Digest: sha256:0f7be4c25fadb2b8aee537cdac00a684b09057e66368683bbf22adf477e05faa) - - debian:9 (Digest: sha256:335ecf9e8d9b2206c2e9e7f8b09547faa9f868e694f7c5be14c38be15ea8a7cf) - - debian:8 (Digest: sha256:8a0f2603166345b4d7bbf4842137b2ffcb492ece20d15f963f08aa26670f82c7) - - node:12-alpine (Digest: sha256:9623cd396644f9b2e595d833dc0188a880333674488d939338ab5fde10ef7c43) - - node:10-alpine (Digest: sha256:2f202af4d6baba655fef9c93f41a914b33ee576b9f55a6e69ba23b49e3b62766) - - alpine:3.9 (Digest: sha256:414e0518bb9228d35e4cd5165567fb91d26c6a214e9c95899e1e056fcd349011) - - alpine:3.10 (Digest: sha256:f0e9534a598e501320957059cb2a23774b4d4072e37c7b2cf7e95b241f019e35) - - alpine:3.8 (Digest: sha256:2bb501e6173d9d006e56de5bce2720eb06396803300fe1687b58a7ff32bf4c14) - - ubuntu:14.04 (Digest: sha256:ffc76f71dd8be8c9e222d420dc96901a07b61616689a44c7b3ef6a10b7213de4) - - alpine:3.7 (Digest: sha256:8421d9a84432575381bfabd248f1eb56f3aa21d9d7cd2511583c68c9b7511d10) - - mcr.microsoft.com/azure-pipelines/node8-typescript:latest (Digest: sha256:e52e60b9f71183969830a3664279b5d8c799b4b0ec2c25a0686f7c02f6a9669a) - Ruby: - Ruby 2.4.10 - Ruby 2.5.8 @@ -365,16 +369,16 @@ Local version: Unknown) - node 8.17.0 - node 10.22.0 - node 12.18.3 - - node 14.9.0 + - node 14.10.1 - go: - go 1.11.13 - go 1.12.17 - go 1.13.15 - - go 1.14.8 - - go 1.15.1 + - go 1.14.9 + - go 1.15.2 - boost: - boost 1.69.0 - boost 1.72.0 - AWS SAM CLI, version 1.2.0 -- Homebrew on Linux (Homebrew 2.5.0 -Homebrew/linuxbrew-core (git revision 3199c; last commit 2020-09-08)) +- Homebrew on Linux (Homebrew 2.5.1 +Homebrew/linuxbrew-core (git revision d52011; last commit 2020-09-12)) From 757f01513062e82bbe8c5670c0b118fafe89e9bc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 17 Sep 2020 16:33:38 +0300 Subject: [PATCH 49/55] Updating readme file for ubuntu18 version 20200914.1 (#1585) Co-authored-by: Image generation service account Co-authored-by: Actions service account --- images/linux/Ubuntu1804-README.md | 130 +++++++++++++++--------------- 1 file changed, 67 insertions(+), 63 deletions(-) diff --git a/images/linux/Ubuntu1804-README.md b/images/linux/Ubuntu1804-README.md index 36e89d0b1..afcf59dc6 100644 --- a/images/linux/Ubuntu1804-README.md +++ b/images/linux/Ubuntu1804-README.md @@ -1,6 +1,10 @@ +| Announcements | +|-| +| [Clang/LLVM 10 will be set as a default one and Clang/LLVM 6 will be deprecated for Ubuntu 20.04 on September, 23](https://github.com/actions/virtual-environments/issues/1536) | +*** # Ubuntu 18.04.5 LTS -The following software is installed on machines with the 20200908.1 update. +The following software is installed on machines with the 20200914.1 update. *** - 7-Zip 16.02 - Ansible (ansible 2.9.13) @@ -9,63 +13,63 @@ The following software is installed on machines with the 20200908.1 update. - Azure CLI (azure-cli 2.11.1) - Azure CLI (azure-devops 0.18.0) - Basic packages: + - dbus - dnsutils + - dpkg + - fakeroot + - gnupg2 - iproute2 - iputils-ping + - lib32z1 + - libc++abi-dev + - libc++-dev + - libcurl3 + - libgbm-dev + - libgconf-2-4 + - libgtk-3-0 + - libsecret-1-dev + - libsqlite3-dev - libunwind8 + - libxkbfile-dev + - libxss1 - locales - openssh-client + - pkg-config + - rpm + - texinfo + - tk - tzdata - upx - - zstd - - libxkbfile-dev - - pkg-config - - libsecret-1-dev - - libxss1 - - libgconf-2-4 - - dbus - - xvfb - - libgbm-dev - - libgtk-3-0 - - tk - - fakeroot - - dpkg - - rpm - - xz-utils - xorriso + - xvfb + - xz-utils + - zstd - zsync - - gnupg2 - - lib32z1 - - texinfo - - libsqlite3-dev - - libc++-dev - - libc++abi-dev + - bison + - brotli + - bzip2 - curl - file + - flex - ftp - jq + - m4 - netcat - - ssh - parallel + - patchelf - rsync - shellcheck + - sqlite3 + - ssh - sudo - telnet - time - unzip - - zip - wget - - m4 - - bison - - flex - - patchelf - - bzip2 - - sqlite3 - - brotli - yamllint - - libcurl3 + - zip - Alibaba Cloud CLI (3.0.56) -- AWS CLI (aws-cli/1.18.134 Python/2.7.17 Linux/5.4.0-1025-azure botocore/1.17.57) +- AWS CLI (aws-cli/1.18.137 Python/2.7.17 Linux/5.4.0-1025-azure botocore/1.17.60) - AWS CLI Session manager plugin (1.1.61.0) - build-essential - Clang 6.0 (6.0.0) @@ -77,9 +81,25 @@ Target: x86_64-unknown-linux-gnu - Podman (2.0.6) - Buildah (1.15.2) - Skopeo (1.1.1) -- Docker Compose (docker-compose version 1.27.0, build 980ec85b) +- Docker Compose (docker-compose version 1.27.2, build 18f557f9) - Docker-Moby (Docker version 19.03.12+azure, build 0ed913b885c8919944a2e4c8d0b80a318a8dd48b) - Docker-Buildx (0.4.2+azure) +- Cached container images + - node:10 (Digest: sha256:ab6f988c514b5c5fb6d5a6d18afb216084b256719791c6cc61096da58e66c436) + - node:12 (Digest: sha256:20ffb04c1d35e273dc7aa68fe31ef136630d95128689283a8eb914329158022b) + - buildpack-deps:stretch (Digest: sha256:4f72cea5afa05e21bf2aec93b219b0843a10af5e2f407cc184f211e45f929ccc) + - buildpack-deps:buster (Digest: sha256:8a76b9f9ee417eb330e97d3129e373277515e98d0f3a95a89ab944b645190efd) + - debian:9 (Digest: sha256:bc125c699d736ac84c92b76ab7028741bbac69f207b7a8a4065bca6f79d5698e) + - debian:8 (Digest: sha256:e180975d5c1012518e711c92ab26a4ff98218f439a97d9adbcd503b0d3ad1c8a) + - jekyll/builder:latest (Digest: sha256:4bc6a3b6eddebef1652ef38ceb965fc9c1b06677f65f764e1e17b88dc2aa9934) + - node:12-alpine (Digest: sha256:9623cd396644f9b2e595d833dc0188a880333674488d939338ab5fde10ef7c43) + - node:10-alpine (Digest: sha256:2f202af4d6baba655fef9c93f41a914b33ee576b9f55a6e69ba23b49e3b62766) + - alpine:3.9 (Digest: sha256:414e0518bb9228d35e4cd5165567fb91d26c6a214e9c95899e1e056fcd349011) + - alpine:3.10 (Digest: sha256:f0e9534a598e501320957059cb2a23774b4d4072e37c7b2cf7e95b241f019e35) + - alpine:3.8 (Digest: sha256:2bb501e6173d9d006e56de5bce2720eb06396803300fe1687b58a7ff32bf4c14) + - ubuntu:14.04 (Digest: sha256:ffc76f71dd8be8c9e222d420dc96901a07b61616689a44c7b3ef6a10b7213de4) + - alpine:3.7 (Digest: sha256:8421d9a84432575381bfabd248f1eb56f3aa21d9d7cd2511583c68c9b7511d10) + - mcr.microsoft.com/azure-pipelines/node8-typescript:latest (Digest: sha256:e52e60b9f71183969830a3664279b5d8c799b4b0ec2c25a0686f7c02f6a9669a) - .NET Core SDK: - 3.1.402 - 3.1.401 @@ -167,7 +187,7 @@ Target: x86_64-unknown-linux-gnu - GitHub CLI 0.12.0 - Google Chrome (Google Chrome 85.0.4183.102 ) - ChromeDriver 85.0.4183.87 (cd6713ebf92fa1cacc0f1a598df280093af0c5d7-refs/branch-heads/4183@{#1689}); Chrome Driver is available via CHROMEWEBDRIVER environment variable -- Google Cloud SDK (308.0.0) +- Google Cloud SDK (309.0.0) - Haskell Cabal (cabal-install version 3.4.0.0 compiled using version 3.4.0.0 of the Cabal library ) - GHC (The Glorious Glasgow Haskell Compilation System, version 8.10.2) @@ -185,7 +205,7 @@ compiled using version 3.4.0.0 of the Cabal library ) - Gradle 6.6.1 - Maven (Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)) - Kind (kind v0.8.1 go1.14.2 linux/amd64) -- kubectl (Client Version: v1.19.0) +- kubectl (Client Version: v1.19.1) - helm (v3.3.1+g249e521) - minikube version: v1.13.0 - kustomize ({kustomize/v3.8.2 2020-08-29T17:44:01Z }) @@ -217,14 +237,14 @@ Local version: Unknown) - PhantomJS (2.1.1) - PHP 7.1 (PHP 7.1.33-17+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Aug 7 2020 14:47:20) ( NTS )) - PHP 7.2 (PHP 7.2.33-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Aug 7 2020 14:44:29) ( NTS )) -- PHP 7.3 (PHP 7.3.21-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Aug 7 2020 14:44:10) ( NTS )) -- PHP 7.4 (PHP 7.4.9 (cli) (built: Aug 7 2020 14:29:36) ( NTS )) -- Composer (Composer version 1.10.12 2020-09-08 22:58:51) +- PHP 7.3 (PHP 7.3.22-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Sep 9 2020 06:46:30) ( NTS )) +- PHP 7.4 (PHP 7.4.10 (cli) (built: Sep 9 2020 06:36:14) ( NTS )) +- Composer (Composer version 1.10.13 2020-09-09 11:46:34) - PHPUnit (PHPUnit 7.5.20 by Sebastian Bergmann and contributors.) - Pollinate - psql (PostgreSQL) 12.4 - Powershell (PowerShell 7.0.3) -- Pulumi v2.9.2 +- Pulumi v2.10.0 - ruby (2.5.1p57) - gem (3.1.4) - OpenSSL 1.1.1g 21 Apr 2020 @@ -249,10 +269,10 @@ Local version: Unknown) - Packer (1.6.2) - Vcpkg 2020.06.15-unknownhash - Vercel CLI (20.1.0) -- MongoDB on Linux v4.4.0 +- MongoDB on Linux v4.4.1 - Haveged 1.9.1-6 - Swig 3.0.12 -- Netlify CLI (netlify-cli/2.61.2 linux-x64 node-v12.18.3) +- Netlify CLI (netlify-cli/2.63.0 linux-x64 node-v12.18.3) - Google Repository 58 - Google Play services 49 - Google APIs 24 @@ -321,22 +341,6 @@ Local version: Unknown) - Az Module (4.3.0) - Az Module (4.4.0) - Az Module (4.6.0) -- Cached container images - - jekyll/builder:latest (Digest: sha256:4bc6a3b6eddebef1652ef38ceb965fc9c1b06677f65f764e1e17b88dc2aa9934) - - node:10 (Digest: sha256:304c59f827930ae1a4a9775aec5837c8f95c3d41b5e6d7c0a329b4eb8c4cc8a8) - - node:12 (Digest: sha256:099346a8e9c861b406c9bbb1f109125c7263868e5447cc57d6d564e1fec8a5cf) - - buildpack-deps:stretch (Digest: sha256:82a686ba95fdf2bf4a5f5264e8e55b8aa272ffcedaed7826777f08de0d9e1146) - - buildpack-deps:buster (Digest: sha256:0f7be4c25fadb2b8aee537cdac00a684b09057e66368683bbf22adf477e05faa) - - debian:9 (Digest: sha256:335ecf9e8d9b2206c2e9e7f8b09547faa9f868e694f7c5be14c38be15ea8a7cf) - - debian:8 (Digest: sha256:8a0f2603166345b4d7bbf4842137b2ffcb492ece20d15f963f08aa26670f82c7) - - node:12-alpine (Digest: sha256:9623cd396644f9b2e595d833dc0188a880333674488d939338ab5fde10ef7c43) - - node:10-alpine (Digest: sha256:2f202af4d6baba655fef9c93f41a914b33ee576b9f55a6e69ba23b49e3b62766) - - alpine:3.9 (Digest: sha256:414e0518bb9228d35e4cd5165567fb91d26c6a214e9c95899e1e056fcd349011) - - alpine:3.10 (Digest: sha256:f0e9534a598e501320957059cb2a23774b4d4072e37c7b2cf7e95b241f019e35) - - alpine:3.8 (Digest: sha256:2bb501e6173d9d006e56de5bce2720eb06396803300fe1687b58a7ff32bf4c14) - - ubuntu:14.04 (Digest: sha256:ffc76f71dd8be8c9e222d420dc96901a07b61616689a44c7b3ef6a10b7213de4) - - alpine:3.7 (Digest: sha256:8421d9a84432575381bfabd248f1eb56f3aa21d9d7cd2511583c68c9b7511d10) - - mcr.microsoft.com/azure-pipelines/node8-typescript:latest (Digest: sha256:e52e60b9f71183969830a3664279b5d8c799b4b0ec2c25a0686f7c02f6a9669a) - Ruby: - Ruby 2.4.10 - Ruby 2.5.8 @@ -359,16 +363,16 @@ Local version: Unknown) - node 8.17.0 - node 10.22.0 - node 12.18.3 - - node 14.9.0 + - node 14.10.1 - go: - go 1.11.13 - go 1.12.17 - go 1.13.15 - - go 1.14.8 - - go 1.15.1 + - go 1.14.9 + - go 1.15.2 - boost: - boost 1.69.0 - boost 1.72.0 - AWS SAM CLI, version 1.2.0 -- Homebrew on Linux (Homebrew 2.5.0 -Homebrew/linuxbrew-core (git revision 3199c; last commit 2020-09-08)) +- Homebrew on Linux (Homebrew 2.5.1 +Homebrew/linuxbrew-core (git revision d52011; last commit 2020-09-12)) From 597569e608ad1cc27fbc3536730ce621323e8b6c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 17 Sep 2020 16:33:47 +0300 Subject: [PATCH 50/55] Updating readme file for ubuntu20 version 20200914.1 (#1590) Co-authored-by: Image generation service account Co-authored-by: Actions service account --- images/linux/Ubuntu2004-README.md | 129 ++++++++++++++++-------------- 1 file changed, 67 insertions(+), 62 deletions(-) diff --git a/images/linux/Ubuntu2004-README.md b/images/linux/Ubuntu2004-README.md index 82c6085ee..8f33731ff 100644 --- a/images/linux/Ubuntu2004-README.md +++ b/images/linux/Ubuntu2004-README.md @@ -1,6 +1,10 @@ +| Announcements | +|-| +| [Clang/LLVM 10 will be set as a default one and Clang/LLVM 6 will be deprecated for Ubuntu 20.04 on September, 23](https://github.com/actions/virtual-environments/issues/1536) | +*** # Ubuntu 20.04.1 LTS -The following software is installed on machines with the 20200908.1 update. +The following software is installed on machines with the 20200914.1 update. *** - 7-Zip 16.02 - Ansible (ansible 2.9.6) @@ -9,63 +13,64 @@ The following software is installed on machines with the 20200908.1 update. - Azure CLI (azure-cli 2.11.1) - Azure CLI (azure-devops 0.18.0) - Basic packages: + - dbus - dnsutils + - dpkg + - fakeroot + - gnupg2 - iproute2 - iputils-ping + - lib32z1 + - libc++abi-dev + - libc++-dev + - libcurl4 + - libgbm-dev + - libgconf-2-4 + - libgtk-3-0 + - libsecret-1-dev + - libsqlite3-dev - libunwind8 + - libxkbfile-dev + - libxss1 - locales - openssh-client + - pkg-config + - python-is-python2 + - rpm + - texinfo + - tk - tzdata - upx - - zstd - - libxkbfile-dev - - pkg-config - - libsecret-1-dev - - libxss1 - - libgconf-2-4 - - dbus - - xvfb - - libgbm-dev - - libgtk-3-0 - - tk - - fakeroot - - dpkg - - rpm - - xz-utils - xorriso + - xvfb + - xz-utils + - zstd - zsync - - gnupg2 - - lib32z1 - - texinfo - - libsqlite3-dev - - libc++-dev - - libc++abi-dev + - bison + - brotli + - bzip2 - curl - file + - flex - ftp - jq + - m4 - netcat - - ssh - parallel + - patchelf - rsync - shellcheck + - sqlite3 + - ssh - sudo - telnet - time - unzip - - zip - wget - - m4 - - bison - - flex - - patchelf - - bzip2 - - sqlite3 - - brotli - yamllint - - libcurl4 + - zip - Alibaba Cloud CLI (3.0.56) -- AWS CLI (aws-cli/2.0.46 Python/3.7.3 Linux/5.4.0-1023-azure exe/x86_64.ubuntu.20) +- AWS CLI (aws-cli/2.0.48 Python/3.7.3 Linux/5.4.0-1025-azure exe/x86_64.ubuntu.20) - AWS CLI Session manager plugin (1.1.61.0) - build-essential - Clang 6.0 (6.0.1) @@ -77,9 +82,25 @@ Target: x86_64-unknown-linux-gnu - Podman (2.0.6) - Buildah (1.15.2) - Skopeo (1.1.1) -- Docker Compose (docker-compose version 1.27.0, build 980ec85b) +- Docker Compose (docker-compose version 1.27.2, build 18f557f9) - Docker-Moby (Docker version 19.03.12+azure, build 0ed913b885c8919944a2e4c8d0b80a318a8dd48b) - Docker-Buildx (0.4.2+azure) +- Cached container images + - node:10 (Digest: sha256:ab6f988c514b5c5fb6d5a6d18afb216084b256719791c6cc61096da58e66c436) + - node:12 (Digest: sha256:20ffb04c1d35e273dc7aa68fe31ef136630d95128689283a8eb914329158022b) + - buildpack-deps:stretch (Digest: sha256:4f72cea5afa05e21bf2aec93b219b0843a10af5e2f407cc184f211e45f929ccc) + - buildpack-deps:buster (Digest: sha256:8a76b9f9ee417eb330e97d3129e373277515e98d0f3a95a89ab944b645190efd) + - debian:9 (Digest: sha256:bc125c699d736ac84c92b76ab7028741bbac69f207b7a8a4065bca6f79d5698e) + - debian:8 (Digest: sha256:e180975d5c1012518e711c92ab26a4ff98218f439a97d9adbcd503b0d3ad1c8a) + - jekyll/builder:latest (Digest: sha256:4bc6a3b6eddebef1652ef38ceb965fc9c1b06677f65f764e1e17b88dc2aa9934) + - node:12-alpine (Digest: sha256:9623cd396644f9b2e595d833dc0188a880333674488d939338ab5fde10ef7c43) + - node:10-alpine (Digest: sha256:2f202af4d6baba655fef9c93f41a914b33ee576b9f55a6e69ba23b49e3b62766) + - alpine:3.9 (Digest: sha256:414e0518bb9228d35e4cd5165567fb91d26c6a214e9c95899e1e056fcd349011) + - alpine:3.10 (Digest: sha256:f0e9534a598e501320957059cb2a23774b4d4072e37c7b2cf7e95b241f019e35) + - alpine:3.8 (Digest: sha256:2bb501e6173d9d006e56de5bce2720eb06396803300fe1687b58a7ff32bf4c14) + - ubuntu:14.04 (Digest: sha256:ffc76f71dd8be8c9e222d420dc96901a07b61616689a44c7b3ef6a10b7213de4) + - alpine:3.7 (Digest: sha256:8421d9a84432575381bfabd248f1eb56f3aa21d9d7cd2511583c68c9b7511d10) + - mcr.microsoft.com/azure-pipelines/node8-typescript:latest (Digest: sha256:e52e60b9f71183969830a3664279b5d8c799b4b0ec2c25a0686f7c02f6a9669a) - .NET Core SDK: - 3.1.402 - 3.1.401 @@ -163,7 +184,7 @@ Target: x86_64-unknown-linux-gnu - GitHub CLI 0.12.0 - Google Chrome (Google Chrome 85.0.4183.102 ) - ChromeDriver 85.0.4183.87 (cd6713ebf92fa1cacc0f1a598df280093af0c5d7-refs/branch-heads/4183@{#1689}); Chrome Driver is available via CHROMEWEBDRIVER environment variable -- Google Cloud SDK (308.0.0) +- Google Cloud SDK (309.0.0) - Haskell Cabal (cabal-install version 3.4.0.0 compiled using version 3.4.0.0 of the Cabal library ) - GHC (The Glorious Glasgow Haskell Compilation System, version 8.10.2) @@ -178,7 +199,7 @@ compiled using version 3.4.0.0 of the Cabal library ) - Gradle 6.6.1 - Maven (Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)) - Kind (kind v0.8.1 go1.14.2 linux/amd64) -- kubectl (Client Version: v1.19.0) +- kubectl (Client Version: v1.19.1) - helm (v3.3.1+g249e521) - minikube version: v1.13.0 - kustomize ({kustomize/v3.8.2 2020-08-29T17:44:01Z }) @@ -208,18 +229,18 @@ Local version: Unknown) - Bazelisk (1.6.1) - ORAS CLI 0.8.1 - PhantomJS (2.1.1) -- PHP 7.4 (PHP 7.4.9 (cli) (built: Aug 7 2020 14:30:01) ( NTS )) +- PHP 7.4 (PHP 7.4.10 (cli) (built: Sep 9 2020 06:36:30) ( NTS )) > To use ppa:ondrej/php APT repository On Ubuntu 20.04 it is necessary to add it to the APT sources ``` apt-add-repository ppa:ondrej/php -y apt-get update ``` -- Composer (Composer version 1.10.12 2020-09-08 22:58:51) +- Composer (Composer version 1.10.13 2020-09-09 11:46:34) - PHPUnit (PHPUnit 7.5.20 by Sebastian Bergmann and contributors.) - Pollinate - psql (PostgreSQL) 12.4 - Powershell (PowerShell 7.0.3) -- Pulumi v2.9.2 +- Pulumi v2.10.0 - ruby (2.7.0p0) - gem (3.1.2) - OpenSSL 1.1.1f 31 Mar 2020 @@ -245,10 +266,10 @@ apt-get update - Packer (1.6.2) - Vcpkg 2020.06.15-unknownhash - Vercel CLI (20.1.0) -- MongoDB on Linux v4.4.0 +- MongoDB on Linux v4.4.1 - Haveged 1.9.1-6ubuntu1 - Swig 4.0.1 -- Netlify CLI (netlify-cli/2.61.2 linux-x64 node-v12.18.3) +- Netlify CLI (netlify-cli/2.63.0 linux-x64 node-v12.18.3) - Google Repository 58 - Google Play services 49 - CMake 3.10.2.4988404 @@ -274,22 +295,6 @@ apt-get update - Android SDK Build-Tools 27.0.0 - Android NDK 21.3.6528147 - Az Module (4.6.1) -- Cached container images - - jekyll/builder:latest (Digest: sha256:4bc6a3b6eddebef1652ef38ceb965fc9c1b06677f65f764e1e17b88dc2aa9934) - - node:10 (Digest: sha256:304c59f827930ae1a4a9775aec5837c8f95c3d41b5e6d7c0a329b4eb8c4cc8a8) - - node:12 (Digest: sha256:099346a8e9c861b406c9bbb1f109125c7263868e5447cc57d6d564e1fec8a5cf) - - buildpack-deps:stretch (Digest: sha256:82a686ba95fdf2bf4a5f5264e8e55b8aa272ffcedaed7826777f08de0d9e1146) - - buildpack-deps:buster (Digest: sha256:0f7be4c25fadb2b8aee537cdac00a684b09057e66368683bbf22adf477e05faa) - - debian:9 (Digest: sha256:335ecf9e8d9b2206c2e9e7f8b09547faa9f868e694f7c5be14c38be15ea8a7cf) - - debian:8 (Digest: sha256:8a0f2603166345b4d7bbf4842137b2ffcb492ece20d15f963f08aa26670f82c7) - - node:12-alpine (Digest: sha256:9623cd396644f9b2e595d833dc0188a880333674488d939338ab5fde10ef7c43) - - node:10-alpine (Digest: sha256:2f202af4d6baba655fef9c93f41a914b33ee576b9f55a6e69ba23b49e3b62766) - - alpine:3.9 (Digest: sha256:414e0518bb9228d35e4cd5165567fb91d26c6a214e9c95899e1e056fcd349011) - - alpine:3.10 (Digest: sha256:f0e9534a598e501320957059cb2a23774b4d4072e37c7b2cf7e95b241f019e35) - - alpine:3.8 (Digest: sha256:2bb501e6173d9d006e56de5bce2720eb06396803300fe1687b58a7ff32bf4c14) - - ubuntu:14.04 (Digest: sha256:ffc76f71dd8be8c9e222d420dc96901a07b61616689a44c7b3ef6a10b7213de4) - - alpine:3.7 (Digest: sha256:8421d9a84432575381bfabd248f1eb56f3aa21d9d7cd2511583c68c9b7511d10) - - mcr.microsoft.com/azure-pipelines/node8-typescript:latest (Digest: sha256:e52e60b9f71183969830a3664279b5d8c799b4b0ec2c25a0686f7c02f6a9669a) - Ruby: - Ruby 2.5.8 - Ruby 2.6.6 @@ -311,10 +316,10 @@ apt-get update - node 8.17.0 - node 10.22.0 - node 12.18.3 - - node 14.9.0 + - node 14.10.1 - go: - - go 1.14.8 - - go 1.15.1 + - go 1.14.9 + - go 1.15.2 - AWS SAM CLI, version 1.2.0 -- Homebrew on Linux (Homebrew 2.5.0 -Homebrew/linuxbrew-core (git revision 3199c; last commit 2020-09-08)) +- Homebrew on Linux (Homebrew 2.5.1 +Homebrew/linuxbrew-core (git revision d52011; last commit 2020-09-12)) From 65b6ca816344b4a52a244c4308c71dc75811c10d Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov Date: Thu, 17 Sep 2020 17:59:39 +0300 Subject: [PATCH 51/55] add os helpers --- images/linux/scripts/installers/clang.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/images/linux/scripts/installers/clang.sh b/images/linux/scripts/installers/clang.sh index fc4f85c5a..c81cfd2a3 100644 --- a/images/linux/scripts/installers/clang.sh +++ b/images/linux/scripts/installers/clang.sh @@ -3,6 +3,10 @@ ## File: clang.sh ## Desc: Installs Clang compiler ################################################################################ +set -e + +# Source the helpers for use with the script +source $HELPER_SCRIPTS/os.sh function InstallClang { local version=$1 From 33b92aee3c69cacbb2aae51e6de286797d850d51 Mon Sep 17 00:00:00 2001 From: Mikhail Timofeev Date: Fri, 18 Sep 2020 15:12:45 +0300 Subject: [PATCH 52/55] fix filter to avoid rc versions --- images/win/scripts/Installers/Install-PyPy.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/images/win/scripts/Installers/Install-PyPy.ps1 b/images/win/scripts/Installers/Install-PyPy.ps1 index 598752a5a..db5d89753 100644 --- a/images/win/scripts/Installers/Install-PyPy.ps1 +++ b/images/win/scripts/Installers/Install-PyPy.ps1 @@ -97,8 +97,8 @@ foreach($pypyTool in $pypyTools) foreach($pypyVersion in $pypyTool.versions) { # Query latest PyPy version - $filter = '{0}{1}-*-{2}.zip' -f $pypyTool.name, $pypyVersion, $pypyTool.platform - $latestMajorPyPyVersion = $pypyVersions | Where-Object {$_.name -like $filter} | Select-Object -First 1 + $filter = '{0}{1}-v[0-9]+\.[0-9]+\.[0-9]+-{2}.zip' -f $pypyTool.name, $pypyVersion, $pypyTool.platform + $latestMajorPyPyVersion = $pypyVersions | Where-Object {$_.name -match $filter} | Select-Object -First 1 if ($latestMajorPyPyVersion) { From e183946520fda2bcae0328865b3bc4e956086f67 Mon Sep 17 00:00:00 2001 From: Mikhail Timofeev Date: Fri, 18 Sep 2020 15:24:13 +0300 Subject: [PATCH 53/55] beautify regexp --- images/win/scripts/Installers/Install-PyPy.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/win/scripts/Installers/Install-PyPy.ps1 b/images/win/scripts/Installers/Install-PyPy.ps1 index db5d89753..af1b11820 100644 --- a/images/win/scripts/Installers/Install-PyPy.ps1 +++ b/images/win/scripts/Installers/Install-PyPy.ps1 @@ -97,7 +97,7 @@ foreach($pypyTool in $pypyTools) foreach($pypyVersion in $pypyTool.versions) { # Query latest PyPy version - $filter = '{0}{1}-v[0-9]+\.[0-9]+\.[0-9]+-{2}.zip' -f $pypyTool.name, $pypyVersion, $pypyTool.platform + $filter = '{0}{1}-v\d+\.\d+\.\d+-{2}.zip' -f $pypyTool.name, $pypyVersion, $pypyTool.platform $latestMajorPyPyVersion = $pypyVersions | Where-Object {$_.name -match $filter} | Select-Object -First 1 if ($latestMajorPyPyVersion) From 4f51cd9d2872ea4aa6a0610eb0ffbceef1c201a7 Mon Sep 17 00:00:00 2001 From: Alejandro Pauly Date: Fri, 18 Sep 2020 11:13:36 -0400 Subject: [PATCH 54/55] Use special secret for pr approval. --- .github/workflows/merge_pull_request.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/merge_pull_request.yml b/.github/workflows/merge_pull_request.yml index c1d18cd44..c93437f59 100644 --- a/.github/workflows/merge_pull_request.yml +++ b/.github/workflows/merge_pull_request.yml @@ -26,7 +26,7 @@ jobs: - name: Approve pull request by GitHub-Actions bot uses: actions/github-script@v2 with: - github-token: ${{secrets.GITHUB_TOKEN}} + github-token: ${{secrets.PRAPPROVAL_SECRET}} script: | github.pulls.createReview({ owner: context.repo.owner, @@ -56,4 +56,4 @@ jobs: owner: context.repo.owner, repo: context.repo.repo, ref: "heads/${{ github.event.client_payload.ReleaseBranchName }}-docs" - }) \ No newline at end of file + }) From 2c60c781415379e3c992fec323309c951b156ccb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 19 Sep 2020 09:54:33 +0000 Subject: [PATCH 55/55] Updating readme file for macos-10.15 version 20200916.1 (#1617) Co-authored-by: no-reply@microsoft.com Co-authored-by: Actions service account --- images/macos/macos-10.15-Readme.md | 129 +++++++++++++++-------------- 1 file changed, 65 insertions(+), 64 deletions(-) diff --git a/images/macos/macos-10.15-Readme.md b/images/macos/macos-10.15-Readme.md index e103a50e3..26492d8e6 100644 --- a/images/macos/macos-10.15-Readme.md +++ b/images/macos/macos-10.15-Readme.md @@ -1,7 +1,7 @@ # macOS 10.15 info - System Version: macOS 10.15.6 (19G2021) - Kernel Version: Darwin 19.6.0 -- Image Version: 20200913.1 +- Image Version: 20200916.1 ## Installed Software ### Language and Runtime @@ -12,7 +12,7 @@ - GNU Fortran (Homebrew GCC 9.3.0) 9.3.0 — available by `gfortran-9` alias - Node.js v12.18.3 - NVM 0.35.3 -- NVM - Cached node versions: v6.17.1 v8.17.0 v10.22.0 v12.18.3 v13.14.0 v14.10.1 +- NVM - Cached node versions: v6.17.1 v8.17.0 v10.22.1 v12.18.4 v13.14.0 v14.11.0 - Python 2.7.17 - Python 3.8.5 - Ruby 2.6.6p146 @@ -27,7 +27,7 @@ - Bundler version 2.1.4 - Carthage 0.35.0 - CocoaPods 1.9.3 -- Homebrew 2.5.0 +- Homebrew 2.5.1 - NPM 6.14.6 - Yarn 1.22.5 - NuGet 5.6.0.6489 @@ -128,9 +128,9 @@ #### Node.js - 8.17.0 -- 10.22.0 -- 12.18.3 -- 14.10.1 +- 10.22.1 +- 12.18.4 +- 14.11.0 #### Go - 1.11.13 @@ -203,19 +203,20 @@ - NUnit 3.6.1 ### Xcode -| Version | Build | Path | -| -------------- | -------- | ------------------------------ | -| 12.0 | 12A8189n | /Applications/Xcode_12.app | -| 11.7 (default) | 11E801a | /Applications/Xcode_11.7.app | -| 11.6 | 11E708 | /Applications/Xcode_11.6.app | -| 11.5 | 11E608c | /Applications/Xcode_11.5.app | -| 11.4.1 | 11E503a | /Applications/Xcode_11.4.1.app | -| 11.4 | 11E146 | /Applications/Xcode_11.4.app | -| 11.3.1 | 11C505 | /Applications/Xcode_11.3.1.app | -| 11.2.1 | 11B500 | /Applications/Xcode_11.2.1.app | -| 11.1 | 11A1027 | /Applications/Xcode_11.1.app | -| 11.0 | 11A420a | /Applications/Xcode_11.app | -| 10.3 | 10G8 | /Applications/Xcode_10.3.app | +| Version | Build | Path | +| -------------- | -------- | ------------------------------- | +| 12.0 | 12A8189n | /Applications/Xcode_12_beta.app | +| 12.0 | 12A7209 | /Applications/Xcode_12.app | +| 11.7 (default) | 11E801a | /Applications/Xcode_11.7.app | +| 11.6 | 11E708 | /Applications/Xcode_11.6.app | +| 11.5 | 11E608c | /Applications/Xcode_11.5.app | +| 11.4.1 | 11E503a | /Applications/Xcode_11.4.1.app | +| 11.4 | 11E146 | /Applications/Xcode_11.4.app | +| 11.3.1 | 11C505 | /Applications/Xcode_11.3.1.app | +| 11.2.1 | 11B500 | /Applications/Xcode_11.2.1.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.4 @@ -225,51 +226,51 @@ - xcversion 2.6.6 #### 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.1, 11.3.1, 11.4, 11.4.1, 11.5, 11.6, 11.7 | -| macOS 11.0 | macosx11.0 | 12.0 | -| 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.1, 11.3.1 | -| iOS 13.4 | iphoneos13.4 | 11.4, 11.4.1 | -| iOS 13.5 | iphoneos13.5 | 11.5 | -| iOS 13.6 | iphoneos13.6 | 11.6 | -| iOS 13.7 | iphoneos13.7 | 11.7 | -| iOS 14.0 | iphoneos14.0 | 12.0 | -| 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.1, 11.3.1 | -| Simulator - iOS 13.4 | iphonesimulator13.4 | 11.4, 11.4.1 | -| Simulator - iOS 13.5 | iphonesimulator13.5 | 11.5 | -| Simulator - iOS 13.6 | iphonesimulator13.6 | 11.6 | -| Simulator - iOS 13.7 | iphonesimulator13.7 | 11.7 | -| Simulator - iOS 14.0 | iphonesimulator14.0 | 12.0 | -| tvOS 12.4 | appletvos12.4 | 10.3 | -| tvOS 13.0 | appletvos13.0 | 11.0, 11.1 | -| tvOS 13.2 | appletvos13.2 | 11.2.1, 11.3.1 | -| tvOS 13.4 | appletvos13.4 | 11.4, 11.4.1, 11.5, 11.6, 11.7 | -| tvOS 14.0 | appletvos14.0 | 12.0 | -| 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.1, 11.3.1 | -| Simulator - tvOS 13.4 | appletvsimulator13.4 | 11.4, 11.4.1, 11.5, 11.6, 11.7 | -| Simulator - tvOS 14.0 | appletvsimulator14.0 | 12.0 | -| watchOS 5.3 | watchos5.3 | 10.3 | -| watchOS 6.0 | watchos6.0 | 11.0, 11.1 | -| watchOS 6.1 | watchos6.1 | 11.2.1, 11.3.1 | -| watchOS 6.2 | watchos6.2 | 11.4, 11.4.1, 11.5, 11.6, 11.7 | -| watchOS 7.0 | watchos7.0 | 12.0 | -| 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.1, 11.3.1 | -| Simulator - watchOS 6.2 | watchsimulator6.2 | 11.4, 11.4.1, 11.5, 11.6, 11.7 | -| Simulator - watchOS 7.0 | watchsimulator7.0 | 12.0 | -| DriverKit 19.0 | driverkit.macosx19.0 | 11.0, 11.1, 11.2.1, 11.3.1, 11.4, 11.4.1, 11.5, 11.6, 11.7 | -| DriverKit 20.0 | driverkit.macosx20.0 | 12.0 | +| SDK | SDK Name | Xcode Version | +| ----------------------- | -------------------- | ---------------------------------------------------------------- | +| macOS 10.14 | macosx10.14 | 10.3 | +| macOS 10.15 | macosx10.15 | 11.0, 11.1, 11.2.1, 11.3.1, 11.4, 11.4.1, 11.5, 11.6, 11.7, 12.0 | +| macOS 11.0 | macosx11.0 | 12.0 | +| 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.1, 11.3.1 | +| iOS 13.4 | iphoneos13.4 | 11.4, 11.4.1 | +| iOS 13.5 | iphoneos13.5 | 11.5 | +| iOS 13.6 | iphoneos13.6 | 11.6 | +| iOS 13.7 | iphoneos13.7 | 11.7 | +| iOS 14.0 | iphoneos14.0 | 12.0, 12.0 | +| 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.1, 11.3.1 | +| Simulator - iOS 13.4 | iphonesimulator13.4 | 11.4, 11.4.1 | +| Simulator - iOS 13.5 | iphonesimulator13.5 | 11.5 | +| Simulator - iOS 13.6 | iphonesimulator13.6 | 11.6 | +| Simulator - iOS 13.7 | iphonesimulator13.7 | 11.7 | +| Simulator - iOS 14.0 | iphonesimulator14.0 | 12.0, 12.0 | +| tvOS 12.4 | appletvos12.4 | 10.3 | +| tvOS 13.0 | appletvos13.0 | 11.0, 11.1 | +| tvOS 13.2 | appletvos13.2 | 11.2.1, 11.3.1 | +| tvOS 13.4 | appletvos13.4 | 11.4, 11.4.1, 11.5, 11.6, 11.7 | +| tvOS 14.0 | appletvos14.0 | 12.0, 12.0 | +| 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.1, 11.3.1 | +| Simulator - tvOS 13.4 | appletvsimulator13.4 | 11.4, 11.4.1, 11.5, 11.6, 11.7 | +| Simulator - tvOS 14.0 | appletvsimulator14.0 | 12.0, 12.0 | +| watchOS 5.3 | watchos5.3 | 10.3 | +| watchOS 6.0 | watchos6.0 | 11.0, 11.1 | +| watchOS 6.1 | watchos6.1 | 11.2.1, 11.3.1 | +| watchOS 6.2 | watchos6.2 | 11.4, 11.4.1, 11.5, 11.6, 11.7 | +| watchOS 7.0 | watchos7.0 | 12.0, 12.0 | +| 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.1, 11.3.1 | +| Simulator - watchOS 6.2 | watchsimulator6.2 | 11.4, 11.4.1, 11.5, 11.6, 11.7 | +| Simulator - watchOS 7.0 | watchsimulator7.0 | 12.0, 12.0 | +| DriverKit 19.0 | driverkit.macosx19.0 | 11.0, 11.1, 11.2.1, 11.3.1, 11.4, 11.4.1, 11.5, 11.6, 11.7, 12.0 | +| DriverKit 20.0 | driverkit.macosx20.0 | 12.0 | #### Installed Simulators | OS | Xcode Version | Simulators |