diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md index 0b5c2fe6..b95d5ebc 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -2,21 +2,21 @@ name: Bug report about: Submit a bug report title: '' -labels: t:Bug report +labels: needs triage assignees: '' --- -**Describe the bug** +**Description** A clear and concise description of what the bug is, and why you consider it to be a bug. -**Area for Triage**: +**Area for Triage**: -**Question, Bug, or Feature?**: +**Question, Bug, or Feature?**: -**Virtual environments affected** +**Virtual environments affected** - [ ] macOS 10.15 - [ ] Ubuntu 16.04 LTS - [ ] Ubuntu 18.04 LTS @@ -24,10 +24,13 @@ A clear and concise description of what the bug is, and why you consider it to b - [ ] Windows Server 2016 R2 - [ ] Windows Server 2019 -**Expected behavior** +**Expected behavior** A description of what you expected to happen. -**Actual behavior** +**Actual behavior** +A description of what is actually happening. + +**Repro steps** A description with steps to reproduce the issue. If your have a public example or repo to share, please provide the link. diff --git a/.github/ISSUE_TEMPLATE/tool-request.md b/.github/ISSUE_TEMPLATE/tool-request.md index 02d0aeb4..2eeb8737 100644 --- a/.github/ISSUE_TEMPLATE/tool-request.md +++ b/.github/ISSUE_TEMPLATE/tool-request.md @@ -2,7 +2,7 @@ name: Tool request about: Request a new tool or update to a tool title: Update/Add [tool name] -labels: t:Enhancement +labels: feature request, needs triage assignees: '' --- diff --git a/.github/workflows/create_github_release.yml b/.github/workflows/create_github_release.yml index 95e73815..f7ae5fcc 100644 --- a/.github/workflows/create_github_release.yml +++ b/.github/workflows/create_github_release.yml @@ -6,7 +6,7 @@ on: jobs: - build: + Create_GitHub_release: runs-on: ubuntu-latest steps: diff --git a/.github/workflows/create_pull_request.yml b/.github/workflows/create_pull_request.yml index 36b2508c..cff80e9d 100644 --- a/.github/workflows/create_pull_request.yml +++ b/.github/workflows/create_pull_request.yml @@ -6,11 +6,19 @@ on: jobs: - build: + Create_pull_request: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Clone release branch to create pull request + run: | + git checkout ${{ github.event.client_payload.ReleaseBranchName }} + git branch ${{ github.event.client_payload.ReleaseBranchName }}-docs + git push origin ${{ github.event.client_payload.ReleaseBranchName }}-docs - name: Create pull request for ${{ github.event.client_payload.ReleaseBranchName }} uses: actions/github-script@v2 @@ -21,7 +29,7 @@ jobs: owner: context.repo.owner, repo: context.repo.repo, title: "${{ github.event.client_payload.PullRequestTitle }}", - head: "${{ github.event.client_payload.ReleaseBranchName }}", + head: "${{ github.event.client_payload.ReleaseBranchName }}-docs", base: "${{ github.event.client_payload.PullRequestBase }}", body: `${{ github.event.client_payload.PullRequestBody }}` }); \ No newline at end of file diff --git a/.github/workflows/merge_pull_request.yml b/.github/workflows/merge_pull_request.yml index dd6f3fc6..c1d18cd4 100644 --- a/.github/workflows/merge_pull_request.yml +++ b/.github/workflows/merge_pull_request.yml @@ -6,11 +6,34 @@ on: jobs: - build: + Merge_pull_request: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Resolve possible conflicts ${{ github.event.client_payload.ReleaseBranchName }} with main + run: | + git config --global user.email "no-reply@github.com" + git config --global user.name "Actions service account" + git checkout ${{ github.event.client_payload.ReleaseBranchName }}-docs + git merge --no-edit --strategy-option=ours main + git push origin ${{ github.event.client_payload.ReleaseBranchName }}-docs + sleep 30 + + - name: Approve pull request by GitHub-Actions bot + uses: actions/github-script@v2 + with: + github-token: ${{secrets.GITHUB_TOKEN}} + script: | + github.pulls.createReview({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: ${{ github.event.client_payload.PullRequestNumber }}, + event: "APPROVE" + }); - name: Merge pull request for ${{ github.event.client_payload.ReleaseBranchName }} uses: actions/github-script@v2 @@ -20,5 +43,17 @@ jobs: github.pulls.merge({ owner: context.repo.owner, repo: context.repo.repo, - pull_number: ${{ github.event.client_payload.PullRequestNumber }} + pull_number: ${{ github.event.client_payload.PullRequestNumber }}, + merge_method: "squash" + }) + + - name: Delete docs branch ${{ github.event.client_payload.ReleaseBranchName }}-docs + uses: actions/github-script@v2 + with: + github-token: ${{secrets.GITHUB_TOKEN}} + script: | + github.git.deleteRef({ + owner: context.repo.owner, + repo: context.repo.repo, + ref: "heads/${{ github.event.client_payload.ReleaseBranchName }}-docs" }) \ No newline at end of file diff --git a/.github/workflows/update_github_release.yml b/.github/workflows/update_github_release.yml index e6593ae9..0ea6d302 100644 --- a/.github/workflows/update_github_release.yml +++ b/.github/workflows/update_github_release.yml @@ -6,7 +6,7 @@ on: jobs: - build: + Update_GitHub_release: runs-on: ubuntu-latest steps: diff --git a/helpers/CreateAzureVMFromPackerTemplate.ps1 b/helpers/CreateAzureVMFromPackerTemplate.ps1 index 0aa95b04..683f2cf5 100644 --- a/helpers/CreateAzureVMFromPackerTemplate.ps1 +++ b/helpers/CreateAzureVMFromPackerTemplate.ps1 @@ -1,10 +1,10 @@ Function CreateAzureVMFromPackerTemplate { <# .SYNOPSIS - Creates an Azure VM from a template. Also generates network resources in Azure to make the VM accessible. + A helper function to deploy a VM from a generated image. .DESCRIPTION - Creates Azure resources and kicks off a packer image generation for the selected image type. + Creates an Azure VM from a template. Also generates network resources in Azure to make the VM accessible. .PARAMETER SubscriptionId The Azure subscription Id where resources will be created. diff --git a/helpers/GenerateResourcesAndImage.ps1 b/helpers/GenerateResourcesAndImage.ps1 index 26d62178..32177094 100644 --- a/helpers/GenerateResourcesAndImage.ps1 +++ b/helpers/GenerateResourcesAndImage.ps1 @@ -39,6 +39,16 @@ Function Get-PackerTemplatePath { return $RepositoryRoot + $relativePath; } +Function Get-LatestCommit { + [CmdletBinding()] + param() + + process { + Write-Host "Latest commit:" + git log --pretty=format:"Date: %cd; Commit: %H - %s; Author: %an <%ae>" -1 + } +} + Function GenerateResourcesAndImage { <# .SYNOPSIS @@ -170,6 +180,8 @@ Function GenerateResourcesAndImage { $tenantId = $sub.TenantId # "", "Note this variable-setting script for running Packer with these Azure resources in the future:", "==============================================================================================", "`$spClientId = `"$spClientId`"", "`$ServicePrincipalClientSecret = `"$ServicePrincipalClientSecret`"", "`$SubscriptionId = `"$SubscriptionId`"", "`$tenantId = `"$tenantId`"", "`$spObjectId = `"$spObjectId`"", "`$AzureLocation = `"$AzureLocation`"", "`$ResourceGroupName = `"$ResourceGroupName`"", "`$storageAccountName = `"$storageAccountName`"", "`$install_password = `"$install_password`"", "" + Get-LatestCommit -ErrorAction SilentlyContinue + packer.exe build -on-error=ask ` -var "client_id=$($spClientId)" ` -var "client_secret=$($ServicePrincipalClientSecret)" ` diff --git a/images.CI/azure-pipelines/image-generation.yml b/images.CI/azure-pipelines/image-generation.yml index d2adc15a..70db48f1 100644 --- a/images.CI/azure-pipelines/image-generation.yml +++ b/images.CI/azure-pipelines/image-generation.yml @@ -17,13 +17,10 @@ jobs: displayName: 'Download custom repository' condition: and(ne(variables['CUSTOM_REPOSITORY_URL'], ''), ne(variables['CUSTOM_REPOSITORY_BRANCH'], '')) inputs: - targetType: 'inline' - script: | - Write-Host "Clean up default repository" - Remove-Item -path './*' -Recurse -Force - Write-Host "Download $(CUSTOM_REPOSITORY_BRANCH) branch from $(CUSTOM_REPOSITORY_URL)" - $env:GIT_REDIRECT_STDERR = '2>&1' - git clone $(CUSTOM_REPOSITORY_URL) . -b $(CUSTOM_REPOSITORY_BRANCH) --single-branch --depth 1 + targetType: 'filePath' + filePath: ./images.CI/download-repo.ps1 + arguments: -RepoUrl $(CUSTOM_REPOSITORY_URL) ` + -RepoBranch $(CUSTOM_REPOSITORY_BRANCH) - task: PowerShell@2 displayName: 'Build VM' diff --git a/images.CI/download-repo.ps1 b/images.CI/download-repo.ps1 new file mode 100644 index 00000000..40270769 --- /dev/null +++ b/images.CI/download-repo.ps1 @@ -0,0 +1,14 @@ +param( + [String] [Parameter (Mandatory=$true)] $RepoUrl, + [String] [Parameter (Mandatory=$true)] $RepoBranch +) + +Write-Host "Clean up default repository" +Remove-Item -path './*' -Recurse -Force + +Write-Host "Download ${RepoBranch} branch from ${RepoUrl}" +$env:GIT_REDIRECT_STDERR = '2>&1' +git clone $RepoUrl . -b $RepoBranch --single-branch --depth 1 + +Write-Host "Latest commit:" +git log --pretty=format:"Date: %cd; Commit: %H - %s; Author: %an <%ae>" -1 \ No newline at end of file diff --git a/images/linux/Ubuntu1604-README.md b/images/linux/Ubuntu1604-README.md index bf5ba84e..a3bc4bd9 100644 --- a/images/linux/Ubuntu1604-README.md +++ b/images/linux/Ubuntu1604-README.md @@ -1,12 +1,12 @@ -# Ubuntu 16.04.6 LTS -The following software is installed on machines with the 20200806.0 update. +# Ubuntu 16.04.7 LTS +The following software is installed on machines with the 20200908.1 update. *** - 7-Zip 9.20 -- Ansible (ansible 2.9.11) +- Ansible (ansible 2.9.13) - AzCopy7 (available by azcopy alias) 7.3.0 -- AzCopy10 (available by azcopy10 alias) 10.5.1 -- Azure CLI (azure-cli 2.10.1) +- AzCopy10 (available by azcopy10 alias) 10.6.0 +- Azure CLI (azure-cli 2.11.1) - Azure CLI (azure-devops 0.18.0) - Basic packages: - dnsutils @@ -66,7 +66,7 @@ The following software is installed on machines with the 20200806.0 update. - yamllint - libcurl3 - Alibaba Cloud CLI (3.0.56) -- AWS CLI (aws-cli/1.18.113 Python/2.7.12 Linux/4.15.0-1092-azure botocore/1.17.36) +- AWS CLI (aws-cli/1.18.134 Python/2.7.12 Linux/4.15.0-1093-azure botocore/1.17.57) - AWS CLI Session manager plugin (1.1.61.0) - build-essential - nvm (0.35.3) @@ -76,16 +76,20 @@ The following software is installed on machines with the 20200806.0 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.26.2, build eefe0d31) +- Docker Compose (docker-compose version 1.27.0, build 980ec85b) - Docker-Moby (Docker version 19.03.12+azure, build 0ed913b885c8919944a2e4c8d0b80a318a8dd48b) -- Docker-Buildx (0.4.1+azure) +- Docker-Buildx (0.4.2+azure) - .NET Core SDK: + - 3.1.402 + - 3.1.401 - 3.1.302 - 3.1.301 - 3.1.300 - 3.1.202 - 3.1.201 - 3.1.200 + - 3.1.108 + - 3.1.107 - 3.1.106 - 3.1.105 - 3.1.104 @@ -97,6 +101,8 @@ Target: x86_64-unknown-linux-gnu - 3.0.102 - 3.0.101 - 3.0.100 + - 2.1.810 + - 2.1.809 - 2.1.808 - 2.1.807 - 2.1.806 @@ -107,6 +113,8 @@ Target: x86_64-unknown-linux-gnu - 2.1.801 - 2.1.701 - 2.1.700 + - 2.1.615 + - 2.1.614 - 2.1.613 - 2.1.612 - 2.1.611 @@ -119,6 +127,8 @@ Target: x86_64-unknown-linux-gnu - 2.1.604 - 2.1.603 - 2.1.602 + - 2.1.518 + - 2.1.517 - 2.1.516 - 2.1.515 - 2.1.514 @@ -142,7 +152,7 @@ Target: x86_64-unknown-linux-gnu - 2.1.301 - 2.1.300 - Erlang (Erlang (SMP,ASYNC_THREADS,HIPE) (BEAM) emulator version 11.0.3) -- Firefox (Mozilla Firefox 79.0) +- Firefox (Mozilla Firefox 80.0.1) - Geckodriver (0.27.0); Gecko Driver is available via GECKOWEBDRIVER environment variable - GNU C++ 7.5.0 - GNU C++ 8.4.0 @@ -150,18 +160,18 @@ Target: x86_64-unknown-linux-gnu - GNU Fortran 8.4.0 - GNU Fortran 9.3.0 - Git (2.28.0) -- Git Large File Storage (LFS) (2.11.0) +- Git Large File Storage (LFS) (2.12.0) - Git-ftp (1.0.2) - Hub CLI (2.14.2) -- GitHub CLI 0.11.1 -- Google Chrome (Google Chrome 84.0.4147.105 ) -- ChromeDriver 84.0.4147.30 (48b3e868b4cc0aa7e8149519690b6f6949e110a8-refs/branch-heads/4147@{#310}); Chrome Driver is available via CHROMEWEBDRIVER environment variable -- Google Cloud SDK (304.0.0) -- Haskell Cabal (cabal-install version 3.2.0.0 -compiled using version 3.2.0.0 of the Cabal library ) -- GHC (The Glorious Glasgow Haskell Compilation System, version 8.10.1) +- 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) +- 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) - Haskell Stack (Version 2.3.3, Git revision cb44d51bed48b723a5deb08c3348c0b3ccfc437e x86_64 hpack-0.33.0) -- Heroku (heroku/7.42.6 linux-x64 node-v12.16.2) +- Heroku (heroku/7.42.13 linux-x64 node-v12.16.2) - HHVM (HipHop VM 4.56.1 (rel)) - ImageMagick - Azul Zulu OpenJDK: @@ -171,17 +181,19 @@ compiled using version 3.2.0.0 of the Cabal library ) - 11 (openjdk version "11.0.8" 2020-07-14) - 12 (openjdk version "12.0.2" 2019-07-16) - Ant (Apache Ant(TM) version 1.9.6 compiled on July 20 2018) -- Gradle 6.5.1 +- 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.18.6) -- helm (v3.2.4+g0ad800e) -- minikube version: v1.12.2 +- kubectl (Client Version: v1.19.0) +- helm (v3.3.1+g249e521) +- minikube version: v1.13.0 +- kustomize ({kustomize/v3.8.2 2020-08-29T17:44:01Z }) - oc CLI Client Version: 4.5.0-202005291417-9933eb9 - Leiningen (Leiningen 2.9.4 on Java 1.8.0_265 OpenJDK 64-Bit Server VM) - Mercurial (Mercurial Distributed SCM (version 4.4.1)) - Miniconda (conda 4.8.3) -- Mono (Mono JIT compiler version 6.10.0.104 (tarball Fri Jun 26 19:43:02 UTC 2020)) +- Mono (Mono JIT compiler version 6.12.0.90 (tarball Fri Sep 4 13:58:50 UTC 2020)) +- NuGet (NuGet Version: 5.5.0.6382) - MySQL (mysql Ver 14.14 Distrib 5.7.31, for Linux (x86_64) using EditLine wrapper) - MySQL Server (user:root password:root) - MS SQL Server Client Tools @@ -192,55 +204,55 @@ compiled using version 3.2.0.0 of the Cabal library ) Local version: Unknown) - n (6.7.0) - Parcel (1.12.4) -- TypeScript (Version 3.9.7) +- TypeScript (Version 4.0.2) - Webpack (4.44.1) - Webpack CLI (3.3.12) -- Yarn (1.22.4) -- Newman (5.1.2) -- Bazel (bazel 3.4.1) -- Bazelisk (1.5.0) +- Yarn (1.22.5) +- Newman (5.2.0) +- Bazel (bazel 3.5.0) +- Bazelisk (1.6.1) - ORAS CLI 0.8.1 - PhantomJS (2.1.1) -- PHP 5.6 (PHP 5.6.40-29+ubuntu16.04.1+deb.sury.org+1 (cli) ) -- PHP 7.0 (PHP 7.0.33-29+ubuntu16.04.1+deb.sury.org+1 (cli) (built: May 14 2020 09:08:44) ( NTS )) -- PHP 7.1 (PHP 7.1.33-16+ubuntu16.04.1+deb.sury.org+1 (cli) (built: May 14 2020 08:26:44) ( NTS )) -- PHP 7.2 (PHP 7.2.32-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Jul 9 2020 16:33:33) ( NTS )) -- PHP 7.3 (PHP 7.3.20-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Jul 9 2020 16:33:48) ( NTS )) -- PHP 7.4 (PHP 7.4.8 (cli) (built: Jul 13 2020 16:45:28) ( NTS )) -- Composer (Composer version 1.10.10 2020-08-03 11:35:19) +- PHP 5.6 (PHP 5.6.40-30+ubuntu16.04.1+deb.sury.org+1 (cli) ) +- 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) - PHPUnit (PHPUnit 7.5.20 by Sebastian Bergmann and contributors.) -- OpenSSL 1.0.2g 1 Mar 2016 -- Libssl 1.0.2g-1ubuntu4.16 - Pollinate -- psql (PostgreSQL) 12.3 +- psql (PostgreSQL) 12.4 - Powershell (PowerShell 7.0.3) +- Pulumi v2.9.2 - ruby (2.3.1p112) - gem (3.1.4) +- OpenSSL 1.1.0h 27 Mar 2018 (Library: OpenSSL 1.1.1g 21 Apr 2020) +- Libssl 1.1.1g-1+ubuntu16.04.1+deb.sury.org+1 - R 4.0.2 - rustup (1.22.1) -- rust (1.45.2) -- cargo (1.45.1) -- rustfmt (1.4.17-stable) +- rust (1.46.0) +- cargo (1.46.0) +- rustfmt (1.4.18-stable) - clippy (0.0.212) -- rustdoc (1.45.2) -- bindgen (0.54.1) -- cbindgen (0.14.3) +- rustdoc (1.46.0) +- bindgen (0.55.1) +- cbindgen (0.14.4) - cargo audit (0.12.0) - cargo outdated (v0.9.11) -- Julia (julia version 1.5.0) +- Julia (julia version 1.5.1) - sbt (1.3.13) - Selenium server standalone (available via SELENIUM_JAR_PATH environment variable) - Sphinx Open Source Search Server - Subversion (svn, version 1.9.3 (r1718519)) -- Terraform (Terraform v0.12.29) -- Packer (1.6.1) +- Terraform (Terraform v0.13.2) +- Packer (1.6.2) - Vcpkg 2020.06.15-unknownhash -- Vercel CLI (19.2.0) -- MongoDB on Linux (2020-08-06T20:20:14.317+0000 I CONTROL [initandlisten] db version v4.2.8 -2020-08-06T20:20:14.317+0000 I CONTROL [initandlisten] git version: 43d25964249164d76d5e04dd6cf38f6111e21f5f -2020-08-06T20:20:14.317+0000 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.2g 1 Mar 2016) +- Vercel CLI (20.1.0) +- MongoDB on Linux v4.4.0 - Haveged 1.9.1-3 - Swig 3.0.8 +- Netlify CLI (netlify-cli/2.61.2 linux-x64 node-v12.18.3) - Google Repository 58 - Google Play services 49 - Google APIs 24 @@ -249,9 +261,10 @@ Local version: Unknown) - Google APIs 21 - CMake 3.10.2.4988404 3.6.4111459 -- Android Support Repository 47.0.0 -- Android Solver for ConstraintLayout 1.0.2 -- Android Solver for ConstraintLayout 1.0.1 +- Android ConstraintLayout 1.0.2 +- Android ConstraintLayout 1.0.1 +- Android ConstraintLayout Solver 1.0.2 +- Android ConstraintLayout Solver 1.0.1 - Android SDK Platform-Tools 30.0.4 - Android SDK Platform 30 - Android SDK Platform 29 @@ -268,6 +281,7 @@ Local version: Unknown) - Android SDK Platform 15 - Android SDK Platform 10 - Android SDK Patch Applier v4 +- Android SDK Build-Tools 30.0.2 - Android SDK Build-Tools 30.0.1 - Android SDK Build-Tools 30.0.0 - Android SDK Build-Tools 29.0.3 @@ -302,8 +316,6 @@ Local version: Unknown) - Android SDK Build-Tools 19.1.0 - Android SDK Build-Tools 17.0.0 - Android NDK 21.3.6528147 -- Android ConstraintLayout 1.0.2 -- Android ConstraintLayout 1.0.1 - Az Module (1.0.0) - Az Module (1.6.0) - Az Module (2.3.2) @@ -314,15 +326,17 @@ Local version: Unknown) - Az Module (3.8.0) - Az Module (4.3.0) - Az Module (4.4.0) +- Az Module (4.6.0) - Cached container images - - node:10 (Digest: sha256:cf3ee6a5a1b1916c7a2e4fb51eb7ecba1afe186739677d62e9c1bb2cb1c7d6b0) - - node:12 (Digest: sha256:d0738468dfc7cedb7d260369e0546fd7ee8731cfd67136f6023d070ad9679090) - - buildpack-deps:stretch (Digest: sha256:34a18637ed801407f7a17a29575e82264fb0818f9b6a0c890f8a6530afea43dc) + - 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) - - jekyll/builder:latest (Digest: sha256:98cda359955f25f18c4bcc78536cdfd30e7ded689b1f52fcd513c75cbe4e751e) - alpine:3.9 (Digest: sha256:414e0518bb9228d35e4cd5165567fb91d26c6a214e9c95899e1e056fcd349011) - alpine:3.10 (Digest: sha256:f0e9534a598e501320957059cb2a23774b4d4072e37c7b2cf7e95b241f019e35) - alpine:3.8 (Digest: sha256:2bb501e6173d9d006e56de5bce2720eb06396803300fe1687b58a7ff32bf4c14) @@ -340,9 +354,9 @@ Local version: Unknown) - pip3 (pip 8.1.1 from /usr/lib/python3/dist-packages (python 3.5)) - Python: - Python 2.7.18 - - Python 3.5.9 - - Python 3.6.11 - - Python 3.7.8 + - Python 3.5.10 + - Python 3.6.12 + - Python 3.7.9 - Python 3.8.5 - PyPy: - PyPy 2.7.13 [PyPy 7.3.1 with GCC 7.3.1 20180303 (Red Hat 7.3.1-5)] @@ -351,15 +365,16 @@ Local version: Unknown) - node 8.17.0 - node 10.22.0 - node 12.18.3 - - node 14.7.0 + - node 14.9.0 - go: - go 1.11.13 - go 1.12.17 - go 1.13.15 - - go 1.14.7 + - go 1.14.8 + - go 1.15.1 - boost: - boost 1.69.0 - boost 1.72.0 -- AWS SAM CLI, version 1.0.0 -- Homebrew on Linux (Homebrew 2.4.9 -Homebrew/linuxbrew-core (git revision 4c7841; last commit 2020-08-05)) +- 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)) diff --git a/images/linux/Ubuntu1804-README.md b/images/linux/Ubuntu1804-README.md index 6234b753..36e89d0b 100644 --- a/images/linux/Ubuntu1804-README.md +++ b/images/linux/Ubuntu1804-README.md @@ -1,12 +1,12 @@ -# Ubuntu 18.04.4 LTS -The following software is installed on machines with the 20200806.0 update. +# Ubuntu 18.04.5 LTS +The following software is installed on machines with the 20200908.1 update. *** - 7-Zip 16.02 -- Ansible (ansible 2.9.11) +- Ansible (ansible 2.9.13) - AzCopy7 (available by azcopy alias) 7.3.0 -- AzCopy10 (available by azcopy10 alias) 10.5.1 -- Azure CLI (azure-cli 2.10.1) +- AzCopy10 (available by azcopy10 alias) 10.6.0 +- Azure CLI (azure-cli 2.11.1) - Azure CLI (azure-devops 0.18.0) - Basic packages: - dnsutils @@ -65,7 +65,7 @@ The following software is installed on machines with the 20200806.0 update. - yamllint - libcurl3 - Alibaba Cloud CLI (3.0.56) -- AWS CLI (aws-cli/1.18.113 Python/2.7.17 Linux/5.3.0-1034-azure botocore/1.17.36) +- AWS CLI (aws-cli/1.18.134 Python/2.7.17 Linux/5.4.0-1025-azure botocore/1.17.57) - AWS CLI Session manager plugin (1.1.61.0) - build-essential - Clang 6.0 (6.0.0) @@ -74,19 +74,23 @@ The following software is installed on machines with the 20200806.0 update. - Swift version 5.2.5 (swift-5.2.5-RELEASE) Target: x86_64-unknown-linux-gnu - CMake (cmake version 3.17.0) -- Podman (2.0.4) -- Buildah (1.15.1) +- Podman (2.0.6) +- Buildah (1.15.2) - Skopeo (1.1.1) -- Docker Compose (docker-compose version 1.26.2, build eefe0d31) +- Docker Compose (docker-compose version 1.27.0, build 980ec85b) - Docker-Moby (Docker version 19.03.12+azure, build 0ed913b885c8919944a2e4c8d0b80a318a8dd48b) -- Docker-Buildx (0.4.1+azure) +- Docker-Buildx (0.4.2+azure) - .NET Core SDK: + - 3.1.402 + - 3.1.401 - 3.1.302 - 3.1.301 - 3.1.300 - 3.1.202 - 3.1.201 - 3.1.200 + - 3.1.108 + - 3.1.107 - 3.1.106 - 3.1.105 - 3.1.104 @@ -98,6 +102,8 @@ Target: x86_64-unknown-linux-gnu - 3.0.102 - 3.0.101 - 3.0.100 + - 2.1.810 + - 2.1.809 - 2.1.808 - 2.1.807 - 2.1.806 @@ -108,6 +114,8 @@ Target: x86_64-unknown-linux-gnu - 2.1.801 - 2.1.701 - 2.1.700 + - 2.1.615 + - 2.1.614 - 2.1.613 - 2.1.612 - 2.1.611 @@ -120,6 +128,8 @@ Target: x86_64-unknown-linux-gnu - 2.1.604 - 2.1.603 - 2.1.602 + - 2.1.518 + - 2.1.517 - 2.1.516 - 2.1.515 - 2.1.514 @@ -143,7 +153,7 @@ Target: x86_64-unknown-linux-gnu - 2.1.301 - 2.1.300 - Erlang (Erlang (SMP,ASYNC_THREADS,HIPE) (BEAM) emulator version 11.0.3) -- Firefox (Mozilla Firefox 79.0) +- Firefox (Mozilla Firefox 80.0.1) - Geckodriver (0.27.0); Gecko Driver is available via GECKOWEBDRIVER environment variable - GNU C++ 7.5.0 - GNU C++ 8.4.0 @@ -151,19 +161,19 @@ Target: x86_64-unknown-linux-gnu - GNU Fortran 8.4.0 - GNU Fortran 9.3.0 - Git (2.28.0) -- Git Large File Storage (LFS) (2.11.0) +- Git Large File Storage (LFS) (2.12.0) - Git-ftp (1.3.1) - Hub CLI (2.14.2) -- GitHub CLI 0.11.1 -- Google Chrome (Google Chrome 84.0.4147.105 ) -- ChromeDriver 84.0.4147.30 (48b3e868b4cc0aa7e8149519690b6f6949e110a8-refs/branch-heads/4147@{#310}); Chrome Driver is available via CHROMEWEBDRIVER environment variable -- Google Cloud SDK (304.0.0) -- Haskell Cabal (cabal-install version 3.2.0.0 -compiled using version 3.2.0.0 of the Cabal library ) -- GHC (The Glorious Glasgow Haskell Compilation System, version 8.10.1) +- 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) +- 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) - Haskell Stack (Version 2.3.3, Git revision cb44d51bed48b723a5deb08c3348c0b3ccfc437e x86_64 hpack-0.33.0) -- Heroku (heroku/7.42.6 linux-x64 node-v12.16.2) -- HHVM (HipHop VM 4.69.1 (rel)) +- Heroku (heroku/7.42.13 linux-x64 node-v12.16.2) +- HHVM (HipHop VM 4.74.0 (rel)) - ImageMagick - Azul Zulu OpenJDK: - 7 (openjdk version "1.7.0_272") @@ -172,17 +182,19 @@ compiled using version 3.2.0.0 of the Cabal library ) - 11 (openjdk version "11.0.8" 2020-07-14) - 12 (openjdk version "12.0.2" 2019-07-16) - Ant (Apache Ant(TM) version 1.10.5 compiled on March 28 2019) -- Gradle 6.5.1 +- 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.18.6) -- helm (v3.2.4+g0ad800e) -- minikube version: v1.12.2 +- kubectl (Client Version: v1.19.0) +- helm (v3.3.1+g249e521) +- minikube version: v1.13.0 +- kustomize ({kustomize/v3.8.2 2020-08-29T17:44:01Z }) - oc CLI Client Version: 4.5.0-202005291417-9933eb9 - Leiningen (Leiningen 2.9.4 on Java 1.8.0_265 OpenJDK 64-Bit Server VM) - Mercurial (Mercurial Distributed SCM (version 4.5.3)) - Miniconda (conda 4.8.3) -- Mono (Mono JIT compiler version 6.10.0.104 (tarball Fri Jun 26 19:38:24 UTC 2020)) +- Mono (Mono JIT compiler version 6.12.0.90 (tarball Fri Sep 4 14:01:23 UTC 2020)) +- NuGet (NuGet Version: 5.5.0.6382) - MySQL (mysql Ver 14.14 Distrib 5.7.31, for Linux (x86_64) using EditLine wrapper) - MySQL Server (user:root password:root) - MS SQL Server Client Tools @@ -194,53 +206,53 @@ compiled using version 3.2.0.0 of the Cabal library ) Local version: Unknown) - n (6.7.0) - Parcel (1.12.4) -- TypeScript (Version 3.9.7) +- TypeScript (Version 4.0.2) - Webpack (4.44.1) - Webpack CLI (3.3.12) -- Yarn (1.22.4) -- Newman (5.1.2) -- Bazel (bazel 3.4.1) -- Bazelisk (1.5.0) +- Yarn (1.22.5) +- Newman (5.2.0) +- Bazel (bazel 3.5.0) +- Bazelisk (1.6.1) - ORAS CLI 0.8.1 - PhantomJS (2.1.1) -- PHP 7.1 (PHP 7.1.33-16+ubuntu18.04.1+deb.sury.org+1 (cli) (built: May 14 2020 08:27:11) ( NTS )) -- PHP 7.2 (PHP 7.2.32-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Jul 9 2020 16:33:55) ( NTS )) -- PHP 7.3 (PHP 7.3.20-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Jul 9 2020 16:34:09) ( NTS )) -- PHP 7.4 (PHP 7.4.8 (cli) (built: Jul 13 2020 16:45:47) ( NTS )) -- Composer (Composer version 1.10.10 2020-08-03 11:35:19) +- 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) - PHPUnit (PHPUnit 7.5.20 by Sebastian Bergmann and contributors.) -- OpenSSL 1.1.1 11 Sep 2018 -- Libssl 1.1.1-1ubuntu2.1~18.04.6 - Pollinate -- psql (PostgreSQL) 12.3 +- psql (PostgreSQL) 12.4 - Powershell (PowerShell 7.0.3) +- Pulumi v2.9.2 - ruby (2.5.1p57) - gem (3.1.4) +- OpenSSL 1.1.1g 21 Apr 2020 +- Libssl 1.1.1g-1+ubuntu18.04.1+deb.sury.org+1 - R 4.0.2 - rustup (1.22.1) -- rust (1.45.2) -- cargo (1.45.1) -- rustfmt (1.4.17-stable) +- rust (1.46.0) +- cargo (1.46.0) +- rustfmt (1.4.18-stable) - clippy (0.0.212) -- rustdoc (1.45.2) -- bindgen (0.54.1) -- cbindgen (0.14.3) +- rustdoc (1.46.0) +- bindgen (0.55.1) +- cbindgen (0.14.4) - cargo audit (0.12.0) - cargo outdated (v0.9.11) -- Julia (julia version 1.5.0) +- Julia (julia version 1.5.1) - sbt (1.3.13) - Selenium server standalone (available via SELENIUM_JAR_PATH environment variable) - Sphinx Open Source Search Server - Subversion (svn, version 1.9.7 (r1800392)) -- Terraform (Terraform v0.12.29) -- Packer (1.6.1) +- Terraform (Terraform v0.13.2) +- Packer (1.6.2) - Vcpkg 2020.06.15-unknownhash -- Vercel CLI (19.2.0) -- MongoDB on Linux (2020-08-06T20:11:59.209+0000 I CONTROL [initandlisten] db version v4.2.8 -2020-08-06T20:11:59.209+0000 I CONTROL [initandlisten] git version: 43d25964249164d76d5e04dd6cf38f6111e21f5f -2020-08-06T20:11:59.209+0000 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.1.1g 21 Apr 2020) +- Vercel CLI (20.1.0) +- MongoDB on Linux v4.4.0 - Haveged 1.9.1-6 - Swig 3.0.12 +- Netlify CLI (netlify-cli/2.61.2 linux-x64 node-v12.18.3) - Google Repository 58 - Google Play services 49 - Google APIs 24 @@ -249,7 +261,6 @@ Local version: Unknown) - Google APIs 21 - CMake 3.10.2.4988404 3.6.4111459 -- Android Support Repository 47.0.0 - Android SDK Platform-Tools 30.0.4 - Android SDK Platform 30 - Android SDK Platform 29 @@ -264,6 +275,7 @@ Local version: Unknown) - Android SDK Platform 19 - Android SDK Platform 17 - Android SDK Patch Applier v4 +- Android SDK Build-Tools 30.0.2 - Android SDK Build-Tools 30.0.1 - Android SDK Build-Tools 30.0.0 - Android SDK Build-Tools 29.0.3 @@ -308,15 +320,17 @@ Local version: Unknown) - Az Module (3.8.0) - Az Module (4.3.0) - Az Module (4.4.0) +- Az Module (4.6.0) - Cached container images - - node:10 (Digest: sha256:cf3ee6a5a1b1916c7a2e4fb51eb7ecba1afe186739677d62e9c1bb2cb1c7d6b0) - - node:12 (Digest: sha256:d0738468dfc7cedb7d260369e0546fd7ee8731cfd67136f6023d070ad9679090) - - buildpack-deps:stretch (Digest: sha256:34a18637ed801407f7a17a29575e82264fb0818f9b6a0c890f8a6530afea43dc) + - 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) - - jekyll/builder:latest (Digest: sha256:98cda359955f25f18c4bcc78536cdfd30e7ded689b1f52fcd513c75cbe4e751e) - alpine:3.9 (Digest: sha256:414e0518bb9228d35e4cd5165567fb91d26c6a214e9c95899e1e056fcd349011) - alpine:3.10 (Digest: sha256:f0e9534a598e501320957059cb2a23774b4d4072e37c7b2cf7e95b241f019e35) - alpine:3.8 (Digest: sha256:2bb501e6173d9d006e56de5bce2720eb06396803300fe1687b58a7ff32bf4c14) @@ -334,9 +348,9 @@ Local version: Unknown) - pip3 (pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6)) - Python: - Python 2.7.18 - - Python 3.5.9 - - Python 3.6.11 - - Python 3.7.8 + - Python 3.5.10 + - Python 3.6.12 + - Python 3.7.9 - Python 3.8.5 - PyPy: - PyPy 2.7.13 [PyPy 7.3.1 with GCC 7.3.1 20180303 (Red Hat 7.3.1-5)] @@ -345,15 +359,16 @@ Local version: Unknown) - node 8.17.0 - node 10.22.0 - node 12.18.3 - - node 14.7.0 + - node 14.9.0 - go: - go 1.11.13 - go 1.12.17 - go 1.13.15 - - go 1.14.7 + - go 1.14.8 + - go 1.15.1 - boost: - boost 1.69.0 - boost 1.72.0 -- AWS SAM CLI, version 1.0.0 -- Homebrew on Linux (Homebrew 2.4.9 -Homebrew/linuxbrew-core (git revision 4c7841; last commit 2020-08-05)) +- 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)) diff --git a/images/linux/Ubuntu2004-README.md b/images/linux/Ubuntu2004-README.md index d699cc01..82c6085e 100644 --- a/images/linux/Ubuntu2004-README.md +++ b/images/linux/Ubuntu2004-README.md @@ -1,12 +1,12 @@ # Ubuntu 20.04.1 LTS -The following software is installed on machines with the 20200806.0 update. +The following software is installed on machines with the 20200908.1 update. *** - 7-Zip 16.02 - Ansible (ansible 2.9.6) - AzCopy7 (available by azcopy alias) 7.3.0 -- AzCopy10 (available by azcopy10 alias) 10.5.1 -- Azure CLI (azure-cli 2.10.1) +- AzCopy10 (available by azcopy10 alias) 10.6.0 +- Azure CLI (azure-cli 2.11.1) - Azure CLI (azure-devops 0.18.0) - Basic packages: - dnsutils @@ -65,7 +65,7 @@ The following software is installed on machines with the 20200806.0 update. - yamllint - libcurl4 - Alibaba Cloud CLI (3.0.56) -- AWS CLI (aws-cli/2.0.37 Python/3.7.3 Linux/5.4.0-1022-azure exe/x86_64.ubuntu.20) +- AWS CLI (aws-cli/2.0.46 Python/3.7.3 Linux/5.4.0-1023-azure exe/x86_64.ubuntu.20) - AWS CLI Session manager plugin (1.1.61.0) - build-essential - Clang 6.0 (6.0.1) @@ -74,19 +74,23 @@ The following software is installed on machines with the 20200806.0 update. - Swift version 5.2.5 (swift-5.2.5-RELEASE) Target: x86_64-unknown-linux-gnu - CMake (cmake version 3.17.0) -- Podman (2.0.4) -- Buildah (1.15.1) +- Podman (2.0.6) +- Buildah (1.15.2) - Skopeo (1.1.1) -- Docker Compose (docker-compose version 1.26.2, build eefe0d31) +- Docker Compose (docker-compose version 1.27.0, build 980ec85b) - Docker-Moby (Docker version 19.03.12+azure, build 0ed913b885c8919944a2e4c8d0b80a318a8dd48b) -- Docker-Buildx (0.4.1+azure) +- Docker-Buildx (0.4.2+azure) - .NET Core SDK: + - 3.1.402 + - 3.1.401 - 3.1.302 - 3.1.301 - 3.1.300 - 3.1.202 - 3.1.201 - 3.1.200 + - 3.1.108 + - 3.1.107 - 3.1.106 - 3.1.105 - 3.1.104 @@ -94,6 +98,8 @@ Target: x86_64-unknown-linux-gnu - 3.1.102 - 3.1.101 - 3.1.100 + - 2.1.810 + - 2.1.809 - 2.1.808 - 2.1.807 - 2.1.806 @@ -104,6 +110,8 @@ Target: x86_64-unknown-linux-gnu - 2.1.801 - 2.1.701 - 2.1.700 + - 2.1.615 + - 2.1.614 - 2.1.613 - 2.1.612 - 2.1.611 @@ -116,6 +124,8 @@ Target: x86_64-unknown-linux-gnu - 2.1.604 - 2.1.603 - 2.1.602 + - 2.1.518 + - 2.1.517 - 2.1.516 - 2.1.515 - 2.1.514 @@ -139,7 +149,7 @@ Target: x86_64-unknown-linux-gnu - 2.1.301 - 2.1.300 - Erlang (Erlang (SMP,ASYNC_THREADS,HIPE) (BEAM) emulator version 11.0.3) -- Firefox (Mozilla Firefox 79.0) +- Firefox (Mozilla Firefox 80.0.1) - Geckodriver (0.27.0); Gecko Driver is available via GECKOWEBDRIVER environment variable - GNU C++ 7.5.0 - GNU C++ 8.4.0 @@ -147,35 +157,37 @@ Target: x86_64-unknown-linux-gnu - GNU Fortran 8.4.0 - GNU Fortran 9.3.0 - Git (2.28.0) -- Git Large File Storage (LFS) (2.11.0) +- Git Large File Storage (LFS) (2.12.0) - Git-ftp (1.6.0) - Hub CLI (2.14.2) -- GitHub CLI 0.11.1 -- Google Chrome (Google Chrome 84.0.4147.105 ) -- ChromeDriver 84.0.4147.30 (48b3e868b4cc0aa7e8149519690b6f6949e110a8-refs/branch-heads/4147@{#310}); Chrome Driver is available via CHROMEWEBDRIVER environment variable -- Google Cloud SDK (304.0.0) -- Haskell Cabal (cabal-install version 3.2.0.0 -compiled using version 3.2.0.0 of the Cabal library ) -- GHC (The Glorious Glasgow Haskell Compilation System, version 8.10.1) +- 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) +- 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) - Haskell Stack (Version 2.3.3, Git revision cb44d51bed48b723a5deb08c3348c0b3ccfc437e x86_64 hpack-0.33.0) -- Heroku (heroku/7.42.6 linux-x64 node-v12.16.2) -- HHVM (HipHop VM 4.69.1 (rel)) +- Heroku (heroku/7.42.13 linux-x64 node-v12.16.2) +- HHVM (HipHop VM 4.74.0 (rel)) - ImageMagick - Adopt OpenJDK: - 8 (openjdk version "1.8.0_265") - 11 (openjdk version "11.0.8" 2020-07-14) (default) - Ant (Apache Ant(TM) version 1.10.7 compiled on October 24 2019) -- Gradle 6.5.1 +- 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.18.6) -- helm (v3.2.4+g0ad800e) -- minikube version: v1.12.2 +- kubectl (Client Version: v1.19.0) +- helm (v3.3.1+g249e521) +- minikube version: v1.13.0 +- kustomize ({kustomize/v3.8.2 2020-08-29T17:44:01Z }) - oc CLI Client Version: 4.5.0-202005291417-9933eb9 - Leiningen (Leiningen 2.9.4 on Java 11.0.8 OpenJDK 64-Bit Server VM) - Mercurial (Mercurial Distributed SCM (version 5.3.1)) - Miniconda (conda 4.8.3) -- Mono (Mono JIT compiler version 6.10.0.104 (tarball Fri Jun 26 19:38:44 UTC 2020)) +- Mono (Mono JIT compiler version 6.12.0.90 (tarball Fri Sep 4 14:02:38 UTC 2020)) +- NuGet (NuGet Version: 5.5.0.6382) - MySQL (mysql Ver 8.0.21-0ubuntu0.20.04.4 for Linux on x86_64 ((Ubuntu))) - MySQL Server (user:root password:root) - MS SQL Server Client Tools @@ -187,63 +199,66 @@ compiled using version 3.2.0.0 of the Cabal library ) Local version: Unknown) - n (6.7.0) - Parcel (1.12.4) -- TypeScript (Version 3.9.7) +- TypeScript (Version 4.0.2) - Webpack (4.44.1) - Webpack CLI (3.3.12) -- Yarn (1.22.4) -- Newman (5.1.2) -- Bazel (bazel 3.4.1) -- Bazelisk (1.5.0) +- Yarn (1.22.5) +- Newman (5.2.0) +- Bazel (bazel 3.5.0) +- Bazelisk (1.6.1) - ORAS CLI 0.8.1 - PhantomJS (2.1.1) -- PHP 7.4 (PHP 7.4.8 (cli) (built: Jul 13 2020 16:46:22) ( NTS )) +- PHP 7.4 (PHP 7.4.9 (cli) (built: Aug 7 2020 14:30:01) ( 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.10 2020-08-03 11:35:19) +- Composer (Composer version 1.10.12 2020-09-08 22:58:51) - PHPUnit (PHPUnit 7.5.20 by Sebastian Bergmann and contributors.) -- OpenSSL 1.1.1f 31 Mar 2020 -- Libssl 1.1.1f-1ubuntu2 - Pollinate -- psql (PostgreSQL) 12.3 +- psql (PostgreSQL) 12.4 - Powershell (PowerShell 7.0.3) +- Pulumi v2.9.2 - ruby (2.7.0p0) - gem (3.1.2) +- OpenSSL 1.1.1f 31 Mar 2020 +- Libssl 1.1.1f-1ubuntu2 - R 4.0.2 - rustup (1.22.1) -- rust (1.45.2) -- cargo (1.45.1) -- rustfmt (1.4.17-stable) +- rust (1.46.0) +- cargo (1.46.0) +- rustfmt (1.4.18-stable) - clippy (0.0.212) -- rustdoc (1.45.2) -- bindgen (0.54.1) -- cbindgen (0.14.3) +- rustdoc (1.46.0) +- bindgen (0.55.1) +- cbindgen (0.14.4) - cargo audit (0.12.0) - cargo outdated (v0.9.11) -- Julia (julia version 1.5.0) +- Julia (julia version 1.5.1) - sbt (copying runtime jar... 1.3.13) - Selenium server standalone (available via SELENIUM_JAR_PATH environment variable) - Sphinx Open Source Search Server - Subversion (svn, version 1.13.0 (r1867053)) -- Terraform (Terraform v0.12.29) -- Packer (1.6.1) +- Terraform (Terraform v0.13.2) +- Packer (1.6.2) - Vcpkg 2020.06.15-unknownhash -- Vercel CLI (19.2.0) +- Vercel CLI (20.1.0) +- MongoDB on Linux v4.4.0 - Haveged 1.9.1-6ubuntu1 - Swig 4.0.1 +- Netlify CLI (netlify-cli/2.61.2 linux-x64 node-v12.18.3) - Google Repository 58 - Google Play services 49 - CMake 3.10.2.4988404 -- Android Support Repository 47.0.0 - Android SDK Platform-Tools 30.0.4 - Android SDK Platform 30 - Android SDK Platform 29 - Android SDK Platform 28 - Android SDK Platform 27 - Android SDK Patch Applier v4 +- Android SDK Build-Tools 30.0.2 - Android SDK Build-Tools 30.0.1 - Android SDK Build-Tools 30.0.0 - Android SDK Build-Tools 29.0.3 @@ -258,16 +273,17 @@ apt-get update - Android SDK Build-Tools 27.0.1 - Android SDK Build-Tools 27.0.0 - Android NDK 21.3.6528147 -- Az Module (4.5.0) +- Az Module (4.6.1) - Cached container images - - node:10 (Digest: sha256:cf3ee6a5a1b1916c7a2e4fb51eb7ecba1afe186739677d62e9c1bb2cb1c7d6b0) - - node:12 (Digest: sha256:d0738468dfc7cedb7d260369e0546fd7ee8731cfd67136f6023d070ad9679090) - - buildpack-deps:stretch (Digest: sha256:34a18637ed801407f7a17a29575e82264fb0818f9b6a0c890f8a6530afea43dc) + - 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) - - jekyll/builder:latest (Digest: sha256:98cda359955f25f18c4bcc78536cdfd30e7ded689b1f52fcd513c75cbe4e751e) - alpine:3.9 (Digest: sha256:414e0518bb9228d35e4cd5165567fb91d26c6a214e9c95899e1e056fcd349011) - alpine:3.10 (Digest: sha256:f0e9534a598e501320957059cb2a23774b4d4072e37c7b2cf7e95b241f019e35) - alpine:3.8 (Digest: sha256:2bb501e6173d9d006e56de5bce2720eb06396803300fe1687b58a7ff32bf4c14) @@ -279,14 +295,14 @@ apt-get update - Ruby 2.6.6 - Ruby 2.7.1 - Python (Python 2.7.18rc1) -- pip (pip 20.2.1 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7)) +- pip (pip 20.2.3 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7)) - Python3 (Python 3.8.2) - pip3 (pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)) - Python: - Python 2.7.18 - - Python 3.5.9 - - Python 3.6.11 - - Python 3.7.8 + - Python 3.5.10 + - Python 3.6.12 + - Python 3.7.9 - Python 3.8.5 - PyPy: - PyPy 2.7.13 [PyPy 7.3.1 with GCC 7.3.1 20180303 (Red Hat 7.3.1-5)] @@ -295,9 +311,10 @@ apt-get update - node 8.17.0 - node 10.22.0 - node 12.18.3 - - node 14.7.0 + - node 14.9.0 - go: - - go 1.14.7 -- AWS SAM CLI, version 1.0.0 -- Homebrew on Linux (Homebrew 2.4.9 -Homebrew/linuxbrew-core (git revision 4c7841; last commit 2020-08-05)) + - go 1.14.8 + - go 1.15.1 +- 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)) diff --git a/images/linux/scripts/base/apt.sh b/images/linux/scripts/base/apt.sh index b7ad9e7b..8afcbe8d 100644 --- a/images/linux/scripts/base/apt.sh +++ b/images/linux/scripts/base/apt.sh @@ -11,8 +11,10 @@ systemctl disable apt-daily-upgrade.service # Configure apt to always assume Y echo "APT::Get::Assume-Yes \"true\";" > /etc/apt/apt.conf.d/90assumeyes -# Use apt-fast for parallel downloads +# Install aria2 and jq apt-get install aria2 +apt-get install jq +# Use apt-fast for parallel downloads add-apt-repository -y ppa:apt-fast/stable apt-get update -apt-get -y install apt-fast +apt-get install apt-fast diff --git a/images/linux/scripts/helpers/containercache.sh b/images/linux/scripts/helpers/containercache.sh deleted file mode 100644 index 018bcf53..00000000 --- a/images/linux/scripts/helpers/containercache.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash -################################################################################ -## File: containercache.sh -## Desc: Prepulls Docker images used in build tasks and templates -################################################################################ - -source $HELPER_SCRIPTS/document.sh - -# Check prereqs -echo "Checking prereqs for image pulls" -if ! command -v docker; then - echo "Docker is not installed, cant pull images" - exit 1 -fi - -# Information output -systemctl status docker --no-pager - -# Pull images -images=( - docker.io/jekyll/builder - mcr.microsoft.com/azure-pipelines/node8-typescript -) - -for image in "${images[@]}"; do - docker pull "$image" -done - -## 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/helpers/install.sh b/images/linux/scripts/helpers/install.sh index 232a7353..414980bb 100644 --- a/images/linux/scripts/helpers/install.sh +++ b/images/linux/scripts/helpers/install.sh @@ -13,7 +13,7 @@ download_with_retries() { local NAME="${3:-${URL##*/}}" local COMPRESSED="$4" - if [ $COMPRESSED == "compressed" ]; then + if [[ $COMPRESSED == "compressed" ]]; then COMMAND="curl $URL -4 -sL --compressed -o '$DEST/$NAME'" else COMMAND="curl $URL -4 -sL -o '$DEST/$NAME'" diff --git a/images/linux/scripts/installers/1604/android.sh b/images/linux/scripts/installers/1604/android.sh deleted file mode 100644 index 1d8d2d9c..00000000 --- a/images/linux/scripts/installers/1604/android.sh +++ /dev/null @@ -1,171 +0,0 @@ -#!/bin/bash -################################################################################ -## File: android.sh -## Desc: Installs Android SDK -################################################################################ - -set -e - -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh - -# Set env variable for SDK Root (https://developer.android.com/studio/command-line/variables) - ANDROID_ROOT=/usr/local/lib/android - ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk - echo "ANDROID_SDK_ROOT=${ANDROID_SDK_ROOT}" | tee -a /etc/environment - -# ANDROID_HOME is deprecated, but older versions of Gradle rely on it -echo "ANDROID_HOME=${ANDROID_SDK_ROOT}" | tee -a /etc/environment - -# Create android sdk directory -mkdir -p ${ANDROID_SDK_ROOT} - -# Download the latest command line tools so that we can accept all of the licenses. -# See https://developer.android.com/studio/#command-tools -wget -O android-sdk.zip https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip -unzip android-sdk.zip -d ${ANDROID_SDK_ROOT} -rm -f android-sdk.zip - -# Check sdk manager installation -/usr/local/lib/android/sdk/tools/bin/sdkmanager --list 1>/dev/null -if [ $? -eq 0 ] -then - echo "Android SDK manager was installed" -else - echo "Android SDK manager was not installed" - exit 1 -fi - -# Add required permissions -chmod -R a+rwx ${ANDROID_SDK_ROOT} - -# Install the following SDKs and build tools, passing in "y" to accept licenses. -echo "y" | ${ANDROID_SDK_ROOT}/tools/bin/sdkmanager \ - "ndk-bundle" \ - "platform-tools" \ - "platforms;android-30" \ - "platforms;android-29" \ - "platforms;android-28" \ - "platforms;android-27" \ - "platforms;android-26" \ - "platforms;android-25" \ - "platforms;android-24" \ - "platforms;android-23" \ - "platforms;android-22" \ - "platforms;android-21" \ - "platforms;android-19" \ - "platforms;android-17" \ - "platforms;android-15" \ - "platforms;android-10" \ - "build-tools;30.0.1" \ - "build-tools;30.0.0" \ - "build-tools;29.0.3" \ - "build-tools;29.0.2" \ - "build-tools;29.0.0" \ - "build-tools;28.0.3" \ - "build-tools;28.0.2" \ - "build-tools;28.0.1" \ - "build-tools;28.0.0" \ - "build-tools;27.0.3" \ - "build-tools;27.0.2" \ - "build-tools;27.0.1" \ - "build-tools;27.0.0" \ - "build-tools;26.0.3" \ - "build-tools;26.0.2" \ - "build-tools;26.0.1" \ - "build-tools;26.0.0" \ - "build-tools;25.0.3" \ - "build-tools;25.0.2" \ - "build-tools;25.0.1" \ - "build-tools;25.0.0" \ - "build-tools;24.0.3" \ - "build-tools;24.0.2" \ - "build-tools;24.0.1" \ - "build-tools;24.0.0" \ - "build-tools;23.0.3" \ - "build-tools;23.0.2" \ - "build-tools;23.0.1" \ - "build-tools;22.0.1" \ - "build-tools;21.1.2" \ - "build-tools;20.0.0" \ - "build-tools;19.1.0" \ - "build-tools;17.0.0" \ - "extras;android;m2repository" \ - "extras;google;m2repository" \ - "extras;google;google_play_services" \ - "extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.2" \ - "extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.1" \ - "extras;m2repository;com;android;support;constraint;constraint-layout;1.0.2" \ - "extras;m2repository;com;android;support;constraint;constraint-layout;1.0.1" \ - "add-ons;addon-google_apis-google-24" \ - "add-ons;addon-google_apis-google-23" \ - "add-ons;addon-google_apis-google-22" \ - "add-ons;addon-google_apis-google-21" \ - "cmake;3.6.4111459" \ - "cmake;3.10.2.4988404" \ - "patcher;v4" - -# Document what was added to the image -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)" -DocumentInstalledItem "Google APIs 24" -DocumentInstalledItem "Google APIs 23" -DocumentInstalledItem "Google APIs 22" -DocumentInstalledItem "Google APIs 21" -DocumentInstalledItem "CMake $(ls ${ANDROID_SDK_ROOT}/cmake 2>&1)" -DocumentInstalledItem "Android Support Repository 47.0.0" -DocumentInstalledItem "Android Solver for ConstraintLayout 1.0.2" -DocumentInstalledItem "Android Solver for ConstraintLayout 1.0.1" -DocumentInstalledItem "Android SDK Platform-Tools $(cat ${ANDROID_SDK_ROOT}/platform-tools/source.properties 2>&1 | grep Pkg.Revision | cut -d '=' -f 2)" -DocumentInstalledItem "Android SDK Platform 30" -DocumentInstalledItem "Android SDK Platform 29" -DocumentInstalledItem "Android SDK Platform 28" -DocumentInstalledItem "Android SDK Platform 27" -DocumentInstalledItem "Android SDK Platform 26" -DocumentInstalledItem "Android SDK Platform 25" -DocumentInstalledItem "Android SDK Platform 24" -DocumentInstalledItem "Android SDK Platform 23" -DocumentInstalledItem "Android SDK Platform 22" -DocumentInstalledItem "Android SDK Platform 21" -DocumentInstalledItem "Android SDK Platform 19" -DocumentInstalledItem "Android SDK Platform 17" -DocumentInstalledItem "Android SDK Platform 15" -DocumentInstalledItem "Android SDK Platform 10" -DocumentInstalledItem "Android SDK Patch Applier v4" -DocumentInstalledItem "Android SDK Build-Tools 30.0.1" -DocumentInstalledItem "Android SDK Build-Tools 30.0.0" -DocumentInstalledItem "Android SDK Build-Tools 29.0.3" -DocumentInstalledItem "Android SDK Build-Tools 29.0.2" -DocumentInstalledItem "Android SDK Build-Tools 29.0.0" -DocumentInstalledItem "Android SDK Build-Tools 28.0.3" -DocumentInstalledItem "Android SDK Build-Tools 28.0.2" -DocumentInstalledItem "Android SDK Build-Tools 28.0.1" -DocumentInstalledItem "Android SDK Build-Tools 28.0.0" -DocumentInstalledItem "Android SDK Build-Tools 27.0.3" -DocumentInstalledItem "Android SDK Build-Tools 27.0.2" -DocumentInstalledItem "Android SDK Build-Tools 27.0.1" -DocumentInstalledItem "Android SDK Build-Tools 27.0.0" -DocumentInstalledItem "Android SDK Build-Tools 26.0.3" -DocumentInstalledItem "Android SDK Build-Tools 26.0.2" -DocumentInstalledItem "Android SDK Build-Tools 26.0.1" -DocumentInstalledItem "Android SDK Build-Tools 26.0.0" -DocumentInstalledItem "Android SDK Build-Tools 25.0.3" -DocumentInstalledItem "Android SDK Build-Tools 25.0.2" -DocumentInstalledItem "Android SDK Build-Tools 25.0.1" -DocumentInstalledItem "Android SDK Build-Tools 25.0.0" -DocumentInstalledItem "Android SDK Build-Tools 24.0.3" -DocumentInstalledItem "Android SDK Build-Tools 24.0.2" -DocumentInstalledItem "Android SDK Build-Tools 24.0.1" -DocumentInstalledItem "Android SDK Build-Tools 24.0.0" -DocumentInstalledItem "Android SDK Build-Tools 23.0.3" -DocumentInstalledItem "Android SDK Build-Tools 23.0.2" -DocumentInstalledItem "Android SDK Build-Tools 23.0.1" -DocumentInstalledItem "Android SDK Build-Tools 22.0.1" -DocumentInstalledItem "Android SDK Build-Tools 21.1.2" -DocumentInstalledItem "Android SDK Build-Tools 20.0.0" -DocumentInstalledItem "Android SDK Build-Tools 19.1.0" -DocumentInstalledItem "Android SDK Build-Tools 17.0.0" -DocumentInstalledItem "Android NDK $(cat ${ANDROID_SDK_ROOT}/ndk-bundle/source.properties 2>&1 | grep Pkg.Revision | cut -d ' ' -f 3)" -DocumentInstalledItem "Android ConstraintLayout 1.0.2" -DocumentInstalledItem "Android ConstraintLayout 1.0.1" diff --git a/images/linux/scripts/installers/1804/android.sh b/images/linux/scripts/installers/1804/android.sh deleted file mode 100644 index eddecb35..00000000 --- a/images/linux/scripts/installers/1804/android.sh +++ /dev/null @@ -1,159 +0,0 @@ -#!/bin/bash -################################################################################ -## File: android.sh -## Desc: Installs Android SDK -################################################################################ - -set -e - -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh - -# Set env variable for SDK Root (https://developer.android.com/studio/command-line/variables) -ANDROID_ROOT=/usr/local/lib/android -ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk -echo "ANDROID_SDK_ROOT=${ANDROID_SDK_ROOT}" | tee -a /etc/environment - -# ANDROID_HOME is deprecated, but older versions of Gradle rely on it -echo "ANDROID_HOME=${ANDROID_SDK_ROOT}" | tee -a /etc/environment - -# Create android sdk directory -mkdir -p ${ANDROID_SDK_ROOT} - -# Download the latest command line tools so that we can accept all of the licenses. -# See https://developer.android.com/studio/#command-tools -wget -O android-sdk.zip https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip -unzip android-sdk.zip -d ${ANDROID_SDK_ROOT} -rm -f android-sdk.zip - -# Add required permissions -chmod -R a+rwx ${ANDROID_SDK_ROOT} - -# Check sdk manager installation -/usr/local/lib/android/sdk/tools/bin/sdkmanager --list 1>/dev/null -if [ $? -eq 0 ] -then - echo "Android SDK manager was installed" -else - echo "Android SDK manager was not installed" - exit 1 -fi - -# Install the following SDKs and build tools, passing in "y" to accept licenses. -echo "y" | ${ANDROID_SDK_ROOT}/tools/bin/sdkmanager \ - "ndk-bundle" \ - "platform-tools" \ - "platforms;android-30" \ - "platforms;android-29" \ - "platforms;android-28" \ - "platforms;android-27" \ - "platforms;android-26" \ - "platforms;android-25" \ - "platforms;android-24" \ - "platforms;android-23" \ - "platforms;android-22" \ - "platforms;android-21" \ - "platforms;android-19" \ - "platforms;android-17" \ - "build-tools;30.0.1" \ - "build-tools;30.0.0" \ - "build-tools;29.0.3" \ - "build-tools;29.0.2" \ - "build-tools;29.0.0" \ - "build-tools;28.0.3" \ - "build-tools;28.0.2" \ - "build-tools;28.0.1" \ - "build-tools;28.0.0" \ - "build-tools;27.0.3" \ - "build-tools;27.0.2" \ - "build-tools;27.0.1" \ - "build-tools;27.0.0" \ - "build-tools;26.0.3" \ - "build-tools;26.0.2" \ - "build-tools;26.0.1" \ - "build-tools;26.0.0" \ - "build-tools;25.0.3" \ - "build-tools;25.0.2" \ - "build-tools;25.0.1" \ - "build-tools;25.0.0" \ - "build-tools;24.0.3" \ - "build-tools;24.0.2" \ - "build-tools;24.0.1" \ - "build-tools;24.0.0" \ - "build-tools;23.0.3" \ - "build-tools;23.0.2" \ - "build-tools;23.0.1" \ - "build-tools;22.0.1" \ - "build-tools;21.1.2" \ - "build-tools;20.0.0" \ - "build-tools;19.1.0" \ - "build-tools;17.0.0" \ - "extras;android;m2repository" \ - "extras;google;m2repository" \ - "extras;google;google_play_services" \ - "add-ons;addon-google_apis-google-24" \ - "add-ons;addon-google_apis-google-23" \ - "add-ons;addon-google_apis-google-22" \ - "add-ons;addon-google_apis-google-21" \ - "cmake;3.6.4111459" \ - "cmake;3.10.2.4988404" \ - "patcher;v4" - -# Document what was added to the image -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)" -DocumentInstalledItem "Google APIs 24" -DocumentInstalledItem "Google APIs 23" -DocumentInstalledItem "Google APIs 22" -DocumentInstalledItem "Google APIs 21" -DocumentInstalledItem "CMake $(ls ${ANDROID_SDK_ROOT}/cmake 2>&1)" -DocumentInstalledItem "Android Support Repository 47.0.0" -DocumentInstalledItem "Android SDK Platform-Tools $(cat ${ANDROID_SDK_ROOT}/platform-tools/source.properties 2>&1 | grep Pkg.Revision | cut -d '=' -f 2)" -DocumentInstalledItem "Android SDK Platform 30" -DocumentInstalledItem "Android SDK Platform 29" -DocumentInstalledItem "Android SDK Platform 28" -DocumentInstalledItem "Android SDK Platform 27" -DocumentInstalledItem "Android SDK Platform 26" -DocumentInstalledItem "Android SDK Platform 25" -DocumentInstalledItem "Android SDK Platform 24" -DocumentInstalledItem "Android SDK Platform 23" -DocumentInstalledItem "Android SDK Platform 22" -DocumentInstalledItem "Android SDK Platform 21" -DocumentInstalledItem "Android SDK Platform 19" -DocumentInstalledItem "Android SDK Platform 17" -DocumentInstalledItem "Android SDK Patch Applier v4" -DocumentInstalledItem "Android SDK Build-Tools 30.0.1" -DocumentInstalledItem "Android SDK Build-Tools 30.0.0" -DocumentInstalledItem "Android SDK Build-Tools 29.0.3" -DocumentInstalledItem "Android SDK Build-Tools 29.0.2" -DocumentInstalledItem "Android SDK Build-Tools 29.0.0" -DocumentInstalledItem "Android SDK Build-Tools 28.0.3" -DocumentInstalledItem "Android SDK Build-Tools 28.0.2" -DocumentInstalledItem "Android SDK Build-Tools 28.0.1" -DocumentInstalledItem "Android SDK Build-Tools 28.0.0" -DocumentInstalledItem "Android SDK Build-Tools 27.0.3" -DocumentInstalledItem "Android SDK Build-Tools 27.0.2" -DocumentInstalledItem "Android SDK Build-Tools 27.0.1" -DocumentInstalledItem "Android SDK Build-Tools 27.0.0" -DocumentInstalledItem "Android SDK Build-Tools 26.0.3" -DocumentInstalledItem "Android SDK Build-Tools 26.0.2" -DocumentInstalledItem "Android SDK Build-Tools 26.0.1" -DocumentInstalledItem "Android SDK Build-Tools 26.0.0" -DocumentInstalledItem "Android SDK Build-Tools 25.0.3" -DocumentInstalledItem "Android SDK Build-Tools 25.0.2" -DocumentInstalledItem "Android SDK Build-Tools 25.0.1" -DocumentInstalledItem "Android SDK Build-Tools 25.0.0" -DocumentInstalledItem "Android SDK Build-Tools 24.0.3" -DocumentInstalledItem "Android SDK Build-Tools 24.0.2" -DocumentInstalledItem "Android SDK Build-Tools 24.0.1" -DocumentInstalledItem "Android SDK Build-Tools 24.0.0" -DocumentInstalledItem "Android SDK Build-Tools 23.0.3" -DocumentInstalledItem "Android SDK Build-Tools 23.0.2" -DocumentInstalledItem "Android SDK Build-Tools 23.0.1" -DocumentInstalledItem "Android SDK Build-Tools 22.0.1" -DocumentInstalledItem "Android SDK Build-Tools 21.1.2" -DocumentInstalledItem "Android SDK Build-Tools 20.0.0" -DocumentInstalledItem "Android SDK Build-Tools 19.1.0" -DocumentInstalledItem "Android SDK Build-Tools 17.0.0" -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/Install-Toolset.ps1 b/images/linux/scripts/installers/Install-Toolset.ps1 index e95645e5..1d261ff3 100644 --- a/images/linux/scripts/installers/Install-Toolset.ps1 +++ b/images/linux/scripts/installers/Install-Toolset.ps1 @@ -27,10 +27,10 @@ Function Install-Asset { $ErrorActionPreference = "Stop" # Get toolset content -$toolsetJson = Get-Content -Path "$env:INSTALLER_SCRIPT_FOLDER/toolset.json" -Raw +$toolset = Get-Content -Path "$env:INSTALLER_SCRIPT_FOLDER/toolset.json" -Raw $toolsToInstall = @("Python", "Node", "Boost", "Go") -$tools = ConvertFrom-Json -InputObject $toolsetJson | Select-Object -ExpandProperty toolcache | Where-Object {$ToolsToInstall -contains $_.Name} +$tools = ConvertFrom-Json -InputObject $toolset | Select-Object -ExpandProperty toolcache | Where-Object {$ToolsToInstall -contains $_.Name} foreach ($tool in $tools) { # Get versions manifest for current tool diff --git a/images/linux/scripts/installers/Validate-Toolset.ps1 b/images/linux/scripts/installers/Validate-Toolset.ps1 index 5d20dfca..b5eb9a0a 100644 --- a/images/linux/scripts/installers/Validate-Toolset.ps1 +++ b/images/linux/scripts/installers/Validate-Toolset.ps1 @@ -46,8 +46,8 @@ $toolsExecutables = @{ } # Get toolset content -$toolsetJson = Get-Content -Path "$env:INSTALLER_SCRIPT_FOLDER/toolset.json" -Raw -$tools = ConvertFrom-Json -InputObject $toolsetJson | Select-Object -ExpandProperty toolcache +$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):'`"" diff --git a/images/linux/scripts/installers/2004/android.sh b/images/linux/scripts/installers/android.sh similarity index 59% rename from images/linux/scripts/installers/2004/android.sh rename to images/linux/scripts/installers/android.sh index bcae9402..ed06f51a 100644 --- a/images/linux/scripts/installers/2004/android.sh +++ b/images/linux/scripts/installers/android.sh @@ -27,9 +27,6 @@ wget -O android-sdk.zip https://dl.google.com/android/repository/sdk-tools-linux unzip android-sdk.zip -d ${ANDROID_SDK_ROOT} rm -f android-sdk.zip -# Add required permissions -chmod -R a+rwx ${ANDROID_SDK_ROOT} - if isUbuntu20 ; then # Sdk manager doesn't work with Java > 8, set version 8 explicitly sed -i "2i export JAVA_HOME=${JAVA_HOME_8_X64}" /usr/local/lib/android/sdk/tools/bin/sdkmanager @@ -45,56 +42,54 @@ else exit 1 fi +toolset="$INSTALLER_SCRIPT_FOLDER/toolset.json" +platforms=$(jq -r '.android.platform_list[]|"platforms;" + .' $toolset) +buildtools=$(jq -r '.android.build_tools[]|"build-tools;" + .' $toolset) +extras=$(jq -r '.android.extra_list[]|"extras;" + .' $toolset) +addons=$(jq -r '.android.addon_list[]|"add-ons;" + .' $toolset) +additional=$(jq -r '.android.additional_tools[]' $toolset) + # Install the following SDKs and build tools, passing in "y" to accept licenses. -echo "y" | ${ANDROID_SDK_ROOT}/tools/bin/sdkmanager \ - "ndk-bundle" \ - "platform-tools" \ - "platforms;android-30" \ - "platforms;android-29" \ - "platforms;android-28" \ - "platforms;android-27" \ - "build-tools;30.0.1" \ - "build-tools;30.0.0" \ - "build-tools;29.0.3" \ - "build-tools;29.0.2" \ - "build-tools;29.0.0" \ - "build-tools;28.0.3" \ - "build-tools;28.0.2" \ - "build-tools;28.0.1" \ - "build-tools;28.0.0" \ - "build-tools;27.0.3" \ - "build-tools;27.0.2" \ - "build-tools;27.0.1" \ - "build-tools;27.0.0" \ - "extras;android;m2repository" \ - "extras;google;m2repository" \ - "extras;google;google_play_services" \ - "cmake;3.10.2.4988404" \ - "patcher;v4" +echo "y" | ${ANDROID_SDK_ROOT}/tools/bin/sdkmanager $platforms $buildtools $extras $google_api_list $addons $additional # Document what was added to the image + +google_api_versions_list=$(echo "$addons"|awk -F- '/addon-google_apis-google/ {print $5}') +constraint_layout_versions_list=$(echo "$extras"|awk -F';' '/constraint-layout;/ {print $8}') +constraint_layout_solver_versions_list=$(echo "$extras"|awk -F';' '/constraint-layout-solver;/ {print $8}') +platform_versions_list=$(echo "$platforms"|awk -F- '{print $2}') +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)" -DocumentInstalledItem "Android Support Repository 47.0.0" + +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)" -DocumentInstalledItem "Android SDK Platform 30" -DocumentInstalledItem "Android SDK Platform 29" -DocumentInstalledItem "Android SDK Platform 28" -DocumentInstalledItem "Android SDK Platform 27" +for version in $platform_versions_list; do + DocumentInstalledItem "Android SDK Platform $version" +done + DocumentInstalledItem "Android SDK Patch Applier v4" -DocumentInstalledItem "Android SDK Build-Tools 30.0.1" -DocumentInstalledItem "Android SDK Build-Tools 30.0.0" -DocumentInstalledItem "Android SDK Build-Tools 29.0.3" -DocumentInstalledItem "Android SDK Build-Tools 29.0.2" -DocumentInstalledItem "Android SDK Build-Tools 29.0.0" -DocumentInstalledItem "Android SDK Build-Tools 28.0.3" -DocumentInstalledItem "Android SDK Build-Tools 28.0.2" -DocumentInstalledItem "Android SDK Build-Tools 28.0.1" -DocumentInstalledItem "Android SDK Build-Tools 28.0.0" -DocumentInstalledItem "Android SDK Build-Tools 27.0.3" -DocumentInstalledItem "Android SDK Build-Tools 27.0.2" -DocumentInstalledItem "Android SDK Build-Tools 27.0.1" -DocumentInstalledItem "Android SDK Build-Tools 27.0.0" + +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/aws-sam-cli.sh b/images/linux/scripts/installers/aws-sam-cli.sh index a8512e61..97ceb213 100644 --- a/images/linux/scripts/installers/aws-sam-cli.sh +++ b/images/linux/scripts/installers/aws-sam-cli.sh @@ -9,11 +9,11 @@ source $HELPER_SCRIPTS/document.sh # Download latest aws sam cli sources -TarballUrl=$(curl -s https://api.github.com/repos/awslabs/aws-sam-cli/releases/latest | jq -r '.tarball_url') +TarballUrl=$(curl -s https://api.github.com/repos/aws/aws-sam-cli/releases/latest | jq -r '.tarball_url') TarballPath="/tmp/aws-sam-cli.tar.gz" wget $TarballUrl -O $TarballPath tar -xzvf $TarballPath -C /tmp -cd /tmp/awslabs-aws-sam-cli* +cd /tmp/aws-aws-sam-cli* mkdir /opt/python-aws-sam-cli cp -r /opt/hostedtoolcache/Python/3.7* /opt/python-aws-sam-cli diff --git a/images/linux/scripts/installers/azpowershell.sh b/images/linux/scripts/installers/azpowershell.sh index 082ab185..2b7d703d 100644 --- a/images/linux/scripts/installers/azpowershell.sh +++ b/images/linux/scripts/installers/azpowershell.sh @@ -12,8 +12,8 @@ source $HELPER_SCRIPTS/os.sh if isUbuntu20 ; then versions=$(pwsh -Command '(Find-Module -Name Az).Version') else - toolsetJson="$INSTALLER_SCRIPT_FOLDER/toolset.json" - versions=$(cat $toolsetJson | jq -r '.azureModules[] | select(.name | contains("az")) | .versions[]') + toolset="$INSTALLER_SCRIPT_FOLDER/toolset.json" + versions=$(jq -r '.azureModules[] | select(.name | contains("az")) | .versions[]' $toolset) fi # Install Azure CLI (instructions taken from https://docs.microsoft.com/en-us/cli/azure/install-azure-cli) diff --git a/images/linux/scripts/installers/basic.sh b/images/linux/scripts/installers/basic.sh index 0a9e0e1b..0772cf4e 100644 --- a/images/linux/scripts/installers/basic.sh +++ b/images/linux/scripts/installers/basic.sh @@ -4,90 +4,13 @@ ## Desc: Installs basic command line utilities and dev packages ################################################################################ +set -e # Source the helpers for use with the script source $HELPER_SCRIPTS/document.sh -source $HELPER_SCRIPTS/os.sh - -set -e - -common_packages="dnsutils - iproute2 - iputils-ping - libunwind8 - locales - openssh-client - 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 - zsync - gnupg2 - lib32z1 - texinfo - libsqlite3-dev - libc++-dev - libc++abi-dev" - -cmd_packages="curl - file - ftp - jq - netcat - ssh - parallel - rsync - shellcheck - sudo - telnet - time - unzip - zip - wget - m4 - bison - flex - patchelf - bzip2 - sqlite3 - brotli - yamllint" - -if isUbuntu20 ; then - echo "Install python2" - apt-get install -y --no-install-recommends python-is-python2 -fi - -echo "Install libcurl" -if isUbuntu16 || isUbuntu18; then - libcurelVer="libcurl3" -fi - -if isUbuntu20 ; then - libcurelVer="libcurl4" -fi - -apt-get install -y --no-install-recommends $libcurelVer - -# install additional packages only for Ubuntu16.04 -if isUbuntu16; then - common_packages="$common_packages - libicu55" -fi +toolset="$INSTALLER_SCRIPT_FOLDER/toolset.json" +common_packages=$(jq -r ".apt.common_packages[]" $toolset) +cmd_packages=$(jq -r ".apt.cmd_packages[]" $toolset) for package in $common_packages $cmd_packages; do echo "Install $package" apt-get install -y --no-install-recommends $package @@ -108,5 +31,3 @@ DocumentInstalledItem "Basic packages:" for package in $common_packages $cmd_packages; do DocumentInstalledItemIndent $package done - -DocumentInstalledItemIndent "$libcurelVer" diff --git a/images/linux/scripts/installers/configure-environment.sh b/images/linux/scripts/installers/configure-environment.sh index e4ca2f20..fbac4275 100644 --- a/images/linux/scripts/installers/configure-environment.sh +++ b/images/linux/scripts/installers/configure-environment.sh @@ -19,3 +19,7 @@ AGENT_TOOLSDIRECTORY=/opt/hostedtoolcache mkdir $AGENT_TOOLSDIRECTORY echo "AGENT_TOOLSDIRECTORY=$AGENT_TOOLSDIRECTORY" | tee -a /etc/environment chmod -R 777 $AGENT_TOOLSDIRECTORY + +# https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html +# https://www.suse.com/support/kb/doc/?id=000016692 +echo 'vm.max_map_count=262144' | tee -a /etc/sysctl.conf \ No newline at end of file diff --git a/images/linux/scripts/installers/docker-moby.sh b/images/linux/scripts/installers/docker-moby.sh index 7ab457de..6ce33671 100644 --- a/images/linux/scripts/installers/docker-moby.sh +++ b/images/linux/scripts/installers/docker-moby.sh @@ -3,19 +3,20 @@ ## File: docker-moby.sh ## Desc: Installs docker onto the image ################################################################################ +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 -docker_package=moby - # There is no stable docker-moby for Ubuntu 20 at the moment if isUbuntu20 ; then add-apt-repository "deb [arch=amd64,armhf,arm64] https://packages.microsoft.com/ubuntu/20.04/prod testing main" fi -## Check to see if docker is already installed +# Check to see if docker is already installed +docker_package=moby echo "Determing if Docker ($docker_package) is installed" if ! IsPackageInstalled $docker_package; then echo "Docker ($docker_package) was not found. Installing..." @@ -44,26 +45,17 @@ else echo "Docker-moby and Docker-buildx checking the successfull" # Docker daemon takes time to come up after installing sleep 10 - set -e docker info - set +e fi -docker pull node:10 -docker pull node:12 -docker pull buildpack-deps:stretch -docker pull buildpack-deps:buster -docker pull node:10-alpine -docker pull node:12-alpine -docker pull debian:8 -docker pull debian:9 -docker pull alpine:3.7 -docker pull alpine:3.8 -docker pull alpine:3.9 -docker pull alpine:3.10 -docker pull ubuntu:14.04 +# Pull images +toolset="$INSTALLER_SCRIPT_FOLDER/toolset.json" +images=$(jq -r '.docker.images[]' $toolset) +for image in $images; do + docker pull "$image" +done -## Add version information to the metadata file +# Add version information to the metadata file echo "Documenting Docker version" docker_version=$(docker -v) DocumentInstalledItem "Docker-Moby ($docker_version)" @@ -71,3 +63,9 @@ 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/git.sh b/images/linux/scripts/installers/git.sh index e2b27429..ae497458 100644 --- a/images/linux/scripts/installers/git.sh +++ b/images/linux/scripts/installers/git.sh @@ -3,9 +3,11 @@ ## File: git.sh ## Desc: Installs Git ################################################################################ +set -e # Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh +source "$HELPER_SCRIPTS"/document.sh +source "$HELPER_SCRIPTS"/install.sh ## Install git add-apt-repository ppa:git-core/ppa -y @@ -46,7 +48,13 @@ DocumentInstalledItem "Git Large File Storage (LFS) ($(git-lfs --version 2>&1 | DocumentInstalledItem "Git-ftp ($(git-ftp --version | cut -d ' ' -f 3))" #Install hub -snap install hub --classic +tmp_hub="/tmp/hub" +mkdir -p "$tmp_hub" +url=$(curl -s https://api.github.com/repos/github/hub/releases/latest | jq -r '.assets[].browser_download_url | select(contains("hub-linux-amd64"))') +download_with_retries "$url" "$tmp_hub" +tar xzvf "$tmp_hub"/hub-linux-amd64-*.tgz --strip-components 1 -C "$tmp_hub" +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))" diff --git a/images/linux/scripts/installers/java-tools.sh b/images/linux/scripts/installers/java-tools.sh index aafed29f..7ec94b73 100644 --- a/images/linux/scripts/installers/java-tools.sh +++ b/images/linux/scripts/installers/java-tools.sh @@ -10,6 +10,15 @@ source $HELPER_SCRIPTS/os.sh set -e +function javaTool { + if [[ "$2" =~ ([1]{0,1}.)?$DEFAULT_JDK_VERSION.* ]]; then + echo "$1 $2 is equal to default one $DEFAULT_JDK_VERSION" + else + echo "$1 $2 is not equal to default one $DEFAULT_JDK_VERSION" + exit 1 + fi +} + # Install GPG Key for Adopt Open JDK. See https://adoptopenjdk.net/installation.html wget -qO - "https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public" | apt-key add - add-apt-repository --yes https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/ @@ -38,6 +47,11 @@ apt-get -y install adoptopenjdk-8-hotspot=\* apt-get -y install adoptopenjdk-11-hotspot=\* # Set Default Java version. +if isUbuntu16; then + # issue: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=825987 + # stackoverflow: https://askubuntu.com/questions/1187136/update-java-alternatives-only-java-but-not-javac-is-changed + sed -i 's/(hl|jre|jdk|plugin|DUMMY) /(hl|jre|jdk|jdkhl|plugin|DUMMY) /g' /usr/sbin/update-java-alternatives +fi update-java-alternatives -s /usr/lib/jvm/adoptopenjdk-${DEFAULT_JDK_VERSION}-hotspot-amd64 echo "JAVA_HOME_8_X64=/usr/lib/jvm/adoptopenjdk-8-hotspot-amd64" | tee -a /etc/environment @@ -46,7 +60,6 @@ if isUbuntu16 || isUbuntu18 ; then echo "JAVA_HOME_12_X64=/usr/lib/jvm/adoptopenjdk-12-hotspot-amd64" | tee -a /etc/environment fi echo "JAVA_HOME=/usr/lib/jvm/adoptopenjdk-${DEFAULT_JDK_VERSION}-hotspot-amd64" | tee -a /etc/environment -echo "JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8" | tee -a /etc/environment # Install Ant apt-fast install -y --no-install-recommends ant ant-optional @@ -86,6 +99,11 @@ for cmd in gradle java javac mvn ant; do fi done +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 diff --git a/images/linux/scripts/installers/kubernetes-tools.sh b/images/linux/scripts/installers/kubernetes-tools.sh index bdd22dd2..f86f8aba 100644 --- a/images/linux/scripts/installers/kubernetes-tools.sh +++ b/images/linux/scripts/installers/kubernetes-tools.sh @@ -24,7 +24,9 @@ curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux- sudo install minikube-linux-amd64 /usr/local/bin/minikube # Install kustomize -sudo snap install kustomize +download_url="https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" +curl -s "$download_url" | bash +mv kustomize /usr/local/bin # Run tests to determine that the software installed as expected echo "Testing to make sure that script performed as expected, and basic scenarios work" @@ -58,4 +60,4 @@ 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))" \ No newline at end of file +DocumentInstalledItem "kustomize ($(kustomize version --short))" diff --git a/images/linux/scripts/installers/mono.sh b/images/linux/scripts/installers/mono.sh index 10b90583..e0f84a11 100644 --- a/images/linux/scripts/installers/mono.sh +++ b/images/linux/scripts/installers/mono.sh @@ -15,7 +15,7 @@ LSB_CODENAME=$(lsb_release -cs) apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF echo "deb https://download.mono-project.com/repo/ubuntu stable-$LSB_CODENAME main" | tee /etc/apt/sources.list.d/mono-official-stable.list apt-get update -apt-get install -y --no-install-recommends apt-transport-https mono-complete +apt-get install -y --no-install-recommends apt-transport-https mono-complete nuget # Run tests to determine that the software installed as expected echo "Testing to make sure that script performed as expected, and basic scenarios work" @@ -23,7 +23,12 @@ if ! command -v mono; then echo "mono was not installed" exit 1 fi +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/preparemetadata.sh b/images/linux/scripts/installers/preparemetadata.sh index 8342cfe1..9e8aef1e 100644 --- a/images/linux/scripts/installers/preparemetadata.sh +++ b/images/linux/scripts/installers/preparemetadata.sh @@ -9,8 +9,8 @@ source $HELPER_SCRIPTS/document.sh WriteItem "" -if [ $ANNOUNCEMENTS ]; then - WriteItem $ANNOUNCEMENTS +if [ -n "$ANNOUNCEMENTS" ]; then + WriteItem "$ANNOUNCEMENTS" WriteItem "***" fi diff --git a/images/linux/scripts/installers/pulumi.sh b/images/linux/scripts/installers/pulumi.sh new file mode 100644 index 00000000..e041c2b7 --- /dev/null +++ b/images/linux/scripts/installers/pulumi.sh @@ -0,0 +1,26 @@ +#!/bin/bash +################################################################################ +## File: pulumi.sh +## Desc: Installs Pulumi +################################################################################ + +# Source the helpers for use with the script +source $HELPER_SCRIPTS/document.sh +source $HELPER_SCRIPTS/install.sh + +# Install Pulumi +VERSION=$(curl --fail --silent -L "https://www.pulumi.com/latest-version") +TARBALL_URL="https://get.pulumi.com/releases/sdk/pulumi-v${VERSION}-linux-x64.tar.gz" +download_with_retries ${TARBALL_URL} "/tmp" pulumi-v${VERSION}.tar.gz +tar --strip=1 -xvf /tmp/pulumi-v${VERSION}.tar.gz -C /usr/local/bin + +# Run tests to determine that the software installed as expected +echo "Testing to make sure that script performed as expected, and basic scenarios work" +if ! command -v 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 e47235af..b859eb4e 100644 --- a/images/linux/scripts/installers/pypy.sh +++ b/images/linux/scripts/installers/pypy.sh @@ -75,8 +75,8 @@ uri="https://downloads.python.org/pypy/" download_with_retries $uri "/tmp" "pypyUrls.html" compressed pypyVersions="$(cat /tmp/pypyUrls.html | grep 'linux64' | awk -v uri="$uri" -F'>|<' '{print uri$5}')" -toolsetJson="$INSTALLER_SCRIPT_FOLDER/toolset.json" -toolsetVersions=$(cat $toolsetJson | jq -r '.toolcache[] | select(.name | contains("PyPy")) | .versions[]') +toolset="$INSTALLER_SCRIPT_FOLDER/toolset.json" +toolsetVersions=$(jq -r '.toolcache[] | select(.name | contains("PyPy")) | .versions[]' $toolset) # Fail out if any setups fail set -e diff --git a/images/linux/toolsets/toolset-1604.json b/images/linux/toolsets/toolset-1604.json index dae39f5e..1204f2a8 100644 --- a/images/linux/toolsets/toolset-1604.json +++ b/images/linux/toolsets/toolset-1604.json @@ -61,6 +61,36 @@ ] } ], + "android": { + "platform_list": [ + "android-30", "android-29", "android-28", "android-27", "android-26", "android-25", "android-24", "android-23", "android-22", "android-21", "android-19","android-17","android-15","android-10" + ], + "build_tools": [ + "30.0.2", "30.0.1", "30.0.0", "29.0.3", "29.0.2", "29.0.0", "28.0.3", "28.0.2", "28.0.1", "28.0.0", "27.0.3", "27.0.2", "27.0.1", "27.0.0", "26.0.3", "26.0.2", "26.0.1", "26.0.0", "25.0.3", "25.0.2", "25.0.1", "25.0.0", "24.0.3", "24.0.2", "24.0.1", "24.0.0", "23.0.3", "23.0.2", "23.0.1", "22.0.1", "21.1.2", "20.0.0", "19.1.0", "17.0.0" + ], + "extra_list": [ + "android;m2repository", + "google;m2repository", + "google;google_play_services", + "m2repository;com;android;support;constraint;constraint-layout-solver;1.0.2", + "m2repository;com;android;support;constraint;constraint-layout-solver;1.0.1", + "m2repository;com;android;support;constraint;constraint-layout;1.0.2", + "m2repository;com;android;support;constraint;constraint-layout;1.0.1" + ], + "addon_list": [ + "addon-google_apis-google-24", + "addon-google_apis-google-23", + "addon-google_apis-google-22", + "addon-google_apis-google-21" + ], + "additional_tools": [ + "cmake;3.6.4111459", + "cmake;3.10.2.4988404", + "patcher;v4", + "ndk-bundle", + "platform-tools" + ] + }, "azureModules": [ { "name": "az", @@ -74,8 +104,90 @@ "3.5.0", "3.8.0", "4.3.0", - "4.4.0" + "4.4.0", + "4.6.0" ] } - ] + ], + "apt": { + "common_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", + "xorriso", + "xvfb", + "xz-utils", + "zstd", + "zsync" + ], + "cmd_packages": [ + "bison", + "brotli", + "bzip2", + "curl", + "file", + "flex", + "ftp", + "jq", + "m4", + "netcat", + "parallel", + "patchelf", + "rsync", + "shellcheck", + "sqlite3", + "ssh", + "sudo", + "telnet", + "time", + "unzip", + "wget", + "yamllint", + "zip" + ] + }, + "docker": { + "images": [ + "alpine:3.7", + "alpine:3.8", + "alpine:3.9", + "alpine:3.10", + "buildpack-deps:stretch", + "buildpack-deps:buster", + "debian:8", + "debian:9", + "jekyll/builder", + "mcr.microsoft.com/azure-pipelines/node8-typescript", + "node:10", + "node:12", + "node:10-alpine", + "node:12-alpine", + "ubuntu:14.04" + ] + } } diff --git a/images/linux/toolsets/toolset-1804.json b/images/linux/toolsets/toolset-1804.json index edf3e9fe..2c399c8f 100644 --- a/images/linux/toolsets/toolset-1804.json +++ b/images/linux/toolsets/toolset-1804.json @@ -61,6 +61,32 @@ ] } ], + "android": { + "platform_list": [ + "android-30", "android-29", "android-28", "android-27", "android-26", "android-25", "android-24", "android-23", "android-22", "android-21", "android-19","android-17" + ], + "build_tools": [ + "30.0.2", "30.0.1", "30.0.0", "29.0.3", "29.0.2", "29.0.0", "28.0.3", "28.0.2", "28.0.1", "28.0.0", "27.0.3", "27.0.2", "27.0.1", "27.0.0", "26.0.3", "26.0.2", "26.0.1", "26.0.0", "25.0.3", "25.0.2", "25.0.1", "25.0.0", "24.0.3", "24.0.2", "24.0.1", "24.0.0", "23.0.3", "23.0.2", "23.0.1", "22.0.1", "21.1.2", "20.0.0", "19.1.0", "17.0.0" + ], + "extra_list": [ + "android;m2repository", + "google;m2repository", + "google;google_play_services" + ], + "addon_list": [ + "addon-google_apis-google-24", + "addon-google_apis-google-23", + "addon-google_apis-google-22", + "addon-google_apis-google-21" + ], + "additional_tools": [ + "cmake;3.6.4111459", + "cmake;3.10.2.4988404", + "patcher;v4", + "ndk-bundle", + "platform-tools" + ] + }, "azureModules": [ { "name": "az", @@ -74,8 +100,89 @@ "3.5.0", "3.8.0", "4.3.0", - "4.4.0" + "4.4.0", + "4.6.0" ] } - ] + ], + "apt": { + "common_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", + "xorriso", + "xvfb", + "xz-utils", + "zstd", + "zsync" + ], + "cmd_packages": [ + "bison", + "brotli", + "bzip2", + "curl", + "file", + "flex", + "ftp", + "jq", + "m4", + "netcat", + "parallel", + "patchelf", + "rsync", + "shellcheck", + "sqlite3", + "ssh", + "sudo", + "telnet", + "time", + "unzip", + "wget", + "yamllint", + "zip" + ] + }, + "docker": { + "images": [ + "alpine:3.7", + "alpine:3.8", + "alpine:3.9", + "alpine:3.10", + "buildpack-deps:stretch", + "buildpack-deps:buster", + "debian:8", + "debian:9", + "jekyll/builder", + "mcr.microsoft.com/azure-pipelines/node8-typescript", + "node:10", + "node:12", + "node:10-alpine", + "node:12-alpine", + "ubuntu:14.04" + ] + } } diff --git a/images/linux/toolsets/toolset-2004.json b/images/linux/toolsets/toolset-2004.json index 414e8941..1162b713 100644 --- a/images/linux/toolsets/toolset-2004.json +++ b/images/linux/toolsets/toolset-2004.json @@ -46,5 +46,107 @@ ], "default": "1.14.*" } - ] + ], + "android": { + "platform_list": [ + "android-30", "android-29", "android-28", "android-27" + ], + "build_tools": [ + "30.0.2", "30.0.1", "30.0.0", "29.0.3", "29.0.2", "29.0.0", "28.0.3", "28.0.2", "28.0.1", "28.0.0", "27.0.3", "27.0.2", "27.0.1", "27.0.0" + ], + "extra_list": [ + "android;m2repository", + "google;m2repository", + "google;google_play_services" + ], + "addon_list": [ + ], + "additional_tools": [ + "cmake;3.10.2.4988404", + "patcher;v4", + "ndk-bundle", + "platform-tools" + ] + }, + "apt": { + "common_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", + "xorriso", + "xvfb", + "xz-utils", + "zstd", + "zsync" + ], + "cmd_packages": [ + "bison", + "brotli", + "bzip2", + "curl", + "file", + "flex", + "ftp", + "jq", + "m4", + "netcat", + "parallel", + "patchelf", + "rsync", + "shellcheck", + "sqlite3", + "ssh", + "sudo", + "telnet", + "time", + "unzip", + "wget", + "yamllint", + "zip" + ] + }, + "docker": { + "images": [ + "alpine:3.7", + "alpine:3.8", + "alpine:3.9", + "alpine:3.10", + "buildpack-deps:stretch", + "buildpack-deps:buster", + "debian:8", + "debian:9", + "jekyll/builder", + "mcr.microsoft.com/azure-pipelines/node8-typescript", + "node:10", + "node:12", + "node:10-alpine", + "node:12-alpine", + "ubuntu:14.04" + ] + } } diff --git a/images/linux/ubuntu1604.json b/images/linux/ubuntu1604.json index 93161553..1e9c2125 100644 --- a/images/linux/ubuntu1604.json +++ b/images/linux/ubuntu1604.json @@ -1,6 +1,5 @@ { "variables": { - "commit_url": "{{env `COMMIT_URL`}}", "client_id": "{{env `ARM_CLIENT_ID`}}", "client_secret": "{{env `ARM_CLIENT_SECRET`}}", "subscription_id": "{{env `ARM_SUBSCRIPTION_ID`}}", @@ -14,7 +13,6 @@ "virtual_network_subnet_name": "{{env `VNET_SUBNET`}}", "private_virtual_network_with_public_ip": "{{env `PRIVATE_VIRTUAL_NETWORK_WITH_PUBLIC_IP`}}", "image_folder": "/imagegeneration", - "commit_file": "/imagegeneration/commit.txt", "imagedata_file": "/imagegeneration/imagedata.json", "metadata_file": "/imagegeneration/metadatafile", "installer_script_folder": "/imagegeneration/installers", @@ -59,9 +57,7 @@ "type": "shell", "inline": [ "mkdir {{user `image_folder`}}", - "chmod 777 {{user `image_folder`}}", - "echo {{user `commit_url`}} > {{user `commit_file`}}", - "chmod +r {{user `commit_file`}}" + "chmod 777 {{user `image_folder`}}" ], "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" }, @@ -92,8 +88,19 @@ "source": "{{template_dir}}/scripts/installers", "destination": "{{user `installer_script_folder`}}" }, + { + "type": "file", + "source": "{{template_dir}}/toolsets/toolcache-1604.json", + "destination": "{{user `installer_script_folder`}}/toolcache.json" + }, + { + "type": "file", + "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" ], @@ -102,8 +109,7 @@ "METADATA_FILE={{user `metadata_file`}}", "HELPER_SCRIPTS={{user `helper_script_folder`}}", "ANNOUNCEMENTS={{user `announcements`}}" - ], - "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" + ] }, { "type": "shell", @@ -186,6 +192,7 @@ "{{template_dir}}/scripts/installers/pollinate.sh", "{{template_dir}}/scripts/installers/postgresql.sh", "{{template_dir}}/scripts/installers/powershellcore.sh", + "{{template_dir}}/scripts/installers/pulumi.sh", "{{template_dir}}/scripts/installers/ruby.sh", "{{template_dir}}/scripts/installers/r.sh", "{{template_dir}}/scripts/installers/rust.sh", @@ -202,31 +209,9 @@ "{{template_dir}}/scripts/installers/mongodb.sh", "{{template_dir}}/scripts/installers/rndgenerator.sh", "{{template_dir}}/scripts/installers/swig.sh", - "{{template_dir}}/scripts/installers/netlify.sh" - ], - "environment_vars": [ - "METADATA_FILE={{user `metadata_file`}}", - "HELPER_SCRIPTS={{user `helper_script_folder`}}", - "DEBIAN_FRONTEND=noninteractive" - ], - "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" - }, - { - "type": "file", - "source": "{{template_dir}}/toolsets/toolcache-1604.json", - "destination": "{{user `installer_script_folder`}}/toolcache.json" - }, - { - "type": "file", - "source": "{{template_dir}}/toolsets/toolset-1604.json", - "destination": "{{user `installer_script_folder`}}/toolset.json" - }, - { - "type": "shell", - "scripts":[ - "{{template_dir}}/scripts/installers/1604/android.sh", + "{{template_dir}}/scripts/installers/netlify.sh", + "{{template_dir}}/scripts/installers/android.sh", "{{template_dir}}/scripts/installers/azpowershell.sh", - "{{template_dir}}/scripts/helpers/containercache.sh", "{{template_dir}}/scripts/installers/hosted-tool-cache.sh", "{{template_dir}}/scripts/installers/pypy.sh", "{{template_dir}}/scripts/installers/python.sh", @@ -236,7 +221,8 @@ "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`}}" + "GITHUB_FEED_TOKEN={{user `github_feed_token`}}", + "DEBIAN_FRONTEND=noninteractive" ], "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" }, diff --git a/images/linux/ubuntu1804.json b/images/linux/ubuntu1804.json index c8e3da10..deef5a5a 100644 --- a/images/linux/ubuntu1804.json +++ b/images/linux/ubuntu1804.json @@ -1,6 +1,5 @@ { "variables": { - "commit_url": "{{env `COMMIT_URL`}}", "client_id": "{{env `ARM_CLIENT_ID`}}", "client_secret": "{{env `ARM_CLIENT_SECRET`}}", "subscription_id": "{{env `ARM_SUBSCRIPTION_ID`}}", @@ -14,7 +13,6 @@ "virtual_network_subnet_name": "{{env `VNET_SUBNET`}}", "private_virtual_network_with_public_ip": "{{env `PRIVATE_VIRTUAL_NETWORK_WITH_PUBLIC_IP`}}", "image_folder": "/imagegeneration", - "commit_file": "/imagegeneration/commit.txt", "imagedata_file": "/imagegeneration/imagedata.json", "metadata_file": "/imagegeneration/metadatafile", "installer_script_folder": "/imagegeneration/installers", @@ -59,9 +57,7 @@ "type": "shell", "inline": [ "mkdir {{user `image_folder`}}", - "chmod 777 {{user `image_folder`}}", - "echo {{user `commit_url`}} > {{user `commit_file`}}", - "chmod +r {{user `commit_file`}}" + "chmod 777 {{user `image_folder`}}" ], "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" }, @@ -95,8 +91,19 @@ "source": "{{template_dir}}/scripts/installers", "destination": "{{user `installer_script_folder`}}" }, + { + "type": "file", + "source": "{{template_dir}}/toolsets/toolcache-1804.json", + "destination": "{{user `installer_script_folder`}}/toolcache.json" + }, + { + "type": "file", + "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" ], @@ -105,8 +112,7 @@ "METADATA_FILE={{user `metadata_file`}}", "HELPER_SCRIPTS={{user `helper_script_folder`}}", "ANNOUNCEMENTS={{user `announcements`}}" - ], - "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" + ] }, { "type": "shell", @@ -190,6 +196,7 @@ "{{template_dir}}/scripts/installers/pollinate.sh", "{{template_dir}}/scripts/installers/postgresql.sh", "{{template_dir}}/scripts/installers/powershellcore.sh", + "{{template_dir}}/scripts/installers/pulumi.sh", "{{template_dir}}/scripts/installers/ruby.sh", "{{template_dir}}/scripts/installers/r.sh", "{{template_dir}}/scripts/installers/rust.sh", @@ -206,31 +213,9 @@ "{{template_dir}}/scripts/installers/mongodb.sh", "{{template_dir}}/scripts/installers/rndgenerator.sh", "{{template_dir}}/scripts/installers/swig.sh", - "{{template_dir}}/scripts/installers/netlify.sh" - ], - "environment_vars": [ - "METADATA_FILE={{user `metadata_file`}}", - "HELPER_SCRIPTS={{user `helper_script_folder`}}", - "DEBIAN_FRONTEND=noninteractive" - ], - "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" - }, - { - "type": "file", - "source": "{{template_dir}}/toolsets/toolcache-1804.json", - "destination": "{{user `installer_script_folder`}}/toolcache.json" - }, - { - "type": "file", - "source": "{{template_dir}}/toolsets/toolset-1804.json", - "destination": "{{user `installer_script_folder`}}/toolset.json" - }, - { - "type": "shell", - "scripts":[ - "{{template_dir}}/scripts/installers/1804/android.sh", + "{{template_dir}}/scripts/installers/netlify.sh", + "{{template_dir}}/scripts/installers/android.sh", "{{template_dir}}/scripts/installers/azpowershell.sh", - "{{template_dir}}/scripts/helpers/containercache.sh", "{{template_dir}}/scripts/installers/hosted-tool-cache.sh", "{{template_dir}}/scripts/installers/pypy.sh", "{{template_dir}}/scripts/installers/python.sh", @@ -240,7 +225,8 @@ "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`}}" + "GITHUB_FEED_TOKEN={{user `github_feed_token`}}", + "DEBIAN_FRONTEND=noninteractive" ], "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" }, diff --git a/images/linux/ubuntu2004.json b/images/linux/ubuntu2004.json index 6f472c2d..e3cd20fd 100644 --- a/images/linux/ubuntu2004.json +++ b/images/linux/ubuntu2004.json @@ -1,6 +1,5 @@ { "variables": { - "commit_url": "{{env `COMMIT_URL`}}", "client_id": "{{env `ARM_CLIENT_ID`}}", "client_secret": "{{env `ARM_CLIENT_SECRET`}}", "subscription_id": "{{env `ARM_SUBSCRIPTION_ID`}}", @@ -14,7 +13,6 @@ "virtual_network_subnet_name": "{{env `VNET_SUBNET`}}", "private_virtual_network_with_public_ip": "{{env `PRIVATE_VIRTUAL_NETWORK_WITH_PUBLIC_IP`}}", "image_folder": "/imagegeneration", - "commit_file": "/imagegeneration/commit.txt", "imagedata_file": "/imagegeneration/imagedata.json", "metadata_file": "/imagegeneration/metadatafile", "installer_script_folder": "/imagegeneration/installers", @@ -61,9 +59,7 @@ "type": "shell", "inline": [ "mkdir {{user `image_folder`}}", - "chmod 777 {{user `image_folder`}}", - "echo {{user `commit_url`}} > {{user `commit_file`}}", - "chmod +r {{user `commit_file`}}" + "chmod 777 {{user `image_folder`}}" ], "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" }, @@ -97,8 +93,19 @@ "source": "{{template_dir}}/scripts/installers", "destination": "{{user `installer_script_folder`}}" }, + { + "type": "file", + "source": "{{template_dir}}/toolsets/toolcache-2004.json", + "destination": "{{user `installer_script_folder`}}/toolcache.json" + }, + { + "type": "file", + "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" ], @@ -107,8 +114,7 @@ "METADATA_FILE={{user `metadata_file`}}", "HELPER_SCRIPTS={{user `helper_script_folder`}}", "ANNOUNCEMENTS={{user `announcements`}}" - ], - "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" + ] }, { "type": "shell", @@ -192,6 +198,7 @@ "{{template_dir}}/scripts/installers/pollinate.sh", "{{template_dir}}/scripts/installers/postgresql.sh", "{{template_dir}}/scripts/installers/powershellcore.sh", + "{{template_dir}}/scripts/installers/pulumi.sh", "{{template_dir}}/scripts/installers/ruby.sh", "{{template_dir}}/scripts/installers/r.sh", "{{template_dir}}/scripts/installers/rust.sh", @@ -208,31 +215,9 @@ "{{template_dir}}/scripts/installers/mongodb.sh", "{{template_dir}}/scripts/installers/rndgenerator.sh", "{{template_dir}}/scripts/installers/swig.sh", - "{{template_dir}}/scripts/installers/netlify.sh" - ], - "environment_vars": [ - "METADATA_FILE={{user `metadata_file`}}", - "HELPER_SCRIPTS={{user `helper_script_folder`}}", - "DEBIAN_FRONTEND=noninteractive" - ], - "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" - }, - { - "type": "file", - "source": "{{template_dir}}/toolsets/toolcache-2004.json", - "destination": "{{user `installer_script_folder`}}/toolcache.json" - }, - { - "type": "file", - "source": "{{template_dir}}/toolsets/toolset-2004.json", - "destination": "{{user `installer_script_folder`}}/toolset.json" - }, - { - "type": "shell", - "scripts":[ - "{{template_dir}}/scripts/installers/2004/android.sh", + "{{template_dir}}/scripts/installers/netlify.sh", + "{{template_dir}}/scripts/installers/android.sh", "{{template_dir}}/scripts/installers/azpowershell.sh", - "{{template_dir}}/scripts/helpers/containercache.sh", "{{template_dir}}/scripts/installers/hosted-tool-cache.sh", "{{template_dir}}/scripts/installers/pypy.sh", "{{template_dir}}/scripts/installers/python.sh", @@ -242,7 +227,8 @@ "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`}}" + "GITHUB_FEED_TOKEN={{user `github_feed_token`}}", + "DEBIAN_FRONTEND=noninteractive" ], "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" }, diff --git a/images/macos/helpers/Common.Helpers.psm1 b/images/macos/helpers/Common.Helpers.psm1 new file mode 100644 index 00000000..aa2ffdc5 --- /dev/null +++ b/images/macos/helpers/Common.Helpers.psm1 @@ -0,0 +1,76 @@ +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 + } +} + +# Gets path to the tool, analogue of 'which tool' +function Get-WhichTool($tool) { + return (Get-Command $tool).Path +} + +# Gets value of environment variable by the name +function Get-EnvironmentVariable($variable) { + return [System.Environment]::GetEnvironmentVariable($variable) +} + +# Returns the object with information about current OS +# It can be used for OS-specific tests +function Get-OSVersion { + $osVersion = [Environment]::OSVersion + return [PSCustomObject]@{ + Version = $osVersion.Version + Platform = $osVersion.Platform + IsHighSierra = $osVersion.Version.Major -eq 17 + IsMojave = $osVersion.Version.Major -eq 18 + IsCatalina = $osVersion.Version.Major -eq 19 + IsBigSur = $osVersion.Version.Major -eq 20 + IsLessThanCatalina = $osVersion.Version.Major -lt 19 + IsLessThanBigSur = $osVersion.Version.Major -lt 20 + IsHigherThanMojave = $osVersion.Version.Major -gt 18 + } +} + +function Get-ChildItemWithoutSymlinks { + param ( + [Parameter(Mandatory)] + [string] $Path, + [string] $Filter + ) + + $files = Get-ChildItem -Path $Path -Filter $Filter + $files = $files | Where-Object { !$_.LinkType } # cut symlinks + return $files +} + +# Get the value of specific toolset node +# Example, invoke `Get-ToolsetValue "xamarin.bundles"` to get value of `$toolsetJson.xamarin.bundles` +function Get-ToolsetValue { + param ( + [Parameter(Mandatory = $true)] + [string] $KeyPath + ) + $toolsetPath = Join-Path $env:HOME "image-generation" "toolset.json" + $jsonNode = Get-Content -Raw $toolsetPath | ConvertFrom-Json + + $pathParts = $KeyPath.Split(".") + # try to walk through all arguments consequentially to resolve specific json node + $pathParts | ForEach-Object { + $jsonNode = $jsonNode.$_ + } + return $jsonNode +} + +function Get-ToolcachePackages { + $toolcachePath = Join-Path $env:HOME "image-generation" "toolcache.json" + return Get-Content -Raw $toolcachePath | ConvertFrom-Json +} \ No newline at end of file diff --git a/images/macos/helpers/SoftwareReport.Helpers.psm1 b/images/macos/helpers/SoftwareReport.Helpers.psm1 new file mode 100644 index 00000000..2742bad1 --- /dev/null +++ b/images/macos/helpers/SoftwareReport.Helpers.psm1 @@ -0,0 +1,32 @@ +function Run-Command { + param ( + [Parameter(Mandatory=$true)] + [string] $Command, + [switch] $SuppressStderr + ) + # Bash trick to suppress and show error output because some commands write to stderr (for example, "python --version") + $redirectOutputArguments = If ($SuppressStderr) { "2> /dev/null" } Else { "2>&1" } + $stdout = & bash -c "${Command} ${redirectOutputArguments}" + + return $stdout +} + +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 New-MDNewLine { + param ( + [int] $Count = 1 + ) + $newLineSymbol = [System.Environment]::NewLine + return $newLineSymbol * $Count +} diff --git a/images/macos/helpers/Tests.Helpers.psm1 b/images/macos/helpers/Tests.Helpers.psm1 new file mode 100644 index 00000000..621f2124 --- /dev/null +++ b/images/macos/helpers/Tests.Helpers.psm1 @@ -0,0 +1,87 @@ +# Invokes command and validate that the exit code is 0 +function Validate-ZeroExitCode($command) { + $result = Get-CommandResult $command + $result.ExitCode | Should -Be 0 -Because $result.Output +} + +# Validates that tool is installed and in PATH +function Validate-ToolExist($tool) { + Get-Command $tool -ErrorAction SilentlyContinue | Should -BeTrue +} + +function Validate-ArrayWithoutDuplicates { + param ( + [AllowEmptyCollection()] + [Parameter(Mandatory = $true)] + [array] $Items, + [string] $Because + ) + $uniqueList = @() + $Items | ForEach-Object { + $uniqueList | Should -Not -Contain $_ -Because $Because + $uniqueList += $_ + } +} + +function Validate-Url { + param ( + [Parameter(Mandatory)] + [ValidateNotNullOrEmpty()] + [string] $Url + ) + + $result = $true + try { + $requestResult = Invoke-WebRequest $Url -DisableKeepAlive -UseBasicParsing -Method Head + $result = ($requestResult.StatusCode -eq 200) + } catch { + $result = $false + } + + $result | Should -BeTrue -Because "'$Url' should be available, but it is not" +} + +function Validate-IdenticalFileContent { + param ( + [Parameter(Mandatory)] + [string] $File1, + [Parameter(Mandatory)] + [string] $File2 + ) + + $File1 | Should -Exist -Because "The content of '$File1' should be identical with content of '$File2' but '$File1' doesn't exist" + $File2 | Should -Exist -Because "The content of '$File1' should be identical with content of '$File2' but '$File2' doesn't exist" + + $content1 = Get-Content -Raw $File1 + $content2 = Get-Content -Raw $File2 + $content1 | Should -Be $content2 -Because "The content of '$File1' should be identical with content of '$File2' but they are different" +} + +function ShouldReturnZeroExitCode { + Param( + [String] $ActualValue, + [switch] $Negate, + [string] $Because # This parameter is unused by we need it to match Pester asserts signature + ) + + $result = Get-CommandResult $ActualValue + + [bool]$succeeded = $result.ExitCode -eq 0 + if ($Negate) { $succeeded = -not $succeeded } + + if (-not $succeeded) + { + $commandOutputIndent = " " * 4 + $commandOutput = ($result.Output | ForEach-Object { "${commandOutputIndent}${_}" }) -join "`n" + $failureMessage = "Command '${ActualValue}' has finished with exit code ${actualExitCode}`n${commandOutput}" + } + + return [PSCustomObject] @{ + Succeeded = $succeeded + FailureMessage = $failureMessage + } +} + +If (Get-Command -Name Add-AssertionOperator -ErrorAction SilentlyContinue) { + Add-AssertionOperator -Name ReturnZeroExitCode -InternalName ShouldReturnZeroExitCode -Test ${function:ShouldReturnZeroExitCode} +} \ No newline at end of file diff --git a/images/macos/helpers/Xcode.Helpers.psm1 b/images/macos/helpers/Xcode.Helpers.psm1 new file mode 100644 index 00000000..6f3dcf73 --- /dev/null +++ b/images/macos/helpers/Xcode.Helpers.psm1 @@ -0,0 +1,94 @@ +function Get-XcodeRootPath { + Param ( + [Parameter(Mandatory)] + [string] $Version + ) + + return "/Applications/Xcode_$Version.app" +} + +function Get-DefaultXcodeRootPath { + $defaultXcodePath = "/Applications/Xcode.app" + $defaultXcodeItem = Get-Item -Path $defaultXcodePath + return $defaultXcodeItem.Target +} + +function Get-XcodeToolPath { + param ( + [Parameter(ParameterSetName = 'Version')] + [string] $Version, + [Parameter(ParameterSetName = 'Path')] + [string] $XcodeRootPath, + [string] $ToolName + ) + + if ($PSCmdlet.ParameterSetName -eq "Version") { + $XcodeRootPath = Get-XcodeRootPath $Version + } + + return Join-Path $XcodeRootPath "Contents/Developer/usr/bin" $ToolName +} + +function Switch-Xcode { + param ( + [Parameter(ParameterSetName = 'Version')] + [string] $Version, + [Parameter(ParameterSetName = 'Path')] + [string] $XcodeRootPath + ) + + if ($PSCmdlet.ParameterSetName -eq "Version") { + $XcodeRootPath = Get-XcodeRootPath $Version + } + + Write-Verbose "Switching Xcode to '${XcodeRootPath}'" + Invoke-Expression "sudo xcode-select --switch ${XcodeRootPath}" +} + +function Get-XcodeSimulatorsInfo { + param( + [string] $Filter + ) + + [string]$rawSimulatorsInfo = Invoke-Expression "xcrun simctl list --json" + $jsonSimulatorsInfo = $rawSimulatorsInfo | ConvertFrom-Json + + if ($Filter) { + return $jsonSimulatorsInfo | Select-Object -ExpandProperty $Filter + } + + return $jsonSimulatorsInfo +} + +function Get-XcodeDevicesList { + $result = @() + + $runtimes = Get-XcodeSimulatorsInfo -Filter "devices" + $runtimes.PSObject.Properties | ForEach-Object { + $runtimeName = $_.Name + $devices = $_.Value + $devices | Where-Object { + $availability = $_.availability + $isAvailable = $_.isAvailable + return (($availability -eq "(available)") -or ($isAvailable -eq "YES") -or ($isAvailable -eq $true)) + } | ForEach-Object { + $deviceName = $_.name + $result += "$runtimeName $deviceName" + } + } + return $result +} + +function Get-XcodePairsList { + $result = @() + + $runtimes = Get-XcodeSimulatorsInfo -Filter "pairs" + $runtimes.PSObject.Properties | Where-Object { + return $_.Value.state -match "active" + } | ForEach-Object { + $watchName = $_.Value.watch.name + $phoneName = $_.Value.phone.name + $result += "$watchName $phoneName" + } + return $result +} \ No newline at end of file diff --git a/images/macos/macos-10.15-Readme.md b/images/macos/macos-10.15-Readme.md index 14fafd2e..3c57b80b 100644 --- a/images/macos/macos-10.15-Readme.md +++ b/images/macos/macos-10.15-Readme.md @@ -1,112 +1,117 @@ - -# macOS info -- System Version: macOS 10.15.6 (19G73) +| 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 -- System Integrity Protection: Enabled -- Image Version: 20200802.1 +- Image Version: 20200903.1 ## Installed Software ### Language and Runtime -- Java 1.7: (Zulu 7.40.0.15-CA-macosx) (build 1.7.0_272-b10) -- Java 1.8: (AdoptOpenJDK)(build 1.8.0_265-b01) (default) -- Java 11: AdoptOpenJDK (build 11.0.8+10) -- Java 12: AdoptOpenJDK (build 12.0.2+10) -- Java 13: AdoptOpenJDK (build 13.0.2+8) -- Java 14: AdoptOpenJDK (build 14.0.2+12) -- Clang/LLVM 10.0.0 -- gcc-8 (Homebrew GCC 8.4.0_1) 8.4.0 -- gcc-9 (Homebrew GCC 9.3.0) 9.3.0 -- GNU Fortran (Homebrew GCC 8.4.0_1) 8.4.0 -- GNU Fortran (Homebrew GCC 9.3.0) 9.3.0 +- Clang/LLVM 10.0.1 +- gcc-8 (Homebrew GCC 8.4.0_1) 8.4.0 — available by `gcc-8` alias +- gcc-9 (Homebrew GCC 9.3.0) 9.3.0 — available by `gcc-9` alias +- GNU Fortran (Homebrew GCC 8.4.0_1) 8.4.0 — available by `gfortran-8` alias +- 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.7.0 +- NVM - Cached node versions: v6.17.1 v8.17.0 v10.22.0 v12.18.3 v13.14.0 v14.9.0 - 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 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 +- .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 - R 4.0.2 -- Go 1.14.6 -- PHP 7.4.8 -- julia 1.4.2 +- Go 1.15 +- PHP 7.4.10 +- julia 1.5.1 ### Package Management - Vcpkg 2020.06.15 - Bundler version 2.1.4 - Carthage 0.35.0 - CocoaPods 1.9.3 -- Homebrew 2.4.9 +- Homebrew 2.4.16 - NPM 6.14.6 -- Yarn 1.22.4 +- Yarn 1.22.5 - NuGet 5.6.0.6489 - Pip 19.3.1 (python 2.7) - Pip 20.1.1 (python 3.8) - Miniconda 4.8.3 - RubyGems 3.1.4 -- Composer 1.10.9 +- Composer 1.10.10 ### Project Management - Apache Maven 3.6.3 -- Gradle 6.5.1 +- Gradle 6.6.1 - Apache Ant(TM) 1.10.8 ### Utilities -- Curl 7.71.1 +- Curl 7.72.0 - Git: 2.28.0 -- Git LFS: 2.11.0 +- Git LFS: 2.12.0 - GitHub CLI: 0.11.1 - Hub CLI: 2.14.2 - GNU Wget 1.20.3 - Subversion (SVN) 1.14.0 -- Packer 1.6.1 +- 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)` - jq 1.6 -- gpg (GnuPG) 2.2.21 -- psql (PostgreSQL) 12.3 -- PostgreSQL 12.3 +- gpg (GnuPG) 2.2.22 +- psql (PostgreSQL) 12.4 +- PostgreSQL 12.4 - aria2 1.35.0 -- azcopy 10.5.1 +- azcopy 10.6.0 - zstd 1.4.5 -- bazel 3.4.1 -- bazelisk 1.5.0 -- helm v3.2.4+g0ad800e +- bazel 3.5.0 +- bazelisk 1.6.1 +- helm v3.3.1+g249e521 - virtualbox 6.1.12r139181 - mongo v4.4.0 - mongod v4.4.0 -- Vagrant 2.2.9 +- Vagrant 2.2.10 - 7-Zip 16.02 -- Newman 5.1.2 +- Newman 5.2.0 ### Tools -- Fastlane 2.154.0 -- Cmake 3.18.1 -- App Center CLI 2.6.4 -- Azure CLI 2.9.1 -- AWS CLI 2.0.36 -- AWS SAM CLI 1.0.0 +- Fastlane 2.157.2 +- Cmake 3.18.2 +- App Center CLI 2.6.7 +- Azure CLI 2.11.1 +- AWS CLI 2.0.44 +- AWS SAM CLI 1.2.0 - AWS Session Manager CLI 1.1.61.0 -- Aliyun CLI 3.0.55 -- GHCup v0.1.8 -- GHC 8.10.1 +- Aliyun CLI 3.0.56 +- GHCup v0.1.10 +- GHC 9.0.0 - Cabal 3.2.0.0 -- Stack 2.3.1 +- Stack 2.3.3 ### Linters - yamllint 1.24.2 -- SwiftLint 0.39.2 +- SwiftLint 0.40.1 ### Browsers - Safari 13.1.2 (15609.3.5.1.3) - SafariDriver 13.1.2 (15609.3.5.1.3) -- Google Chrome 84.0.4147.105 -- ChromeDriver 84.0.4147.30 -- Microsoft Edge 84.0.522.50 -- MSEdgeDriver 84.0.522.52 -- Mozilla Firefox 79.0 +- Google Chrome 85.0.4183.83 +- ChromeDriver 85.0.4183.87 +- Microsoft Edge 85.0.564.44 +- MSEdgeDriver 85.0.564.44 +- Mozilla Firefox 80.0.1 - geckodriver 0.27.0 +### Java +| Version | Vendor | Environment Variable | +| --------- | ------------ | -------------------- | +| 1.7.0_272 | Zulu | JAVA_HOME_7_X64 | +| 1.8.0_265 | AdoptOpenJDK | JAVA_HOME_8_X64 | +| 11.0.8 | AdoptOpenJDK | JAVA_HOME_11_X64 | +| 12.0.2 | AdoptOpenJDK | JAVA_HOME_12_X64 | +| 13.0.2 | AdoptOpenJDK | JAVA_HOME_13_X64 | +| 14.0.2 | AdoptOpenJDK | JAVA_HOME_14_X64 | ### Cached Tools #### Ruby - 2.4.10 @@ -117,8 +122,8 @@ #### Python - 2.7.18 - 3.5.9 -- 3.6.11 -- 3.7.8 +- 3.6.12 +- 3.7.9 - 3.8.5 #### PyPy @@ -129,21 +134,22 @@ - 8.17.0 - 10.22.0 - 12.18.3 -- 14.7.0 +- 14.9.0 #### Go - 1.11.13 - 1.12.17 -- 1.13.14 -- 1.14.6 +- 1.13.15 +- 1.14.8 +- 1.15.1 ### Rust Tools -- Rust 1.45.1 +- Rust 1.46.0 - Rustup 1.22.1 #### Packages -- Bindgen 0.54.1 -- Cbindgen 0.14.3 +- Bindgen 0.55.1 +- Cbindgen 0.14.4 - Cargo-outdated v0.9.11 - Cargo-audit 0.12.0 @@ -153,21 +159,23 @@ #### PowerShell Modules | Module | Version | | ---------- | ------- | -| Az | 4.4.0 | +| Az | 4.6.1 | | MarkdownPS | 1.9 | -| Pester | 4.10.1 | +| Pester | 5.0.4 | ### Xamarin #### Visual Studio for Mac -- 8.6.8.2 +- 8.7.4.38 #### Mono +- 6.12.0.90 - 6.10.0.106 - 6.8.0.123 - 6.6.0.166 - 6.4.0.208 #### Xamarin.iOS +- 13.20.2.2 - 13.18.2.1 - 13.16.0.13 - 13.14.1.39 @@ -178,6 +186,7 @@ - 13.2.0.47 #### Xamarin.Mac +- 6.20.2.2 - 6.18.3.2 - 6.16.0.13 - 6.14.1.39 @@ -188,6 +197,7 @@ - 6.2.0.47 #### Xamarin.Android +- 11.0.2 - 10.3.1 - 10.2.0 - 10.1.3 @@ -199,8 +209,9 @@ ### Xcode | Version | Build | Path | | -------------- | -------- | ------------------------------- | -| 12.0 (beta) | 12A8169g | /Applications/Xcode_12_beta.app | -| 11.6 (default) | 11E708 | /Applications/Xcode_11.6.app | +| 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 | @@ -218,73 +229,76 @@ - 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 | -| 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 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 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 | -| 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 | -| 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 | -| 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 | -| 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 | -| 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 | +| 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 | #### Installed Simulators -| OS | Xcode Version | Simulators | -| ----------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| iOS 12.4 | 10.3 | iPhone 5s
iPhone 6 Plus
iPhone 6
iPhone 6s
iPhone 6s Plus
iPhone SE
iPhone 7
iPhone 7 Plus
iPhone 8
iPhone 8 Plus
iPhone X
iPhone Xs
iPhone Xs Max
iPhone XÊ€
iPad Air
iPad Air 2
iPad Pro (9.7-inch)
iPad Pro (12.9-inch)
iPad (5th generation)
iPad Pro (12.9-inch) (2nd generation)
iPad Pro (10.5-inch)
iPad (6th generation)
iPad Pro (11-inch)
iPad Pro (12.9-inch) (3rd generation)
iPad Air (3rd generation) | -| iOS 13.0 | 11.0 | iPhone 8
iPhone 8 Plus
iPhone 11
iPhone 11 Pro
iPhone 11 Pro Max
iPad Pro (9.7-inch)
iPad Pro (11-inch)
iPad Pro (12.9-inch) (3rd generation)
iPad Air (3rd generation) | -| iOS 13.1 | 11.1 | iPhone 8
iPhone 8 Plus
iPhone 11
iPhone 11 Pro
iPhone 11 Pro Max
iPad Pro (9.7-inch)
iPad Pro (11-inch)
iPad Pro (12.9-inch) (3rd generation)
iPad Air (3rd generation) | -| iOS 13.2 | 11.2.1 | iPhone 8
iPhone 8 Plus
iPhone 11
iPhone 11 Pro
iPhone 11 Pro Max
iPad Pro (9.7-inch)
iPad Pro (11-inch)
iPad Pro (12.9-inch) (3rd generation)
iPad Air (3rd generation) | -| iOS 13.3 | 11.3.1 | iPhone 8
iPhone 8 Plus
iPhone 11
iPhone 11 Pro
iPhone 11 Pro Max
iPad Pro (9.7-inch)
iPad Pro (11-inch)
iPad Pro (12.9-inch) (3rd generation)
iPad Air (3rd generation) | -| iOS 13.4 | 11.4
11.4.1 | iPhone 8
iPhone 8 Plus
iPhone 11
iPhone 11 Pro
iPhone 11 Pro Max
iPhone SE (2nd generation)
iPad Pro (9.7-inch)
iPad (7th generation)
iPad Pro (11-inch) (2nd generation)
iPad Pro (12.9-inch) (4th generation)
iPad Air (3rd generation) | -| iOS 13.5 | 11.5 | iPhone 8
iPhone 8 Plus
iPhone 11
iPhone 11 Pro
iPhone 11 Pro Max
iPhone SE (2nd generation)
iPad Pro (9.7-inch)
iPad (7th generation)
iPad Pro (11-inch) (2nd generation)
iPad Pro (12.9-inch) (4th generation)
iPad Air (3rd generation) | -| iOS 13.6 | 11.6 | iPhone 8
iPhone 8 Plus
iPhone 11
iPhone 11 Pro
iPhone 11 Pro Max
iPhone SE (2nd generation)
iPad Pro (9.7-inch)
iPad (7th generation)
iPad Pro (11-inch) (2nd generation)
iPad Pro (12.9-inch) (4th generation)
iPad Air (3rd generation) | -| iOS 14.0 | 12.0 | iPhone 8
iPhone 8 Plus
iPhone 11
iPhone 11 Pro
iPhone 11 Pro Max
iPhone SE (2nd generation)
iPod touch (7th generation)
iPad Pro (9.7-inch)
iPad (7th generation)
iPad Pro (11-inch) (2nd generation)
iPad Pro (12.9-inch) (4th generation)
iPad Air (3rd generation) | -| tvOS 12.4 | 10.3 | Apple TV
Apple TV 4K
Apple TV 4K (at 1080p) | -| tvOS 13.0 | 11.0
11.1 | Apple TV
Apple TV 4K
Apple TV 4K (at 1080p) | -| tvOS 13.2 | 11.2.1 | Apple TV
Apple TV 4K
Apple TV 4K (at 1080p) | -| tvOS 13.3 | 11.3.1 | Apple TV
Apple TV 4K
Apple TV 4K (at 1080p) | -| tvOS 13.4 | 11.4
11.4.1
11.5
11.6 | Apple TV
Apple TV 4K
Apple TV 4K (at 1080p) | -| tvOS 14.0 | 12.0 | Apple TV
Apple TV 4K
Apple TV 4K (at 1080p) | -| watchOS 5.3 | 10.3 | Apple Watch Series 2 - 38mm
Apple Watch Series 2 - 42mm
Apple Watch Series 3 - 38mm
Apple Watch Series 3 - 42mm
Apple Watch Series 4 - 40mm
Apple Watch Series 4 - 44mm | -| watchOS 6.0 | 11.0
11.1 | Apple Watch Series 4 - 40mm
Apple Watch Series 4 - 44mm
Apple Watch Series 5 - 40mm
Apple Watch Series 5 - 44mm | -| watchOS 6.1 | 11.2.1
11.3.1 | Apple Watch Series 4 - 40mm
Apple Watch Series 4 - 44mm
Apple Watch Series 5 - 40mm
Apple Watch Series 5 - 44mm | -| watchOS 6.2 | 11.4
11.4.1
11.5
11.6 | Apple Watch Series 4 - 40mm
Apple Watch Series 4 - 44mm
Apple Watch Series 5 - 40mm
Apple Watch Series 5 - 44mm | -| watchOS 7.0 | 12.0 | Apple Watch Series 4 - 40mm
Apple Watch Series 4 - 44mm
Apple Watch Series 5 - 40mm
Apple Watch Series 5 - 44mm | +| OS | Xcode Version | Simulators | +| ----------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| iOS 12.4 | 10.3 | iPhone 5s
iPhone 6
iPhone 6 Plus
iPhone 6s
iPhone 6s Plus
iPhone 7
iPhone 7 Plus
iPhone 8
iPhone 8 Plus
iPhone SE
iPhone X
iPhone XR
iPhone Xs
iPhone Xs Max
iPad (5th generation)
iPad (6th generation)
iPad Air
iPad Air (3rd generation)
iPad Air 2
iPad Pro (10.5-inch)
iPad Pro (11-inch)
iPad Pro (12.9-inch)
iPad Pro (12.9-inch) (2nd generation)
iPad Pro (12.9-inch) (3rd generation)
iPad Pro (9.7-inch) | +| iOS 13.0 | 11.0 | iPhone 11
iPhone 11 Pro
iPhone 11 Pro Max
iPhone 8
iPhone 8 Plus
iPad Air (3rd generation)
iPad Pro (11-inch)
iPad Pro (12.9-inch) (3rd generation)
iPad Pro (9.7-inch) | +| iOS 13.1 | 11.1 | iPhone 11
iPhone 11 Pro
iPhone 11 Pro Max
iPhone 8
iPhone 8 Plus
iPad Air (3rd generation)
iPad Pro (11-inch)
iPad Pro (12.9-inch) (3rd generation)
iPad Pro (9.7-inch) | +| iOS 13.2 | 11.2.1 | iPhone 11
iPhone 11 Pro
iPhone 11 Pro Max
iPhone 8
iPhone 8 Plus
iPad Air (3rd generation)
iPad Pro (11-inch)
iPad Pro (12.9-inch) (3rd generation)
iPad Pro (9.7-inch) | +| iOS 13.3 | 11.3.1 | iPhone 11
iPhone 11 Pro
iPhone 11 Pro Max
iPhone 8
iPhone 8 Plus
iPad Air (3rd generation)
iPad Pro (11-inch)
iPad Pro (12.9-inch) (3rd generation)
iPad Pro (9.7-inch) | +| iOS 13.4 | 11.4
11.4.1 | iPhone 11
iPhone 11 Pro
iPhone 11 Pro Max
iPhone 8
iPhone 8 Plus
iPhone SE (2nd generation)
iPad (7th generation)
iPad Air (3rd generation)
iPad Pro (11-inch) (2nd generation)
iPad Pro (12.9-inch) (4th generation)
iPad Pro (9.7-inch) | +| iOS 13.5 | 11.5 | iPhone 11
iPhone 11 Pro
iPhone 11 Pro Max
iPhone 8
iPhone 8 Plus
iPhone SE (2nd generation)
iPad (7th generation)
iPad Air (3rd generation)
iPad Pro (11-inch) (2nd generation)
iPad Pro (12.9-inch) (4th generation)
iPad Pro (9.7-inch) | +| iOS 13.6 | 11.6 | iPhone 11
iPhone 11 Pro
iPhone 11 Pro Max
iPhone 8
iPhone 8 Plus
iPhone SE (2nd generation)
iPad (7th generation)
iPad Air (3rd generation)
iPad Pro (11-inch) (2nd generation)
iPad Pro (12.9-inch) (4th generation)
iPad Pro (9.7-inch) | +| iOS 13.7 | 11.7 | iPhone 11
iPhone 11 Pro
iPhone 11 Pro Max
iPhone 8
iPhone 8 Plus
iPhone SE (2nd generation)
iPad (7th generation)
iPad Air (3rd generation)
iPad Pro (11-inch) (2nd generation)
iPad Pro (12.9-inch) (4th generation)
iPad Pro (9.7-inch) | +| iOS 14.0 | 12.0 | iPod touch (7th generation)
iPhone 11
iPhone 11 Pro
iPhone 11 Pro Max
iPhone 8
iPhone 8 Plus
iPhone SE (2nd generation)
iPad (7th generation)
iPad Air (3rd generation)
iPad Pro (11-inch) (2nd generation)
iPad Pro (12.9-inch) (4th generation)
iPad Pro (9.7-inch) | +| tvOS 12.4 | 10.3 | Apple TV
Apple TV 4K
Apple TV 4K (at 1080p) | +| tvOS 13.0 | 11.0
11.1 | Apple TV
Apple TV 4K
Apple TV 4K (at 1080p) | +| tvOS 13.2 | 11.2.1 | Apple TV
Apple TV 4K
Apple TV 4K (at 1080p) | +| tvOS 13.3 | 11.3.1 | Apple TV
Apple TV 4K
Apple TV 4K (at 1080p) | +| tvOS 13.4 | 11.4
11.4.1
11.5
11.6
11.7 | Apple TV
Apple TV 4K
Apple TV 4K (at 1080p) | +| tvOS 14.0 | 12.0 | Apple TV
Apple TV 4K
Apple TV 4K (at 1080p) | +| watchOS 5.3 | 10.3 | Apple Watch Series 2 - 38mm
Apple Watch Series 2 - 42mm
Apple Watch Series 3 - 38mm
Apple Watch Series 3 - 42mm
Apple Watch Series 4 - 40mm
Apple Watch Series 4 - 44mm | +| watchOS 6.0 | 11.0
11.1 | Apple Watch Series 4 - 40mm
Apple Watch Series 4 - 44mm
Apple Watch Series 5 - 40mm
Apple Watch Series 5 - 44mm | +| watchOS 6.1 | 11.2.1
11.3.1 | Apple Watch Series 4 - 40mm
Apple Watch Series 4 - 44mm
Apple Watch Series 5 - 40mm
Apple Watch Series 5 - 44mm | +| watchOS 6.2 | 11.4
11.4.1
11.5
11.6
11.7 | Apple Watch Series 4 - 40mm
Apple Watch Series 4 - 44mm
Apple Watch Series 5 - 40mm
Apple Watch Series 5 - 44mm | +| watchOS 7.0 | 12.0 | Apple Watch Series 4 - 40mm
Apple Watch Series 4 - 44mm
Apple Watch Series 5 - 40mm
Apple Watch Series 5 - 44mm | ### Android #### Android SDK Tools @@ -305,8 +319,8 @@ | android-26 | Android SDK Platform 26, Revision 2 | | android-27 | Android SDK Platform 27, Revision 3 | | android-28 | Android SDK Platform 28, Revision 6 | -| android-29 | Android SDK Platform 29, Revision 4 | -| android-30 | Android SDK Platform 30, Revision 2 | +| android-29 | Android SDK Platform 29, Revision 5 | +| android-30 | Android SDK Platform 30, Revision 3 | #### Android SDK Build-Tools | Package Name | Description | @@ -337,6 +351,7 @@ | build-tools-29.0.3 | Android SDK Build-Tools, Revision 29.0.3 | | build-tools-30.0.0 | Android SDK Build-Tools, Revision 30.0.0 | | build-tools-30.0.1 | Android SDK Build-Tools, Revision 30.0.1 | +| build-tools-30.0.2 | Android SDK Build-Tools, Revision 30.0.2 | #### Android NDKs | Version | Path | @@ -349,7 +364,7 @@ | Package Name | Version | | ---------------- | ----------- | | cmake | 3.6.4111459 | -| Android Emulator | 30.0.12 | +| Android Emulator | 30.0.26 | #### Android Google APIs | Package Name | Description | diff --git a/images/macos/provision/bootstrap-provisioner/change_password b/images/macos/provision/bootstrap-provisioner/change_password new file mode 100755 index 00000000..d3516ff2 --- /dev/null +++ b/images/macos/provision/bootstrap-provisioner/change_password @@ -0,0 +1,18 @@ +#!/bin/bash +USERNAME="$1" +OLD_PASSWD="$2" +NEW_PASSWD="$3" + +export PATH=/usr/bin:/usr/sbin:/usr/local/bin:/bin:/sbin + +macosver="$(sw_vers | grep ProductVersion | awk {'print $2'})" + +if [[ $macosver =~ 10.13.* ]]; then + sudo /usr/bin/dscl . -passwd /Users/$USERNAME "$NEW_PASSWD" +else + sudo /usr/sbin/sysadminctl -resetPasswordFor $USERNAME -newPassword "$NEW_PASSWD" -adminUser $USERNAME -adminPassword "$OLD_PASSWD" +fi + +sudo /usr/bin/python /Users/$USERNAME/bootstrap/kcpassword.py "$NEW_PASSWD" +sudo /usr/bin/defaults write /Library/Preferences/com.apple.loginwindow autoLoginUser "$USERNAME" +/usr/bin/security set-keychain-password -o "$OLD_PASSWD" -p "$NEW_PASSWD" /Users/$USERNAME/Library/Keychains/login.keychain \ No newline at end of file diff --git a/images/macos/provision/bootstrap-provisioner/installNewProvisioner.sh b/images/macos/provision/bootstrap-provisioner/installNewProvisioner.sh new file mode 100644 index 00000000..79a3afdf --- /dev/null +++ b/images/macos/provision/bootstrap-provisioner/installNewProvisioner.sh @@ -0,0 +1,40 @@ +#!/bin/bash +BOOTSTRAP_PATH="$1" +ProvisionerPackageUri="$2" +ProvisionerScriptUri="$3" +ScriptName="$4" +ScriptParam="$5" +Username="$6" + +export PATH=/usr/bin:/usr/sbin:/usr/local/bin:/bin:/sbin + +PROVISIONER_ROOT=/usr/local/opt/${Username} +mkdir -p ${PROVISIONER_ROOT} +chown ${Username} ${PROVISIONER_ROOT} + +tee -a ${PROVISIONER_ROOT}/runprovisioner.sh > /dev/null <<\EOF +#!/bin/bash + +. ${HOME}/.bashrc + +/usr/local/opt/$USER/provisioner/provisioner +EOF + +chmod +x $PROVISIONER_ROOT/runprovisioner.sh + +aria2c \ + --enable-color=false \ + --file-allocation=none \ + -d ${BOOTSTRAP_PATH} "${ProvisionerPackageUri}" >> ${BOOTSTRAP_PATH}/download.log + +aria2c \ + --enable-color=false \ + --file-allocation=none \ + -d ${BOOTSTRAP_PATH} "${ProvisionerScriptUri}" >> ${BOOTSTRAP_PATH}/download.log + +chmod +x ${BOOTSTRAP_PATH}/${ScriptName} + +# Install Provisioner with provided scripts +eval "$BOOTSTRAP_PATH/$ScriptName $BOOTSTRAP_PATH/$ScriptParam $Username" 2>&1 | tee "$BOOTSTRAP_PATH/install.log" +# State File +touch $BOOTSTRAP_PATH/provisionerDone \ No newline at end of file diff --git a/images/macos/provision/bootstrap-provisioner/kcpassword.py b/images/macos/provision/bootstrap-provisioner/kcpassword.py new file mode 100755 index 00000000..6b34121e --- /dev/null +++ b/images/macos/provision/bootstrap-provisioner/kcpassword.py @@ -0,0 +1,46 @@ +#!/usr/bin/env python + +# Port of Gavin Brock's Perl kcpassword generator to Python, by Tom Taylor +# . +# Perl version: http://www.brock-family.org/gavin/perl/kcpassword.html +# This script was taken from https://github.com/timsutton/osx-vm-templates/blob/master/scripts/support/set_kcpassword.py +# Distributed by MIT license, license can be found at the bottom of this script + +import sys +import os + +def kcpassword(passwd): + # The magic 11 bytes - these are just repeated + # 0x7D 0x89 0x52 0x23 0xD2 0xBC 0xDD 0xEA 0xA3 0xB9 0x1F + key = [125,137,82,35,210,188,221,234,163,185,31] + key_len = len(key) + + passwd = [ord(x) for x in list(passwd)] + # pad passwd length out to an even multiple of key length + r = len(passwd) % key_len + if (r > 0): + passwd = passwd + [0] * (key_len - r) + + for n in range(0, len(passwd), len(key)): + ki = 0 + for j in range(n, min(n+len(key), len(passwd))): + passwd[j] = passwd[j] ^ key[ki] + ki += 1 + + passwd = [chr(x) for x in passwd] + return "".join(passwd) + +if __name__ == "__main__": + passwd = kcpassword(sys.argv[1]) + fd = os.open('/etc/kcpassword', os.O_WRONLY | os.O_CREAT, 0o600) + file = os.fdopen(fd, 'w') + file.write(passwd) + file.close() + +""" +The MIT License (MIT) +Copyright (c) 2013-2017 Timothy Sutton +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +""" \ No newline at end of file diff --git a/images/macos/provision/configuration/add-network-interface-detection.sh b/images/macos/provision/configuration/add-network-interface-detection.sh new file mode 100755 index 00000000..e939f04b --- /dev/null +++ b/images/macos/provision/configuration/add-network-interface-detection.sh @@ -0,0 +1,40 @@ +#!/bin/sh + +# This script was taken from https://github.com/timsutton/osx-vm-templates/blob/master/scripts/add-network-interface-detection.sh +# Distributed by MIT license, license can be found at the bottom of this script + +# This script adds a Mac OS Launch Daemon, which runs every time the +# machine is booted. The daemon will re-detect the attached network +# interfaces. If this is not done, network devices may not work. +PLIST=/Library/LaunchDaemons/sonoma.detectnewhardware.plist +cat < "${PLIST}" + + + + + Label + sonoma.detectnewhardware + ProgramArguments + + /usr/sbin/networksetup + -detectnewhardware + + RunAtLoad + + + +EOF + +# These should be already set as follows, but since they're required +# in order to load properly, we set them explicitly. +/bin/chmod 644 "${PLIST}" +/usr/sbin/chown root:wheel "${PLIST}" + + +: ' +The MIT License (MIT) +Copyright (c) 2013-2017 Timothy Sutton +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +' \ No newline at end of file diff --git a/images/macos/provision/configuration/autologin.sh b/images/macos/provision/configuration/autologin.sh new file mode 100755 index 00000000..caa29a6b --- /dev/null +++ b/images/macos/provision/configuration/autologin.sh @@ -0,0 +1,16 @@ +# This script was taken from https://github.com/timsutton/osx-vm-templates/blob/master/scripts/autologin.sh +# Distributed by MIT license, license can be found at the bottom of this script + +echo "Enabling automatic GUI login for the '$USERNAME' user.." + +python $HOME/bootstrap/kcpassword.py "$PASSWORD" + +/usr/bin/defaults write /Library/Preferences/com.apple.loginwindow autoLoginUser "$USERNAME" + +: ' +The MIT License (MIT) +Copyright (c) 2013-2017 Timothy Sutton +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +' \ No newline at end of file diff --git a/images/macos/provision/configuration/configure-hostname.sh b/images/macos/provision/configuration/configure-hostname.sh new file mode 100644 index 00000000..477e0980 --- /dev/null +++ b/images/macos/provision/configuration/configure-hostname.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +# Add script for changing hostname to run on startup to prevent duplicate hostnames across the environment. Hostname and Computername should contain .local in name to avoid name resolution issues +tee -a /usr/local/bin/change_hostname.sh > /dev/null <<\EOF +#!/bin/bash + +name="Mac-$(python -c 'from time import time; print int(round(time() * 1000))')" +scutil --set HostName "${name}.local" +scutil --set LocalHostName $name +scutil --set ComputerName "${name}.local" +EOF + +chmod +x "/usr/local/bin/change_hostname.sh" + +sudo tee -a /Library/LaunchDaemons/change_hostname.plist > /dev/null <<\EOF + + + + + Label + change-hostname + Program + /usr/local/bin/change_hostname.sh + RunAtLoad + + + +EOF \ No newline at end of file diff --git a/images/macos/provision/configuration/configure-machine.sh b/images/macos/provision/configuration/configure-machine.sh new file mode 100644 index 00000000..d34d7002 --- /dev/null +++ b/images/macos/provision/configuration/configure-machine.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +# Enable firewall. SSH and VNC opened. Can't did it at bootstrap step, so placed it here +defaults write /Library/Preferences/com.apple.alf globalstate -int 1 + +# Setting correct time zone +echo "Configuring system time to GMT..." +rm -f /etc/localtime +ln -sf /usr/share/zoneinfo/UTC /etc/localtime + +# https://developer.apple.com/documentation/webkit/testing_with_webdriver_in_safari +# Safari’s executable is located at /usr/bin/safaridriver +# Configure Safari to Enable WebDriver Support +sudo safaridriver --enable + +# Turn off hibernation and get rid of the sleepimage +sudo pmset hibernatemode 0 +sudo rm -f /var/vm/sleepimage + +# Change screen resolution to the maximum supported for 4Mb video memory +sudo "/Library/Application Support/VMware Tools/vmware-resolutionSet" 1176 885 \ No newline at end of file diff --git a/images/macos/provision/configuration/configure-ssh.sh b/images/macos/provision/configuration/configure-ssh.sh new file mode 100755 index 00000000..f85e9efa --- /dev/null +++ b/images/macos/provision/configuration/configure-ssh.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +[[ ! -d ~/.ssh ]] && mkdir ~/.ssh 2>/dev/null +chmod 777 ~/.ssh + +ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts +ssh-keyscan -t rsa ssh.dev.azure.com >> ~/.ssh/known_hosts diff --git a/images/macos/provision/configuration/disable-auto-updates.sh b/images/macos/provision/configuration/disable-auto-updates.sh new file mode 100755 index 00000000..3a35f5be --- /dev/null +++ b/images/macos/provision/configuration/disable-auto-updates.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +# Disabling automatic updates +sudo softwareupdate --schedule off +defaults write com.apple.SoftwareUpdate AutomaticDownload -int 0 +defaults write com.apple.SoftwareUpdate CriticalUpdateInstall -int 0 +defaults write com.apple.commerce AutoUpdate -bool false +defaults write com.apple.SoftwareUpdate AutomaticCheckEnabled -bool false \ No newline at end of file diff --git a/images/macos/provision/configuration/environment/bashprofile b/images/macos/provision/configuration/environment/bashprofile new file mode 100644 index 00000000..223689e8 --- /dev/null +++ b/images/macos/provision/configuration/environment/bashprofile @@ -0,0 +1 @@ +[ -f $HOME/.bashrc ] && source $HOME/.bashrc \ No newline at end of file diff --git a/images/macos/provision/configuration/environment/bashrc b/images/macos/provision/configuration/environment/bashrc new file mode 100644 index 00000000..26fd1432 --- /dev/null +++ b/images/macos/provision/configuration/environment/bashrc @@ -0,0 +1,32 @@ +export LC_CTYPE=en_US.UTF-8 +export LC_ALL=en_US.UTF-8 +export LANG=en_US.UTF-8 + +export ANDROID_HOME=${HOME}/Library/Android/sdk +export ANDROID_NDK_HOME=${ANDROID_HOME}/ndk-bundle + +export NUNIT_BASE_PATH=/Library/Developer/nunit +export NUNIT3_PATH=/Library/Developer/nunit/3.6.0 + +export CONDA=/usr/local/miniconda +export AGENT_TOOLSDIRECTORY=$HOME/hostedtoolcache +export RUNNER_TOOL_CACHE=$HOME/hostedtoolcache + +export PATH=/Library/Frameworks/Mono.framework/Versions/Current/Commands:$PATH +export PATH=$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$ANDROID_NDK_HOME:$PATH +export PATH=/usr/local/go/bin:$PATH +export PATH=/usr/local/bin:/usr/local/sbin:~/bin:~/.yarn/bin:$PATH +export PATH="/usr/local/opt/curl/bin:$PATH" +export PATH="/usr/local/opt/ruby/bin:$PATH" +GEM_PATH=`gem env|awk '/EXECUTABLE DIRECTORY/ {print $4}'` +export PATH="$GEM_PATH:$PATH" +export PATH=$HOME/.cargo/bin:$PATH + +export RCT_NO_LAUNCH_PACKAGER=1 +export DOTNET_ROOT=$HOME/.dotnet +export DOTNET_MULTILEVEL_LOOKUP=0 + +export HOMEBREW_NO_AUTO_UPDATE=1 +export HOMEBREW_CASK_OPTS="--no-quarantine" + +export BOOTSTRAP_HASKELL_NONINTERACTIVE=1 diff --git a/images/macos/provision/configuration/finalize-vm.sh b/images/macos/provision/configuration/finalize-vm.sh new file mode 100644 index 00000000..b01b3c23 --- /dev/null +++ b/images/macos/provision/configuration/finalize-vm.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# Close all finder windows because they can interfere with UI tests +osascript -e 'tell application "Finder" to close windows' + +# Ignore available updates to prevent system pop-ups +updateName=$(softwareupdate -l | grep "Title: " | awk -F[:,] '{print $2}' | awk '{$1=$1};1') +if [ ! -z "$updateName" ]; then + sudo softwareupdate --ignore "$updateName" +fi + +# Put documentation to $HOME root +cp $HOME/image-generation/output/software-report/systeminfo.txt $HOME/image-generation/output/software-report/systeminfo.md $HOME/ + +# Clean up npm cache which collected during image-generation +# we have to do that here because `npm install` is run in a few different places during image-generation +npm cache clean --force + +# Clean up temporary directories +rm -rf ~/utils ~/image-generation \ No newline at end of file diff --git a/images/macos/provision/configuration/max-files.sh b/images/macos/provision/configuration/max-files.sh new file mode 100755 index 00000000..a6e41f12 --- /dev/null +++ b/images/macos/provision/configuration/max-files.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +set -e + +Launch_Daemons="/Library/LaunchDaemons" + +# EOF in quotes to disable variable expansion +echo "Creating limit.maxfiles.plist" +cat > "${Launch_Daemons}/limit.maxfiles.plist" << EOF + + + + + Label + limit.maxfiles + ProgramArguments + + launchctl + limit + maxfiles + 52428 + 524288 + + RunAtLoad + + ServiceIPC + + + +EOF + +echo "limit.maxfiles.plist permissions changing" +chown root:wheel "${Launch_Daemons}/limit.maxfiles.plist" +chmod 0644 "${Launch_Daemons}/limit.maxfiles.plist" + + +echo "Done, limit.maxfiles has been updated" + diff --git a/images/macos/provision/configuration/ntpconf.sh b/images/macos/provision/configuration/ntpconf.sh new file mode 100755 index 00000000..09916cc3 --- /dev/null +++ b/images/macos/provision/configuration/ntpconf.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +echo Additional NTP servers adding into /etc/ntp.conf file... +cat > /etc/ntp.conf << EOF +server 0.pool.ntp.org +server 1.pool.ntp.org +server 2.pool.ntp.org +server 3.pool.ntp.org +server time.apple.com +server time.windows.com +EOF + +# Set the timezone to UTC. +echo The Timezone setting to UTC... +ln -sf /usr/share/zoneinfo/UTC /etc/localtime diff --git a/images/macos/provision/configuration/preimagedata.sh b/images/macos/provision/configuration/preimagedata.sh new file mode 100644 index 00000000..c269a149 --- /dev/null +++ b/images/macos/provision/configuration/preimagedata.sh @@ -0,0 +1,29 @@ +#!/bin/bash +source ~/utils/utils.sh + +imagedata_file="$HOME/imagedata.json" +image_version=$(echo $IMAGE_VERSION | cut -d _ -f 2) +os_name=$(sw_vers -productName) +os_version=$(sw_vers -productVersion) +os_build=$(sw_vers -buildVersion) +label_version=$(echo $os_version | cut -d. -f1,2) +image_label="macos-${label_version}" +software_url="https://github.com/actions/virtual-environments/blob/${image_label}/${image_version}/images/macos/${image_label}-Readme.md" + +if is_Catalina || is_BigSur; then + cat < $imagedata_file + [ + { + "group": "Operating System", + "detail": "${os_name}\n${os_version}\n${os_build}" + }, + { + "group": "Virtual Environment", + "detail": "Environment: ${image_label}\nVersion: ${image_version}\nIncluded Software: ${software_url}" + } + ] +EOF +fi + +echo "export ImageVersion=$image_version" >> $HOME/.bashrc +echo "export ImageOS=$IMAGE_OS" >> $HOME/.bashrc \ No newline at end of file diff --git a/images/macos/provision/configuration/screensaver-off.sh b/images/macos/provision/configuration/screensaver-off.sh new file mode 100755 index 00000000..c154f8d8 --- /dev/null +++ b/images/macos/provision/configuration/screensaver-off.sh @@ -0,0 +1,25 @@ +#!/bin/bash +# set screensaver idleTime to 0, to prevent turning screensaver on +macUUID=`ioreg -rd1 -c IOPlatformExpertDevice | grep -i "UUID" | cut -c27-62` + +rm -rf /Users/$USERNAME/Library/Preferences/com.apple.screensaver.$macUUID.plist +rm -rf /Users/$USERNAME/Library/Preferences/ByHost/com.apple.screensaver.$macUUID.plist +rm -rf /Users/$USERNAME/Library/Preferences/com.apple.screensaver.plist +rm -rf /Users/$USERNAME/Library/Preferences/ByHost/com.apple.screensaver.plist + +defaults write /Users/$USERNAME/Library/Preferences/com.apple.screensaver.$macUUID.plist idleTime -string 0 +defaults write /Users/$USERNAME/Library/Preferences/com.apple.screensaver.$macUUID.plist CleanExit "YES" +defaults write /Users/$USERNAME/Library/Preferences/ByHost/com.apple.screensaver.$macUUID.plist idleTime -string 0 +defaults write /Users/$USERNAME/Library/Preferences/ByHost/com.apple.screensaver.$macUUID.plist CleanExit "YES" +defaults write /Users/$USERNAME/Library/Preferences/com.apple.screensaver.plist idleTime -string 0 +defaults write /Users/$USERNAME/Library/Preferences/com.apple.screensaver.plist CleanExit "YES" +defaults write /Users/$USERNAME/Library/Preferences/ByHost/com.apple.screensaver.plist idleTime -string 0 +defaults write /Users/$USERNAME/Library/Preferences/ByHost/com.apple.screensaver.plist CleanExit "YES" + +chown -R $USERNAME:staff /Users/$USERNAME/Library/Preferences/ByHost/ +chown -R $USERNAME:staff /Users/$USERNAME/Library/Preferences/ + +killall cfprefsd + +# Set values to 0, to prevent sleep at all +pmset -a displaysleep 0 sleep 0 disksleep 0 diff --git a/images/macos/provision/configuration/shell-change.sh b/images/macos/provision/configuration/shell-change.sh new file mode 100644 index 00000000..a84216cb --- /dev/null +++ b/images/macos/provision/configuration/shell-change.sh @@ -0,0 +1,3 @@ +echo "Changing shell to bash" +sudo chsh -s /bin/bash $USERNAME +sudo chsh -s /bin/bash root \ No newline at end of file diff --git a/images/macos/provision/core/android-toolsets.sh b/images/macos/provision/core/android-toolsets.sh new file mode 100755 index 00000000..a3b8aa97 --- /dev/null +++ b/images/macos/provision/core/android-toolsets.sh @@ -0,0 +1,92 @@ +#!/bin/bash -e +source ~/utils/utils.sh + +ANDROID_PLATFORM_LIST=($(get_toolset_value '.android."platform-list"[]')) +ANDROID_BUILD_TOOLS=($(get_toolset_value '.android."build-tools"[]')) +ANDROID_EXTRA_LIST=($(get_toolset_value '.android."extra-list"[]')) +ANDROID_ADDON_LIST=($(get_toolset_value '.android."addon-list"[]')) + +# Get the latest command line tools from https://developer.android.com/studio/index.html +# Release note: https://developer.android.com/studio/releases/sdk-tools.html +ANDROID_OSX_SDK_LOCATION="https://dl.google.com/android/repository/sdk-tools-darwin-3859397.zip" +ANDROID_HOME=$HOME/Library/Android/sdk +ANDROID_OSX_SDK_FILE=tools-macosx.zip + +pushd $HOME + +# Prevent the warning of sdkmanager +mkdir $HOME/.android +echo "count=0" >> $HOME/.android/repositories.cfg + +echo "Downloading android sdk..." +curl -L -o $ANDROID_OSX_SDK_FILE $ANDROID_OSX_SDK_LOCATION + +echo "Uncompressing android sdk..." +unzip -q $ANDROID_OSX_SDK_FILE && rm -f $ANDROID_OSX_SDK_FILE +rm -rf $HOME/Library/Android/sdk +mkdir -p $HOME/Library/Android/sdk + +echo ANDROID_HOME is $ANDROID_HOME +mv tools $ANDROID_HOME + +export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin + +SDKMANAGER=$ANDROID_HOME/tools/bin/sdkmanager + +# Mark the different Android licenses as accepted +mkdir -p $ANDROID_HOME/licenses +echo "8933bad161af4178b1185d1a37fbf41ea5269c55 +d56f5187479451eabf01fb78af6dfcb131a6481e" >> $ANDROID_HOME/licenses/android-sdk-license +echo "84831b9409646a918e30573bab4c9c91346d8abd" >> $ANDROID_HOME/licenses/android-sdk-preview-license + +echo "Installing latest tools & platform tools..." +echo y | $SDKMANAGER "tools" "platform-tools" + +echo "Installing latest CMake..." +echo y | $SDKMANAGER "cmake;3.6.4111459" + +echo "Installing latest ndk..." +echo y | $SDKMANAGER "ndk-bundle" + +for platform_name in "${ANDROID_PLATFORM_LIST[@]}" +do + echo "Installing platform $platform_name ..." + echo y | $SDKMANAGER "platforms;$platform_name" +done + +for build_tools_version in "${ANDROID_BUILD_TOOLS[@]}" +do + echo "Installing build tools $build_tools_version ..." + echo y | $SDKMANAGER "build-tools;$build_tools_version" +done + +for extra_name in "${ANDROID_EXTRA_LIST[@]}" +do + echo "Installing extra $extra_name ..." + echo y | $SDKMANAGER "extras;$extra_name" +done + +# Intel x86 Emulator Accelerator (HAXM installer) +# see Issue 31164 notes +# Command needs to be run under sudo. +chmod +x $ANDROID_HOME/extras/intel/Hardware_Accelerated_Execution_Manager/silent_install.sh +sudo $ANDROID_HOME/extras/intel/Hardware_Accelerated_Execution_Manager/silent_install.sh + +for addon_name in "${ANDROID_ADDON_LIST[@]}" +do + echo "Installing add-on $addon_name ..." + echo y | $SDKMANAGER "add-ons;$addon_name" +done + +popd + +echo "Installing ProGuard-5..." +PROGUARD_LOCATION="https://github.com/Guardsquare/proguard/archive/proguard5.3.3.tar.gz" +pushd $ANDROID_HOME +cd tools +mv proguard proguard4 +mkdir proguard && cd proguard +curl -L -o proguard5.tgz $PROGUARD_LOCATION +tar xzf proguard5.tgz --strip 1 && rm -f proguard5.tgz +cp ../proguard4/proguard-*.txt . # Copy the Proguard Android definitions from the previous version +popd diff --git a/images/macos/provision/core/audiodevice.sh b/images/macos/provision/core/audiodevice.sh new file mode 100644 index 00000000..705490de --- /dev/null +++ b/images/macos/provision/core/audiodevice.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +echo "install soundflower" +brew cask install soundflower + +echo "install switchaudio-osx" +brew install switchaudio-osx + +echo "install sox" +brew install sox + +echo "set Soundflower (2ch) as input/output device" +SwitchAudioSource -s "Soundflower (2ch)" -t input +SwitchAudioSource -s "Soundflower (2ch)" -t output + +echo "grant microphone permission for simulators" +sudo sqlite3 ~/Library/Application\ Support/com.apple.TCC/TCC.db "insert into access values('kTCCServiceMicrophone','com.apple.CoreSimulator.SimulatorTrampoline', 0,1,1,NULL,NULL,NULL,'UNUSED',NULL,NULL,1576347152)" +sudo sqlite3 /Library/Application\ Support/com.apple.TCC/TCC.db "insert into access values('kTCCServiceMicrophone','/usr/local/opt/runner/runprovisioner.sh', 1,1,1,NULL,NULL,NULL,'UNUSED',NULL,NULL,1576661342)" +sudo sqlite3 ~/Library/Application\ Support/com.apple.TCC/TCC.db "insert into access values('kTCCServiceMicrophone','/usr/local/opt/runner/runprovisioner.sh', 1,1,1,NULL,NULL,NULL,'UNUSED',NULL,NULL,1576661342)" diff --git a/images/macos/provision/core/aws.sh b/images/macos/provision/core/aws.sh new file mode 100644 index 00000000..9e0063be --- /dev/null +++ b/images/macos/provision/core/aws.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +echo Installing aws... +brew install awscli + +echo Installing aws sam cli... +brew tap aws/tap +brew install aws-sam-cli + +echo "Install aws cli session manager" +brew cask install session-manager-plugin diff --git a/images/macos/provision/core/azcopy.sh b/images/macos/provision/core/azcopy.sh new file mode 100755 index 00000000..56b848e9 --- /dev/null +++ b/images/macos/provision/core/azcopy.sh @@ -0,0 +1,13 @@ +#!/bin/bash +set -e + +AZCOPY_DOWNLOAD_URL="https://aka.ms/downloadazcopy-v10-mac" + +wget -O "$HOME/azcopy.zip" "$AZCOPY_DOWNLOAD_URL" +unzip azcopy.zip -d azcopy +AZCOPY_EXTRACTED=$(echo azcopy/azcopy*) +cp "$AZCOPY_EXTRACTED/azcopy" "/usr/local/bin/azcopy" +chmod +x "/usr/local/bin/azcopy" + +echo "Done, cleaning up" +rm -rf azcopy* diff --git a/images/macos/provision/core/build-xcode-symlinks.sh b/images/macos/provision/core/build-xcode-symlinks.sh new file mode 100644 index 00000000..0cee8df8 --- /dev/null +++ b/images/macos/provision/core/build-xcode-symlinks.sh @@ -0,0 +1,20 @@ +set -e + +source ~/utils/utils.sh + +# Link the existing Xcodes into the correct location for provisionator. + +# These symlinks are necessary for Xamarin team to make sure that xamarin-provisionator can find them. + +# Old style provisionator directories. This is maintained for +# backwards compatibility only. Do not add new xcodes here. +ln -sf /Applications/Xcode_8.app /Applications/Xcode8.app +ln -sf /Applications/Xcode_8.1.app /Applications/Xcode81.app +ln -sf /Applications/Xcode_9.app /Applications/Xcode9.app +ln -sf /Applications/Xcode_9.1.app /Applications/Xcode91.app +ln -sf /Applications/Xcode_9.2.app /Applications/Xcode92.app +ln -sf /Applications/Xcode_9.3.app /Applications/Xcode93.app +ln -sf /Applications/Xcode_9.3.app /Applications/Xcode_9.3_beta.app +ln -sf /Applications/Xcode_9.4.app /Applications/Xcode_9.4-beta.app +ln -sf /Applications/Xcode_9.4.app /Applications/Xcode_9.4_beta.app +ln -sf /Applications/Xcode_9.4.app /Applications/Xcode_9.4_beta_2.app \ No newline at end of file diff --git a/images/macos/provision/core/chrome.sh b/images/macos/provision/core/chrome.sh new file mode 100644 index 00000000..203faee7 --- /dev/null +++ b/images/macos/provision/core/chrome.sh @@ -0,0 +1,11 @@ +echo "Installing Chrome..." +brew cask install google-chrome + +echo "Installing Chrome Driver" +brew cask install chromedriver + +echo "Installing Selenium" +brew install selenium-server-standalone + +CHROMEWEBDRIVER_DIR=$(readlink $(which chromedriver) | xargs dirname) +echo "export CHROMEWEBDRIVER=$CHROMEWEBDRIVER_DIR" >> "${HOME}/.bashrc" \ No newline at end of file diff --git a/images/macos/provision/core/cocoapods.sh b/images/macos/provision/core/cocoapods.sh new file mode 100755 index 00000000..edf2a85f --- /dev/null +++ b/images/macos/provision/core/cocoapods.sh @@ -0,0 +1,9 @@ +#!/bin/sh +echo "Installing Cocoapods..." + +# Setup the Cocoapods master repo +echo Setting up the Cocoapods master repository... +pod setup + +# Create a symlink to /usr/local/bin since it was removed due to Homebrew change. +ln -sf $(which pod) /usr/local/bin/pod \ No newline at end of file diff --git a/images/macos/provision/core/commonutils.sh b/images/macos/provision/core/commonutils.sh new file mode 100644 index 00000000..efa4d016 --- /dev/null +++ b/images/macos/provision/core/commonutils.sh @@ -0,0 +1,53 @@ +#!/bin/sh + +set -e + +source ~/utils/utils.sh +# brew install +binst_common_utils=( + carthage + xctool + cmake + bats + parallel + subversion + go + gnupg + llvm + libpq + zstd + packer + helm + aliyun-cli + bazelisk + github/gh/gh + p7zip + ant + yamllint + aria2 +) + +for package in ${binst_common_utils[@]}; do + echo "Install $package" + brew install $package +done + +# brew cask install +bcask_common_utils=( + julia + virtualbox + vagrant + r +) + +for package in ${bcask_common_utils[@]}; do + echo "Install $package" + brew cask install $package +done + +if ! is_HighSierra; then + brew install swiftlint +fi + +# Invoke bazel to download the latest bazel version via bazelisk +bazel diff --git a/images/macos/provision/core/delete-duplicate-sims.rb b/images/macos/provision/core/delete-duplicate-sims.rb new file mode 100644 index 00000000..d7ee50a1 --- /dev/null +++ b/images/macos/provision/core/delete-duplicate-sims.rb @@ -0,0 +1,155 @@ +#!/usr/bin/env ruby + +# What is this for? +# This script fixes an issue appeared for some Xcode users where it would show long identifiers +# in the list of simulators instead of usual short names. This is caused by duplicate simulators +# being sometimes created after switching between Xcode versions, with the same +# device type + runtime pair occurring more than once in your list of available simulators. +# Instead of showing the same simulator name twice, Xcode defaults to simulator identifiers. +# +# What it does? +# The script queries Xcode's `simctl` utility for all simulators you have, finds duplicate type + runtime pairs, +# and offers you to delete them. After that, Xcode should return to displaying the list of simulators normally. +# When searching for duplicates, the script sorts simulators by their creation time to make sure it deletes +# the copy that was created more recently. +# +# License +# This script was taken from https://gist.github.com/vlas-voloshin/f9982128200345cd3fb7 and some modifications made +# Distributed by MIT license, license can be found at the bottom of this script + +class SimDevice + + attr_accessor :runtime + attr_accessor :name + attr_accessor :identifier + attr_accessor :timestamp + + def initialize(runtime, name, identifier, timestamp) + @runtime = runtime + @name = name + @identifier = identifier + @timestamp = timestamp + end + + def to_s + return "#{@name} - #{@runtime} (#{@identifier}) [#{@timestamp}]" + end + + def equivalent_to_device(device) + return @runtime == device.runtime && @name == device.name + end + + end + + # Executes a shell command and returns the result from stdout + def execute_simctl_command(command) + return %x[xcrun simctl #{command}] + end + + # Retrieves the creation date/time of simulator with specified identifier + def simulator_creation_date(identifier) + directory = Dir.home() + "/Library/Developer/CoreSimulator/Devices/" + identifier + if (Dir.exists?(directory)) + if (File::Stat.method_defined?(:birthtime)) + return File.stat(directory).birthtime + else + return File.stat(directory).ctime + end + else + # Simulator directory is not yet created - treat it as if it was created right now (happens with new iOS 9 sims) + return Time.now + end + end + + # Deletes specified simulator + def delete_device(device) + execute_simctl_command("delete #{device.identifier}") + end + + puts("Searching for simulators...") + + # Retrieve the list of existing simulators + devices = [] + runtime = "" + execute_simctl_command("list devices").lines.each do |line| + case line[0] + when '=' + # First header, skip it + when '-' + # Runtime header + runtime = line.scan(/-- (.+?) --/).flatten[0] + else + name_and_identifier = line.scan(/\s+(.+?) \(([\w\d]+-[\w\d]+-[\w\d-]+)\)/)[0] + name = name_and_identifier[0] + identifier = name_and_identifier[1] + timestamp = simulator_creation_date(identifier) + device = SimDevice.new(runtime, name, identifier, timestamp) + devices.push(device) + end + end + + # Sort the simulators by their creation timestamp, ascending + devices = devices.sort { |a, b| a.timestamp <=> b.timestamp } + + duplicates = {} + # Enumerate all devices except for the last one + for i in 0..devices.count-2 + device = devices[i] + # Enumerate all devices *after* this one (created *later*) + for j in i+1..devices.count-1 + potential_duplicate = devices[j] + if potential_duplicate.equivalent_to_device(device) + duplicates[potential_duplicate] = device + # Break out of the inner loop if a duplicate is found - if another duplicate exists, + # it will be found when this one is reached in the outer loop + break + end + end + end + + if duplicates.count == 0 + puts("You don't have duplicate simulators!") + exit() + end + + puts("Looks like you have #{duplicates.count} duplicate simulator#{duplicates.count > 1 ? "s" : ""}:") + duplicates.each_pair do |duplicate, original| + puts + puts("#{duplicate}") + puts("--- duplicate of ---") + puts("#{original}") + end + puts + + puts("Each duplicate was determined as the one created later than the 'original'.") + + puts("Deleting...") + duplicates.each_key do |duplicate| + delete_device(duplicate) + end + + puts("Done!") + +=begin +MIT License + +Copyright (c) 2015-2019 Vlas Voloshin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +=end \ No newline at end of file diff --git a/images/macos/provision/core/dotnet.sh b/images/macos/provision/core/dotnet.sh new file mode 100755 index 00000000..4e8f7dfa --- /dev/null +++ b/images/macos/provision/core/dotnet.sh @@ -0,0 +1,68 @@ +#!/bin/sh + +########################################################################### +# The main idea of this script is to automate dotnet installs +# Based on: +# https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script +# +########################################################################### + +source ~/utils/utils.sh + +export DOTNET_CLI_TELEMETRY_OPTOUT=1 + +# Download installer from dot.net and keep it locally +DOTNET_INSTALL_SCRIPT="https://dotnet.microsoft.com/download/dotnet-core/scripts/v1/dotnet-install.sh" +curl -o "dotnet-install.sh" "$DOTNET_INSTALL_SCRIPT" +chmod +x ./dotnet-install.sh + +ARGS_LIST=() +echo "Parsing dotnet SDK (except rc and preview versions) from .json..." + +if is_Less_Catalina; then + DOTNET_CHANNELS=( + 'https://raw.githubusercontent.com/dotnet/core/master/release-notes/2.1/releases.json' + ) +else + DOTNET_CHANNELS=( + 'https://raw.githubusercontent.com/dotnet/core/master/release-notes/2.1/releases.json' + 'https://raw.githubusercontent.com/dotnet/core/master/release-notes/3.0/releases.json' + 'https://raw.githubusercontent.com/dotnet/core/master/release-notes/3.1/releases.json' + ) +fi + +for DOTNET_CHANNEL in "${DOTNET_CHANNELS[@]}"; do + # Old Mono versions don't support NuGet versions from .Net sdk >=2.1.6**, exclude them explicitly from Mojave and HS images + # https://rider-support.jetbrains.com/hc/en-us/articles/360004180039 + if is_Less_Catalina; then + ARGS_LIST+=( + $(curl -s "$DOTNET_CHANNEL" | \ + jq -r '.releases[].sdk."version"' | grep -v -E '\-(preview|rc)\d*' | grep -v -E '2.1.[6-9]\d*') + ) + else + ARGS_LIST+=( + $(curl -s "$DOTNET_CHANNEL" | \ + jq -r '.releases[].sdk."version"' | grep -v -E '\-(preview|rc)\d*') + ) + fi +done + +for ARGS in "${ARGS_LIST[@]}"; do + ./dotnet-install.sh --version $ARGS -NoPath +done + +rm ./dotnet-install.sh + +# dotnet installer doesn't create symlink to executable in /user/local/bin +# Moreover at that moment /user/local/bin doesn't exist (though already added to $PATH) +ln -s ~/.dotnet/dotnet /usr/local/bin/dotnet + +# Validate installation +if [ $(dotnet --list-sdks | wc -l) -lt "1" ]; then + echo "The .NET Core SDK is not installed" + exit 1 +fi + +echo 'export PATH="$PATH:$HOME/.dotnet/tools"' >> "$HOME/.bashrc" + +echo "Dotnet operations have been completed successfully..." diff --git a/images/macos/provision/core/edge.sh b/images/macos/provision/core/edge.sh new file mode 100644 index 00000000..81219f68 --- /dev/null +++ b/images/macos/provision/core/edge.sh @@ -0,0 +1,58 @@ +source ~/utils/utils.sh + +echo "Installing Microsoft Edge..." +brew cask install microsoft-edge + +EDGE_INSTALLATION_PATH="/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge" +EDGE_VERSION=$("$EDGE_INSTALLATION_PATH" --version | cut -d' ' -f 3) +EDGE_VERSION_MAJOR=$(echo $EDGE_VERSION | cut -d'.' -f 1) + +echo "Version of Microsoft Edge: ${EDGE_VERSION}" + +echo "Installing Microsoft Edge WebDriver..." + +EDGE_DRIVER_VERSION_URL="https://msedgedriver.azureedge.net/LATEST_RELEASE_${EDGE_VERSION_MAJOR}" +EDGE_DRIVER_LATEST_VERSION=$(curl -s "$EDGE_DRIVER_VERSION_URL" | iconv -f utf-16 -t utf-8 | tr -d '\r') +EDGE_DRIVER_URL="https://msedgedriver.azureedge.net/${EDGE_DRIVER_LATEST_VERSION}/edgedriver_mac64.zip" + +echo "Compatible version of WebDriver: ${EDGE_DRIVER_LATEST_VERSION}" + +pushd "/tmp" > /dev/null +download_with_retries $EDGE_DRIVER_URL "." "edgedriver.zip" + +# Move webdriver to the separate directory to be consistent with the docs +# https://docs.microsoft.com/en-us/azure/devops/pipelines/test/continuous-test-selenium?view=azure-devops#decide-how-you-will-deploy-and-test-your-app + +APPLICATION="/usr/local/bin/msedgedriver" +EDGEDRIVER_DIR="/usr/local/share/edge_driver" +EDGEDRIVER_BIN="$EDGEDRIVER_DIR/msedgedriver" + +mkdir -p $EDGEDRIVER_DIR + +unzip "edgedriver.zip" -d $EDGEDRIVER_DIR +ln -s "$EDGEDRIVER_BIN" $APPLICATION +echo "export EDGEWEBDRIVER=${EDGEDRIVER_DIR}" >> "${HOME}/.bashrc" +popd > /dev/null + +#Delete Microsoft autoupdate service to prevent autoupdates popup +AUTOUPDATE_START="$HOME/Library/Preferences/com.microsoft.autoupdate2.plist" +while [ ! -f "$AUTOUPDATE_START" ] +do + echo "Wait for MS update automatic installation" + sleep 30 +done + +echo "kill autoupdate process" +ps -ef | grep [M]icrosoft | awk '{print $2}' | sudo xargs kill -9 +echo "remove autupdate service" +sudo launchctl remove com.microsoft.autoupdate.helper + +echo "delete autoupdate files" +sudo rm -rf "$HOME/Library/Application Support/Microsoft AU Daemon/" +sudo rm -rf "$HOME/Library/Application Support/Microsoft AutoUpdate/" +sudo rm -rf "$HOME/Library/Preferences/com.microsoft.autoupdate2.plist" +sudo rm -rf "$HOME/Library/Preferences/com.microsoft.autoupdate.fba.plist" +sudo rm -rf "$HOME/Library/Caches/com.microsoft.autoupdate2" +sudo rm -rf "/Library/Application Support/Microsoft/MAU2.0/" +sudo rm -rf "/Library/LaunchAgents/com.microsoft.update.agent.plist" +sudo rm -rf "/Library/PrivelegedHelperTools/com.microsoft.autoupdate.helper" diff --git a/images/macos/provision/core/firefox.sh b/images/macos/provision/core/firefox.sh new file mode 100644 index 00000000..f6a90d61 --- /dev/null +++ b/images/macos/provision/core/firefox.sh @@ -0,0 +1,8 @@ +echo "Installing Firefox..." +brew cask install firefox + +echo "Installing Geckodriver..." +brew install geckodriver + +echo "Add GECKOWEBDRIVER to bashrc..." +echo "export GECKOWEBDRIVER=$(brew --prefix geckodriver)/bin" >> "${HOME}/.bashrc" \ No newline at end of file diff --git a/images/macos/provision/core/gcc.sh b/images/macos/provision/core/gcc.sh new file mode 100644 index 00000000..febc0760 --- /dev/null +++ b/images/macos/provision/core/gcc.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +echo "Installing GCC@8 using homebrew..." +brew install gcc@8 + +echo "Installing GCC@9 using homebrew..." +brew install gcc@9 \ No newline at end of file diff --git a/images/macos/provision/core/git.sh b/images/macos/provision/core/git.sh new file mode 100644 index 00000000..55feb92b --- /dev/null +++ b/images/macos/provision/core/git.sh @@ -0,0 +1,28 @@ +echo Installing Git... +brew install git + +echo Installing Git LFS +brew install git-lfs +# Update global git config +git lfs install +# Update system git config +sudo git lfs install --system + +echo Installing Hub +brew install hub + +echo Disable all the Git help messages... +git config --global advice.pushUpdateRejected false +git config --global advice.pushNonFFCurrent false +git config --global advice.pushNonFFMatching false +git config --global advice.pushAlreadyExists false +git config --global advice.pushFetchFirst false +git config --global advice.pushNeedsForce false +git config --global advice.statusHints false +git config --global advice.statusUoption false +git config --global advice.commitBeforeMerge false +git config --global advice.resolveConflict false +git config --global advice.implicitIdentity false +git config --global advice.detachedHead false +git config --global advice.amWorkDir false +git config --global advice.rmHints false \ No newline at end of file diff --git a/images/macos/provision/core/haskell.sh b/images/macos/provision/core/haskell.sh new file mode 100644 index 00000000..33fa38db --- /dev/null +++ b/images/macos/provision/core/haskell.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh +export PATH="$HOME/.ghcup/bin:$PATH" +echo 'export PATH="$PATH:$HOME/.ghcup/bin"' >> "$HOME/.bashrc" + +availableVersions=$(ghcup list | grep -v "prerelease" | grep "ghc " | awk '{print $3}') +minorMajorVersions=$(echo "$availableVersions" | cut -d"." -f 1,2 | uniq | tail -n3) +for majorMinorVersion in $minorMajorVersions; do + fullVersion=$(echo "$availableVersions" | grep "$majorMinorVersion." | tail -n1) + echo "install ghc version $fullVersion..." + ghcup install $fullVersion + ghcup set $fullVersion +done + +echo "install cabal..." +ghcup install-cabal diff --git a/images/macos/provision/core/homebrew.sh b/images/macos/provision/core/homebrew.sh new file mode 100755 index 00000000..01b0fb0f --- /dev/null +++ b/images/macos/provision/core/homebrew.sh @@ -0,0 +1,24 @@ +#!/bin/sh +echo "Installing Homebrew..." + +source ~/utils/utils.sh + +echo Installing Homebrew... +HOMEBREW_INSTALL_URL="https://raw.githubusercontent.com/Homebrew/install/master/install.sh" + +/bin/bash -c "$(curl -fsSL ${HOMEBREW_INSTALL_URL})" + +echo Disabling Homebrew analytics... +brew analytics off + +echo Installing the last version of curl +brew install curl + +echo Installing wget... +brew install wget + +echo Installing jq +brew install jq + +# init brew bundle feature +brew tap Homebrew/bundle \ No newline at end of file diff --git a/images/macos/provision/core/miniconda.sh b/images/macos/provision/core/miniconda.sh new file mode 100644 index 00000000..b214b352 --- /dev/null +++ b/images/macos/provision/core/miniconda.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +MINICONDA_INSTALLER="/tmp/miniconda.sh" +curl -sL https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -o $MINICONDA_INSTALLER +chmod +x $MINICONDA_INSTALLER +sudo $MINICONDA_INSTALLER -b -p /usr/local/miniconda + +sudo ln -s /usr/local/miniconda/bin/conda /usr/local/bin/conda + +if [ -d "$HOME/.conda" ]; then + sudo chown -R $USER "$HOME/.conda" +fi \ No newline at end of file diff --git a/images/macos/provision/core/mongodb.sh b/images/macos/provision/core/mongodb.sh new file mode 100644 index 00000000..1b6a5a8d --- /dev/null +++ b/images/macos/provision/core/mongodb.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +# MongoDB object-value database +# installs last version of MongoDB Community Edition +# https://docs.mongodb.com/manual/tutorial/install-mongodb-on-os-x/v + +echo "Installing mongodb..." + +brew tap mongodb/brew +brew install mongodb-community \ No newline at end of file diff --git a/images/macos/provision/core/node.sh b/images/macos/provision/core/node.sh new file mode 100644 index 00000000..f5bb099f --- /dev/null +++ b/images/macos/provision/core/node.sh @@ -0,0 +1,45 @@ +source ~/utils/utils.sh + +node_common_modules=( + node-gyp + mobile-center-cli +) + +node_catalina_modules=( + appcenter-cli + newman +) + +if is_Less_Catalina; then + echo Installing the latest Node JS 8... + TMP_FILE=/tmp/node-v8.17.0.pkg + NODEURL=https://nodejs.org/dist/latest-v8.x/node-v8.17.0.pkg + curl "${NODEURL}" -o "${TMP_FILE}" + sudo installer -pkg "${TMP_FILE}" -target / + rm -rf "${TMP_FILE}" + sudo chown -R $USER "/usr/local/lib/node_modules" + + echo Installing NPM 3.x.x... + npm install -g npm@3 + npm config set prefix /usr/local + + echo Installing App Center CLI... + npm install -g appcenter-cli@^1.0.0 +else + # Install Node.JS 12 for macOS >= 10.15 + brew install node@12 + brew link node@12 --force + + for module in ${node_catalina_modules[@]}; do + echo "Install $module" + npm install -g $module + done +fi + +echo Installing yarn... +curl -o- -L https://yarnpkg.com/install.sh | bash + +for module in ${node_common_modules[@]}; do + echo "Install $module" + npm install -g $module +done diff --git a/images/macos/provision/core/nvm.sh b/images/macos/provision/core/nvm.sh new file mode 100755 index 00000000..544bf2a3 --- /dev/null +++ b/images/macos/provision/core/nvm.sh @@ -0,0 +1,35 @@ +#!/bin/sh + +########################################################################### +# The script installs node version manager with node versions 6,8,10 and 12 +# +########################################################################### +source ~/utils/utils.sh + +curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.35.3/install.sh | bash + +if [ $? -eq 0 ]; then + . ~/.bashrc + nvm --version + nvm install lts/boron # 6.x + nvm install lts/carbon # 8.x + nvm install lts/dubnium # 10.x + nvm install lts/erbium # 12.x + nvm install v13 # 13.x + nvm install v14 # 14.x + nvm alias node6 lts/boron + nvm alias node8 lts/carbon + nvm alias node10 lts/dubnium + nvm alias node12 lts/erbium + nvm alias node13 v13 + nvm alias node14 v14 + + if is_Catalina || is_BigSur; then + # set system node as default + nvm alias default system + fi +else + echo error +fi + +echo "Node version manager has been installed successfully" diff --git a/images/macos/provision/core/openjdk.sh b/images/macos/provision/core/openjdk.sh new file mode 100644 index 00000000..ca2c5f01 --- /dev/null +++ b/images/macos/provision/core/openjdk.sh @@ -0,0 +1,53 @@ +#!/bin/sh + +set -e + +source ~/utils/utils.sh + +installAzulJDK() { + local URL=$1 + local TMP_FILE=/tmp/openjdk.dmg + local TMP_MOUNT=`/usr/bin/mktemp -d /tmp/zulu.XXXX` + # Download dmg + curl "${URL}" -o "${TMP_FILE}" + # Attach dmg + hdiutil attach "${TMP_FILE}" -mountpoint "${TMP_MOUNT}" + # Install pkg + sudo installer -pkg "${TMP_MOUNT}/"*.pkg -target / + # Detach dmg + hdiutil detach "${TMP_MOUNT}" + # Remove dmg + rm -rf "${TMP_FILE}" +} + +createEnvironmentVariable() { + local VARIABLE_NAME=$1 + local JAVA_VERSION=$2 + if [[ $JAVA_VERSION == "7" || $JAVA_VERSION == "8" ]]; then + JAVA_VERSION="1.${JAVA_VERSION}" + fi + local JAVA_PATH=$(/usr/libexec/java_home -v${JAVA_VERSION}) + echo "export ${VARIABLE_NAME}=${JAVA_PATH}" >> "${HOME}/.bashrc" +} + +brew tap AdoptOpenJDK/openjdk + +JAVA_VERSIONS_LIST=($(get_toolset_value '.java.versions | .[]')) +JAVA_DEFAULT=$(get_toolset_value '.java.default') +for JAVA_VERSION in "${JAVA_VERSIONS_LIST[@]}" +do + if [[ $JAVA_VERSION == "7" ]]; then + installAzulJDK "https://cdn.azul.com/zulu/bin/zulu7.40.0.15-ca-jdk7.0.272-macosx_x64.dmg" + else + brew cask install "adoptopenjdk${JAVA_VERSION}" + fi + createEnvironmentVariable "JAVA_HOME_${JAVA_VERSION}_X64" $JAVA_VERSION +done + +createEnvironmentVariable "JAVA_HOME" $JAVA_DEFAULT + +echo Installing Maven... +brew install maven + +echo Installing Gradle ... +brew install gradle \ No newline at end of file diff --git a/images/macos/provision/core/openssl.sh b/images/macos/provision/core/openssl.sh new file mode 100755 index 00000000..3b66441c --- /dev/null +++ b/images/macos/provision/core/openssl.sh @@ -0,0 +1,26 @@ +#!/bin/sh +echo "Installing OpenSSL..." +export PATH="/usr/local/bin:/usr/local/sbin:~/bin:$PATH" + +echo Installing OpenSSL... +/usr/local/bin/brew install openssl +/usr/local/bin/brew link openssl --force + +# Install OpenSSL 1.0.2t +# https://www.openssl.org/policies/releasestrat.html - Version 1.0.2 will be supported until 2019-12-31 (LTS) +# To preserve backward compatibility with ruby-toolcache +/usr/local/bin/brew tap-new local/openssl +FORMULA_PATH=$(/usr/local/bin/brew extract openssl local/openssl | grep "Homebrew/Library/Taps") +/usr/local/bin/brew install $FORMULA_PATH + +# Set OpenSSL 1.0.2t as default +ln -sf /usr/local/Cellar/openssl@1.0.2t /usr/local/Cellar/openssl +ln -sf /usr/local/Cellar/openssl/1.0.2t/bin/openssl /usr/local/bin/openssl +rm /usr/local/opt/openssl +ln -sf ../Cellar/openssl/1.0.2t /usr/local/opt/openssl + +# Resolve dot net core openssl dependency issue for agent +# https://github.com/microsoft/azure-pipelines-agent/blob/master/docs/start/envosx.md +mkdir -p /usr/local/lib/ +ln -s /usr/local/opt/openssl@1.0.2t/lib/libcrypto.1.0.0.dylib /usr/local/lib/ +ln -s /usr/local/opt/openssl@1.0.2t/lib/libssl.1.0.0.dylib /usr/local/lib/ \ No newline at end of file diff --git a/images/macos/provision/core/php.sh b/images/macos/provision/core/php.sh new file mode 100644 index 00000000..08c19f94 --- /dev/null +++ b/images/macos/provision/core/php.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +echo Installing PHP +brew install php + +echo Installing composer +brew install composer \ No newline at end of file diff --git a/images/macos/provision/core/postgresql.sh b/images/macos/provision/core/postgresql.sh new file mode 100644 index 00000000..f69e078a --- /dev/null +++ b/images/macos/provision/core/postgresql.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +#Install latest version of postgresql +brew install postgres + +#Service postgresql should be started before use. +brew services start postgresql + +#Verify that PostgreSQL is ready for accept incoming connections. +# exit codes: +# ready - 0 +# reject - 1 +# connection timeout - 2 +# incorrect credentials or parameters - 3 +pg_isready + +#Stop postgresql +brew services stop postgresql \ No newline at end of file diff --git a/images/macos/provision/core/powershell.sh b/images/macos/provision/core/powershell.sh new file mode 100644 index 00000000..5717adc7 --- /dev/null +++ b/images/macos/provision/core/powershell.sh @@ -0,0 +1,34 @@ +source ~/utils/utils.sh + +echo Installing Azure CLI... +brew install azure-cli + +echo Installing PowerShell... +brew cask install powershell + +# A dummy call of `az` to initialize ~/.azure directory before the modules are installed +az -v + +# Install PowerShell modules +psModules=$(get_toolset_value '.powershellModules[].name') +for module in ${psModules[@]}; do + echo "Installing $module module" + moduleVersions="$(get_toolset_value ".powershellModules[] | select(.name==\"$module\") | .versions[]?")" + if [[ -z "$moduleVersions" ]];then + pwsh -command "& {Install-Module $module -Force -Scope AllUsers}" + else + for version in ${moduleVersions[@]}; do + echo " - $version" + pwsh -command "& {Install-Module $module -RequiredVersion $version -Force -Scope AllUsers}" + done + fi +done + +# Enables AzureRm prefix aliases for Az modules +sudo pwsh -command "& {Import-Module Az; Enable-AzureRmAlias -Scope LocalMachine}" + +# powershell link was removed in powershell-6.0.0-beta9 +sudo ln -s /usr/local/bin/pwsh /usr/local/bin/powershell + +# fix ~/.azure directory permissions +sudo chown -R ${USER}: $HOME/.azure \ No newline at end of file diff --git a/images/macos/provision/core/pypy.sh b/images/macos/provision/core/pypy.sh new file mode 100644 index 00000000..a57f0ebb --- /dev/null +++ b/images/macos/provision/core/pypy.sh @@ -0,0 +1,84 @@ +#!/bin/bash +################################################################################ +## File: pypy.sh +## Desc: Installs PyPy +################################################################################ +source ~/utils/utils.sh +set -e + +function InstallPyPy +{ + PACKAGE_URL=$1 + + PACKAGE_TAR_NAME=$(echo $PACKAGE_URL | awk -F/ '{print $NF}') + echo "Downloading tar archive '$PACKAGE_TAR_NAME' - '$PACKAGE_URL'" + PACKAGE_TAR_TEMP_PATH="/tmp/$PACKAGE_TAR_NAME" + wget -q -O $PACKAGE_TAR_TEMP_PATH $PACKAGE_URL + + echo "Expand '$PACKAGE_TAR_NAME' to the /tmp folder" + tar xf $PACKAGE_TAR_TEMP_PATH -C /tmp + + # Get Python version + PACKAGE_NAME=${PACKAGE_TAR_NAME/.tar.bz2/} + MAJOR_VERSION=$(echo ${PACKAGE_NAME/pypy/} | cut -d. -f1) + PYTHON_MAJOR="python$MAJOR_VERSION" + + if [ $MAJOR_VERSION != 2 ]; then + PYPY_MAJOR="pypy$MAJOR_VERSION" + else + PYPY_MAJOR="pypy" + fi + + PACKAGE_TEMP_FOLDER="/tmp/$PACKAGE_NAME" + PYTHON_FULL_VERSION=$("$PACKAGE_TEMP_FOLDER/bin/$PYPY_MAJOR" -c "import sys;print('{}.{}.{}'.format(sys.version_info[0],sys.version_info[1],sys.version_info[2]))") + + # PyPy folder structure + PYPY_TOOLCACHE_PATH=$AGENT_TOOLSDIRECTORY/PyPy + PYPY_TOOLCACHE_VERSION_PATH=$PYPY_TOOLCACHE_PATH/$PYTHON_FULL_VERSION + PYPY_TOOLCACHE_VERSION_ARCH_PATH=$PYPY_TOOLCACHE_VERSION_PATH/x64 + + echo "Check if PyPy hostedtoolcache folder exist..." + if [ ! -d $PYPY_TOOLCACHE_PATH ]; then + mkdir -p $PYPY_TOOLCACHE_PATH + fi + + echo "Create PyPy '$PYPY_TOOLCACHE_VERSION_PATH' folder" + mkdir $PYPY_TOOLCACHE_VERSION_PATH + + echo "Move PyPy '$PACKAGE_TEMP_FOLDER' binaries to '$PYPY_TOOLCACHE_VERSION_ARCH_PATH' folder" + mv $PACKAGE_TEMP_FOLDER $PYPY_TOOLCACHE_VERSION_ARCH_PATH + + echo "Create additional symlinks (Required for UsePythonVersion Azure DevOps task)" + cd $PYPY_TOOLCACHE_VERSION_ARCH_PATH/bin + ln -s $PYPY_MAJOR $PYTHON_MAJOR + ln -s $PYTHON_MAJOR python + + chmod +x ./python ./$PYTHON_MAJOR + + echo "Install latest Pip" + ./python -m ensurepip + ./python -m pip install --ignore-installed pip + + echo "Create complete file" + touch $PYPY_TOOLCACHE_VERSION_PATH/x64.complete + + echo "Remove '$PACKAGE_TAR_TEMP_PATH'" + rm -f $PACKAGE_TAR_TEMP_PATH +} + +# PyPy 7.3.1 relies on system libffi.6.dylib, which is not existed in in libffi 3.3 release. As a workaround symlink can be created +ln -s libffi.7.dylib /usr/local/opt/libffi/lib/libffi.6.dylib + +uri="https://downloads.python.org/pypy/" +pypyVersions=$(curl -4 -s --compressed $uri | grep 'osx64' | awk -v uri="$uri" -F'>|<' '{print uri$5}') + +toolsetVersions=$(get_toolset_value '.toolcache[] | select(.name | contains("PyPy")) | .versions[]') + +for toolsetVersion in $toolsetVersions; do + latestMajorPyPyVersion=$(echo "${pypyVersions}" | grep -E "pypy${toolsetVersion}-v[0-9]+\.[0-9]+\.[0-9]+-" | head -1) + if [[ -z "$latestMajorPyPyVersion" ]]; then + echo "Failed to get PyPy version '$toolsetVersion'" + exit 1 + fi + InstallPyPy $latestMajorPyPyVersion +done \ No newline at end of file diff --git a/images/macos/provision/core/python.sh b/images/macos/provision/core/python.sh new file mode 100755 index 00000000..05b135e1 --- /dev/null +++ b/images/macos/provision/core/python.sh @@ -0,0 +1,10 @@ +echo "Installing Python Tooling" + +echo "Brew Installing Python 3" +/usr/local/bin/brew install python3 + +echo "Brew Installing Python 2" +# Create local tap with formula due to python2 formula depreciation +/usr/local/bin/brew tap-new local/python2 +FORMULA_PATH=$(/usr/local/bin/brew extract python@2 local/python2 | grep "Homebrew/Library/Taps") +/usr/local/bin/brew install $FORMULA_PATH diff --git a/images/macos/provision/core/reboot.sh b/images/macos/provision/core/reboot.sh new file mode 100644 index 00000000..a6e44435 --- /dev/null +++ b/images/macos/provision/core/reboot.sh @@ -0,0 +1,2 @@ +#!/bin/bash +shutdown -r now \ No newline at end of file diff --git a/images/macos/provision/core/ruby.sh b/images/macos/provision/core/ruby.sh new file mode 100755 index 00000000..912b0005 --- /dev/null +++ b/images/macos/provision/core/ruby.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +set -e + +if [ $(id -u) -eq 0 ]; then + echo "This script can not run as root. Aborting..." + exit 1 +fi + +# We can't install latest ruby 2.7 as a default version related with bug +# https://github.com/fastlane/fastlane/issues/15397 +echo Installing Ruby... +/usr/local/bin/brew install ruby@2.6 +ln -sf /usr/local/opt/ruby\@2.6 /usr/local/opt/ruby diff --git a/images/macos/provision/core/rubygem.sh b/images/macos/provision/core/rubygem.sh new file mode 100755 index 00000000..6872e57e --- /dev/null +++ b/images/macos/provision/core/rubygem.sh @@ -0,0 +1,29 @@ +#!/bin/sh +source ~/utils/utils.sh + +echo Updating RubyGems... +gem update --system + +echo Installing xcode-install utility... +gem install xcode-install --force + +echo Installing CocoaPods... +gem install cocoapods + +# fix nomad-cli installation +if is_HighSierra; then + brew install libxml2 + gem install nokogiri -v 1.6.8.1 -- --use-system-libraries --with-xml2-include=$(brew --prefix libxml2)/include/libxml2 +fi + +echo Installing nomad-cli... +gem install nomad-cli + +echo Installing xcpretty... +gem install xcpretty + +echo Installing bundler... +gem install bundler --force + +echo Installing fastlane tools... +gem install fastlane \ No newline at end of file diff --git a/images/macos/provision/core/rust.sh b/images/macos/provision/core/rust.sh new file mode 100644 index 00000000..5ef7675c --- /dev/null +++ b/images/macos/provision/core/rust.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +set -e + +echo Installing Rustup... +brew install rustup-init + +echo Installing Rust language... +rustup-init -y --no-modify-path --default-toolchain=stable --profile=minimal + +echo Initialize environment variables... +CARGO_HOME=$HOME/.cargo +source $CARGO_HOME/env + +echo Install common tools... +cargo install bindgen cbindgen cargo-audit cargo-outdated + +echo Cleanup Cargo registry cached data... +rm -rf $CARGO_HOME/registry/* \ No newline at end of file diff --git a/images/macos/provision/core/stack.sh b/images/macos/provision/core/stack.sh new file mode 100644 index 00000000..81b41fa8 --- /dev/null +++ b/images/macos/provision/core/stack.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +echo "Get the latest Stack version..." +StackRelease=$(curl -s "https://api.github.com/repos/commercialhaskell/stack/releases/latest") +DownloadUrl=$(echo $StackRelease | jq -r '.assets[].browser_download_url | select(contains("osx-x86_64.tar.gz"))' | head -n 1) +StackVersion=$(echo $StackRelease | jq -r '.name' | cut -c2-) +StackArchive="/tmp/stack.tar.gz" + +echo "Download stack version $StackVersion..." +wget $DownloadUrl -O $StackArchive + +StackToolcachePath="$AGENT_TOOLSDIRECTORY/stack/$StackVersion" +DestinationPath="$StackToolcachePath/x64" + +mkdir -p $DestinationPath + +echo "Unzip stack archive..." +tar -xzf $StackArchive -C $DestinationPath --strip 1 + +touch $StackToolcachePath/x64.complete + +echo "export PATH="\$PATH":$DestinationPath" >> "$HOME/.bashrc" diff --git a/images/macos/provision/core/toolcache-high-sierra.sh b/images/macos/provision/core/toolcache-high-sierra.sh new file mode 100644 index 00000000..61a3cc8c --- /dev/null +++ b/images/macos/provision/core/toolcache-high-sierra.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +########################################################################### +# The script downloads macos hosted tool cache for several Python versions +# and installs them onto the system +# +########################################################################### + +SOURCE_URL="https://vstsagenttools.blob.core.windows.net/tools" +PACKAGES_DIR=/tmp/hostedtoolcache + +# Download hosted tool cache with azcopy +azcopy copy $SOURCE_URL $PACKAGES_DIR --include-path "hostedtoolcache/macos-10.13" --recursive +mv $PACKAGES_DIR/tools/hostedtoolcache/macos-10.13/* $PACKAGES_DIR + +if [ $? -ne 0 ]; then + echo "An error occured while downloading hostedtoolcache" + exit 1 +fi + +# Install the tools from the hosted tool cache +packages=$(find $PACKAGES_DIR -name package.json) +for package in $packages; do + pushd $(dirname $package) + npm install + popd +done; diff --git a/images/macos/provision/core/toolcache.sh b/images/macos/provision/core/toolcache.sh new file mode 100755 index 00000000..eb6dc905 --- /dev/null +++ b/images/macos/provision/core/toolcache.sh @@ -0,0 +1,38 @@ +#!/bin/sh + +# Download hosted tool cache with npm +NPM_FEED="npm.pkg.github.com" +TOOLSET_PATH="$HOME/image-generation/toolcache.json" + +echo "Installing npm-toolcache..." +PACKAGE_LIST=($(jq -r 'keys | .[]' $TOOLSET_PATH)) + +# Execute in /tmp folder to avoid node_modules creation in $HOME +pushd /tmp + +# GitHub Package Registry doesn't support downloading public packages without auth so we have to authorize +# Put the .npmrc to /tmp directory on the image to make sure that it will deleted after image generation +echo "Configure auth for github package registry" +echo "@actions:registry=https://${NPM_FEED}/" >> ".npmrc" +echo "//${NPM_FEED}/:_authToken=${GITHUB_FEED_TOKEN}" >> ".npmrc" + +echo "Install packages..." +for PACKAGE_NAME in ${PACKAGE_LIST[@]}; do + PACKAGE_VERSIONS=($(jq -r ".[\"$PACKAGE_NAME\"] | .[]" $TOOLSET_PATH)) + for PACKAGE_VERSION in ${PACKAGE_VERSIONS[@]}; do + echo "Install ${PACKAGE_NAME}@${PACKAGE_VERSION}" + + npm install ${PACKAGE_NAME}@${PACKAGE_VERSION} + + exit_code=$? + if [ $exit_code -ne 0 ]; then + echo "${PACKAGE_NAME}@${PACKAGE_VERSION} installation failure; Error:${exit_code}" + + exit 1 + fi + done; +done; + +rm -f ".npmrc" + +popd \ No newline at end of file diff --git a/images/macos/provision/core/toolset.ps1 b/images/macos/provision/core/toolset.ps1 new file mode 100644 index 00000000..bc016c4b --- /dev/null +++ b/images/macos/provision/core/toolset.ps1 @@ -0,0 +1,58 @@ +################################################################################ +## File: toolset.ps1 +## Team: CI-Build +## Desc: Install toolset +################################################################################ + +Function Get-ToolcacheFromToolset { + $toolsetPath = Join-Path $env:HOME "image-generation" "toolset.json" + $toolsetJson = Get-Content -Raw $toolsetPath | ConvertFrom-Json + return $toolsetJson.toolcache +} + +Function Install-Asset { + param( + [Parameter(Mandatory=$true)] + [object] $ReleaseAsset + ) + + $assetFolderPath = Join-Path "/tmp" "$($ReleaseAsset.filename)-temp-dir" + New-Item -ItemType Directory -Path $assetFolderPath | Out-Null + $assetArchivePath = Join-Path $assetFolderPath $ReleaseAsset.filename + + Write-Host "Download $($ReleaseAsset.filename) archive to the $assetFolderPath folder..." + wget -P $assetFolderPath $ReleaseAsset.download_url --retry-connrefused --retry-on-http-error=429,500,503 --wait=30 --no-verbose + + Write-Host "Extract $($ReleaseAsset.filename) content..." + tar -xzf $assetArchivePath -C $assetFolderPath + + Write-Host "Invoke installation script..." + Push-Location -Path $assetFolderPath + Invoke-Expression "bash ./setup.sh" + Pop-Location +} + +# Get toolcache content from toolset +$toolsToInstall = @("Python", "Node", "Go") +$tools = Get-ToolcacheFromToolset | Where-Object {$ToolsToInstall -contains $_.Name} + +foreach ($tool in $tools) { + # Get versions manifest for current tool + $assets = Invoke-RestMethod $tool.url + + # Get github release asset for each version + foreach ($version in $tool.versions) { + $asset = $assets | Where-Object version -like $version ` + | Select-Object -ExpandProperty files ` + | Where-Object { ($_.platform -eq $tool.platform) -and ($_.arch -eq $tool.arch) -and ($_.platform_version -eq $tool.platform_version)} ` + | Select-Object -First 1 + + Write-Host "Installing $($tool.name) $version..." + if ($null -ne $asset) { + Install-Asset -ReleaseAsset $asset + } else { + Write-Host "Asset was not found in versions manifest" + exit 1 + } + } +} \ No newline at end of file diff --git a/images/macos/provision/core/vcpkg.sh b/images/macos/provision/core/vcpkg.sh new file mode 100644 index 00000000..289d7ba4 --- /dev/null +++ b/images/macos/provision/core/vcpkg.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +set -e +source ~/utils/utils.sh + +# Set env variable for vcpkg +VCPKG_INSTALLATION_ROOT=/usr/local/share/vcpkg +echo "export VCPKG_INSTALLATION_ROOT=${VCPKG_INSTALLATION_ROOT}" | tee -a ~/.bashrc + +# Install vcpkg +git clone --depth=1 https://github.com/Microsoft/vcpkg $VCPKG_INSTALLATION_ROOT +$VCPKG_INSTALLATION_ROOT/bootstrap-vcpkg.sh +$VCPKG_INSTALLATION_ROOT/vcpkg integrate install +chmod -R 0777 $VCPKG_INSTALLATION_ROOT +ln -sf $VCPKG_INSTALLATION_ROOT/vcpkg /usr/local/bin diff --git a/images/macos/provision/core/vsmac.sh b/images/macos/provision/core/vsmac.sh new file mode 100644 index 00000000..9774e486 --- /dev/null +++ b/images/macos/provision/core/vsmac.sh @@ -0,0 +1,27 @@ +#!/bin/sh +source ~/utils/utils.sh +source ~/utils/xamarin-utils.sh + +VSMAC_VERSION=$(get_toolset_value '.xamarin.vsmac') +VSMAC_DOWNLOAD_URL=$(buildVSMacDownloadUrl $VSMAC_VERSION) + +TMPMOUNT=`/usr/bin/mktemp -d /tmp/visualstudio.XXXX` +TMPMOUNT_DOWNLOADS="$TMPMOUNT/downloads" +mkdir $TMPMOUNT_DOWNLOADS + +download_with_retries $VSMAC_DOWNLOAD_URL $TMPMOUNT_DOWNLOADS + +echo "Mounting Visual studio..." +VISUAL_STUDIO_NAME=${VSMAC_DOWNLOAD_URL##*/} +hdiutil attach "$TMPMOUNT_DOWNLOADS/$VISUAL_STUDIO_NAME" -mountpoint "$TMPMOUNT" + +echo "Moving Visual Studio to /Applications/..." +pushd $TMPMOUNT +tar cf - "./Visual Studio.app" | tar xf - -C /Applications/ + +echo "Launching vstools..." +/Applications/Visual\ Studio.app/Contents/MacOS/vstool + +popd +sudo hdiutil detach "$TMPMOUNT" +sudo rm -rf "$TMPMOUNT" \ No newline at end of file diff --git a/images/macos/provision/core/xamarin-android-ndk.sh b/images/macos/provision/core/xamarin-android-ndk.sh new file mode 100644 index 00000000..35e4d006 --- /dev/null +++ b/images/macos/provision/core/xamarin-android-ndk.sh @@ -0,0 +1,64 @@ +#!/bin/sh +source ~/utils/utils.sh + +ANDROID_HOME=$HOME/Library/Android/sdk +ANDROID_NDK_HOME=$ANDROID_HOME/ndk-bundle +SDKMANAGER=$ANDROID_HOME/tools/bin/sdkmanager + +# Android NDK v16 is not compatible with old Xamarin.Android SDK +# and fails builds with BundleAssemblies enabled +ANDROID_NDK_15_HOME=$HOME/Library/Android/sdk/android-ndk-r15c +ANDROID_NDK_PACKAGE="android-ndk-r15c-darwin-x86_64.zip" +ANDROID_NDK_URL="https://dl.google.com/android/repository/${ANDROID_NDK_PACKAGE}" + +echo "Install and setup Android NDK v15..." +cd $HOME + +download_with_retries $ANDROID_NDK_URL + +echo "Unzipping $ANDROID_NDK_URL..." +unzip -q $ANDROID_NDK_PACKAGE -d ${ANDROID_HOME} + +echo "Removing $ANDROID_NDK_URL..." +rm -rf "$ANDROID_NDK_PACKAGE" + +XAMARIN_ANDROID_NDK_PATH=$HOME/Library/Developer/Xamarin +mkdir -p $XAMARIN_ANDROID_NDK_PATH + +echo "Preparing symlink for $ANDROID_NDK_15_HOME ..." +ln -s $ANDROID_NDK_15_HOME $XAMARIN_ANDROID_NDK_PATH/android-ndk + +# NDK r17 does not include MIPS/MIPS64 toolchains anymore, NDK r16b still provides this a supplement +echo "Checking NDK installation contains required MIPS toolchains…" +NDK_BUNDLE_TOOLCHAINS=$ANDROID_NDK_HOME/toolchains +ANDROID_NDK_R16B_PATH=$ANDROID_HOME/ndk/16.1.4479499 +MIPS64_TOOLCHAIN=$NDK_BUNDLE_TOOLCHAINS/mips64el-linux-android-4.9/prebuilt/darwin-x86_64/bin +MIPS_TOOLCHAIN=$NDK_BUNDLE_TOOLCHAINS/mipsel-linux-android-4.9/prebuilt/darwin-x86_64/bin + +if [ -d $MIPS64_TOOLCHAIN ] && [ -d $MIPS_TOOLCHAIN ]; then + echo "MIPS64 and MIPS toolchain already installed for NDK bundle - not reinstalling." +else + pushd $ANDROID_HOME + + echo "Installing ndk r16b..." + echo y | $SDKMANAGER "ndk;16.1.4479499" + + echo "Cleaning potential pre-existing MIPS toolchain directories" + rm -rf ndk-bundle/toolchains/mips* + + echo "Moving MIPS toolchains to $ANDROID_NDK_HOME/toolchains" + mv $ANDROID_NDK_R16B_PATH/toolchains/mips** ndk-bundle/toolchains/ + + echo "Delete ndk r16b..." + rm -rf $ANDROID_NDK_R16B_PATH + + if [ ! -d $MIPS64_TOOLCHAIN ] || [ ! -d $MIPS_TOOLCHAIN ]; then + echo "MIPS toolchains not installed correctly! Check whether $ANDROID_NDK_HOME/toolchains/mips* does not exist." + fi + popd +fi + +# Latest versions of NDK doesn't include GCC, NDK r18 does +echo "Installing ndk r18B..." +echo y | $SDKMANAGER "ndk;18.1.5063045" +echo "export ANDROID_NDK_18R_PATH=${ANDROID_HOME}/ndk/18.1.5063045" >> "${HOME}/.bashrc" \ No newline at end of file diff --git a/images/macos/provision/core/xamarin.sh b/images/macos/provision/core/xamarin.sh new file mode 100755 index 00000000..0f0801d7 --- /dev/null +++ b/images/macos/provision/core/xamarin.sh @@ -0,0 +1,81 @@ +#!/bin/sh +source ~/utils/utils.sh +source ~/utils/xamarin-utils.sh + +MONO_VERSIONS=($(get_toolset_value '.xamarin."mono-versions" | reverse | .[]')) +XAMARIN_IOS_VERSIONS=($(get_toolset_value '.xamarin."ios-versions" | reverse | .[]')) +XAMARIN_MAC_VERSIONS=($(get_toolset_value '.xamarin."mac-versions" | reverse | .[]')) +XAMARIN_ANDROID_VERSIONS=($(get_toolset_value '.xamarin."android-versions" | reverse | .[]')) +LATEST_SDK_SYMLINK=$(get_toolset_value '.xamarin.bundles[0].symlink') +CURRENT_SDK_SYMLINK=$(get_toolset_value '.xamarin."bundle-default"') + +if [ "$CURRENT_SDK_SYMLINK" == "latest" ]; then + CURRENT_SDK_SYMLINK=$LATEST_SDK_SYMLINK +fi + +MONO_VERSIONS_PATH='/Library/Frameworks/Mono.framework/Versions' +IOS_VERSIONS_PATH='/Library/Frameworks/Xamarin.iOS.framework/Versions' +ANDROID_VERSIONS_PATH='/Library/Frameworks/Xamarin.Android.framework/Versions' +MAC_VERSIONS_PATH='/Library/Frameworks/Xamarin.Mac.framework/Versions' + +TMPMOUNT=`/usr/bin/mktemp -d /tmp/visualstudio.XXXX` +TMPMOUNT_FRAMEWORKS="$TMPMOUNT/frameworks" +createBackupFolders + +pushd $TMPMOUNT + +# Download NUnit console +downloadNUnitConsole + +# Install Mono sdks +for VERSION in "${MONO_VERSIONS[@]}"; do installMono $VERSION; done +sudo mv -v $TMPMOUNT_FRAMEWORKS/mono/* $MONO_VERSIONS_PATH/ + +# Install Xamarin.iOS sdks +for VERSION in "${XAMARIN_IOS_VERSIONS[@]}"; do installXamarinIOS $VERSION; done +sudo mv -v $TMPMOUNT_FRAMEWORKS/ios/* $IOS_VERSIONS_PATH/ + +# Install Xamarin.Mac sdks +for VERSION in "${XAMARIN_MAC_VERSIONS[@]}"; do installXamarinMac $VERSION; done +sudo mv -v $TMPMOUNT_FRAMEWORKS/mac/* $MAC_VERSIONS_PATH/ + +# Install Xamarin.Android sdks +for VERSION in "${XAMARIN_ANDROID_VERSIONS[@]}"; do installXamarinAndroid $VERSION; done +sudo mv -v $TMPMOUNT_FRAMEWORKS/android/* $ANDROID_VERSIONS_PATH/ + + +# Create bundles +BUNDLES_COUNT=$(get_toolset_value '.xamarin.bundles | length') +for ((BUNDLE_INDEX=0; BUNDLE_INDEX 11.3.1, 11.2 -> 11.2.1 +if is_Catalina; then + ln -sf /Applications/Xcode_11.2.1.app /Applications/Xcode_11.2.app + ln -sf /Applications/Xcode_11.3.1.app /Applications/Xcode_11.3.app +fi + +echo "Setting Xcode ${DEFAULT_XCODE_VERSION} as default" +sudo xcode-select -s "/Applications/Xcode_${DEFAULT_XCODE_VERSION}.app/Contents/Developer" + +echo "Adding symlink '/Applications/Xcode_${DEFAULT_XCODE_VERSION}.app' -> '/Applications/Xcode.app'" +ln -s "/Applications/Xcode_${DEFAULT_XCODE_VERSION}.app" "/Applications/Xcode.app" + +echo "Enabling developer mode" +sudo /usr/sbin/DevToolsSecurity --enable + +echo "Setting environment variables 'XCODE__DEVELOPER_DIR'" +setXcodeDeveloperDirVariables + +# Cleanup +echo "Doing cleanup. Emptying ${WORK_DIR}..." +rm -rf "$WORK_DIR" diff --git a/images/macos/provision/utils/utils.sh b/images/macos/provision/utils/utils.sh new file mode 100755 index 00000000..6a924e03 --- /dev/null +++ b/images/macos/provision/utils/utils.sh @@ -0,0 +1,94 @@ +download_with_retries() { +# Due to restrictions of bash functions, positional arguments are used here. +# In case if you using latest argument NAME, you should also set value to all previous parameters. +# Example: download_with_retries $ANDROID_SDK_URL "." "android_sdk.zip" + local URL="$1" + local DEST="${2:-.}" + local NAME="${3:-${URL##*/}}" + + echo "Downloading $URL..." + wget $URL --output-document="$DEST/$NAME" \ + --tries=30 \ + --wait 30 \ + --retry-connrefused \ + --retry-on-host-error \ + --retry-on-http-error=429,500,502,503 \ + --no-verbose + + if [ $? != 0 ]; then + echo "Could not download $URL; Exiting build!" + exit 1 + fi + + return 0 +} + +is_BigSur() { + if [ "$OSTYPE" = "darwin20" ]; then + true + else + false + fi +} + +is_Catalina() { + if [ "$OSTYPE" = "darwin19" ]; then + true + else + false + fi +} + +is_Mojave() { + if [ "$OSTYPE" = "darwin18" ]; then + true + else + false + fi +} + +is_HighSierra() { + if [ "$OSTYPE" = "darwin17" ]; then + true + else + false + fi +} + +is_Less_Catalina() { + if is_HighSierra || is_Mojave; then + true + else + false + fi +} + +is_Less_BigSur() { + if is_HighSierra || is_Mojave || is_Catalina; then + true + else + false + fi +} + +get_toolset_path() { + echo "$HOME/image-generation/toolset.json" +} + +get_toolset_value() { + local toolset_path=$(get_toolset_path) + local query=$1 + echo "$(jq -r "$query" $toolset_path)" +} + +get_xcode_list_from_toolset() { + echo $(get_toolset_value '.xcode.versions | reverse | .[]') +} + +get_latest_xcode_from_toolset() { + echo $(get_toolset_value '.xcode.versions[0]') +} + +get_default_xcode_from_toolset() { + echo $(get_toolset_value '.xcode.default') +} \ No newline at end of file diff --git a/images/macos/provision/utils/xamarin-utils.sh b/images/macos/provision/utils/xamarin-utils.sh new file mode 100644 index 00000000..dd6d7ae9 --- /dev/null +++ b/images/macos/provision/utils/xamarin-utils.sh @@ -0,0 +1,233 @@ +#!/bin/sh + +# Xamarin can clean their SDKs while updating to newer versions, +# so we should be able to detect it during image generation +downloadAndInstallPKG() { + local PKG_URL=$1 + local PKG_NAME=${PKG_URL##*/} + + download_with_retries $PKG_URL + + echo "Installing $PKG_NAME..." + sudo installer -pkg "$TMPMOUNT/$PKG_NAME" -target / +} + +buildVSMacDownloadUrl() { + echo "https://dl.xamarin.com/VsMac/VisualStudioForMac-${1}.dmg" +} + +buildMonoDownloadUrl() { + echo "https://dl.xamarin.com/MonoFrameworkMDK/Macx86/MonoFramework-MDK-${1}.macos10.xamarin.universal.pkg" +} + +buildXamariniIOSDownloadUrl() { + echo "https://dl.xamarin.com/MonoTouch/Mac/xamarin.ios-${1}.pkg" +} + +buildXamarinMacDownloadUrl() { + echo "https://dl.xamarin.com/XamarinforMac/Mac/xamarin.mac-${1}.pkg" +} + +buildXamarinAndroidDownloadUrl() { + echo "https://dl.xamarin.com/MonoforAndroid/Mac/xamarin.android-${1}.pkg" +} + +installMono() { + local VERSION=$1 + + echo "Installing Mono ${VERSION}..." + local MONO_FOLDER_NAME=$(echo $VERSION | cut -d. -f 1,2,3) + local SHORT_VERSION=$(echo $VERSION | cut -d. -f 1,2) + local PKG_URL=$(buildMonoDownloadUrl $VERSION) + downloadAndInstallPKG $PKG_URL + + echo "Installing nunit3-console for Mono "$VERSION + installNunitConsole $MONO_FOLDER_NAME + + echo "Creating short symlink '${SHORT_VERSION}'" + sudo ln -s ${MONO_VERSIONS_PATH}/${MONO_FOLDER_NAME} ${MONO_VERSIONS_PATH}/${SHORT_VERSION} + + echo "Move to backup folder" + sudo mv -v $MONO_VERSIONS_PATH/* $TMPMOUNT_FRAMEWORKS/mono/ +} + +installXamarinIOS() { + local VERSION=$1 + + echo "Installing Xamarin.iOS ${VERSION}..." + local SHORT_VERSION=$(echo $VERSION | cut -d. -f 1,2) + local PKG_URL=$(buildXamariniIOSDownloadUrl $VERSION) + downloadAndInstallPKG $PKG_URL + + echo "Creating short symlink '${SHORT_VERSION}'" + sudo ln -s ${IOS_VERSIONS_PATH}/${VERSION} ${IOS_VERSIONS_PATH}/${SHORT_VERSION} + + echo "Move to backup folder" + sudo mv -v $IOS_VERSIONS_PATH/* $TMPMOUNT_FRAMEWORKS/ios/ +} + +installXamarinMac() { + local VERSION=$1 + + echo "Installing Xamarin.Mac ${VERSION}..." + local SHORT_VERSION=$(echo $VERSION | cut -d. -f 1,2) + local PKG_URL=$(buildXamarinMacDownloadUrl $VERSION) + downloadAndInstallPKG $PKG_URL + + echo "Creating short symlink '${SHORT_VERSION}'" + sudo ln -s ${MAC_VERSIONS_PATH}/${VERSION} ${MAC_VERSIONS_PATH}/${SHORT_VERSION} + + echo "Move to backup folder" + sudo mv -v $MAC_VERSIONS_PATH/* $TMPMOUNT_FRAMEWORKS/mac/ +} + +installXamarinAndroid() { + local VERSION=$1 + + echo "Installing Xamarin.Android ${VERSION}..." + local SHORT_VERSION=$(echo $VERSION | cut -d. -f 1,2) + local PKG_URL=$(buildXamarinAndroidDownloadUrl $VERSION) + downloadAndInstallPKG $PKG_URL + + if [ "$VERSION" == "9.4.1.0" ]; then + # Fix symlinks for broken Xamarin.Android + fixXamarinAndroidSymlinksInLibDir $VERSION + fi + + echo "Creating short symlink '${SHORT_VERSION}'" + sudo ln -s ${ANDROID_VERSIONS_PATH}/${VERSION} ${ANDROID_VERSIONS_PATH}/${SHORT_VERSION} + + echo "Move to backup folder" + sudo mv -v $ANDROID_VERSIONS_PATH/* $TMPMOUNT_FRAMEWORKS/android/ +} + +createBundle() { + local SYMLINK=$1 + local MONO_SDK=$2 + local IOS_SDK=$3 + local MAC_SDK=$4 + local ANDROID_SDK=$5 + + echo "Creating bundle '$SYMLINK' (Mono $MONO_SDK; iOS $IOS_SDK; Mac $MAC_SDK; Android $ANDROID_SDK" + deleteSymlink ${SYMLINK} + sudo ln -s ${MONO_VERSIONS_PATH}/${MONO_SDK} ${MONO_VERSIONS_PATH}/${SYMLINK} + sudo ln -s ${IOS_VERSIONS_PATH}/${IOS_SDK} ${IOS_VERSIONS_PATH}/${SYMLINK} + sudo ln -s ${MAC_VERSIONS_PATH}/${MAC_SDK} ${MAC_VERSIONS_PATH}/${SYMLINK} + sudo ln -s ${ANDROID_VERSIONS_PATH}/${ANDROID_SDK} ${ANDROID_VERSIONS_PATH}/${SYMLINK} +} + +createBundleLink() { + local SOURCE=$1 + local TARGET=$2 + echo "Creating bundle symlink '$SOURCE' -> '$TARGET'" + deleteSymlink ${TARGET} + sudo ln -s ${MONO_VERSIONS_PATH}/$SOURCE ${MONO_VERSIONS_PATH}/$TARGET + sudo ln -s ${IOS_VERSIONS_PATH}/$SOURCE ${IOS_VERSIONS_PATH}/$TARGET + sudo ln -s ${MAC_VERSIONS_PATH}/$SOURCE ${MAC_VERSIONS_PATH}/$TARGET + sudo ln -s ${ANDROID_VERSIONS_PATH}/$SOURCE ${ANDROID_VERSIONS_PATH}/$TARGET +} + +# https://github.com/xamarin/xamarin-android/issues/3457 +# Recreate missing symlinks in lib for new Xamarin.Android package +# Symlink path /Library/Frameworks/Xamarin.Android.framework/Libraries +# xbuild -> xamarin.android/xbuild +# xbuild-frameworks -> xamarin.android/xbuild-frameworks +fixXamarinAndroidSymlinksInLibDir() { + local XAMARIN_ANDROID_VERSION=$1 + local XAMARIN_ANDROID_LIB_PATH="${ANDROID_VERSIONS_PATH}/${XAMARIN_ANDROID_VERSION}/lib" + + if [ -d "${XAMARIN_ANDROID_LIB_PATH}" ]; then + pushd "${XAMARIN_ANDROID_LIB_PATH}" > /dev/null + + local XAMARIN_ANDROID_XBUILD_DIR="${XAMARIN_ANDROID_LIB_PATH}/xbuild" + if [ ! -d "${XAMARIN_ANDROID_XBUILD_DIR}" ]; then + echo "${XAMARIN_ANDROID_XBUILD_DIR}" + sudo ln -sf xamarin.android/xbuild xbuild + fi + + local XAMARIN_ANDROID_XBUILD_FRAMEWORKS_DIR="${XAMARIN_ANDROID_LIB_PATH}/xbuild-frameworks" + if [ ! -d "${XAMARIN_ANDROID_XBUILD_FRAMEWORKS_DIR}" ]; then + echo "${XAMARIN_ANDROID_XBUILD_FRAMEWORKS_DIR}" + sudo ln -sf xamarin.android/xbuild-frameworks xbuild-frameworks + fi + + popd > /dev/null + fi +} + +installNunitConsole() { + local MONO_VERSION=$1 + + cat < ${TMPMOUNT}/${NUNIT3_CONSOLE_BIN} +#!/bin/sh +exec /Library/Frameworks/Mono.framework/Versions/${MONO_VERSION}/bin/mono --debug \$MONO_OPTIONS $NUNIT3_PATH/nunit3-console.exe "\$@" +EOF + sudo chmod +x ${TMPMOUNT}/${NUNIT3_CONSOLE_BIN} + sudo mv ${TMPMOUNT}/${NUNIT3_CONSOLE_BIN} ${MONO_VERSIONS_PATH}/${MONO_VERSION}/Commands/${NUNIT3_CONSOLE_BIN} +} + +downloadNUnitConsole() { + echo "Downloading NUnit 3..." + local NUNIT3_LOCATION='https://github.com/nunit/nunit-console/releases/download/3.6.1/NUnit.Console-3.6.1.zip' + local NUNIT_PATH="/Library/Developer/nunit" + NUNIT3_PATH="$NUNIT_PATH/3.6.1" + + pushd $TMPMOUNT + + sudo mkdir -p $NUNIT3_PATH + sudo curl -L -o nunit3.zip $NUNIT3_LOCATION + + echo "Installing NUnit 3..." + sudo unzip nunit3.zip -d $NUNIT3_PATH + NUNIT3_CONSOLE_BIN=nunit3-console + + popd +} + +installNuget() { + local MONO_VERSION=$1 + local NUGET_VERSION=$2 + local NUGET_URL="https://dist.nuget.org/win-x86-commandline/v${NUGET_VERSION}/nuget.exe" + echo "Installing nuget $NUGET_VERSION for Mono $MONO_VERSION" + cd ${MONO_VERSIONS_PATH}/${MONO_VERSION}/lib/mono/nuget + sudo mv nuget.exe nuget_old.exe + sudo curl -L -o nuget.exe $NUGET_URL + sudo chmod a+x nuget.exe +} + +createUWPShim() { + echo "Creating UWP Shim to hack UWP build failure..." + cat < ${TMPMOUNT}/Microsoft.Windows.UI.Xaml.CSharp.Targets + + + + +EOF + + local UWPTARGET_PATH=/Library/Frameworks/Mono.framework/External/xbuild/Microsoft/WindowsXaml + + sudo mkdir -p $UWPTARGET_PATH/v11.0/ + sudo cp ${TMPMOUNT}/Microsoft.Windows.UI.Xaml.CSharp.Targets $UWPTARGET_PATH/v11.0/ + sudo mkdir -p $UWPTARGET_PATH/v12.0/ + sudo cp ${TMPMOUNT}/Microsoft.Windows.UI.Xaml.CSharp.Targets $UWPTARGET_PATH/v12.0/ + sudo mkdir -p $UWPTARGET_PATH/v14.0/ + sudo cp ${TMPMOUNT}/Microsoft.Windows.UI.Xaml.CSharp.Targets $UWPTARGET_PATH/v14.0/ + sudo mkdir -p $UWPTARGET_PATH/v15.0/ + sudo cp ${TMPMOUNT}/Microsoft.Windows.UI.Xaml.CSharp.Targets $UWPTARGET_PATH/v15.0/ + sudo mkdir -p $UWPTARGET_PATH/v16.0/ + sudo cp ${TMPMOUNT}/Microsoft.Windows.UI.Xaml.CSharp.Targets $UWPTARGET_PATH/v16.0/ +} + +createBackupFolders() { + mkdir -p $TMPMOUNT_FRAMEWORKS/mono + mkdir -p $TMPMOUNT_FRAMEWORKS/ios + mkdir -p $TMPMOUNT_FRAMEWORKS/mac + mkdir -p $TMPMOUNT_FRAMEWORKS/android +} + +deleteSymlink() { + sudo rm -f ${MONO_VERSIONS_PATH}/${1} + sudo rm -f ${IOS_VERSIONS_PATH}/${1} + sudo rm -f ${MAC_VERSIONS_PATH}/${1} + sudo rm -f ${ANDROID_VERSIONS_PATH}/${1} +} \ No newline at end of file diff --git a/images/macos/provision/utils/xcode-utils.sh b/images/macos/provision/utils/xcode-utils.sh new file mode 100644 index 00000000..9cd795f0 --- /dev/null +++ b/images/macos/provision/utils/xcode-utils.sh @@ -0,0 +1,81 @@ +createXamarinProvisionatorSymlink() { + local XCODE_VERSION="$1" + local FULL_VERSION=$(echo "${XCODE_VERSION}.0.0" | cut -d'.' -f 1,2,3) + + if [ $FULL_VERSION != $XCODE_VERSION ]; then + ln -sf "/Applications/Xcode_${XCODE_VERSION}.app" "/Applications/Xcode_${FULL_VERSION}.app" + fi +} + +getXcodeVersionToInstall() { + local XCODE_VERSION="$1" + + if [[ ! $XCODE_VERSION =~ "_beta" ]]; then + echo "$XCODE_VERSION" + else + local XCODE_BETA="${XCODE_VERSION/_/ }" + echo "$(xcversion list | sort -r | grep -m 1 "$XCODE_BETA")" + fi +} + +validateXcodeIntegrity() { + local WORKING_DIR="$1" + local XCODE_VERSION="$2" + + if echo $XCODE_VERSION | grep "beta"; then + return 0 + fi + + spctl --assess --raw "${WORKING_DIR}/Xcode.app" +} + +approveLicense() { + local XCODE_VERSION="$1" + sudo "/Applications/Xcode_${XCODE_VERSION}.app/Contents/Developer/usr/bin/xcodebuild" -license accept +} + +installAdditionalPackages() { + # should be called only for old High Sierra and Mojave + local XCODE_VERSION="$1" + find /Applications/Xcode_${XCODE_VERSION}.app/Contents/Resources/Packages/ -name '*.pkg' | xargs -I '{}' sudo installer -pkg '{}' -target / -allowUntrusted +} + +runFirstLaunch() { + local XCODE_VERSION="$1" + sudo "/Applications/Xcode_${XCODE_VERSION}.app/Contents/Developer/usr/bin/xcodebuild" -runFirstLaunch +} + +setXcodeDeveloperDirVariables() { + stable_xcode_versions=$(get_xcode_list_from_toolset | tr " " "\n" | grep -v "beta") + major_versions=($(echo ${stable_xcode_versions[@]} | tr " " "\n" | cut -d '.' -f 1 | uniq)) + for MAJOR_VERSION in "${major_versions[@]}" + do + LATEST_STABLE_VERSION=$(echo "${stable_xcode_versions[*]}" | grep "${MAJOR_VERSION}" | tail -n 1) + echo "export XCODE_${MAJOR_VERSION}_DEVELOPER_DIR=/Applications/Xcode_${LATEST_STABLE_VERSION}.app/Contents/Developer" >> "$HOME/.bashrc" + done +} + +extractXcodeXip() { + local WORKING_DIR="$1" + local XCODE_VERSION="$2" + XCODE_XIP="${WORKING_DIR}/Xcode_${XCODE_VERSION// /_}.xip" + echo "XCODE_XIP = $XCODE_XIP" + + open -W $XCODE_XIP + + if [[ -d "${WORKING_DIR}/Xcode-beta.app" ]]; then + mv -f "${WORKING_DIR}/Xcode-beta.app" "${WORKING_DIR}/Xcode.app" + fi + + if [[ ! -d "${WORKING_DIR}/Xcode.app" ]]; then + echo "'Xcode.app' doesn't exist after Xcode XIP extraction" + exit 1 + fi +} + +createBetaSymlink() { + local XCODE_VERSION=$1 + if [[ $XCODE_VERSION =~ 1[01].* ]] || [[ $XCODE_VERSION == "12" ]] || [[ $XCODE_VERSION == "12_beta" ]]; then + ln -sf "/Applications/Xcode_${XCODE_VERSION}.app" "/Applications/Xcode_${XCODE_VERSION}_beta.app" + fi +} \ No newline at end of file diff --git a/images/macos/software-report/SoftwareReport.Android.psm1 b/images/macos/software-report/SoftwareReport.Android.psm1 new file mode 100644 index 00000000..8145b248 --- /dev/null +++ b/images/macos/software-report/SoftwareReport.Android.psm1 @@ -0,0 +1,166 @@ +Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1" + +$os = Get-OSVersion + +function Split-TableRowByColumns { + param( + [string] $Row + ) + return $Row.Split("|") | ForEach-Object { $_.trim() } +} + +function Build-AndroidTableObject { + param( + [string] $PackageName, + [string] $Description + ) + return [PSCustomObject] @{ + "Package Name" = $PackageName + "Description" = $Description + } +} + +function Get-AndroidSDKRoot { + return Join-Path $env:HOME "Library" "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-AndroidSDKToolsTable { + param ( + [Parameter(Mandatory)] + [object] $packageInfo + ) + + return $packageInfo | ForEach-Object { + $packageInfoParts = Split-TableRowByColumns $_ + $packageName = $packageInfoParts[0] + $packageDescription = $packageInfoParts[2] + ", Revision " + $packageInfoParts[1] + return Build-AndroidTableObject -PackageName $packageName -Description $packageDescription + } +} + +function Build-AndroidSDKPlatformTable { + param ( + [Parameter(Mandatory)] + [object] $packageInfo + ) + + return $packageInfo | ForEach-Object { + $packageInfoParts = Split-TableRowByColumns $_ + $packageName = $packageInfoParts[0].split(";")[1] + $packageDescription = $packageInfoParts[2] + ", Revision " + $packageInfoParts[1] + return Build-AndroidTableObject -PackageName $packageName -Description $packageDescription + } +} + +function Build-AndroidSDKBuildToolsTable { + param ( + [Parameter(Mandatory)] + [object] $packageInfo + ) + + return $packageInfo | ForEach-Object { + $packageInfoParts = Split-TableRowByColumns $_ + $packageName = $packageInfoParts[0].replace(";", "-") + $packageDescription = "Android SDK Build-Tools, Revision " + $packageInfoParts[1] + return Build-AndroidTableObject -PackageName $packageName -Description $packageDescription + } +} + +function Build-AndroidNDKTable { + param ( + [Parameter(Mandatory)][AllowEmptyString()] + [string[]] $installedPackages + ) + + $ndkInfo = @() + + if ($os.IsLessThanBigSur) { + $ndkInfo += [PSCustomObject] @{ + # Hardcode NDK 15 as a separate case since it is installed manually without sdk-manager (to none default location) + "Version" = "15.2.4203891" + "Path" = Join-Path (Get-AndroidSDKRoot) "android-ndk-r15c" + } + + $ndkFolderPath = Join-Path (Get-AndroidSDKRoot) "ndk" + $ndkInfo += Get-ChildItem -Path $ndkFolderPath | ForEach-Object { + return [PSCustomObject] @{ + "Version" = $_.Name + "Path" = $_.FullName + } + } + } + + $ndkBundleInfo = $installedPackages | Where-Object { $_ -Match "ndk-bundle" } | Select-Object -First 1 + $ndkBundleVersion = (Split-TableRowByColumns $ndkBundleInfo)[1] + $ndkInfo += [PSCustomObject] @{ + "Version" = $ndkBundleVersion + "Path" = Join-Path (Get-AndroidSDKRoot) "ndk-bundle" + } + + $ndkInfo | ForEach-Object { + $_.Path = $_.Path.Replace($env:HOME, '$HOME') + } + + return $ndkInfo +} + +function Build-AndroidUtilsTable { + param ( + [Parameter(Mandatory)][AllowEmptyString()] + [string[]] $installedPackages + ) + + $utilsList = @("cmake", "Android Emulator") + return $utilsList | ForEach-Object { + $packageName = $_ + $packageInfo = $installedPackages | Where-Object { $_ -Match $packageName } | Select-Object -First 1 + $packageInfoParts = Split-TableRowByColumns $packageInfo + return [PSCustomObject] @{ + "Package Name" = $packageName + "Version" = $packageInfoParts[1] + } + } +} + +function Build-AndroidExtraPackagesTable { + param ( + [Parameter(Mandatory)][AllowEmptyString()] + [string[]] $installedPackages + ) + + $extraPackages = @( + "Android Support Repository", + "Google Play services", + "Google Repository", + "Hardware_Accelerated_Execution_Manager" + ) + + return $extraPackages | ForEach-Object { + $packageId = $_ + $packageInfo = $installedPackages | Where-Object { $_ -Like "*${packageId}*" } | Select-Object -First 1 + $packageInfoParts = Split-TableRowByColumns $packageInfo + return [PSCustomObject] @{ + "Package Name" = $packageInfoParts[2] + "Version" = $packageInfoParts[1] + } + } +} \ No newline at end of file diff --git a/images/macos/software-report/SoftwareReport.Browsers.psm1 b/images/macos/software-report/SoftwareReport.Browsers.psm1 new file mode 100644 index 00000000..4e46f79f --- /dev/null +++ b/images/macos/software-report/SoftwareReport.Browsers.psm1 @@ -0,0 +1,52 @@ +function Get-BrowserSection { + return New-MDList -Style Unordered -Lines @( + (Get-SafariVersion), + (Get-SafariDriverVersion), + (Get-ChromeVersion), + (Get-ChromeDriverVersion), + (Get-EdgeVersion), + (Get-EdgeDriverVersion), + (Get-FirefoxVersion), + (Get-GeckodriverVersion) + ) +} + +function Get-SafariVersion { + $version = Run-Command "defaults read /Applications/Safari.app/Contents/Info CFBundleShortVersionString" + $build = Run-Command "defaults read /Applications/Safari.app/Contents/Info CFBundleVersion" + "Safari $version ($build)" +} + +function Get-SafariDriverVersion { + $version = Run-Command "safaridriver --version" | Take-Part -Part 3,4 + "SafariDriver $version" +} + +function Get-ChromeVersion { + $chromePath = "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" + return Run-Command "'${chromePath}' --version" +} + +function Get-ChromeDriverVersion { + $rawOutput = Run-Command "chromedriver --version" + $version = $rawOutput | Take-Part -Part 1 + return "ChromeDriver ${version}" +} + +function Get-EdgeVersion { + $edgePath = "/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge" + return Run-Command "'${edgePath}' --version" +} + +function Get-EdgeDriverVersion { + return Run-Command "msedgedriver --version" | Take-Part -Part 0,1 +} + +function Get-FirefoxVersion { + $firefoxPath = "/Applications/Firefox.app/Contents/MacOS/firefox" + return Run-Command "'${firefoxPath}' --version" +} + +function Get-GeckodriverVersion { + return Run-Command "geckodriver --version" | Select-Object -First 1 +} \ No newline at end of file diff --git a/images/macos/software-report/SoftwareReport.Common.psm1 b/images/macos/software-report/SoftwareReport.Common.psm1 new file mode 100644 index 00000000..cd3cce62 --- /dev/null +++ b/images/macos/software-report/SoftwareReport.Common.psm1 @@ -0,0 +1,117 @@ +Import-Module "$PSScriptRoot/../helpers/SoftwareReport.Helpers.psm1" -DisableNameChecking + +function Get-DotnetVersionList { + $sdkRawList = Run-Command "dotnet --list-sdks" + $sdkVersionList = $sdkRawList | ForEach-Object { Take-Part $_ -Part 0 } + return ".NET SDK " + [string]::Join(" ", $sdkVersionList) +} + +function Get-GoVersion { + $goOutput = Run-Command "go version" | Take-Part -Part 2 + if ($goOutput.StartsWith("go")) { + $goOutput = $goOutput.Substring(2) + } + + return $goOutput +} + +function Get-RVersion { + $rVersion = Run-Command "R --version | grep 'R version'" | Take-Part -Part 2 + return "R $rVersion" +} +function Get-RustVersion { + $rustVersion = Run-Command "rustc --version" | Take-Part -Part 1 + return "${rustVersion}" +} + +function Get-Bindgen { + $bindgenVersion = Run-Command "bindgen --version" | Take-Part -Part 1 + return "Bindgen $bindgenVersion" +} + +function Get-Cbindgen { + $cbindgenVersion = Run-Command "cbindgen --version" | Take-Part -Part 1 + return "Cbindgen $cbindgenVersion" +} + +function Get-Cargooutdated { + $cargoOutdatedVersion = Run-Command "cargo outdated --version" | Take-Part -Part 1 + return "Cargo-outdated $cargoOutdatedVersion" +} + +function Get-Cargoaudit { + $cargoAuditVersion = Run-Command "cargo audit --version" | Take-Part -Part 1 + return "Cargo-audit $cargoAuditVersion" +} + +function Get-RustupVersion { + $rustupVersion = Run-Command "rustup --version" | Take-Part -Part 1 + return "Rustup ${rustupVersion}" +} + +function Get-VcpkgVersion { + $vcpkgVersion = Run-Command "vcpkg version" | Select-Object -First 1 | Take-Part -Part 5 | Take-Part -Part 0 -Delimiter "-" + return "Vcpkg ${vcpkgVersion}" +} + +function Get-GccVersion { + $versionList = @("8", "9") + $versionList | Foreach-Object { + $version = Run-Command "gcc-${_} --version" | Select-Object -First 1 + "$version — available by ``gcc-${_}`` alias" + } +} + +function Get-FortranVersion { + $versionList = @("8", "9") + $versionList | Foreach-Object { + $version = Run-Command "gfortran-${_} --version" | Select-Object -First 1 + "$version — available by ``gfortran-${_}`` alias" + } +} + +function Get-ClangLLVMVersion { + $clangLLVMVersion = Run-Command "$(brew --prefix llvm)/bin/clang --version" | Select-Object -First 1 | Take-Part -Part 2 + "Clang/LLVM $clangLLVMVersion" +} + +function Get-NVMVersion { + $nvmPath = Join-Path $env:HOME ".nvm" "nvm.sh" + $nvmInitCommand = ". ${nvmPath} > /dev/null 2>&1 || true" + $nodejsVersion = Run-Command "${nvmInitCommand} && nvm --version" + return $nodejsVersion +} + +function Get-PipVersion { + param ( + [Parameter(Mandatory)][ValidateRange(2, 3)] + [int] $Version + ) + + $command = If ($Version -eq 2) { "pip --version" } Else { "pip3 --version" } + $commandOutput = Run-Command $command + $versionPart1 = $commandOutput | Take-Part -Part 1 + $versionPart2 = $commandOutput | Take-Part -Part 4 + $versionPart3 = $commandOutput | Take-Part -Part 5 + return "${versionPart1} ${versionPart2} ${versionPart3}" +} + +function Get-NVMNodeVersionList { + $nvmPath = Join-Path $env:HOME ".nvm" "nvm.sh" + $nvmInitCommand = ". ${nvmPath} > /dev/null 2>&1 || true" + $nodejsVersionsRaw = Run-Command "${nvmInitCommand} && nvm ls" + $nodeVersions = $nodejsVersionsRaw | ForEach-Object { $_.TrimStart(" ").TrimEnd(" *") } | Where-Object { $_.StartsWith("v") } + return [string]::Join(" ", $nodeVersions) +} + +function Build-OSInfoSection { + $fieldsToInclude = @("System Version:", "Kernel Version:") + $rawSystemInfo = Invoke-Expression "system_profiler SPSoftwareDataType" + $parsedSystemInfo = $rawSystemInfo | Where-Object { -not ($_ | Select-String -NotMatch $fieldsToInclude) } | ForEach-Object { $_.Trim() } + $output = "" + $parsedSystemInfo[0] -match "System Version: macOS (?\d+\.\d+)" | Out-Null + $version = $Matches.Version + $output += New-MDHeader "macOS $version info" -Level 1 + $output += New-MDList -Style Unordered -Lines $parsedSystemInfo -NoNewLine + return $output +} \ No newline at end of file diff --git a/images/macos/software-report/SoftwareReport.Generator.ps1 b/images/macos/software-report/SoftwareReport.Generator.ps1 new file mode 100644 index 00000000..9627e24e --- /dev/null +++ b/images/macos/software-report/SoftwareReport.Generator.ps1 @@ -0,0 +1,361 @@ +param ( + [Parameter(Mandatory)][string] + $OutputDirectory, + $ImageName +) + +Import-Module MarkdownPS +Import-Module "$PSScriptRoot/SoftwareReport.Common.psm1" -DisableNameChecking +Import-Module "$PSScriptRoot/SoftwareReport.Xcode.psm1" -DisableNameChecking +Import-Module "$PSScriptRoot/SoftwareReport.Android.psm1" -DisableNameChecking +Import-Module "$PSScriptRoot/SoftwareReport.Java.psm1" -DisableNameChecking +Import-Module "$PSScriptRoot/SoftwareReport.Xamarin.psm1" -DisableNameChecking +Import-Module "$PSScriptRoot/SoftwareReport.Toolcache.psm1" -DisableNameChecking +Import-Module "$PSScriptRoot/SoftwareReport.Browsers.psm1" -DisableNameChecking +Import-Module "$PSScriptRoot/../helpers/SoftwareReport.Helpers.psm1" +Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1" +Import-Module "$PSScriptRoot/../helpers/Xcode.Helpers.psm1" + +# Operating System info +$os = Get-OSVersion + +# Language and Runtime +$nodejsVersion = Run-Command "node --version" +$nvmVersion = Get-NVMVersion +$nvmCachedVersions = Get-NVMNodeVersionList +$pythonVersion = Run-Command "python --version" +$python3Version = Run-Command "python3 --version" +$rubyVersion = Run-Command "ruby --version" | Take-Part -Part 1 +$goVersion = Get-GoVersion +$phpVersion = Run-Command "php --version" | Select-Object -First 1 | Take-Part -Part 0,1 +$juliaVersion = Run-Command "julia --version" | Take-Part -Part 0,2 + +$markdown = "" + +# Get announcements +if ($env:ANNOUNCEMENTS) { + $markdown += $env:ANNOUNCEMENTS + $markdown += New-MDNewLine + $markdown += "***" + $markdown += New-MDNewLine +} + +# OS info +$markdown += Build-OSInfoSection +$markdown += New-MDList -Style Unordered -Lines ("Image Version: {0}" -f $ImageName.Split('_')[1]) +# Software report +$markdown += New-MDHeader "Installed Software" -Level 2 +$markdown += New-MDHeader "Language and Runtime" -Level 3 + +if ( -not $os.IsHighSierra) { + $clangLLVMVersion = Get-ClangLLVMVersion + $gccVersion = Get-GccVersion + $gfortranVersion = Get-FortranVersion + $lines = @($clangLLVMVersion, $gccVersion, $gfortranVersion) | ForEach-Object {$_} + $markdown += New-MDList -Style Unordered -NoNewLine -Lines $lines +} + +$markdown += New-MDList -Style Unordered -Lines @( + "Node.js ${nodejsVersion}" + "NVM ${nvmVersion}" + "NVM - Cached node versions: ${nvmCachedVersions}" + $pythonVersion, + $python3Version, + "Ruby ${rubyVersion}", + (Get-DotnetVersionList), + (Get-RVersion), + "Go ${goVersion}", + "$phpVersion", + "$juliaVersion" +) + +# Package Management +$bundlerVersion = Run-Command "bundle --version" +$carthageVersion = Run-Command "carthage version" -SuppressStderr +$cocoaPodsVersion = Run-Command "pod --version" +$homebrewVersion = Run-Command "brew --version" | Select-Object -First 1 +$npmVersion = Run-Command "npm --version" +$yarnVersion = Run-Command "yarn --version" +$nugetVersion = Run-Command "nuget help" | Select-Object -First 1 | Take-Part -Part 2 +$pipVersion = Get-PipVersion -Version 2 +$pip3Version = Get-PipVersion -Version 3 +$condaVersion = Invoke-Expression "conda --version" +$rubyGemsVersion = Run-Command "gem --version" +$composerVersion = Run-Command "composer --version" | Take-Part -Part 2 + +$markdown += New-MDHeader "Package Management" -Level 3 +if ($os.IsHigherThanMojave) { + $vcpkgVersion = Get-VcpkgVersion + $markdown += New-MDList -Lines $vcpkgVersion -Style Unordered -NoNewLine +} +$markdown += New-MDList -Style Unordered -Lines @( + $bundlerVersion, + "Carthage ${carthageVersion}", + "CocoaPods ${cocoaPodsVersion}", + $homebrewVersion, + "NPM ${npmVersion}", + "Yarn ${yarnVersion}", + "NuGet ${nugetVersion}", + "Pip ${pipVersion}", + "Pip ${pip3Version}", + "Mini${condaVersion}", + "RubyGems ${rubyGemsVersion}", + "Composer ${composerVersion}" +) + +# Project Management +$mavenVersion = Run-Command "mvn -version" | Select-Object -First 1 | Take-Part -Part 2 +#gradle output differs on the first launch – a welcome message, that we don't need is rendered. The solution is to take the last "Gradle" occurrence from the output +$gradleVersion = (Run-Command "gradle --version" | Select-String "Gradle")[-1] +$apacheAnt = Run-Command "ant -version" | Take-Part -Part 0,1,3 + +$markdown += New-MDHeader "Project Management" -Level 3 +$markdown += New-MDList -Style Unordered -Lines @( + "Apache Maven ${mavenVersion}", + $gradleVersion, + $apacheAnt +) + +# Utilities +$curlVersion = Run-Command "curl --version" | Select-Object -First 1 | Take-Part -Part 1 +$gitVersion = Run-Command "git --version" | Take-Part -Part 2 +$ghVersion = Run-Command "gh --version" | Select-String "gh version" | Select-Object -First 1 | Take-Part -Part 2 +$gitLFSVersion = Run-Command "git-lfs version" | Take-Part -Part 0 | Take-Part -Part 1 -Delimiter "/" +$hubVersion = Run-Command "hub version | grep 'hub version'" | Take-Part -Part 2 +$wgetVersion = Run-Command "wget --version" | Select-String "GNU Wget" | Take-Part -Part 2 +$svnVersion = Run-Command "svn --version --quiet" +$parallelVersion = Run-Command "parallel --version" | Select-String "GNU parallel" | Select-Object -First 1 +$jqVersion = Run-Command "jq --version" | Take-Part -Part 1 -Delimiter "-" +$opensslVersion = Get-Item /usr/local/opt/openssl | ForEach-Object {"{0} ``({1} -> {2})``" -f (Run-Command "openssl version"), $_.FullName, $_.Target} +$gpgVersion = Run-Command "gpg --version" | Select-String 'gpg (GnuPG)' -SimpleMatch +$postgresClientVersion = Run-Command "psql --version" +$postgresServerVersion = Run-Command "pg_config --version" +$aria2Version = Run-Command "aria2c --version" | Select-Object -First 1 | Take-Part -Part 2 +$azcopyVersion = Run-Command "azcopy --version" | Take-Part -Part 2 +$zstdVersion = Run-Command "zstd --version" | Take-Part -Part 1 -Delimiter "v" | Take-Part -Part 0 -Delimiter "," +$bazelVersion = Run-Command "bazel --version" | Take-Part -Part 0 -Delimiter "-" +$bazeliskVersion = Run-Command "bazelisk version" | Select-String "Bazelisk version:" | Take-Part -Part 1 -Delimiter ":" +$packerVersion = Run-Command "packer --version" +$helmVersion = Run-Command "helm version --short" +$vbox = Run-Command "vboxmanage -v" +$vagrant = Run-Command "vagrant -v" +$mongo = Run-Command "mongo --version" | Select-String "MongoDB shell version" | Take-Part -Part 3 +$mongod = Run-Command "mongod --version" | Select-String "db version " | Take-Part -Part 2 +$p7zip = Run-Command "7z i" | Select-String "7-Zip" | Take-Part -Part 0,2 + +$markdown += New-MDHeader "Utilities" -Level 3 +$markdown += New-MDList -Style Unordered -NoNewLine -Lines @( + "Curl ${curlVersion}", + "Git: ${gitVersion}", + "Git LFS: ${gitLFSVersion}", + "GitHub CLI: ${ghVersion}", + "Hub CLI: ${hubVersion}", + "GNU Wget ${wgetVersion}", + "Subversion (SVN) ${svnVersion}", + "Packer $packerVersion", + $parallelVersion, + $opensslVersion, + "jq ${jqVersion}", + $gpgVersion, + $postgresClientVersion, + $postgresServerVersion, + "aria2 $aria2Version", + "azcopy $azcopyVersion", + "zstd $zstdVersion", + $bazelVersion, + "bazelisk $($bazeliskVersion.Trim())", + "helm $helmVersion", + "virtualbox $vbox", + "mongo $mongo", + "mongod $mongod", + "$vagrant", + $p7zip +) +if ($os.IsHigherThanMojave) { + $newmanVersion = Run-Command "newman --version" + $markdown += New-MDList -Lines "Newman $newmanVersion" -Style Unordered +} +$markdown += New-MDNewLine + +# Tools +$fastlaneVersion = Run-Command "fastlane --version" | Select-String "^fastlane [0-9]" | Take-Part -Part 1 +$cmakeVersion = Run-Command "cmake --version" | Select-Object -First 1 | Take-Part -Part 2 +$appcenterCLIVersion = Run-Command "appcenter --version" | Take-Part -Part 2 +$azureCLIVersion = Run-Command "az -v" | Select-String "^azure-cli" | Take-Part -Part 1 +$awsVersion = Run-Command "aws --version" | Take-Part -Part 0 | Take-Part -Delimiter "/" -Part 1 +$aliyunVersion = Run-Command "aliyun --version" | Select-String "Alibaba Cloud Command Line Interface Version " | Take-Part -Part 6 +$awsSamVersion = Run-Command "sam --version" | Take-Part -Part 3 +$awsSessionManagerVersion = Run-Command "session-manager-plugin --version" +$ghcUpVersion = Run-Command "ghcup --version" | Take-Part -Part 5 +$ghcVersion = Run-Command "ghc --version" | Take-Part -Part 7 +$cabalVersion = Run-Command "cabal --version" | Take-Part -Part 3 +$stackVersion = Run-Command "stack --version" | Take-Part -Part 1 | ForEach-Object {$_.replace(",","")} + +$markdown += New-MDHeader "Tools" -Level 3 +$markdown += New-MDList -Style Unordered -NoNewLine -Lines @( + "Fastlane ${fastlaneVersion}", + "Cmake ${cmakeVersion}", + "App Center CLI ${appcenterCLIVersion}", + "Azure CLI ${azureCLIVersion}", + "AWS CLI ${awsVersion}", + "AWS SAM CLI ${awsSamVersion}", + "AWS Session Manager CLI ${awsSessionManagerVersion}", + "Aliyun CLI ${aliyunVersion}" +) + +if( -not $os.IsHighSierra) { + $markdown += New-MDList -Style Unordered -Lines @( + "GHCup ${ghcUpVersion}", + "GHC ${ghcVersion}", + "Cabal ${cabalVersion}", + "Stack ${stackVersion}" + ) +} + +# Linters +$markdown += New-MDHeader "Linters" -Level 3 +$yamllintVersion = Run-Command "yamllint --version" +$markdown += New-MDList -Style Unordered -NoNewLine -Lines @( + $yamllintVersion +) + +if ( -not $os.IsHighSierra) { + $swiftlintVersion = Run-Command "swiftlint version" + $markdown += New-MDList -Style Unordered -Lines @( + "SwiftLint ${swiftlintVersion}" + ) +} + +$markdown += New-MDHeader "Browsers" -Level 3 +$markdown += Get-BrowserSection + +$markdown += New-MDHeader "Java" -Level 3 +$markdown += Get-JavaVersions | New-MDTable + +# Toolcache +$markdown += Build-ToolcacheSection + +if ( -not $os.IsHighSierra) { + $rustVersion = Get-RustVersion + $markdown += New-MDHeader "Rust Tools" -Level 3 + $markdown += New-MDList -Style Unordered -Lines @( + "Rust $rustVersion", + (Get-RustupVersion) + ) + $markdown += New-MDHeader "Packages" -Level 4 + $markdown += New-MDList -Style Unordered -Lines @( + (Get-Bindgen), + (Get-Cbindgen), + (Get-Cargooutdated), + (Get-Cargoaudit) + ) +} + +$markdown += New-MDHeader "PowerShell Tools" -Level 3 +$powershellVersion = Run-Command "powershell --version" +$markdown += New-MDList -Lines $powershellVersion -Style Unordered + +$markdown += New-MDHeader "PowerShell Modules" -Level 4 +$markdown += Get-PowerShellModules | New-MDTable +$markdown += New-MDNewLine + +# Xamarin section +$markdown += New-MDHeader "Xamarin" -Level 3 +$markdown += New-MDHeader "Visual Studio for Mac" -Level 4 +$markdown += New-MDList -Lines @(Get-VSMacVersion) -Style Unordered + +$markdown += New-MDHeader "Mono" -Level 4 +$markdown += New-MDList -Lines (Build-MonoList) -Style Unordered + +$markdown += New-MDHeader "Xamarin.iOS" -Level 4 +$markdown += New-MDList -Lines (Build-XamarinIOSList) -Style Unordered + +$markdown += New-MDHeader "Xamarin.Mac" -Level 4 +$markdown += New-MDList -Lines (Build-XamarinMacList) -Style Unordered + +$markdown += New-MDHeader "Xamarin.Android" -Level 4 +$markdown += New-MDList -Lines (Build-XamarinAndroidList) -Style Unordered + +$markdown += New-MDHeader "Unit Test Framework" -Level 4 +$markdown += New-MDList -Lines @(Get-NUnitVersion) -Style Unordered + +# Xcode section +$xcodeInfo = Get-XcodeInfoList +$markdown += New-MDHeader "Xcode" -Level 3 +$markdown += Build-XcodeTable $xcodeInfo | New-MDTable +$markdown += New-MDNewLine + +$markdown += Build-XcodeSupportToolsSection + +$markdown += New-MDHeader "Installed SDKs" -Level 4 +$markdown += Build-XcodeSDKTable $xcodeInfo | New-MDTable +$markdown += New-MDNewLine + +# Disable simulators table on 11.0 beta for now since "simctl" tool doesn't work properly +if (-not $os.IsBigSur) { + $markdown += New-MDHeader "Installed Simulators" -Level 4 + $markdown += Build-XcodeSimulatorsTable $xcodeInfo | New-MDTable + $markdown += New-MDNewLine +} + +# Android section +$markdown += New-MDHeader "Android" -Level 3 +$androidInstalledPackages = Get-AndroidInstalledPackages + +$markdown += New-MDHeader "Android SDK Tools" -Level 4 +$androidSDKTools = $androidInstalledPackages | Where-Object { $_ -Match "Android SDK Tools" } +$markdown += Build-AndroidSDKToolsTable $androidSDKTools | New-MDTable +$markdown += New-MDNewLine + +$markdown += New-MDHeader "Android SDK Platform-Tools" -Level 4 +$androidSDKPlatformTools = $androidInstalledPackages | Where-Object { $_ -Match "Android SDK Platform-Tools" } +$markdown += Build-AndroidSDKToolsTable $androidSDKPlatformTools | New-MDTable +$markdown += New-MDNewLine + +$markdown += New-MDHeader "Android SDK Platforms" -Level 4 +$androidSDKPlatforms = $androidInstalledPackages | Where-Object { $_ -Match "Android SDK Platform " } +$markdown += Build-AndroidSDKPlatformTable $androidSDKPlatforms | New-MDTable +$markdown += New-MDNewLine + +$markdown += New-MDHeader "Android SDK Build-Tools" -Level 4 +$androidSDKBuildTools = $androidInstalledPackages | Where-Object { $_ -Match "Android SDK Build-Tools" } +$markdown += Build-AndroidSDKBuildtoolsTable $androidSDKBuildTools | New-MDTable +$markdown += New-MDNewLine + +$markdown += New-MDHeader "Android NDKs" -Level 4 +$markdown += Build-AndroidNDKTable $androidInstalledPackages | New-MDTable +$markdown += New-MDNewLine + +$markdown += New-MDHeader "Android Utils" -Level 4 +$markdown += Build-AndroidUtilsTable $androidInstalledPackages | New-MDTable +$markdown += New-MDNewLine + +$androidGoogleAPIsTable = $androidInstalledPackages | Where-Object { $_ -Match "Google APIs" } +if ($androidGoogleAPIsTable.Count -gt 0) { + $markdown += New-MDHeader "Android Google APIs" -Level 4 + $markdown += Build-AndroidSDKPlatformTable $androidGoogleAPIsTable | New-MDTable + $markdown += New-MDNewLine +} + +$markdown += New-MDHeader "Extra Packages" -Level 4 +$markdown += Build-AndroidExtraPackagesTable $androidInstalledPackages | New-MDTable +$markdown += New-MDNewLine + +# +# Generate systeminfo.txt with information about image (for debug purpose) +# +$dateTime = (Get-Date).ToString("yyyy-MM-dd HH:mm:ss") +$systemInfo = [string]::Join([System.Environment]::NewLine, @( + "Date: ${dateTime}", + "Image name: ${ImageName}" +)) + + +if (-not (Test-Path $OutputDirectory)) { New-Item -Path $OutputDirectory -ItemType Directory | Out-Null } + +# +# Write final reports +# +Write-Host $markdownExtended +$systemInfo | Out-File -FilePath "${OutputDirectory}/systeminfo.txt" -Encoding UTF8NoBOM +$markdown | Out-File -FilePath "${OutputDirectory}/systeminfo.md" -Encoding UTF8NoBOM \ No newline at end of file diff --git a/images/macos/software-report/SoftwareReport.Java.psm1 b/images/macos/software-report/SoftwareReport.Java.psm1 new file mode 100644 index 00000000..f66597cb --- /dev/null +++ b/images/macos/software-report/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 = Get-Item 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/macos/software-report/SoftwareReport.Toolcache.psm1 b/images/macos/software-report/SoftwareReport.Toolcache.psm1 new file mode 100644 index 00000000..717f614f --- /dev/null +++ b/images/macos/software-report/SoftwareReport.Toolcache.psm1 @@ -0,0 +1,72 @@ +Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1" + +$os = Get-OSVersion + +function Get-ToolcacheRubyVersions { + $toolcachePath = Join-Path $env:HOME "hostedtoolcache" "Ruby" + return Get-ChildItem $toolcachePath -Name | Sort-Object { [Version]$_ } +} + +function Get-ToolcachePythonVersions { + $toolcachePath = Join-Path $env:HOME "hostedtoolcache" "Python" + return Get-ChildItem $toolcachePath -Name | Sort-Object { [Version]$_ } +} + +function Get-ToolcachePyPyVersions { + $toolcachePath = Join-Path $env:HOME "hostedtoolcache/PyPy/*/x64" + Get-ChildItem -Path $toolcachePath | Sort-Object { [Version] $_.Parent.Name } | ForEach-Object { + $foundVersionPath = $_.FullName + $foundVersionName = (Get-Item ($foundVersionPath -replace "x64") | Sort-Object -Property {[version]$_.name} -Descending | Select-Object -First 1).name + $arrPyPyVersion = ((& "$foundVersionPath/bin/python" -c "import sys;print(sys.version.split('\n')[1])") -split " ") + $pypyVersion = "$($arrPyPyVersion[0]) $($arrPyPyVersion[1])" + return "{0} {1}]" -f $foundVersionName, $pypyVersion + } +} + +function Get-ToolcacheNodeVersions { + $toolcachePath = Join-Path $env:HOME "hostedtoolcache" "Node" + return Get-ChildItem $toolcachePath -Name | Sort-Object { [Version]$_ } +} + +function Get-ToolcacheGoVersions { + $toolcachePath = Join-Path $env:HOME "hostedtoolcache" "Go" + return Get-ChildItem $toolcachePath -Name | Sort-Object { [Version]$_ } +} + +function Build-ToolcacheSection { + $output = "" + $output += New-MDHeader "Cached Tools" -Level 3 + $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 + + if ($os.IsLessThanBigSur) { + $output += New-MDHeader "PyPy" -Level 4 + $output += New-MDList -Lines (Get-ToolcachePyPyVersions) -Style Unordered + } + + if( -not $os.IsHighSierra) { + $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 + } + + return $output +} + +function Get-PowerShellModules { + $modules = (Get-ToolsetValue powershellModules).name + + $psModules = Get-Module -Name $modules -ListAvailable | Sort-Object Name | Group-Object Name + $psModules | ForEach-Object { + $moduleName = $_.Name + $moduleVersions = ($_.group.Version | Sort-Object -Unique) -join '
' + + [PSCustomObject]@{ + Module = $moduleName + Version = $moduleVersions + } + } +} \ No newline at end of file diff --git a/images/macos/software-report/SoftwareReport.Xamarin.psm1 b/images/macos/software-report/SoftwareReport.Xamarin.psm1 new file mode 100644 index 00000000..de1eca6c --- /dev/null +++ b/images/macos/software-report/SoftwareReport.Xamarin.psm1 @@ -0,0 +1,78 @@ +$sortRulesByVersion = @{ + Expression = { [System.Version]::Parse($_) } + Descending = $true +} + +function Get-VSMacVersion { + $plistPath = "/Applications/Visual Studio.app/Contents/Info.plist" + return Run-Command "/usr/libexec/PlistBuddy -c 'Print CFBundleVersion' '$plistPath'" +} + +function Get-NUnitVersion { + $version = Run-Command "nunit3-console --version" | Select-Object -First 1 | Take-Part -Part 3 + return "NUnit ${version}" +} + +function Build-MonoList { + $monoVersionsPath = "/Library/Frameworks/Mono.framework/Versions" + $monoFolders = Get-ChildItemWithoutSymlinks $monoVersionsPath + + $monoVersionList = $monoFolders | ForEach-Object { + $versionFilePath = Join-Path $_.FullName "Version" + if (Test-Path $versionFilePath) { + return Get-Content -Raw $versionFilePath + } + + return $_.Name + } | ForEach-Object { $_.Trim() } + + return $monoVersionList | Sort-Object -Property $sortRulesByVersion +} + +function Build-XamarinIOSList { + $sdkVersionsPath = "/Library/Frameworks/Xamarin.iOS.framework/Versions" + $sdkFolders = Get-ChildItemWithoutSymlinks $sdkVersionsPath + + $sdkVersionList = $sdkFolders | ForEach-Object { + $versionFilePath = Join-Path $_.FullName "Version" + if (Test-Path $versionFilePath) { + return Get-Content -Raw $versionFilePath + } + + return $_.Name + } | ForEach-Object { $_.Trim() } + + return $sdkVersionList | Sort-Object -Property $sortRulesByVersion +} + +function Build-XamarinMacList { + $sdkVersionsPath = "/Library/Frameworks/Xamarin.Mac.framework/Versions" + $sdkFolders = Get-ChildItemWithoutSymlinks $sdkVersionsPath + + $sdkVersionList = $sdkFolders | ForEach-Object { + $versionFilePath = Join-Path $_.FullName "Version" + if (Test-Path $versionFilePath) { + return Get-Content -Raw $versionFilePath + } + + return $_.Name + } | ForEach-Object { $_.Trim() } + + return $sdkVersionList | Sort-Object -Property $sortRulesByVersion +} + +function Build-XamarinAndroidList { + $sdkVersionsPath = "/Library/Frameworks/Xamarin.Android.framework/Versions" + $sdkFolders = Get-ChildItemWithoutSymlinks $sdkVersionsPath + + $sdkVersionList = $sdkFolders | ForEach-Object { + $versionFilePath = Join-Path $_.FullName "Version" + if (Test-Path $versionFilePath) { + return Get-Content -Raw $versionFilePath + } + + return $_.Name + } | ForEach-Object { $_.Trim() } + + return $sdkVersionList | Sort-Object -Property $sortRulesByVersion +} \ No newline at end of file diff --git a/images/macos/software-report/SoftwareReport.Xcode.psm1 b/images/macos/software-report/SoftwareReport.Xcode.psm1 new file mode 100644 index 00000000..d4cda2eb --- /dev/null +++ b/images/macos/software-report/SoftwareReport.Xcode.psm1 @@ -0,0 +1,236 @@ +function Get-XcodePaths { + $xcodePaths = Get-ChildItemWithoutSymlinks "/Applications" -Filter "Xcode_*.app" + return $xcodePaths | Select-Object -ExpandProperty Fullname +} + +function Get-XcodeVersionInfo { + [string]$output = Invoke-Expression "xcodebuild -version" + $versionOutputParts = $output.Split(" ") + return @{ + Version = [System.Version]::Parse($versionOutputParts[1]) + Build = $versionOutputParts[4] + } +} + +function Get-XcodeSDKList { + $versionInfo = Get-XcodeVersionInfo + if ($versionInfo.Version -le [System.Version]::Parse("9.4.1")) { + $output = Invoke-Expression "xcodebuild -showsdks" + $sdkList = $output | Where-Object { $_ -Match "-sdk" } + + return $sdkList | ForEach-Object { + $displayName, $canonicalName = $_.Split("-sdk") + return @{ + canonicalName = $canonicalName.Trim() + displayName = $displayName.Trim() + } + } + } + + [string]$output = Invoke-Expression "xcodebuild -showsdks -json" + return $output | ConvertFrom-Json +} + +function Get-XcodeInfoList { + $defaultXcodeRootPath = Get-DefaultXcodeRootPath + + $xcodeInfo = @{} + Get-XcodePaths | ForEach-Object { + $xcodeRootPath = $_ + Switch-Xcode -XcodeRootPath $xcodeRootPath + + $versionInfo = Get-XcodeVersionInfo + $versionInfo.Path = $xcodeRootPath + $versionInfo.IsDefault = ($xcodeRootPath -eq $defaultXcodeRootPath) + + $xcodeInfo.Add($versionInfo.Version.ToString(), [PSCustomObject] @{ + VersionInfo = $versionInfo + SDKInfo = Get-XcodeSDKList + SimulatorsInfo = Get-XcodeSimulatorsInfo + }) + } + + Switch-Xcode -XcodeRootPath $defaultXcodeRootPath + + return $xcodeInfo +} + +function Get-XcodePlatformOrder { + param ( + [Parameter(Mandatory)] + [string] $PlatformName + ) + + Switch ($PlatformName) { + "macOS" { 1 } + "iOS" { 2 } + "Simulator - iOS" { 3 } + "tvOS" { 4 } + "Simulator - tvOS" { 5 } + "watchOS" { 6 } + "Simulator - watchOS" { 7 } + Default { 100 } + } +} + +function Build-XcodeTable { + param ( + [Parameter(Mandatory)] + [hashtable] $xcodeInfo + ) + + $sortRules = @{ + Expression = { $_.Version } + Descending = $true + } + + $xcodeList = $xcodeInfo.Values | ForEach-Object { $_.VersionInfo } | Sort-Object $sortRules + return $xcodeList | ForEach-Object { + $defaultPostfix = If ($_.IsDefault) { " (default)" } else { "" } + return [PSCustomObject] @{ + "Version" = $_.Version.ToString() + $betaPostfix + $defaultPostfix + "Build" = $_.Build + "Path" = $_.Path + } + } +} + +function Get-XcodeDevicesList { + param ( + [Parameter(Mandatory)][object] $XcodeInfo, + [Parameter(Mandatory)][object] $Runtime + ) + + $runtimeId = $Runtime.identifier + $runtimeName = $Runtime.name + $output = $XcodeInfo.SimulatorsInfo.devices.$runtimeId + if ($null -eq $output) { + $output = $XcodeInfo.SimulatorsInfo.devices.$runtimeName + } + + return $output +} + +function Build-XcodeSDKTable { + param ( + [Parameter(Mandatory)] + [hashtable] $xcodeInfo + ) + + $sdkNames = @() + $xcodeInfo.Values | ForEach-Object { + $_.SDKInfo | ForEach-Object { + $sdkNames += $_.canonicalName + } + } + + $sdkNames = $sdkNames | Select-Object -Unique + return $sdkNames | ForEach-Object { + $sdkName = $_ + $sdkDisplayName = "" + $xcodeList = @() + $xcodeInfo.Values | ForEach-Object { + $sdk = $_.SDKInfo | Where-Object { $_.canonicalName -eq $sdkName } | Select-Object -First 1 + if ($sdk) { + $sdkDisplayName = $sdk.displayName + $xcodeList += $_.VersionInfo.Version + } + } + + $xcodeList = $xcodeList | Sort-Object + + return [PSCustomObject] @{ + "SDK" = $sdkDisplayName + "SDK Name" = $sdkName + "Xcode Version" = [String]::Join(", ", $xcodeList) + } + } | Sort-Object { + # Sort rule 1 + $sdkNameParts = $_."SDK".Split(" ") + $platformName = [String]::Join(" ", $sdkNameParts[0..($sdkNameParts.Length - 2)]) + return Get-XcodePlatformOrder $platformName + }, { + # Sort rule 2 + $sdkNameParts = $_."SDK".Split(" ") + return [System.Version]::Parse($sdkNameParts[-1]) + } +} + +function Format-XcodeSimulatorName { + param([Parameter(Mandatory)][string] $Device) + return $Device.Replace("Ê€", "R") +} + +function Build-XcodeSimulatorsTable { + param ( + [Parameter(Mandatory)] + [hashtable] $xcodeInfo + ) + + $runtimes = @() + $xcodeInfo.Values | ForEach-Object { + $_.SimulatorsInfo.runtimes | ForEach-Object { + $runtimes += $_ + } + } + + $runtimes = $runtimes | Sort-Object @{ Expression = { $_.identifier } } -Unique + + return $runtimes | ForEach-Object { + $runtime = $_ + $runtimeDevices = @() + $xcodeList = @() + + $xcodeInfo.Values | ForEach-Object { + $runtimeFound = $_.SimulatorsInfo.runtimes | Where-Object { $_.identifier -eq $runtime.identifier } | Select-Object -First 1 + if ($runtimeFound) { + $devicesToAdd = Get-XcodeDevicesList -XcodeInfo $_ -Runtime $runtimeFound + $runtimeDevices += $devicesToAdd | Select-Object -ExpandProperty name + $xcodeList += $_.VersionInfo.Version + } + } + + $xcodeList = $xcodeList | Sort-Object + $runtimeDevices = $runtimeDevices | ForEach-Object { Format-XcodeSimulatorName $_ } | Select-Object -Unique + $sortedRuntimeDevices = $runtimeDevices | Sort-Object @{ + Expression = { $_.Split(" ")[0] }; + Descending = $true; + }, { + $_.Split(" ") | Select-Object -Skip 1 | Join-String -Separator " " + } + + return [PSCustomObject] @{ + "OS" = $runtime.name + "Xcode Version" = [String]::Join("
", $xcodeList) + "Simulators" = [String]::Join("
", $sortedRuntimeDevices) + } + } | Sort-Object { + # Sort rule 1 + $sdkNameParts = $_."OS".Split(" ") + $platformName = [String]::Join(" ", $sdkNameParts[0..($sdkNameParts.Length - 2)]) + return Get-XcodePlatformOrder $platformName + }, { + # Sort rule 2 + $sdkNameParts = $_."OS".Split(" ") + return [System.Version]::Parse($sdkNameParts[-1]) + } +} + +function Build-XcodeSupportToolsSection { + $nomadCLI = Run-Command "gem -v nomad-cli" + $nomadIPA = Run-Command "ipa -version" + $xcpretty = Run-Command "xcpretty --version" + $xctool = Run-Command "xctool --version" + $xcversion = Run-Command "xcversion --version" | Select-String "^[0-9]" + + $output = "" + $output += New-MDHeader "Xcode Support Tools" -Level 4 + $output += New-MDList -Style Unordered -Lines @( + "Nomad CLI $nomadCLI", + "Nomad CLI IPA $nomadIPA", + "xcpretty $xcpretty", + "xctool $xctool", + "xcversion $xcversion" + ) + return $output +} \ No newline at end of file diff --git a/images/macos/templates/macOS-10.13.json b/images/macos/templates/macOS-10.13.json new file mode 100644 index 00000000..2190a6b4 --- /dev/null +++ b/images/macos/templates/macOS-10.13.json @@ -0,0 +1,211 @@ +{ + "variables": { + "vcenter_server": null, + "vcenter_username": null, + "vcenter_password": null, + "vcenter_datacenter": null, + "cluster_or_esxi_host": null, + "esxi_datastore": null, + "build_id": null, + "baseimage_name": null, + "output_folder": null, + "vm_username": null, + "vm_password": null, + "github_feed_token": null, + "xcode_install_user": null, + "xcode_install_password": null, + "image_os": "macos1013", + "announcements": "{{env `ANNOUNCEMENTS`}}" + }, + "builders": [ + { + "type": "vsphere-clone", + "vcenter_server": "{{user `vcenter_server`}}", + "username": "{{user `vcenter_username`}}", + "password": "{{user `vcenter_password`}}", + "insecure_connection": true, + "datacenter": "{{ user `vcenter_datacenter` }}", + "template": "{{ user `baseimage_name` }}", + "folder": "{{user `output_folder` }}", + "host": "{{user `cluster_or_esxi_host`}}", + "datastore": "{{user `esxi_datastore`}}", + "vm_name": "{{user `build_id`}}", + "ssh_username": "{{user `vm_username`}}", + "ssh_password": "{{user `vm_password`}}", + "CPUs": "10", + "RAM": "24576", + "NestedHV": "true", + "shutdown_timeout": "15m" + } + ], + "provisioners": [ + { + "type": "shell", + "inline": "mkdir ~/image-generation" + }, + { + "type": "file", + "source": "./tests", + "destination": "~/image-generation/" + }, + { + "type": "file", + "source": "./software-report", + "destination": "~/image-generation/" + }, + { + "type": "file", + "source": "./helpers", + "destination": "~/image-generation/" + }, + { + "type": "file", + "source": "./provision/configuration/environment/bashrc", + "destination": "~/.bashrc" + }, + { + "type": "file", + "source": "./provision/configuration/environment/bashprofile", + "destination": "~/.bash_profile" + }, + { + "type": "file", + "source": "./provision/utils", + "destination": "~/" + }, + { + "type": "file", + "source": "./provision/bootstrap-provisioner", + "destination": "~/bootstrap" + }, + { + "type": "file", + "source": "./toolsets/toolset-10.13.json", + "destination": "~/image-generation/toolset.json" + }, + { + "type": "file", + "source": "./toolsets/toolcache-10.13.json", + "destination": "~/image-generation/toolcache.json" + }, + { + "type": "shell", + "execute_command": "chmod +x {{ .Path }}; sudo {{ .Vars }} {{ .Path }}", + "scripts": [ + "./provision/configuration/add-network-interface-detection.sh", + "./provision/configuration/autologin.sh", + "./provision/configuration/disable-auto-updates.sh", + "./provision/configuration/screensaver-off.sh", + "./provision/configuration/ntpconf.sh", + "./provision/configuration/max-files.sh" + ], + "environment_vars": [ + "PASSWORD={{user `vm_password`}}", + "USERNAME={{user `vm_username`}}" + ] + }, + { + "type": "shell", + "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}", + "scripts": [ + "./provision/configuration/preimagedata.sh", + "./provision/configuration/configure-ssh.sh", + "./provision/configuration/configure-machine.sh" + ], + "environment_vars": [ + "IMAGE_VERSION={{user `build_id`}}", + "IMAGE_OS={{user `image_os`}}" + ] + }, + { + "type": "shell", + "execute_command": "chmod +x {{ .Path }}; sudo {{ .Vars }} {{ .Path }}", + "script": "./provision/core/reboot.sh", + "expect_disconnect": true + }, + { + "type": "shell", + "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}", + "pause_before": "30s", + "scripts": [ + "./provision/core/homebrew.sh", + "./provision/core/dotnet.sh", + "./provision/core/python.sh", + "./provision/core/azcopy.sh", + "./provision/core/openssl.sh", + "./provision/core/ruby.sh", + "./provision/core/rubygem.sh", + "./provision/core/powershell.sh", + "./provision/core/git.sh", + "./provision/core/node.sh" + ] + }, + { + "type": "shell", + "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}", + "scripts": [ + "./provision/core/xcode-tools.sh", + "./provision/core/xcode-sims.sh", + "./provision/core/build-xcode-symlinks.sh" + ], + "environment_vars": [ + "XCODE_INSTALL_USER={{user `xcode_install_user`}}", + "XCODE_INSTALL_PASSWORD={{user `xcode_install_password`}}" + ] + }, + { + "type": "shell", + "execute_command": "chmod +x {{ .Path }}; sudo {{ .Vars }} {{ .Path }}", + "script": "./provision/core/reboot.sh", + "expect_disconnect": true + }, + { + "type": "shell", + "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}", + "scripts": [ + "./provision/core/commonutils.sh", + "./provision/core/openjdk.sh", + "./provision/core/php.sh", + "./provision/core/aws.sh", + "./provision/core/cocoapods.sh", + "./provision/core/android-toolsets.sh", + "./provision/core/xamarin.sh", + "./provision/core/xamarin-android-ndk.sh", + "./provision/core/vsmac.sh", + "./provision/core/nvm.sh", + "./provision/core/postgresql.sh", + "./provision/core/mongodb.sh", + "./provision/core/miniconda.sh", + "./provision/core/chrome.sh", + "./provision/core/edge.sh", + "./provision/core/firefox.sh", + "./provision/core/toolcache-high-sierra.sh", + "./provision/core/pypy.sh" + ] + }, + { + "type": "shell", + "inline": [ + "pwsh -File \"$HOME/image-generation/software-report/SoftwareReport.Generator.ps1\" -OutputDirectory \"$HOME/image-generation/output/software-report\" -ImageName {{user `build_id`}}", + "pwsh -File \"$HOME/image-generation/tests/Run-Tests.ps1\" -WorkingDirectory \"$HOME/image-generation/tests\" -OutputFile \"$HOME/image-generation/output/tests/test-results.xml\"" + ], + "environment_vars": [ + "ANNOUNCEMENTS={{user `announcements`}}" + ] + }, + { + "type": "file", + "direction": "download", + "source": "~/image-generation/output/*", + "destination": "../image-output/" + }, + { + "type": "shell", + "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}", + "scripts": [ + "./provision/configuration/configure-hostname.sh", + "./provision/configuration/finalize-vm.sh" + ] + } + ] +} diff --git a/images/macos/templates/macOS-10.14.json b/images/macos/templates/macOS-10.14.json new file mode 100644 index 00000000..269ffa71 --- /dev/null +++ b/images/macos/templates/macOS-10.14.json @@ -0,0 +1,231 @@ +{ + "variables": { + "vcenter_server": null, + "vcenter_username": null, + "vcenter_password": null, + "vcenter_datacenter": null, + "cluster_or_esxi_host": null, + "esxi_datastore": null, + "build_id": null, + "baseimage_name": null, + "output_folder": null, + "vm_username": null, + "vm_password": null, + "github_feed_token": null, + "xcode_install_user": null, + "xcode_install_password": null, + "image_os": "macos1014", + "announcements": "{{env `ANNOUNCEMENTS`}}" + }, + "builders": [ + { + "type": "vsphere-clone", + "vcenter_server": "{{user `vcenter_server`}}", + "username": "{{user `vcenter_username`}}", + "password": "{{user `vcenter_password`}}", + "insecure_connection": true, + "datacenter": "{{ user `vcenter_datacenter` }}", + "template": "{{ user `baseimage_name` }}", + "folder": "{{user `output_folder` }}", + "host": "{{user `cluster_or_esxi_host`}}", + "datastore": "{{user `esxi_datastore`}}", + "vm_name": "{{user `build_id`}}", + "ssh_username": "{{user `vm_username`}}", + "ssh_password": "{{user `vm_password`}}", + "CPUs": "4", + "RAM": "12288", + "NestedHV": "true", + "shutdown_timeout": "15m" + } + ], + "provisioners": [ + { + "type": "shell", + "inline": "mkdir ~/image-generation" + }, + { + "type": "file", + "source": "./tests", + "destination": "~/image-generation/" + }, + { + "type": "file", + "source": "./software-report", + "destination": "~/image-generation/" + }, + { + "type": "file", + "source": "./helpers", + "destination": "~/image-generation/" + }, + { + "type": "file", + "source": "./provision/configuration/environment/bashrc", + "destination": "~/.bashrc" + }, + { + "type": "file", + "source": "./provision/configuration/environment/bashprofile", + "destination": "~/.bash_profile" + }, + { + "type": "file", + "source": "./provision/utils", + "destination": "~/" + }, + { + "type": "file", + "source": "./provision/bootstrap-provisioner", + "destination": "~/bootstrap" + }, + { + "type": "file", + "source": "./toolsets/toolset-10.14.json", + "destination": "~/image-generation/toolset.json" + }, + { + "type": "file", + "source": "./toolsets/toolcache-10.14.json", + "destination": "~/image-generation/toolcache.json" + }, + { + "type": "shell", + "execute_command": "chmod +x {{ .Path }}; sudo {{ .Vars }} {{ .Path }}", + "scripts": [ + "./provision/configuration/add-network-interface-detection.sh", + "./provision/configuration/autologin.sh", + "./provision/configuration/disable-auto-updates.sh", + "./provision/configuration/screensaver-off.sh", + "./provision/configuration/ntpconf.sh", + "./provision/configuration/max-files.sh" + ], + "environment_vars": [ + "PASSWORD={{user `vm_password`}}", + "USERNAME={{user `vm_username`}}" + ] + }, + { + "type": "shell", + "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}", + "scripts": [ + "./provision/configuration/preimagedata.sh", + "./provision/configuration/configure-ssh.sh", + "./provision/configuration/configure-machine.sh" + ], + "environment_vars": [ + "IMAGE_VERSION={{user `build_id`}}", + "IMAGE_OS={{user `image_os`}}" + ] + }, + { + "type": "shell", + "execute_command": "chmod +x {{ .Path }}; sudo {{ .Vars }} {{ .Path }}", + "script": "./provision/core/reboot.sh", + "expect_disconnect": true + }, + { + "type": "shell", + "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}", + "pause_before": "30s", + "scripts": [ + "./provision/core/homebrew.sh", + "./provision/core/dotnet.sh", + "./provision/core/python.sh", + "./provision/core/azcopy.sh", + "./provision/core/openssl.sh", + "./provision/core/ruby.sh", + "./provision/core/rubygem.sh", + "./provision/core/powershell.sh", + "./provision/core/git.sh", + "./provision/core/node.sh" + ] + }, + { + "type": "shell", + "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}", + "scripts": [ + "./provision/core/xcode-tools.sh", + "./provision/core/xcode-sims.sh" + ], + "environment_vars": [ + "XCODE_INSTALL_USER={{user `xcode_install_user`}}", + "XCODE_INSTALL_PASSWORD={{user `xcode_install_password`}}" + ] + }, + { + "type": "shell", + "execute_command": "chmod +x {{ .Path }}; sudo {{ .Vars }} {{ .Path }}", + "script": "./provision/core/reboot.sh", + "expect_disconnect": true + }, + { + "type": "shell", + "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}", + "scripts": [ + "./provision/core/commonutils.sh", + "./provision/core/openjdk.sh", + "./provision/core/php.sh", + "./provision/core/aws.sh", + "./provision/core/rust.sh", + "./provision/core/gcc.sh", + "./provision/core/haskell.sh", + "./provision/core/stack.sh", + "./provision/core/cocoapods.sh", + "./provision/core/android-toolsets.sh", + "./provision/core/xamarin.sh", + "./provision/core/xamarin-android-ndk.sh", + "./provision/core/vsmac.sh", + "./provision/core/nvm.sh", + "./provision/core/postgresql.sh", + "./provision/core/mongodb.sh", + "./provision/core/audiodevice.sh", + "./provision/core/chrome.sh", + "./provision/core/edge.sh", + "./provision/core/firefox.sh", + "./provision/core/miniconda.sh", + "./provision/core/xcode-postbuild.sh", + "./provision/core/toolcache.sh", + "./provision/core/pypy.sh" + ], + "environment_vars": [ + "GITHUB_FEED_TOKEN={{user `github_feed_token`}}" + ] + }, + { + "type": "shell", + "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} pwsh -f {{ .Path }}", + "scripts": "./provision/core/toolset.ps1" + }, + { + "type": "shell", + "execute_command": "ruby {{ .Path }}", + "scripts": [ + "./provision/core/delete-duplicate-sims.rb" + ] + }, + { + "type": "shell", + "inline": [ + "pwsh -File \"$HOME/image-generation/software-report/SoftwareReport.Generator.ps1\" -OutputDirectory \"$HOME/image-generation/output/software-report\" -ImageName {{user `build_id`}}", + "pwsh -File \"$HOME/image-generation/tests/Run-Tests.ps1\" -WorkingDirectory \"$HOME/image-generation/tests\" -OutputFile \"$HOME/image-generation/output/tests/test-results.xml\"" + ], + "environment_vars": [ + "ANNOUNCEMENTS={{user `announcements`}}" + ] + }, + { + "type": "file", + "direction": "download", + "source": "~/image-generation/output/*", + "destination": "../image-output/" + }, + { + "type": "shell", + "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}", + "scripts": [ + "./provision/configuration/configure-hostname.sh", + "./provision/configuration/finalize-vm.sh" + ] + } + ] +} diff --git a/images/macos/templates/macOS-10.15.json b/images/macos/templates/macOS-10.15.json new file mode 100644 index 00000000..3dcc3d33 --- /dev/null +++ b/images/macos/templates/macOS-10.15.json @@ -0,0 +1,230 @@ +{ + "variables": { + "vcenter_server": null, + "vcenter_username": null, + "vcenter_password": null, + "vcenter_datacenter": null, + "cluster_or_esxi_host": null, + "esxi_datastore": null, + "build_id": null, + "baseimage_name": null, + "output_folder": null, + "vm_username": null, + "vm_password": null, + "github_feed_token": null, + "xcode_install_user": null, + "xcode_install_password": null, + "image_os": "macos1015", + "announcements": "{{env `ANNOUNCEMENTS`}}" + }, + "builders": [ + { + "type": "vsphere-clone", + "vcenter_server": "{{user `vcenter_server`}}", + "username": "{{user `vcenter_username`}}", + "password": "{{user `vcenter_password`}}", + "insecure_connection": true, + "datacenter": "{{ user `vcenter_datacenter` }}", + "template": "{{ user `baseimage_name` }}", + "folder": "{{user `output_folder` }}", + "host": "{{user `cluster_or_esxi_host`}}", + "datastore": "{{user `esxi_datastore`}}", + "vm_name": "{{user `build_id`}}", + "ssh_username": "{{user `vm_username`}}", + "ssh_password": "{{user `vm_password`}}", + "CPUs": "4", + "RAM": "12288", + "NestedHV": "true", + "shutdown_timeout": "15m" + } + ], + "provisioners": [ + { + "type": "shell", + "inline": "mkdir ~/image-generation" + }, + { + "type": "file", + "source": "./tests", + "destination": "~/image-generation/" + }, + { + "type": "file", + "source": "./software-report", + "destination": "~/image-generation/" + }, + { + "type": "file", + "source": "./helpers", + "destination": "~/image-generation/" + }, + { + "type": "file", + "source": "./provision/configuration/environment/bashrc", + "destination": "~/.bashrc" + }, + { + "type": "file", + "source": "./provision/configuration/environment/bashprofile", + "destination": "~/.bash_profile" + }, + { + "type": "file", + "source": "./provision/utils", + "destination": "~/" + }, + { + "type": "file", + "source": "./provision/bootstrap-provisioner", + "destination": "~/bootstrap" + }, + { + "type": "file", + "source": "./toolsets/toolset-10.15.json", + "destination": "~/image-generation/toolset.json" + }, + { + "type": "file", + "source": "./toolsets/toolcache-10.14.json", + "destination": "~/image-generation/toolcache.json" + }, + { + "type": "shell", + "execute_command": "chmod +x {{ .Path }}; sudo {{ .Vars }} {{ .Path }}", + "scripts": [ + "./provision/configuration/add-network-interface-detection.sh", + "./provision/configuration/autologin.sh", + "./provision/configuration/disable-auto-updates.sh", + "./provision/configuration/screensaver-off.sh", + "./provision/configuration/ntpconf.sh", + "./provision/configuration/max-files.sh", + "./provision/configuration/shell-change.sh" + ], + "environment_vars": [ + "PASSWORD={{user `vm_password`}}", + "USERNAME={{user `vm_username`}}" + ] + }, + { + "type": "shell", + "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}", + "scripts": [ + "./provision/configuration/preimagedata.sh", + "./provision/configuration/configure-ssh.sh", + "./provision/configuration/configure-machine.sh" + ], + "environment_vars": [ + "IMAGE_VERSION={{user `build_id`}}", + "IMAGE_OS={{user `image_os`}}" + ] + }, + { + "type": "shell", + "execute_command": "chmod +x {{ .Path }}; sudo {{ .Vars }} {{ .Path }}", + "script": "./provision/core/reboot.sh", + "expect_disconnect": true + }, + { + "type": "shell", + "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}", + "pause_before": "30s", + "scripts": [ + "./provision/core/homebrew.sh", + "./provision/core/dotnet.sh", + "./provision/core/python.sh", + "./provision/core/azcopy.sh", + "./provision/core/openssl.sh", + "./provision/core/ruby.sh", + "./provision/core/rubygem.sh", + "./provision/core/powershell.sh", + "./provision/core/git.sh", + "./provision/core/node.sh" + ] + }, + { + "type": "shell", + "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}", + "script": "./provision/core/xcode-tools.sh", + "environment_vars": [ + "XCODE_INSTALL_USER={{user `xcode_install_user`}}", + "XCODE_INSTALL_PASSWORD={{user `xcode_install_password`}}" + ] + }, + { + "type": "shell", + "execute_command": "chmod +x {{ .Path }}; sudo {{ .Vars }} {{ .Path }}", + "script": "./provision/core/reboot.sh", + "expect_disconnect": true + }, + { + "type": "shell", + "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}", + "scripts": [ + "./provision/core/commonutils.sh", + "./provision/core/openjdk.sh", + "./provision/core/php.sh", + "./provision/core/aws.sh", + "./provision/core/rust.sh", + "./provision/core/gcc.sh", + "./provision/core/haskell.sh", + "./provision/core/stack.sh", + "./provision/core/cocoapods.sh", + "./provision/core/android-toolsets.sh", + "./provision/core/xamarin.sh", + "./provision/core/xamarin-android-ndk.sh", + "./provision/core/vsmac.sh", + "./provision/core/nvm.sh", + "./provision/core/postgresql.sh", + "./provision/core/mongodb.sh", + "./provision/core/audiodevice.sh", + "./provision/core/vcpkg.sh", + "./provision/core/miniconda.sh", + "./provision/core/chrome.sh", + "./provision/core/edge.sh", + "./provision/core/firefox.sh", + "./provision/core/xcode-postbuild.sh", + "./provision/core/toolcache.sh", + "./provision/core/pypy.sh" + ], + "environment_vars": [ + "GITHUB_FEED_TOKEN={{user `github_feed_token`}}" + ] + }, + { + "type": "shell", + "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} pwsh -f {{ .Path }}", + "scripts": "./provision/core/toolset.ps1" + }, + { + "type": "shell", + "execute_command": "ruby {{ .Path }}", + "scripts": [ + "./provision/core/delete-duplicate-sims.rb" + ] + }, + { + "type": "shell", + "inline": [ + "pwsh -File \"$HOME/image-generation/software-report/SoftwareReport.Generator.ps1\" -OutputDirectory \"$HOME/image-generation/output/software-report\" -ImageName {{user `build_id`}}", + "pwsh -File \"$HOME/image-generation/tests/Run-Tests.ps1\" -WorkingDirectory \"$HOME/image-generation/tests\" -OutputFile \"$HOME/image-generation/output/tests/test-results.xml\"" + ], + "environment_vars": [ + "ANNOUNCEMENTS={{user `announcements`}}" + ] + }, + { + "type": "file", + "direction": "download", + "source": "~/image-generation/output/*", + "destination": "../image-output/" + }, + { + "type": "shell", + "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}", + "scripts": [ + "./provision/configuration/configure-hostname.sh", + "./provision/configuration/finalize-vm.sh" + ] + } + ] +} diff --git a/images/macos/templates/macOS-11.0.json b/images/macos/templates/macOS-11.0.json new file mode 100644 index 00000000..7cf7db8e --- /dev/null +++ b/images/macos/templates/macOS-11.0.json @@ -0,0 +1,226 @@ +{ + "variables": { + "vcenter_server": null, + "vcenter_username": null, + "vcenter_password": null, + "vcenter_datacenter": null, + "cluster_or_esxi_host": null, + "esxi_datastore": null, + "build_id": null, + "baseimage_name": null, + "output_folder": null, + "vm_username": null, + "vm_password": null, + "github_feed_token": null, + "xcode_install_user": null, + "xcode_install_password": null, + "image_os": "macos11", + "announcements": "{{env `ANNOUNCEMENTS`}}" + }, + "builders": [ + { + "type": "vsphere-clone", + "vcenter_server": "{{user `vcenter_server`}}", + "username": "{{user `vcenter_username`}}", + "password": "{{user `vcenter_password`}}", + "insecure_connection": true, + "datacenter": "{{ user `vcenter_datacenter` }}", + "template": "{{ user `baseimage_name` }}", + "folder": "{{user `output_folder` }}", + "host": "{{user `cluster_or_esxi_host`}}", + "datastore": "{{user `esxi_datastore`}}", + "vm_name": "{{user `build_id`}}", + "ssh_username": "{{user `vm_username`}}", + "ssh_password": "{{user `vm_password`}}", + "CPUs": "4", + "RAM": "12288", + "NestedHV": "true", + "shutdown_timeout": "15m" + } + ], + "provisioners": [ + { + "type": "shell", + "inline": "mkdir ~/image-generation" + }, + { + "type": "file", + "source": "./tests", + "destination": "~/image-generation/" + }, + { + "type": "file", + "source": "./software-report", + "destination": "~/image-generation/" + }, + { + "type": "file", + "source": "./helpers", + "destination": "~/image-generation/" + }, + { + "type": "file", + "source": "./provision/configuration/environment/bashrc", + "destination": "~/.bashrc" + }, + { + "type": "file", + "source": "./provision/configuration/environment/bashprofile", + "destination": "~/.bash_profile" + }, + { + "type": "file", + "source": "./provision/utils", + "destination": "~/" + }, + { + "type": "file", + "source": "./provision/bootstrap-provisioner", + "destination": "~/bootstrap" + }, + { + "type": "file", + "source": "./toolsets/toolset-11.0.json", + "destination": "~/image-generation/toolset.json" + }, + { + "type": "file", + "source": "./toolsets/toolcache-11.0.json", + "destination": "~/image-generation/toolcache.json" + }, + { + "type": "shell", + "execute_command": "chmod +x {{ .Path }}; sudo {{ .Vars }} {{ .Path }}", + "scripts": [ + "./provision/configuration/add-network-interface-detection.sh", + "./provision/configuration/autologin.sh", + "./provision/configuration/disable-auto-updates.sh", + "./provision/configuration/screensaver-off.sh", + "./provision/configuration/ntpconf.sh", + "./provision/configuration/max-files.sh", + "./provision/configuration/shell-change.sh" + ], + "environment_vars": [ + "PASSWORD={{user `vm_password`}}", + "USERNAME={{user `vm_username`}}" + ] + }, + { + "type": "shell", + "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}", + "scripts": [ + "./provision/configuration/preimagedata.sh", + "./provision/configuration/configure-ssh.sh", + "./provision/configuration/configure-machine.sh" + ], + "environment_vars": [ + "IMAGE_VERSION={{user `build_id`}}", + "IMAGE_OS={{user `image_os`}}" + ] + }, + { + "type": "shell", + "execute_command": "chmod +x {{ .Path }}; sudo {{ .Vars }} {{ .Path }}", + "script": "./provision/core/reboot.sh", + "expect_disconnect": true + }, + { + "type": "shell", + "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}", + "pause_before": "30s", + "scripts": [ + "./provision/core/homebrew.sh", + "./provision/core/dotnet.sh", + "./provision/core/python.sh", + "./provision/core/azcopy.sh", + "./provision/core/openssl.sh", + "./provision/core/ruby.sh", + "./provision/core/rubygem.sh", + "./provision/core/powershell.sh", + "./provision/core/git.sh", + "./provision/core/node.sh" + ] + }, + { + "type": "shell", + "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}", + "script": "./provision/core/xcode-tools.sh", + "environment_vars": [ + "XCODE_INSTALL_USER={{user `xcode_install_user`}}", + "XCODE_INSTALL_PASSWORD={{user `xcode_install_password`}}" + ] + }, + { + "type": "shell", + "execute_command": "chmod +x {{ .Path }}; sudo {{ .Vars }} {{ .Path }}", + "script": "./provision/core/reboot.sh", + "expect_disconnect": true + }, + { + "type": "shell", + "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}", + "scripts": [ + "./provision/core/commonutils.sh", + "./provision/core/openjdk.sh", + "./provision/core/php.sh", + "./provision/core/aws.sh", + "./provision/core/rust.sh", + "./provision/core/gcc.sh", + "./provision/core/haskell.sh", + "./provision/core/stack.sh", + "./provision/core/cocoapods.sh", + "./provision/core/android-toolsets.sh", + "./provision/core/xamarin.sh", + "./provision/core/vsmac.sh", + "./provision/core/nvm.sh", + "./provision/core/postgresql.sh", + "./provision/core/mongodb.sh", + "./provision/core/vcpkg.sh", + "./provision/core/miniconda.sh", + "./provision/core/chrome.sh", + "./provision/core/edge.sh", + "./provision/core/firefox.sh", + "./provision/core/toolcache.sh" + ], + "environment_vars": [ + "GITHUB_FEED_TOKEN={{user `github_feed_token`}}" + ] + }, + { + "type": "shell", + "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} pwsh -f {{ .Path }}", + "scripts": "./provision/core/toolset.ps1" + }, + { + "type": "shell", + "execute_command": "ruby {{ .Path }}", + "scripts": [ + "./provision/core/delete-duplicate-sims.rb" + ] + }, + { + "type": "shell", + "inline": [ + "pwsh -File \"$HOME/image-generation/software-report/SoftwareReport.Generator.ps1\" -OutputDirectory \"$HOME/image-generation/output/software-report\" -ImageName {{user `build_id`}}", + "pwsh -File \"$HOME/image-generation/tests/Run-Tests.ps1\" -WorkingDirectory \"$HOME/image-generation/tests\" -OutputFile \"$HOME/image-generation/output/tests/test-results.xml\"" + ], + "environment_vars": [ + "ANNOUNCEMENTS={{user `announcements`}}" + ] + }, + { + "type": "file", + "direction": "download", + "source": "~/image-generation/output/*", + "destination": "../image-output/" + }, + { + "type": "shell", + "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}", + "scripts": [ + "./provision/configuration/configure-hostname.sh", + "./provision/configuration/finalize-vm.sh" + ] + } + ] +} diff --git a/images/macos/tests/Android.Tests.ps1 b/images/macos/tests/Android.Tests.ps1 new file mode 100644 index 00000000..a7420b23 --- /dev/null +++ b/images/macos/tests/Android.Tests.ps1 @@ -0,0 +1,91 @@ +Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1" +Import-Module "$PSScriptRoot/../helpers/Tests.Helpers.psm1" + +$os = Get-OSVersion + +Describe "Android" { + $androidNdkToolchains = @("mips64el-linux-android-4.9", "mipsel-linux-android-4.9") + + $androidPackages = @( + "tools", + "platform-tools", + "tools/proguard", + "ndk-bundle", + "cmake", + (Get-ToolsetValue "android.platform-list" | ForEach-Object { "platforms/${_}" }), + (Get-ToolsetValue "android.build-tools" | ForEach-Object { "build-tools/${_}" }), + (Get-ToolsetValue "android.extra-list" | ForEach-Object { "extras/${_}" }), + (Get-ToolsetValue "android.addon-list" | ForEach-Object { "add-ons/${_}" }) + ) | ForEach-Object { $_ } + + BeforeAll { + $ANDROID_SDK_DIR = Join-Path $env:HOME "Library" "Android" "sdk" + + function Validate-AndroidPackage { + param ( + [Parameter(Mandatory=$true)] + [string]$PackageName + ) + + # Convert 'm2repository;com;android;support;constraint;constraint-layout-solver;1.0.0-beta1' -> + # 'm2repository/com/android/support/constraint/constraint-layout-solver/1.0.0-beta1' + $PackageName = $PackageName.Replace(";", "/") + $targetPath = Join-Path $ANDROID_SDK_DIR $PackageName + $targetPath | Should -Exist + } + } + + + Context "Packages" { + $testCases = $androidPackages | ForEach-Object { @{ PackageName = $_ } } + + It "" -TestCases $testCases { + param ([string] $PackageName) + Validate-AndroidPackage $PackageName + } + } + + Context "NDK toolchains" -Skip:($os.IsBigSur) { + $testCases = $androidNdkToolchains | ForEach-Object { @{AndroidNdkToolchain = $_} } + + It "" -TestCases $testCases { + param ([string] $AndroidNdkToolchain) + + $toolchainPath = Join-Path $ANDROID_SDK_DIR "ndk-bundle" "toolchains" $AndroidNdkToolchain + $toolchainPath | Should -Exist + } + } + + Context "Legacy NDK versions" -Skip:($os.IsBigSur) { + It "Android NDK version is 21" { + $ndkBundlePath = Join-Path $ANDROID_SDK_DIR "ndk-bundle" "source.properties" + $rawContent = Get-Content $ndkBundlePath -Raw + $rawContent | Should -BeLikeExactly "*Revision = 21.*" + } + + It "Android NDK version r18b is installed" { + $ndk18BundlePath = Join-Path $ANDROID_SDK_DIR "ndk" "18.1.5063045" "source.properties" + $rawContent = Get-Content $ndk18BundlePath -Raw + $rawContent | Should -BeLikeExactly "*Revision = 18.*" + } + } + + It "HAXM is installed" { + $haxmPath = Join-Path $ANDROID_SDK_DIR "extras" "intel" "Hardware_Accelerated_Execution_Manager" "silent_install.sh" + "$haxmPath -v" | Should -ReturnZeroExitCode + } +} + +Describe "Gradle" { + It "Gradle is installed" { + "gradle --version" | Should -ReturnZeroExitCode + } + + It "Gradle is installed to /usr/local/bin" { + (Get-Command "gradle").Path | Should -BeExactly "/usr/local/bin/gradle" + } + + It "Gradle is compatible with init.d plugins" { + "cd /tmp && gradle tasks" | Should -ReturnZeroExitCode + } +} \ No newline at end of file diff --git a/images/macos/tests/Common.Tests.ps1 b/images/macos/tests/Common.Tests.ps1 new file mode 100644 index 00000000..ed813f58 --- /dev/null +++ b/images/macos/tests/Common.Tests.ps1 @@ -0,0 +1,372 @@ +Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1" +Import-Module "$PSScriptRoot/../helpers/Tests.Helpers.psm1" + +$os = Get-OSVersion + +Describe "Disk free space" { + It "Image has more than 10GB free space" { + # we should have at least 10 GB of free space on macOS images + # https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops#capabilities-and-limitations + $freeSpace = (Get-PSDrive "/").Free + $freeSpace | Should -BeGreaterOrEqual 10GB + } +} + +Describe "Git" { + It "git is installed" { + "git --version" | Should -ReturnZeroExitCode + } + + It "git lfs is installed" { + "git lfs version" | Should -ReturnZeroExitCode + } + + It "hub CLI is installed" { + "hub --version" | Should -ReturnZeroExitCode + } +} + +Describe "Audio device" -Skip:($os.IsHighSierra -or $os.IsBigSur) { + It "Sox is installed" { + "sox --version" | Should -ReturnZeroExitCode + } + + It "SwitchAudioSource is installed" { + "SwitchAudioSource -c" | Should -ReturnZeroExitCode + } + + It "Audio channel Soundflower (2ch)" { + SwitchAudioSource -c | Should -BeLikeExactly "Soundflower (2ch)" + } +} + +Describe "Common utilities" { + It "Homebrew" { + "brew --version" | Should -ReturnZeroExitCode + } + + It "DotNet" { + "dotnet --version" | Should -ReturnZeroExitCode + } + + It "Go" { + "go version" | Should -ReturnZeroExitCode + } + + It "Bundler" { + "bundler --version" | Should -ReturnZeroExitCode + } + + It "Maven" { + "mvn --version" | Should -ReturnZeroExitCode + } + + It "CocoaPods" { + "pod --version" | Should -ReturnZeroExitCode + } + + It "Carthage" { + "carthage version" | Should -ReturnZeroExitCode + } + + It "App Center CLI" { + "appcenter --version" | Should -ReturnZeroExitCode + } + + It "Azure CLI" { + "az -v" | Should -ReturnZeroExitCode + } + + Describe "AWS" { + It "AWS CLI" { + "aws --version" | Should -ReturnZeroExitCode + } + It "AWS SAM CLI" { + "sam --version" | Should -ReturnZeroExitCode + } + + It "AWS Session Manager CLI" { + "session-manager-plugin --version" | Should -ReturnZeroExitCode + } + } + + It "Aliyun CLI" { + "aliyun --version" | Should -ReturnZeroExitCode + } + + It "Mobile Center CLI" { + "mobile-center --version" | Should -ReturnZeroExitCode + } + + It "Nomad CLI" { + $result = Get-CommandResult "gem list" + $result.Output | Should -BeLike "*nomad-cli*" + } + + It "Nomad CLI IPA" { + "ipa --version" | Should -ReturnZeroExitCode + } + + It "Conda" { + Get-EnvironmentVariable "CONDA" | Should -Not -BeNullOrEmpty + $condaBinPath = Join-Path $env:CONDA "bin" "conda" + "$condaBinPath --version" | Should -ReturnZeroExitCode + } + + It "Fastlane" { + "fastlane --version" | Should -ReturnZeroExitCode + } + + It "Subversion" { + "svn --version" | Should -ReturnZeroExitCode + } + + It "cmake" { + "cmake --version" | Should -ReturnZeroExitCode + } + + It "curl" { + "curl --version" | Should -ReturnZeroExitCode + } + + It "xctool" { + "xctool --version" | Should -ReturnZeroExitCode + } + + It "xcpretty" { + "xcpretty --version" | Should -ReturnZeroExitCode + } + + It "wget" { + "wget --version" | Should -ReturnZeroExitCode + } + + It "mongodb" { + "mongo --version" | Should -ReturnZeroExitCode + "mongod --version"| Should -ReturnZeroExitCode + } + + It "jq" { + "jq --version" | Should -ReturnZeroExitCode + } + + It "OpenSSL" { + "openssl version" | Should -ReturnZeroExitCode + } + + It "GnuPG" { + "gpg --version" | Should -ReturnZeroExitCode + } + + It "PostgreSQL-Client" { + "psql --version" | Should -ReturnZeroExitCode + } + + It "PostgreSQL-Server" { + "pg_config --version" | Should -ReturnZeroExitCode + } + + It "Aria2" { + "aria2c --version" | Should -ReturnZeroExitCode + } + + It "Azcopy" { + "azcopy --version" | Should -ReturnZeroExitCode + } + + It "PHP" { + Get-WhichTool "php" | Should -Not -BeLike "/usr/bin/php*" + "php --version" | Should -ReturnZeroExitCode + } + + It "Composer" { + "composer --version" | Should -ReturnZeroExitCode + } + + It "R" -Skip:($os.IsBigSur) { + "R --version" | Should -ReturnZeroExitCode + } + + It "zstd" { + "zstd --version" | Should -ReturnZeroExitCode + } + + It "bazel" { + "bazel --version" | Should -ReturnZeroExitCode + } + + It "bazelisk" { + "bazelisk version" | Should -ReturnZeroExitCode + } + + It "Julia" { + "julia --version" | Should -ReturnZeroExitCode + } + + It "Packer" { + "packer --version" | Should -ReturnZeroExitCode + } + + It "Helm" { + "helm version --short" | Should -ReturnZeroExitCode + } + + It "virtualbox" { + "vboxmanage -v" | Should -ReturnZeroExitCode + } + + It "vagrant" { + "vagrant --version" | Should -ReturnZeroExitCode + } + + It "GitHub CLI" { + "gh --version" | Should -ReturnZeroExitCode + } + + It "7-Zip" { + "7z i" | Should -ReturnZeroExitCode + } + + It "Apache Ant" { + "ant -version" | Should -ReturnZeroExitCode + } +} + +Describe "Browsers" { + It "Chrome" { + $chromeLocation = "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" + $chromeLocation | Should -Exist + "'$chromeLocation' --version" | Should -ReturnZeroExitCode + } + + It "Chrome Driver" { + "chromedriver --version" | Should -ReturnZeroExitCode + } + + It "Microsoft Edge" { + $edgeLocation = "/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge" + $edgeLocation | Should -Exist + "'$edgeLocation' --version" | Should -ReturnZeroExitCode + } + + It "Microsoft Edge Driver" { + "msedgedriver --version" | Should -ReturnZeroExitCode + } + + It "Firefox" { + $firefoxLocation = "/Applications/Firefox.app/Contents/MacOS/firefox" + $firefoxLocation | Should -Exist + "'$firefoxLocation' --version" | Should -ReturnZeroExitCode + } + + It "Geckodriver" { + "geckodriver --version" | Should -ReturnZeroExitCode + } +} + +Describe "Rust" -Skip:($os.IsHighSierra) { + It "Rustup is installed" { + "rustup --version" | Should -ReturnZeroExitCode + } + + It "Rustc is installed" { + "rustc --version" | Should -ReturnZeroExitCode + } + + It "Cargo is installed" { + "cargo --version" | Should -ReturnZeroExitCode + } + + Context "Cargo dependencies" { + It "bindgen" { + "bindgen --version" | Should -ReturnZeroExitCode + } + + It "cbindgen" { + "cbindgen --version" | Should -ReturnZeroExitCode + } + + It "Cargo audit" { + "cargo audit --version" | Should -ReturnZeroExitCode + } + + It "Cargo outdated" { + "cargo outdated --version" | Should -ReturnZeroExitCode + } + } +} + +Describe "Haskell" -Skip:($os.IsHighSierra) { + It "GHCup" { + "ghcup --version" | Should -ReturnZeroExitCode + } + + It "GHC" { + "ghc --version" | Should -ReturnZeroExitCode + } + + It "Cabal" { + "cabal --version" | Should -ReturnZeroExitCode + } + + It "Stack" { + "stack --version" | Should -ReturnZeroExitCode + } +} + +Describe "Clang/LLVM" -Skip:($os.IsHighSierra) { + It "Clang/LLVM is installed" { + "$(brew --prefix llvm)/bin/clang --version" | Should -ReturnZeroExitCode + } +} + +Describe "Gcc" -Skip:($os.IsHighSierra) { + $testCases = @("8", "9") | ForEach-Object { @{GccVersion = $_} } + + It "Gcc " -TestCases $testCases { + param ( + [string] $GccVersion + ) + + "gcc-$GccVersion --version" | Should -ReturnZeroExitCode + } +} + +Describe "Gfortran" -Skip:($os.IsHighSierra) { + $testCases = @("8", "9") | ForEach-Object { @{GfortranVersion = $_} } + + It "Gfortran " -TestCases $testCases { + param ( + [string] $GfortranVersion + ) + + "gfortran-$GfortranVersion --version" | Should -ReturnZeroExitCode + } +} + +Describe "Screen Resolution" -Skip:($os.IsHighSierra) { + It "Screen Resolution" { + system_profiler SPDisplaysDataType | Select-String "Resolution" | Should -Match "1176 x 885" + } +} + +Describe "vcpkg" -Skip:($os.IsHighSierra -or $os.IsMojave) { + It "vcpkg" { + "vcpkg version" | Should -ReturnZeroExitCode + } +} + +Describe "Newman" -Skip:($os.IsHighSierra -or $os.IsMojave) { + It "Newman" { + "newman --version" | Should -ReturnZeroExitCode + } +} + +Describe "Visual Studio For Mac" { + It "VS4Mac is installed" { + $vsPath = "/Applications/Visual Studio.app" + $vstoolPath = Join-Path $vsPath "Contents/MacOS/vstool" + $vsPath | Should -Exist + $vstoolPath | Should -Exist + } +} \ No newline at end of file diff --git a/images/macos/tests/Java.Tests.ps1 b/images/macos/tests/Java.Tests.ps1 new file mode 100644 index 00000000..9171eb5b --- /dev/null +++ b/images/macos/tests/Java.Tests.ps1 @@ -0,0 +1,61 @@ +Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1" +Import-Module "$PSScriptRoot/../helpers/Tests.Helpers.psm1" + +#Java tests are disabled because Java is not working properly on macOS 11.0 yet. +$os = Get-OSVersion +function Get-NativeVersionFormat { + param($Version) + if ($Version -in "7", "8") { + return "1.${Version}" + } + return $Version +} + +Describe "Java" -Skip:($os.IsBigSur) { + BeforeAll { + function Validate-JavaVersion { + param($JavaCommand, $ExpectedVersion) + + $commandResult = Get-CommandResult $JavaCommand + $commandResult.ExitCode | Should -Be 0 + $matchResult = $commandResult.Output | Select-String '^openjdk version \"([\d\._]+)\"' + $matchResult.Matches.Success | Should -BeTrue + $version = $matchResult.Matches.Groups[1].Value + $version | Should -BeLike "${ExpectedVersion}*" + } + } + + $versionsList = Get-ToolsetValue "java.versions" + $defaultJava = Get-ToolsetValue "java.default" + + $testCases = $versionsList | ForEach-Object { @{ Title = $_; Version = (Get-NativeVersionFormat $_); EnvVariable = "JAVA_HOME_${_}_X64" } } + $testCases += @{ Title = "Default"; Version = (Get-NativeVersionFormat $defaultJava); EnvVariable = "JAVA_HOME" } + + $testCases | ForEach-Object { + Context $_.Title { + It "Version is found by 'java_home'" -TestCases $_ { + "/usr/libexec/java_home -v${Version}" | Should -ReturnZeroExitCode + } + + It "Version is valid" -TestCases $_ { + $javaRootPath = (Get-CommandResult "/usr/libexec/java_home -v${Version}").Output + $javaBinPath = Join-Path $javaRootPath "/bin/java" + Validate-JavaVersion -JavaCommand "$javaBinPath -version" -ExpectedVersion $Version + } + + It "" -TestCases $_ { + $envVariablePath = Get-EnvironmentVariable $EnvVariable + $commandResult = Get-CommandResult "/usr/libexec/java_home -v${Version}" + $commandResult.ExitCode | Should -Be 0 + $commandResult.Output | Should -Not -BeNullOrEmpty + $commandResult.Output | Should -Be $envVariablePath + } + + if ($_.Title -eq "Default") { + It "Version is default" -TestCases $_ { + Validate-JavaVersion -JavaCommand "java -version" -ExpectedVersion $Version + } + } + } + } +} \ No newline at end of file diff --git a/images/macos/tests/Linters.Tests.ps1 b/images/macos/tests/Linters.Tests.ps1 new file mode 100644 index 00000000..3b7b8e0d --- /dev/null +++ b/images/macos/tests/Linters.Tests.ps1 @@ -0,0 +1,13 @@ +Import-Module "$PSScriptRoot/../helpers/Tests.Helpers.psm1" + +$os = Get-OSVersion + +Describe "Linters" { + It "yamllint" { + "yamllint --version" | Should -ReturnZeroExitCode + } + + It "SwiftLint" -Skip:($os.IsHighSierra) { + "swiftlint version" | Should -ReturnZeroExitCode + } +} \ No newline at end of file diff --git a/images/macos/tests/Node.Tests.ps1 b/images/macos/tests/Node.Tests.ps1 new file mode 100644 index 00000000..7fde021d --- /dev/null +++ b/images/macos/tests/Node.Tests.ps1 @@ -0,0 +1,50 @@ +Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1" +Import-Module "$PSScriptRoot/../helpers/Tests.Helpers.psm1" + +Describe "Node.JS" { + BeforeAll { + $os = Get-OSVersion + $expectedNodeVersion = if ($os.IsHigherThanMojave) { "v12.*" } else { "v8.*" } + } + + It "Node.JS is installed" { + "node --version" | Should -ReturnZeroExitCode + } + + It "Node.JS $expectedNodeVersion is default" { + (Get-CommandResult "node --version").Output | Should -BeLike $expectedNodeVersion + } + + It "NPM is installed" { + "npm --version" | Should -ReturnZeroExitCode + } + + It "Yarn is installed" { + "yarn --version" | Should -ReturnZeroExitCode + } +} + +Describe "NVM" { + BeforeAll { + $nvmPath = Join-Path $env:HOME ".nvm" "nvm.sh" + $nvmInitCommand = ". $nvmPath > /dev/null 2>&1 || true" + } + + It "Nvm is installed" { + $nvmPath | Should -Exist + "$nvmInitCommand && nvm --version" | Should -ReturnZeroExitCode + } + + Context "Nvm versions" { + $NVM_VERSIONS = @(6, 8, 10, 12) + $testCases = $NVM_VERSIONS | ForEach-Object { @{NvmVersion = $_} } + + It "" -TestCases $testCases { + param ( + [string] $NvmVersion + ) + + "$nvmInitCommand && nvm ls $($NvmVersion)" | Should -ReturnZeroExitCode + } + } +} diff --git a/images/macos/tests/Powershell.Tests.ps1 b/images/macos/tests/Powershell.Tests.ps1 new file mode 100644 index 00000000..42db9dda --- /dev/null +++ b/images/macos/tests/Powershell.Tests.ps1 @@ -0,0 +1,41 @@ +Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1" +Import-Module "$PSScriptRoot/../helpers/Tests.Helpers.psm1" + +Describe "Powershell" { + It "Powershell is installed" { + "pwsh -v" | Should -ReturnZeroExitCode + } + + Context "Powershell Modules" { + $modules = Get-ToolsetValue powershellModules + $withoutVersionsModules = $modules | Where-Object {-not $_.versions} | ForEach-Object { + @{moduleName = $_.name} + } + + $withVersionsModules = $modules | Where-Object {$_.versions} | ForEach-Object { + $moduleName = $_.name + $_.versions | ForEach-Object { + @{moduleName = $moduleName; expectedVersion = $_} + } + } + + It " is installed" -TestCases $withoutVersionsModules { + param ( + [string] $moduleName + ) + + Get-Module -Name $moduleName -ListAvailable | Should -BeTrue + } + + if ($withVersionsModules) { + It " with is installed" -TestCases $withVersionsModules { + param ( + [string] $moduleName, + [string] $expectedVersion + ) + + (Get-Module -Name $moduleName -ListAvailable).Version -contains $expectedVersion | Should -BeTrue + } + } + } +} \ No newline at end of file diff --git a/images/macos/tests/Python.Tests.ps1 b/images/macos/tests/Python.Tests.ps1 new file mode 100644 index 00000000..7b5f8348 --- /dev/null +++ b/images/macos/tests/Python.Tests.ps1 @@ -0,0 +1,32 @@ +Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1" +Import-Module "$PSScriptRoot/../helpers/Tests.Helpers.psm1" + +Describe "Python" { + It "Python 2 is available" { + "python --version" | Should -ReturnZeroExitCode + } + + It "Python 2 is real 2.x" { + (Get-CommandResult "python --version").Output | Should -BeLike "Python 2.*" + } + + It "Python 2 is installed under /usr/local/bin" { + Get-WhichTool "python" | Should -BeLike "/usr/local/bin*" + } + + It "Python 3 is available" { + "python3 --version" | Should -ReturnZeroExitCode + } + + It "Python 3 is installed under /usr/local/bin" { + Get-WhichTool "python3" | Should -BeLike "/usr/local/bin*" + } + + It "Pip 2 is available" { + "pip --version" | Should -ReturnZeroExitCode + } + + It "Pip 3 is available" { + "pip3 --version" | Should -ReturnZeroExitCode + } +} \ No newline at end of file diff --git a/images/macos/tests/Ruby.Tests.ps1 b/images/macos/tests/Ruby.Tests.ps1 new file mode 100644 index 00000000..116f0937 --- /dev/null +++ b/images/macos/tests/Ruby.Tests.ps1 @@ -0,0 +1,24 @@ +Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1" +Import-Module "$PSScriptRoot/../helpers/Tests.Helpers.psm1" + +Describe "Ruby" { + It "Ruby is available" { + "ruby --version" | Should -ReturnZeroExitCode + } + + It "Ruby is installed via HomeBrew" { + Get-WhichTool "ruby" | Should -Not -BeLike "/usr/bin/ruby*" + } + + It "Ruby tools are consistent" { + $expectedPrefix = "/usr/local" + Get-WhichTool "ruby" | Should -Match "$($expectedPrefix)*" + Get-WhichTool "gem" | Should -Match "$($expectedPrefix)*" + Get-WhichTool "bundler" | Should -Match "$($expectedPrefix)*" + } + + It "Ruby gems permissions are valid" { + "gem install bundle" | Should -ReturnZeroExitCode + "gem uninstall bundle" | Should -ReturnZeroExitCode + } +} \ No newline at end of file diff --git a/images/macos/tests/Run-Tests.ps1 b/images/macos/tests/Run-Tests.ps1 new file mode 100644 index 00000000..3af5fac3 --- /dev/null +++ b/images/macos/tests/Run-Tests.ps1 @@ -0,0 +1,25 @@ +param ( + [Parameter(Mandatory=$true)] + $WorkingDirectory, + [Parameter(Mandatory=$true)] + $OutputFile +) + +$ErrorActionPreference = "Stop" + +Import-Module Pester +Set-Location -Path $WorkingDirectory + +$parentDirectory = Split-Path $OutputFile -Parent +if (-not (Test-Path $parentDirectory)) { New-Item -Path $parentDirectory -ItemType Directory | Out-Null } + +$configuration = [PesterConfiguration] @{ + Output = @{ Verbosity = "Detailed" } + TestResult = @{ + Enabled = $true + OutputPath = $OutputFile; + OutputFormat = "NUnitXML" + } +} + +Invoke-Pester -Configuration $configuration \ No newline at end of file diff --git a/images/macos/tests/Toolcache.Tests.ps1 b/images/macos/tests/Toolcache.Tests.ps1 new file mode 100644 index 00000000..fc4a3729 --- /dev/null +++ b/images/macos/tests/Toolcache.Tests.ps1 @@ -0,0 +1,240 @@ +Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1" +Import-Module "$PSScriptRoot/../helpers/Tests.Helpers.psm1" + +$os = Get-OSVersion + +Describe "Toolcache" { + $toolcacheDirectory = Join-Path $env:HOME "hostedtoolcache" + $packages = (Get-ToolcachePackages).PSObject.Properties | ForEach-Object { + $packageNameParts = $_.Name.Split("-") + return [PSCustomObject] @{ + ToolName = $packageNameParts[1] + Arch = $packageNameParts[4] + Versions = $_.Value + } + } + + [array]$packages += Get-ToolsetValue -KeyPath "toolcache" | ForEach-Object { + return [PSCustomObject] @{ + ToolName = ($_.name).ToLower() + Arch = $_.arch + Versions = $_.versions | ForEach-Object { $_.Replace(".*", "") } + } + } + + Context "Python" { + $pythonDirectory = Join-Path $toolcacheDirectory "Python" + $pythonPackage = $packages | Where-Object { $_.ToolName -eq "python" } | Select-Object -First 1 + $testCase = @{ PythonDirectory = $pythonDirectory } + + It "Toolcache directory exists" -TestCases $testCase { + param ( [string] $PythonDirectory ) + + $PythonDirectory | Should -Exist + } + + It "Toolcache directory contains at least one version of Python" -TestCases $testCase { + param ( [string] $PythonDirectory ) + + (Get-ChildItem -Path $PythonDirectory -Directory).Count | Should -BeGreaterThan 0 + } + + $pythonPackage.Versions | Where-Object { $_ } | ForEach-Object { + Context "$_" { + $versionDirectory = Get-ChildItem -Path $pythonDirectory -Directory -Filter "$_*" | Select-Object -First 1 + $pythonBinPath = Join-Path $versionDirectory.FullName $pythonPackage.Arch "python" + $testCase = @{ PythonVersion = $_; PythonBinPath = $pythonBinPath } + + It "Version" -TestCases $testCase { + param ( + [string] $PythonVersion, + [string] $PythonBinPath + ) + + $result = Get-CommandResult "$PythonBinPath --version" + $result.Output | Should -BeLike "*$PythonVersion*" + $result.ExitCode | Should -Be 0 + } + + It "Run test script" -TestCases $testCase { + param ( [string] $PythonBinPath ) + + "$PythonBinPath -c 'import sys;print(sys.version)'" | Should -ReturnZeroExitCode + } + } + } + } + + Context "Ruby" { + $rubyDirectory = Join-Path $toolcacheDirectory "Ruby" + $rubyPackage = $packages | Where-Object { $_.ToolName -eq "ruby" } | Select-Object -First 1 + $testCase = @{ RubyDirectory = $rubyDirectory } + + It "Toolcache directory exists" -TestCases $testCase { + param ( [string] $RubyDirectory ) + + $RubyDirectory | Should -Exist + } + + It "Toolcache directory contains at least one version of Ruby" -TestCases $testCase { + param ( [string] $RubyDirectory ) + + (Get-ChildItem -Path $RubyDirectory -Directory).Count | Should -BeGreaterThan 0 + } + + $rubyPackage.Versions | Where-Object { $_ } | ForEach-Object { + Context "$_" { + $versionDirectory = Get-ChildItem -Path $rubyDirectory -Directory -Filter "$_*" | Select-Object -First 1 + $rubyBinPath = Join-Path $versionDirectory.FullName $rubyPackage.Arch "bin" "ruby" + $testCase = @{ RubyVersion = $_; RubyBinPath = $rubyBinPath } + + It "Version" -TestCases $testCase { + param ( + [string] $RubyVersion, + [string] $RubyBinPath + ) + + $result = Get-CommandResult "$RubyBinPath --version" + $result.Output | Should -BeLike "*$RubyVersion*" + $result.ExitCode | Should -Be 0 + } + + It "Run test script" -TestCases $testCase { + param ( [string] $RubyBinPath ) + + "$RubyBinPath -e 'puts RUBY_VERSION'" | Should -ReturnZeroExitCode + } + } + } + } + Context "PyPy" -Skip:($os.IsBigSur) { + $pypyDirectory = Join-Path $toolcacheDirectory "PyPy" + $pypyPackage = $packages | Where-Object { $_.ToolName -eq "pypy" } | Select-Object -First 1 + $testCase = @{ PypyDirectory = $pypyDirectory } + + It "Toolcache directory exists" -TestCases $testCase { + param ( [string] $PypyDirectory ) + + $PypyDirectory | Should -Exist + } + + It "Toolcache directory contains at least one version of PyPy" -TestCases $testCase { + param ( [string] $PypyDirectory ) + + (Get-ChildItem -Path $PypyDirectory -Directory).Count | Should -BeGreaterThan 0 + } + + $pypyPackage.Versions | Where-Object { $_ } | ForEach-Object { + Context "$_" { + $versionDirectory = Get-ChildItem -Path $pypyDirectory -Directory -Filter "$_*" | Select-Object -First 1 + $binFilename = If ($_.StartsWith("3")) { "pypy3" } else { "pypy" } + $pypyBinPath = Join-Path $versionDirectory.FullName $pypyPackage.Arch "bin" $binFilename + $testCase = @{ PypyVersion = $_; PypyBinPath = $pypyBinPath } + + It "Version" -TestCases $testCase { + param ( + [string] $PypyVersion, + [string] $PypyBinPath + ) + + $result = Get-CommandResult "$PypyBinPath --version" + $result.Output | Should -BeLike "*$PypyVersion*" + $result.ExitCode | Should -Be 0 + } + + It "Run test script" -TestCases $testCase { + param ( [string] $PypyBinPath ) + + "$PypyBinPath -c 'import sys;print(sys.version)'" | Should -ReturnZeroExitCode + } + } + } + } + + Context "Node" -Skip:($os.IsHighSierra) { + $nodeDirectory = Join-Path $toolcacheDirectory "node" + $nodePackage = $packages | Where-Object { $_.ToolName -eq "node" } | Select-Object -First 1 + $testCase = @{ NodeDirectory = $nodeDirectory } + + It "Toolcache directory exists" -TestCases $testCase { + param ( [string] $NodeDirectory ) + + $NodeDirectory | Should -Exist + } + + It "Toolcache directory contains at least one version of Node" -TestCases $testCase { + param ( [string] $NodeDirectory ) + + (Get-ChildItem -Path $NodeDirectory -Directory).Count | Should -BeGreaterThan 0 + } + + $nodePackage.Versions | Where-Object { $_ } | ForEach-Object { + Context "$_" { + $versionDirectory = Get-ChildItem -Path $nodeDirectory -Directory -Filter "$_*" | Select-Object -First 1 + $nodeBinPath = Join-Path $versionDirectory.FullName $nodePackage.Arch "bin" "node" + $npmBinPath = Join-Path $versionDirectory.FullName $nodePackage.Arch "bin" "npm" + $testCase = @{ NodeVersion = $_; NodeBinPath = $nodeBinPath; NpmBinPath = $npmBinPath } + + It "Version Node" -TestCases $testCase { + param ( + [string] $NodeVersion, + [string] $NodeBinPath + ) + + $result = Get-CommandResult "$NodeBinPath --version" + $result.Output | Should -BeLike "*$NodeVersion*" + $result.ExitCode | Should -Be 0 + } + + It "Version Npm" -TestCases $testCase { + param ( [string] $NpmBinPath ) + + "$NpmBinPath --version" | Should -ReturnZeroExitCode + } + + It "Run test script" -TestCases $testCase { + param ( [string] $NodeBinPath ) + + "$NodeBinPath -e 'console.log(process.version)'" | Should -ReturnZeroExitCode + } + } + } + } + + Context "Go" -Skip:($os.IsHighSierra) { + $goDirectory = Join-Path $toolcacheDirectory "go" + $goPackage = $packages | Where-Object { $_.ToolName -eq "go" } | Select-Object -First 1 + $testCase = @{ GoDirectory = $goDirectory } + + It "Toolcache directory exists" -TestCases $testCase { + param ( [string] $GoDirectory ) + + $GoDirectory | Should -Exist + } + + It "Toolcache directory contains at least one version of Go" -TestCases $testCase { + param ( [string] $GoDirectory ) + + (Get-ChildItem -Path $GoDirectory -Directory).Count | Should -BeGreaterThan 0 + } + + $goPackage.Versions | Where-Object { $_ } | ForEach-Object { + Context "$_" { + $versionDirectory = Get-ChildItem -Path $goDirectory -Directory -Filter "$_*" | Select-Object -First 1 + $goBinPath = Join-Path $versionDirectory.FullName $goPackage.Arch "bin" "go" + $testCase = @{ GoVersion = $_; GoBinPath = $goBinPath } + + It "Version Go" -TestCases $testCase { + param ( + [string] $GoVersion, + [string] $GoBinPath + ) + + $result = Get-CommandResult "$GoBinPath version" + $result.Output | Should -BeLike "*$GoVersion*" + $result.ExitCode | Should -Be 0 + } + } + } + } +} \ No newline at end of file diff --git a/images/macos/tests/Xamarin.Tests.ps1 b/images/macos/tests/Xamarin.Tests.ps1 new file mode 100644 index 00000000..5e60f536 --- /dev/null +++ b/images/macos/tests/Xamarin.Tests.ps1 @@ -0,0 +1,289 @@ +Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1" +Import-Module "$PSScriptRoot/../helpers/Tests.Helpers.psm1" + +$MONO_VERSIONS = Get-ToolsetValue "xamarin.mono-versions" +$XAMARIN_IOS_VERSIONS = Get-ToolsetValue "xamarin.ios-versions" +$XAMARIN_MAC_VERSIONS = Get-ToolsetValue "xamarin.mac-versions" +$XAMARIN_ANDROID_VERSIONS = Get-ToolsetValue "xamarin.android-versions" + +BeforeAll { + function Get-ShortSymlink { + param ( + [string] $Version + ) + + $versionParts = $Version.Split(".") + return [String]::Join(".", $versionParts[0..1]) + } +} + +Describe "Mono" { + $MONO_VERSIONS | ForEach-Object { + Context "$_" { + $MONO_VERSIONS_PATH = "/Library/Frameworks/Mono.framework/Versions" + $versionFolderPath = Join-Path $MONO_VERSIONS_PATH ([System.Version]::Parse($_).ToString(3)) + $testCase = @{ MonoVersion = $_; VersionFolderPath = $versionFolderPath; MonoVersionsPath = $MONO_VERSIONS_PATH } + + It "is installed" -TestCases $testCase { + param ( [string] $VersionFolderPath ) + + $monoBinPath = Join-Path $VersionFolderPath "bin" "mono" + $VersionFolderPath | Should -Exist + $monoBinPath | Should -Exist + } + + It "is available via short link" -TestCases $testCase { + param ( + [string] $MonoVersion, + [string] $MonoVersionsPath, + [string] $VersionFolderPath + ) + + $shortSymlink = Get-ShortSymlink $MonoVersion # only 'major.minor' + $shortSymlinkFolderPath = Join-Path $MonoVersionsPath $shortSymlink + if ($shortSymlink -eq "4.8") { return } # Skip this test for Mono 4.8 because it doesn't contain VERSION file + $shortVersionPath = Join-Path $shortSymlinkFolderPath "VERSION" + $fullVersionPath = Join-Path $VersionFolderPath "VERSION" + + Validate-IdenticalFileContent -File1 $shortVersionPath -File2 $fullVersionPath + } + + It "NUnit console is installed" -TestCases $testCase { + param ( [string] $VersionFolderPath ) + + $nunitPath = Join-Path $VersionFolderPath "Commands" "nunit3-console" + $nunitPath | Should -Exist + } + + It "Nuget is installed" -TestCases $testCase { + param ( [string] $VersionFolderPath ) + + $nugetBinaryPath = Join-Path $VersionFolderPath "lib" "mono" "nuget" "nuget.exe" + $nugetBinaryWrapperPath = Join-Path $VersionFolderPath "bin" "nuget" + $nugetCommandPath = Join-Path $VersionFolderPath "Commands" "nuget" + + $nugetBinaryPath | Should -Exist + $nugetCommandPath | Should -Exist + $nugetBinaryWrapperPath | Should -Exist + } + + It "Nuget is valid" -TestCases $testCase { + param ( [string] $VersionFolderPath ) + + $nugetBinaryWrapperPath = Join-Path $VersionFolderPath "bin" "nuget" + "$nugetBinaryWrapperPath" | Should -ReturnZeroExitCode + } + } + } +} + +Describe "Xamarin.iOS" { + $XAMARIN_IOS_VERSIONS | ForEach-Object { + Context "$_" { + $XAMARIN_IOS_VERSIONS_PATH = "/Library/Frameworks/Xamarin.iOS.framework/Versions" + $versionFolderPath = Join-Path $XAMARIN_IOS_VERSIONS_PATH $_ + $testCase = @{ XamarinIosVersion = $_; VersionFolderPath = $versionFolderPath; IosVersionsPath = $XAMARIN_IOS_VERSIONS_PATH } + + It "is installed" -TestCases $testCase { + param ( [string] $VersionFolderPath ) + + $xamarinBinPath = Join-Path $VersionFolderPath "bin" + $VersionFolderPath | Should -Exist + $xamarinBinPath | Should -Exist + } + + It "is available via short link" -TestCases $testCase { + param ( + [string] $XamarinIosVersion, + [string] $IosVersionsPath, + [string] $VersionFolderPath + ) + + $shortSymlink = Get-ShortSymlink $XamarinIosVersion # only 'major.minor' + $shortSymlinkFolderPath = Join-Path $IosVersionsPath $shortSymlink + $shortVersionPath = Join-Path $shortSymlinkFolderPath "VERSION" + $fullVersionPath = Join-Path $VersionFolderPath "VERSION" + + Validate-IdenticalFileContent -File1 $shortVersionPath -File2 $fullVersionPath + } + } + } +} + +Describe "Xamarin.Mac" { + $XAMARIN_MAC_VERSIONS | ForEach-Object { + Context "$_" { + $XAMARIN_MAC_VERSIONS_PATH = "/Library/Frameworks/Xamarin.Mac.framework/Versions" + $versionFolderPath = Join-Path $XAMARIN_MAC_VERSIONS_PATH $_ + $testCase = @{ XamarinMacVersion = $_; VersionFolderPath = $versionFolderPath; MacVersionsPath = $XAMARIN_MAC_VERSIONS_PATH } + + It "is installed" -TestCases $testCase { + param ( [string] $VersionFolderPath ) + + $xamarinBinPath = Join-Path $VersionFolderPath "bin" + $VersionFolderPath | Should -Exist + $xamarinBinPath | Should -Exist + } + + It "is available via short link" -TestCases $testCase { + param ( + [string] $XamarinMacVersion, + [string] $MacVersionsPath, + [string] $VersionFolderPath + ) + + $shortSymlink = Get-ShortSymlink $XamarinMacVersion # only 'major.minor' + $shortSymlinkFolderPath = Join-Path $MacVersionsPath $shortSymlink + $shortVersionPath = Join-Path $shortSymlinkFolderPath "VERSION" + $fullVersionPath = Join-Path $VersionFolderPath "VERSION" + + Validate-IdenticalFileContent -File1 $shortVersionPath -File2 $fullVersionPath + } + } + } +} + +Describe "Xamarin.Android" { + $XAMARIN_ANDROID_VERSIONS | ForEach-Object { + Context "$_" { + $XAMARIN_ANDROID_VERSIONS_PATH = "/Library/Frameworks/Xamarin.Android.framework/Versions" + $versionFolderPath = Join-Path $XAMARIN_ANDROID_VERSIONS_PATH $_ + $testCase = @{ XamarinAndroidVersion = $_; VersionFolderPath = $versionFolderPath; AndroidVersionsPath = $XAMARIN_ANDROID_VERSIONS_PATH } + + It "is installed" -TestCases $testCase { + param ( [string] $VersionFolderPath ) + + $xamarinLibPath = Join-Path $VersionFolderPath "lib" + $xamarinLibPath | Should -Exist + } + + It "is available via short link" -TestCases $testCase { + param ( + [string] $XamarinAndroidVersion, + [string] $AndroidVersionsPath, + [string] $VersionFolderPath + ) + + $shortSymlink = Get-ShortSymlink $XamarinAndroidVersion # only 'major.minor' + $shortSymlinkFolderPath = Join-Path $AndroidVersionsPath $shortSymlink + $shortVersionPath = Join-Path $shortSymlinkFolderPath "VERSION" + $fullVersionPath = Join-Path $VersionFolderPath "VERSION" + + Validate-IdenticalFileContent -File1 $shortVersionPath -File2 $fullVersionPath + } + + It "has correct symlinks" -TestCases $testCase { + param ( [string] $VersionFolderPath ) + + $xamarinLibPath = Join-Path $VersionFolderPath "lib" + Join-Path $xamarinLibPath "xbuild" | Should -Exist + Join-Path $xamarinLibPath "xbuild-frameworks" | Should -Exist + } + } + } +} + +Describe "Xamarin Bundles" { + BeforeAll { + $MONO_VERSIONS_PATH = "/Library/Frameworks/Mono.framework/Versions" + $XAMARIN_IOS_VERSIONS_PATH = "/Library/Frameworks/Xamarin.iOS.framework/Versions" + $XAMARIN_MAC_VERSIONS_PATH = "/Library/Frameworks/Xamarin.Mac.framework/Versions" + $XAMARIN_ANDROID_VERSIONS_PATH = "/Library/Frameworks/Xamarin.Android.framework/Versions" + } + + $XAMARIN_BUNDLES = Get-ToolsetValue "xamarin.bundles" + $XAMARIN_DEFAULT_BUNDLE = Get-ToolsetValue "xamarin.bundle-default" + If ($XAMARIN_DEFAULT_BUNDLE -eq "latest") { $XAMARIN_DEFAULT_BUNDLE = $XAMARIN_BUNDLES[0].symlink } + + $currentBundle = [PSCustomObject] @{ + symlink = "Current" + mono = $XAMARIN_DEFAULT_BUNDLE + ios = $XAMARIN_DEFAULT_BUNDLE + mac = $XAMARIN_DEFAULT_BUNDLE + android = $XAMARIN_DEFAULT_BUNDLE + } + + $latestBundle = [PSCustomObject] @{ + symlink = "Latest" + mono = $XAMARIN_BUNDLES[0].mono + ios = $XAMARIN_BUNDLES[0].ios + mac = $XAMARIN_BUNDLES[0].mac + android = $XAMARIN_BUNDLES[0].android + } + + $bundles = $XAMARIN_BUNDLES + $currentBundle + $latestBundle + $allBundles = $bundles | ForEach-Object { @{BundleSymlink = $_.symlink; BundleMono = $_.mono; BundleIos = $_.ios; BundleMac = $_.mac; BundleAndroid = $_.android} } + + It "Mono symlink exists" -TestCases $allBundles { + param ( [string] $BundleSymlink ) + + (Join-Path $MONO_VERSIONS_PATH $BundleSymlink) | Should -Exist + } + + It "Mono symlink points to the correct version" -TestCases $allBundles { + param ( + [string] $BundleSymlink, + [string] $BundleMono + ) + + if ($BundleMono -eq "4.8") { return } # Skip this test for Mono 4.8 because it doesn't contain VERSION file + $sourceVersionPath = Join-Path $MONO_VERSIONS_PATH $BundleMono "VERSION" + $targetVersionPath = Join-Path $MONO_VERSIONS_PATH $BundleSymlink "VERSION" + + Validate-IdenticalFileContent -File1 $targetVersionPath -File2 $sourceVersionPath + } + + It "iOS symlink exists" -TestCases $allBundles { + param ( [string] $BundleSymlink ) + + (Join-Path $XAMARIN_IOS_VERSIONS_PATH $BundleSymlink) | Should -Exist + } + + It "iOS symlink points to the correct version" -TestCases $allBundles { + param ( + [string] $BundleSymlink, + [string] $BundleIos + ) + + $sourceVersionPath = Join-Path $XAMARIN_IOS_VERSIONS_PATH $BundleIos "VERSION" + $targetVersionPath = Join-Path $XAMARIN_IOS_VERSIONS_PATH $BundleSymlink "VERSION" + + Validate-IdenticalFileContent -File1 $targetVersionPath -File2 $sourceVersionPath + } + + It "Mac symlink exists" -TestCases $allBundles { + param ( [string] $BundleSymlink ) + + (Join-Path $XAMARIN_MAC_VERSIONS_PATH $BundleSymlink) | Should -Exist + } + + It "Mac symlink points to the correct version" -TestCases $allBundles { + param ( + [string] $BundleSymlink, + [string] $BundleMac + ) + + $sourceVersionPath = Join-Path $XAMARIN_MAC_VERSIONS_PATH $BundleMac "VERSION" + $targetVersionPath = Join-Path $XAMARIN_MAC_VERSIONS_PATH $BundleSymlink "VERSION" + + Validate-IdenticalFileContent -File1 $targetVersionPath -File2 $sourceVersionPath + } + + It "Xamarin.Android symlink exists" -TestCases $allBundles { + param ( [string] $BundleSymlink ) + + (Join-Path $XAMARIN_ANDROID_VERSIONS_PATH $BundleSymlink) | Should -Exist + } + + It "Android symlink points to the correct version" -TestCases $allBundles { + param ( + [string] $BundleSymlink, + [string] $BundleAndroid + ) + + $sourceVersionPath = Join-Path $XAMARIN_ANDROID_VERSIONS_PATH $BundleAndroid "VERSION" + $targetVersionPath = Join-Path $XAMARIN_ANDROID_VERSIONS_PATH $BundleSymlink "VERSION" + + Validate-IdenticalFileContent -File1 $targetVersionPath -File2 $sourceVersionPath + } +} \ No newline at end of file diff --git a/images/macos/tests/Xcode.Tests.ps1 b/images/macos/tests/Xcode.Tests.ps1 new file mode 100644 index 00000000..543a715d --- /dev/null +++ b/images/macos/tests/Xcode.Tests.ps1 @@ -0,0 +1,107 @@ +Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1" +Import-Module "$PSScriptRoot/../helpers/Xcode.Helpers.psm1" +Import-Module "$PSScriptRoot/../helpers/Tests.Helpers.psm1" + +$XCODE_VERSIONS = Get-ToolsetValue "xcode.versions" +$DEFAULT_XCODE = Get-ToolsetValue "xcode.default" +$LATEST_XCODE_VERSION = $XCODE_VERSIONS | Select-Object -First 1 +$OS = Get-OSVersion + +Describe "Xcode" { + It "Default Xcode is $DEFAULT_XCODE" { + "xcodebuild -version" | Should -ReturnZeroExitCode + (Get-CommandResult "xcodebuild -version").Output | Should -BeLike "Xcode $DEFAULT_XCODE*" + } + + # Cut "_beta" postfix for test cases + $testCases = $XCODE_VERSIONS | ForEach-Object { @{XcodeVersion = $_.Split("_")[0] } } + + It "" -TestCases $testCases { + param ( [string] $XcodeVersion ) + + $xcodebuildPath = Get-XcodeToolPath -Version $XcodeVersion -ToolName "xcodebuild" + "$xcodebuildPath -version" | Should -ReturnZeroExitCode + } + + It "Xcode tools are installed" -TestCases $testCases -Skip:($os.IsHighSierra) { + param ( [string] $XcodeVersion ) + + $TOOLS_NOT_INSTALLED_EXIT_CODE = 69 + $xcodebuildPath = Get-XcodeToolPath -Version $XcodeVersion -ToolName "xcodebuild" + $result = Get-CommandResult "$xcodebuildPath -checkFirstLaunchStatus" + + if ($XcodeVersion -ne $LATEST_XCODE_VERSION) { + $result.ExitCode | Should -Not -Be $TOOLS_NOT_INSTALLED_EXIT_CODE + } else { + $result.ExitCode | Should -BeIn (0, $TOOLS_NOT_INSTALLED_EXIT_CODE) + } + } + + It "Xcode has correct beta symlink" -TestCases $testCases { + param ( [string] $XcodeVersion ) + + $xcodesWithBetaSymlink = @("12", "12_beta", "9.3", "9.4") + $shouldBetaSymlinkExists = $XcodeVersion.StartsWith("10") -or $XcodeVersion.StartsWith("11") -or ($XcodeVersion -in $xcodesWithBetaSymlink) + + $betaSymlinkPath = Get-XcodeRootPath -Version "${XcodeVersion}_beta" + Test-Path $betaSymlinkPath | Should -Be $shouldBetaSymlinkExists + } + + It "/Applications/Xcode* symlinks are valid" { + $symlinks = Get-ChildItem "/Applications" -Filter "Xcode*" | Where-Object { $_.LinkType } + + $symlinks.Target | ForEach-Object { + $_ | Should -Exist + } + } + + Context "XCODE_DEVELOPER_DIR" { + $stableXcodeVersions = $XCODE_VERSIONS | Where-Object { -not ($_ -match "beta") } + $majorXcodeVersions = $stableXcodeVersions | ForEach-Object { $_.Split(".")[0] } | Select-Object -Unique + $testCases = $majorXcodeVersions | ForEach-Object { + $majorXcodeVersion = $_ + $expectedVersion = $stableXcodeVersions | Where-Object { $_.StartsWith("$majorXcodeVersion") } | Select-Object -First 1 + return @{ + MajorXcodeVersion = $majorXcodeVersion + ExpectedVersion = $expectedVersion + } + } + + It "XCODE__DEVELOPER_DIR" -TestCases $testCases { + param ( + [string] $MajorXcodeVersion, + [string] $ExpectedVersion + ) + + $variableName = "XCODE_${MajorXcodeVersion}_DEVELOPER_DIR" + $actualPath = Get-EnvironmentVariable $variableName + $expectedPath = Join-Path (Get-XcodeRootPath -Version $ExpectedVersion) "Contents/Developer" + + $actualPath | Should -Exist + $actualPath | Should -Be $expectedPath + } + } +} + +Describe "Xcode simulators" { + $XCODE_VERSIONS | ForEach-Object { + Switch-Xcode -Version $_ + + Context "$_" { + It "No duplicates in devices" { + [array]$devicesList = @(Get-XcodeDevicesList | Where-Object { $_ }) + Validate-ArrayWithoutDuplicates $devicesList -Because "Found duplicate device simulators" + } + + It "No duplicates in pairs" { + [array]$pairsList = @(Get-XcodePairsList | Where-Object { $_ }) + Validate-ArrayWithoutDuplicates $pairsList -Because "Found duplicate pairs simulators" + } + } + } + + AfterAll { + $DEFAULT_XCODE = Get-ToolsetValue "xcode.default" + Switch-Xcode -Version $DEFAULT_XCODE + } +} \ No newline at end of file diff --git a/images/macos/toolsets/Readme.md b/images/macos/toolsets/Readme.md new file mode 100644 index 00000000..671ef482 --- /dev/null +++ b/images/macos/toolsets/Readme.md @@ -0,0 +1,82 @@ +# Toolset JSON structure +## Xcode +- `default` - version of Xcode to set as default + **Example:** `"11.2.1"` + +- `versions` - the array of versions of Xcode to install + **Example:** `[ "11.3", "11.2.1", "11.2", "11.1", "11" ]` + +## Xamarin +- `vsmac` - version of Visual Studio For Mac to install. + **Example:** `"8.3.11.1"` + +- `mono-versions` - the array of Mono versions to install. + **Example:** `[ "6.4.0.208", "6.0.0.334" ]` + +- `ios-versions` - the array of Xamarin iOS versions to install. + **Example:** `[ "13.6.0.12", "13.4.0.2", "13.2.0.47" ]` + +- `mac-versions` - the array of Xamarin iOS versions to install. + **Example:** `[ "6.6.0.12", "6.4.0.2", "6.2.0.47" ]` + +- `android-versions` - the array of Xamarin iOS versions to install. + **Example:** `[ "10.0.6.2", "9.4.1.0" ]` + +**Note:** More than one version of SDK with the same major.minor version should not be installed. It applies to `mono-versions`, `ios-versions`, `mac-versions`, `android-versions` fields. +For example, if Mono `6.4.0.100` is installed and Mono `6.4.1.2` was released recently, we should not install both, just update `6.4.0.100` -> `6.4.1.2`. Only major and minor version changes can break backward compatibility so it is safe. + +
+ +- `bundle-default` - the symlink of the bundle that will be set as default on the image. +This bundle will be set as `Current`. + **Example:** `"5_12_0"` (set bundle with symlink `5_12_0` as default) + **Example:** `"latest"` (set latest bundle as default) + +- `bundles` - the array of objects that describe bundles that will be created on image after sdk installation. +The first bundle in the list will be as `Latest`. + + Each object should contain the following fields: + - `symlink` - unique id of the bundle (usually looks like "__") + - `mono` - version of Mono that will be set in this bundle. Only two numbers (`major.minor`) should be specified. + - `ios` - version of Xamarin.iOS that will be set in this bundle. Only two numbers (`major.minor`) should be specified. + - `mac` - version of Xamarin.Mac that will be set in this bundle. Only two numbers (`major.minor`) should be specified. + - `android` - version of Xamarin.Android that will be set in this bundle. Only two numbers (`major.minor`) should be specified. + + + **Example:** +``` + [ + { + "symlink": "6_4_2", + "mono": "6.4", + "ios": "13.6", + "mac": "6.6", + "android": "10.0" + }, + { + "symlink": "6_4_1", + "mono": "6.4", + "ios": "13.4", + "mac": "6.4", + "android": "10.0" + } + ] +``` + +## Android +- `platform-list` - the array of android platforms to install. + **Example:** `[ "android-29", "android-28", "android-27" ]` + +- `build-tools` - the array of android build tools to install. + **Example:** `[ "29.0.2", "29.0.1", "29.0.0", "28.0.3" ]` + +- `extra-list` - the array of android extra items to install. + **Example:** `[ "google;google_play_services", "intel;Hardware_Accelerated_Execution_Manager" ]` + +- `addon-list` - the array of android addons to install. + **Example:** `[ "addon-google_apis-google-24", "addon-google_apis-google-23" ]` + + +# Toolset JSON validation +File `Toolset.Tests.ps1` contains PowerShell [Pester](https://github.com/Pester/Pester) tests that validate JSON toolset files. +Type `Invoke-Pester` in the current folder in PowerShell to run tests. \ No newline at end of file diff --git a/images/macos/toolsets/Toolset.Tests.ps1 b/images/macos/toolsets/Toolset.Tests.ps1 new file mode 100644 index 00000000..8e5b69ef --- /dev/null +++ b/images/macos/toolsets/Toolset.Tests.ps1 @@ -0,0 +1,144 @@ +Import-Module "$PSScriptRoot/../helpers/Tests.Helpers.psm1" + +$toolsets = Get-ChildItem -Path $PSScriptRoot -Filter "toolset-*.json" + +function Get-ShortVersion([System.Version] $Version) { + return [System.Version]::Parse($Version).ToString(2) +} + +function Invoke-BashUtilsFunction([string] $FunctionName, [string]$parameter) { + $xamarinUtilsPath = "$PSScriptRoot/../provision/utils/xamarin-utils.sh" + return Invoke-Expression "bash -c `"source $xamarinUtilsPath && $FunctionName $parameter`"" +} + +Describe "Toolset JSON validation" { + $toolsets | ForEach-Object { + It "$($_.Name) is valid" { + $jsonContent = Get-Content -Raw $_.Fullname + $jsonContent | Test-Json | Should -BeTrue + } + } +} + +$toolsets | ForEach-Object { + Describe "$($_.Name)" { + $toolset = Get-Content -Raw $_.Fullname | ConvertFrom-Json + + Context "Xcode" { + It "Default Xcode should be defined" { + $toolset.xcode.default | Should -BeTrue + } + + It "Default Xcode is listed in Xcode list" { + $toolset.xcode.versions | Should -Contain $toolset.xcode.default + } + } + + Context "VSMac" { + $vsmacVersion = $toolset.xamarin.vsmac + + It "Version '$vsmacVersion' is available and can be downloaded" { + $vsmacUrl = Invoke-BashUtilsFunction("buildVSMacDownloadUrl", $vsmacVersion) + Validate-Url $vsmacUrl + } + } + + Context "Mono" { + $sdkVersions = $toolset.xamarin."mono-versions" + + $sdkVersions | ForEach-Object { + It "Version '$_' is available and can be downloaded" { + $sdkUrl = Invoke-BashUtilsFunction("buildMonoDownloadUrl", $_) + Validate-Url $sdkUrl + } + } + + It "Version list doesn't contain versions with the same major/minor version" { + $versions = $sdkVersions | ForEach-Object { Get-ShortVersion $_ } + Validate-ArrayWithoutDuplicates $versions -Because "It doesn't allow to install more than one version with the same major/minor" + } + } + + Context "Xamarin.iOS" { + $sdkVersions = $toolset.xamarin."ios-versions" + + $sdkVersions | ForEach-Object { + It "Version '$_' is available and can be downloaded" { + $sdkUrl = Invoke-BashUtilsFunction("buildXamariniIOSDownloadUrl", $_) + Validate-Url $sdkUrl + } + } + + It "Version list doesn't contain versions with the same major/minor version" { + $versions = $sdkVersions | ForEach-Object { Get-ShortVersion $_ } + Validate-ArrayWithoutDuplicates $versions -Because "It doesn't allow to install more than one version with the same major/minor" + } + } + + Context "Xamarin.Mac" { + $sdkVersions = $toolset.xamarin."mac-versions" + + $sdkVersions | ForEach-Object { + It "Version '$_' is available and can be downloaded" { + $sdkUrl = Invoke-BashUtilsFunction("buildXamarinMacDownloadUrl", $_) + Validate-Url $sdkUrl + } + } + + It "Version list doesn't contain versions with the same major/minor version" { + $versions = $sdkVersions | ForEach-Object { Get-ShortVersion $_ } + Validate-ArrayWithoutDuplicates $versions -Because "It doesn't allow to install more than one version with the same major/minor" + } + } + + Context "Xamarin.Android" { + $sdkVersions = $toolset.xamarin."android-versions" + + $sdkVersions | ForEach-Object { + It "Version '$_' is available and can be downloaded" { + $sdkUrl = Invoke-BashUtilsFunction("buildXamarinAndroidDownloadUrl", $_) + Validate-Url $sdkUrl + } + } + + It "Version list doesn't contain versions with the same major/minor version" { + $versions = $sdkVersions | ForEach-Object { $_.Replace("-", ".") } | ForEach-Object { Get-ShortVersion $_ } + Validate-ArrayWithoutDuplicates $versions -Because "It doesn't allow to install more than one version with the same major/minor" + } + } + + Context "Xamarin bundles" { + $monoVersions = $toolset.xamarin."mono-versions" | ForEach-Object { Get-ShortVersion $_ } + $iOSVersions = $toolset.xamarin."ios-versions" | ForEach-Object { Get-ShortVersion $_ } + $macVersions = $toolset.xamarin."mac-versions" | ForEach-Object { Get-ShortVersion $_ } + # Old Xamarin.Android version looks like "9.0.0-18" that doesn't support by System.Version + $androidVersions = $toolset.xamarin."android-versions" | ForEach-Object { Get-ShortVersion $_.Replace("-", ".") } + + + $bundles = $toolset.xamarin.bundles + $bundles | ForEach-Object { + It "'$($_.symlink)' is valid" { + $monoVersions | Should -Contain $_.mono + $iOSVersions | Should -Contain $_.ios + $macVersions | Should -Contain $_.mac + $androidVersions | Should -Contain $_.android + } + } + + It "Each bundle has unique symlink" { + $symlinks = $bundles | ForEach-Object { $_.symlink } + Validate-ArrayWithoutDuplicates $symlinks -Because "Bundle symlinks should be unique" + } + + It "Current bundle is valid" { + $currentBundleSymlink = $toolset.xamarin."bundle-default" + if ($currentBundleSymlink -ne "latest") { + $bundleSymlinks = $bundles | ForEach-Object { $_.symlink } + $bundleSymlinks | Should -Contain $currentBundleSymlink -Because "Current bundle should be installed" + } + + } + + } + } +} \ No newline at end of file diff --git a/images/macos/toolsets/toolcache-10.13.json b/images/macos/toolsets/toolcache-10.13.json new file mode 100644 index 00000000..1d415ac7 --- /dev/null +++ b/images/macos/toolsets/toolcache-10.13.json @@ -0,0 +1,8 @@ +{ + "@actions/toolcache-python-macos-1013-x64": [ + "2.7", "3.5", "3.6", "3.7", "3.8" + ], + "@actions/toolcache-ruby-macos-1013-x64": [ + "2.4", "2.5", "2.6", "2.7" + ] +} \ No newline at end of file diff --git a/images/macos/toolsets/toolcache-10.14.json b/images/macos/toolsets/toolcache-10.14.json new file mode 100644 index 00000000..4826303e --- /dev/null +++ b/images/macos/toolsets/toolcache-10.14.json @@ -0,0 +1,5 @@ +{ + "@actions/toolcache-ruby-macos-1013-x64": [ + "2.4", "2.5", "2.6", "2.7" + ] +} \ No newline at end of file diff --git a/images/macos/toolsets/toolcache-11.0.json b/images/macos/toolsets/toolcache-11.0.json new file mode 100644 index 00000000..4826303e --- /dev/null +++ b/images/macos/toolsets/toolcache-11.0.json @@ -0,0 +1,5 @@ +{ + "@actions/toolcache-ruby-macos-1013-x64": [ + "2.4", "2.5", "2.6", "2.7" + ] +} \ No newline at end of file diff --git a/images/macos/toolsets/toolset-10.13.json b/images/macos/toolsets/toolset-10.13.json new file mode 100644 index 00000000..fdb14d08 --- /dev/null +++ b/images/macos/toolsets/toolset-10.13.json @@ -0,0 +1,202 @@ +{ + "xcode": { + "default": "10.1", + "versions": [ + "10.1", "10", "9.4.1", "9.4", "9.3.1", "9.3", "9.2", "9.1", "9", "8.3.3", "8.2.1", "8.1", "8" + ] + }, + "xamarin": { + "vsmac": "8.3.11.1", + "mono-versions": [ + "6.4.0.208", "6.0.0.334", "5.18.1.3", "5.16.1.0", "5.12.0.309", "5.10.1.57", "5.8.1.0", "5.4.1.7", "5.2.0.224", "5.0.1.1", "4.8.1.0" + ], + "ios-versions": [ + "13.6.0.12", "13.4.0.2", "13.2.0.47", "12.14.0.114", "12.10.0.157", "12.8.0.2", "12.6.0.25", "12.2.1.16", "12.0.0.15", "11.14.0.13", "11.12.0.4", "11.9.1.24", "11.8.0.20", "11.6.1.4", "11.2.0.11", "11.0.0.0", "10.10.0.36", "10.6.0.10" + ], + "mac-versions": [ + "6.6.0.12", "6.4.0.2", "6.2.0.47", "5.16.1.24", "5.10.0.157", "5.8.0.0", "5.6.0.25", "5.3.1.28", "5.2.1.16" , "4.6.0.13", "4.4.1.193", "4.2.1.28", "4.0.0.216", "3.8.0.49", "3.6.3.3", "3.4.0.36", "3.0.0.398" + ], + "android-versions": [ + "10.0.6.2", "9.4.1.0", "9.3.0-23", "9.2.3-0", "9.1.8-0", "9.0.0-20", "8.3.3-2", "8.2.0-16", "8.1.5-0", "8.0.0-33", "7.4.5-1", "7.3.1-2", "7.1.0-43" + ], + "bundle-default": "5_12_0", + "bundles": [ + { + "symlink": "6_4_2", + "mono": "6.4", + "ios": "13.6", + "mac": "6.6", + "android": "10.0" + }, + { + "symlink": "6_4_1", + "mono": "6.4", + "ios": "13.4", + "mac": "6.4", + "android": "10.0" + }, + { + "symlink": "6_4_0", + "mono": "6.4", + "ios": "13.2", + "mac": "6.2", + "android": "10.0" + }, + { + "symlink": "6_0_0", + "mono": "6.0", + "ios": "12.14", + "mac": "5.16", + "android": "9.4" + }, + { + "symlink": "5_18_3", + "mono": "5.18", + "ios": "12.10", + "mac": "5.10", + "android": "9.3" + }, + { + "symlink": "5_18_2", + "mono": "5.18", + "ios": "12.8", + "mac": "5.8", + "android": "9.2" + }, + { + "symlink": "5_18_1", + "mono": "5.18", + "ios": "12.6", + "mac": "5.6", + "android": "9.2" + }, + { + "symlink": "5_16_0_0", + "mono": "5.16", + "ios": "12.2", + "mac": "5.2", + "android": "9.1" + }, + { + "symlink": "5_16_0", + "mono": "5.16", + "ios": "12.2", + "mac": "5.2", + "android": "9.1" + }, + { + "symlink": "5_12_0_3", + "mono": "5.12", + "ios": "12.2", + "mac": "5.3", + "android": "9.0" + }, + { + "symlink": "5_12_0_XC10_PRE", + "mono": "5.12", + "ios": "12.0", + "mac": "5.2", + "android": "9.0" + }, + { + "symlink": "5_12_0", + "mono": "5.12", + "ios": "11.14", + "mac": "4.6", + "android": "9.0" + }, + { + "symlink": "5_10_1", + "mono": "5.10", + "ios": "11.12", + "mac": "4.4", + "android": "8.3" + }, + { + "symlink": "5_8_1", + "mono": "5.8", + "ios": "11.9", + "mac": "4.2", + "android": "8.2" + }, + { + "symlink": "5_8_0", + "mono": "5.8", + "ios": "11.8", + "mac": "4.2", + "android": "8.2" + }, + { + "symlink": "5_4_1", + "mono": "5.4", + "ios": "11.6", + "mac": "4.0", + "android": "8.1" + }, + { + "symlink": "5_4_0", + "mono": "5.4", + "ios": "11.2", + "mac": "3.8", + "android": "8.0" + }, + { + "symlink": "5_2_0", + "mono": "5.2", + "ios": "11.0", + "mac": "3.6", + "android": "7.4" + }, + { + "symlink": "Legacy_5_0_1", + "mono": "5.0", + "ios": "10.10", + "mac": "3.4", + "android": "7.3" + }, + { + "symlink": "Legacy_4_8_1", + "mono": "4.8", + "ios": "10.6", + "mac": "3.0", + "android": "7.1" + } + ] + }, + "java": { + "default": "8", + "versions": [ + "7", "8", "11", "12", "13", "14" + ] + }, + "android": { + "platform-list": [ + "android-30", "android-29", "android-28", "android-27", "android-26", "android-25", "android-24", "android-23", "android-22", "android-21", "android-20", "android-19", "android-18", "android-17", "android-16", "android-15" + ], + "build-tools": [ + "30.0.1", "30.0.0", "29.0.3", "29.0.2", "29.0.1", "29.0.0", "28.0.3", "28.0.2", "28.0.1", "28.0.0", "27.0.3", "27.0.2", "27.0.1", "27.0.0", "26.0.3", "26.0.2", "26.0.1", "26.0.0", "25.0.3", "25.0.2", "25.0.1", "25.0.0", "24.0.3", "24.0.2", "24.0.1", "24.0.0", "23.0.3", "23.0.2", "23.0.1", "23.0.0", "22.0.1", "21.1.2", "20.0.0", "19.1.0", "17.0.0" + ], + "extra-list": [ + "android;m2repository", "google;m2repository", "google;google_play_services", "intel;Hardware_Accelerated_Execution_Manager", "m2repository;com;android;support;constraint;constraint-layout-solver;1.0.0-beta1", "m2repository;com;android;support;constraint;constraint-layout-solver;1.0.0-beta2", "m2repository;com;android;support;constraint;constraint-layout-solver;1.0.0-beta3", "m2repository;com;android;support;constraint;constraint-layout-solver;1.0.0-beta4", "m2repository;com;android;support;constraint;constraint-layout-solver;1.0.0-beta5", "m2repository;com;android;support;constraint;constraint-layout-solver;1.0.0", "m2repository;com;android;support;constraint;constraint-layout-solver;1.0.1", "m2repository;com;android;support;constraint;constraint-layout-solver;1.0.2", "m2repository;com;android;support;constraint;constraint-layout;1.0.0-beta1", "m2repository;com;android;support;constraint;constraint-layout;1.0.0-beta2", "m2repository;com;android;support;constraint;constraint-layout;1.0.0-beta3", "m2repository;com;android;support;constraint;constraint-layout;1.0.0-beta4", "m2repository;com;android;support;constraint;constraint-layout;1.0.0-beta5", "m2repository;com;android;support;constraint;constraint-layout;1.0.0", "m2repository;com;android;support;constraint;constraint-layout;1.0.1", "m2repository;com;android;support;constraint;constraint-layout;1.0.2" + ], + "addon-list": [ + "addon-google_apis-google-24", "addon-google_apis-google-23", "addon-google_apis-google-22", "addon-google_apis-google-21" + ] + }, + "powershellModules": [ + {"name": "Az"}, + {"name": "MarkdownPS"}, + {"name": "Pester"} + ], + "toolcache": [ + { + "name": "PyPy", + "arch": "x64", + "platform" : "darwin", + "versions": [ + "2.7", + "3.6" + ] + } + ] +} \ No newline at end of file diff --git a/images/macos/toolsets/toolset-10.14.json b/images/macos/toolsets/toolset-10.14.json new file mode 100644 index 00000000..e868f769 --- /dev/null +++ b/images/macos/toolsets/toolset-10.14.json @@ -0,0 +1,261 @@ +{ + "xcode": { + "default": "11.3.1", + "versions": [ + "11.3.1", "11.3", "11.2.1", "11.2", "11.1", "11", "10.3", "10.2.1", "10.2", "10.1", "10", "9.4.1" + ] + }, + "xamarin": { + "vsmac": "8.5.0.3183", + "mono-versions": [ + "6.8.0.123", "6.6.0.166", "6.4.0.208", "6.0.0.334", "5.18.1.3", "5.16.1.0", "5.12.0.309", "5.10.1.57", "5.8.1.0", "5.4.1.7", "5.2.0.224", "5.0.1.1", "4.8.1.0" + ], + "ios-versions": [ + "13.14.1.39", "13.10.0.21", "13.8.3.0", "13.6.0.12", "13.4.0.2", "13.2.0.47", "12.14.0.114", "12.10.0.157", "12.8.0.2", "12.6.0.25", "12.2.1.16", "12.0.0.15", "11.14.0.13", "11.12.0.4", "11.9.1.24", "11.8.0.20", "11.6.1.4", "11.2.0.11", "11.0.0.0", "10.10.0.36", "10.6.0.10" + ], + "mac-versions": [ + "6.14.1.39", "6.10.0.21", "6.8.3.0", "6.6.0.12", "6.4.0.2", "6.2.0.47", "5.16.1.24", "5.10.0.157", "5.8.0.0", "5.6.0.25", "5.3.1.28", "5.2.1.16" , "4.6.0.13", "4.4.1.193", "4.2.1.28", "4.0.0.216", "3.8.0.49", "3.6.3.3", "3.4.0.36", "3.0.0.398" + ], + "android-versions": [ + "10.2.0.100", "10.1.3.7", "10.0.6.2", "9.4.1.0", "9.3.0-23", "9.2.3-0", "9.1.8-0", "9.0.0-20", "8.3.3-2", "8.2.0-16", "8.1.5-0", "8.0.0-33", "7.4.5-1", "7.3.1-2", "7.1.0-43" + ], + "bundle-default": "5_12_0", + "bundles": [ + { + "symlink": "6_8_0", + "mono": "6.8", + "ios": "13.14", + "mac": "6.14", + "android": "10.2" + }, + { + "symlink": "6_6_1", + "mono": "6.6", + "ios": "13.10", + "mac": "6.10", + "android": "10.1" + }, + { + "symlink": "6_6_0", + "mono": "6.6", + "ios": "13.8", + "mac": "6.8", + "android": "10.1" + }, + { + "symlink": "6_4_2", + "mono": "6.4", + "ios": "13.6", + "mac": "6.6", + "android": "10.0" + }, + { + "symlink": "6_4_1", + "mono": "6.4", + "ios": "13.4", + "mac": "6.4", + "android": "10.0" + }, + { + "symlink": "6_4_0", + "mono": "6.4", + "ios": "13.2", + "mac": "6.2", + "android": "10.0" + }, + { + "symlink": "6_0_0", + "mono": "6.0", + "ios": "12.14", + "mac": "5.16", + "android": "9.4" + }, + { + "symlink": "5_18_3", + "mono": "5.18", + "ios": "12.10", + "mac": "5.10", + "android": "9.3" + }, + { + "symlink": "5_18_2", + "mono": "5.18", + "ios": "12.8", + "mac": "5.8", + "android": "9.2" + }, + { + "symlink": "5_18_1", + "mono": "5.18", + "ios": "12.6", + "mac": "5.6", + "android": "9.2" + }, + { + "symlink": "5_16_0_0", + "mono": "5.16", + "ios": "12.2", + "mac": "5.2", + "android": "9.1" + }, + { + "symlink": "5_16_0", + "mono": "5.16", + "ios": "12.2", + "mac": "5.2", + "android": "9.1" + }, + { + "symlink": "5_12_0_3", + "mono": "5.12", + "ios": "12.2", + "mac": "5.3", + "android": "9.0" + }, + { + "symlink": "5_12_0_XC10_PRE", + "mono": "5.12", + "ios": "12.0", + "mac": "5.2", + "android": "9.0" + }, + { + "symlink": "5_12_0", + "mono": "5.12", + "ios": "11.14", + "mac": "4.6", + "android": "9.0" + }, + { + "symlink": "5_10_1", + "mono": "5.10", + "ios": "11.12", + "mac": "4.4", + "android": "8.3" + }, + { + "symlink": "5_8_1", + "mono": "5.8", + "ios": "11.9", + "mac": "4.2", + "android": "8.2" + }, + { + "symlink": "5_8_0", + "mono": "5.8", + "ios": "11.8", + "mac": "4.2", + "android": "8.2" + }, + { + "symlink": "5_4_1", + "mono": "5.4", + "ios": "11.6", + "mac": "4.0", + "android": "8.1" + }, + { + "symlink": "5_4_0", + "mono": "5.4", + "ios": "11.2", + "mac": "3.8", + "android": "8.0" + }, + { + "symlink": "5_2_0", + "mono": "5.2", + "ios": "11.0", + "mac": "3.6", + "android": "7.4" + }, + { + "symlink": "Legacy_5_0_1", + "mono": "5.0", + "ios": "10.10", + "mac": "3.4", + "android": "7.3" + }, + { + "symlink": "Legacy_4_8_1", + "mono": "4.8", + "ios": "10.6", + "mac": "3.0", + "android": "7.1" + } + ] + }, + "java": { + "default": "8", + "versions": [ + "7", "8", "11", "12", "13", "14" + ] + }, + "android": { + "platform-list": [ + "android-30", "android-29", "android-28", "android-27", "android-26", "android-25", "android-24", "android-23", "android-22", "android-21", "android-20", "android-19", "android-18", "android-17", "android-16", "android-15" + ], + "build-tools": [ + "30.0.2", "30.0.1", "30.0.0", "29.0.3", "29.0.2", "29.0.1", "29.0.0", "28.0.3", "28.0.2", "28.0.1", "28.0.0", "27.0.3", "27.0.2", "27.0.1", "27.0.0", "26.0.3", "26.0.2", "26.0.1", "26.0.0", "25.0.3", "25.0.2", "25.0.1", "25.0.0", "24.0.3", "24.0.2", "24.0.1", "24.0.0", "23.0.3", "23.0.2", "23.0.1", "23.0.0", "22.0.1", "21.1.2", "20.0.0", "19.1.0", "17.0.0" + ], + "extra-list": [ + "android;m2repository", "google;m2repository", "google;google_play_services", "intel;Hardware_Accelerated_Execution_Manager", "m2repository;com;android;support;constraint;constraint-layout-solver;1.0.0-beta1", "m2repository;com;android;support;constraint;constraint-layout-solver;1.0.0-beta2", "m2repository;com;android;support;constraint;constraint-layout-solver;1.0.0-beta3", "m2repository;com;android;support;constraint;constraint-layout-solver;1.0.0-beta4", "m2repository;com;android;support;constraint;constraint-layout-solver;1.0.0-beta5", "m2repository;com;android;support;constraint;constraint-layout-solver;1.0.0", "m2repository;com;android;support;constraint;constraint-layout-solver;1.0.1", "m2repository;com;android;support;constraint;constraint-layout-solver;1.0.2", "m2repository;com;android;support;constraint;constraint-layout;1.0.0-beta1", "m2repository;com;android;support;constraint;constraint-layout;1.0.0-beta2", "m2repository;com;android;support;constraint;constraint-layout;1.0.0-beta3", "m2repository;com;android;support;constraint;constraint-layout;1.0.0-beta4", "m2repository;com;android;support;constraint;constraint-layout;1.0.0-beta5", "m2repository;com;android;support;constraint;constraint-layout;1.0.0", "m2repository;com;android;support;constraint;constraint-layout;1.0.1", "m2repository;com;android;support;constraint;constraint-layout;1.0.2" + ], + "addon-list": [ + "addon-google_apis-google-24", "addon-google_apis-google-23", "addon-google_apis-google-22", "addon-google_apis-google-21" + ] + }, + "powershellModules": [ + {"name": "Az"}, + {"name": "MarkdownPS"}, + {"name": "Pester"} + ], + "toolcache": [ + { + "name": "Python", + "url" : "https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json", + "arch": "x64", + "platform" : "darwin", + "versions": [ + "2.7.*", + "3.5.*", + "3.6.*", + "3.7.*", + "3.8.*" + ] + }, + { + "name": "PyPy", + "arch": "x64", + "platform" : "darwin", + "versions": [ + "2.7", + "3.6" + ] + }, + { + "name": "Node", + "url" : "https://raw.githubusercontent.com/actions/node-versions/main/versions-manifest.json", + "platform" : "darwin", + "arch": "x64", + "versions": [ + "8.*", + "10.*", + "12.*", + "14.*" + ] + }, + { + "name": "Go", + "url" : "https://raw.githubusercontent.com/actions/go-versions/main/versions-manifest.json", + "arch": "x64", + "platform" : "darwin", + "versions": [ + "1.11.*", + "1.12.*", + "1.13.*", + "1.14.*", + "1.15.*" + ] + } + ] +} \ No newline at end of file diff --git a/images/macos/toolsets/toolset-10.15.json b/images/macos/toolsets/toolset-10.15.json new file mode 100644 index 00000000..c825865c --- /dev/null +++ b/images/macos/toolsets/toolset-10.15.json @@ -0,0 +1,163 @@ +{ + "xcode": { + "default": "11.7", + "versions": [ + "12_beta", "11.7", "11.6", "11.5", "11.4.1", "11.4", "11.3.1", "11.2.1", "11.1", "11", "10.3" + ] + }, + "xamarin": { + "vsmac": "8.7.5.19", + "mono-versions": [ + "6.12.0.93", "6.10.0.106", "6.8.0.123", "6.6.0.166", "6.4.0.208" + ], + "ios-versions": [ + "13.20.2.2", "13.18.2.1", "13.16.0.13", "13.14.1.39", "13.10.0.21", "13.8.3.0", "13.6.0.12", "13.4.0.2", "13.2.0.47" + ], + "mac-versions": [ + "6.20.2.2", "6.18.3.2", "6.16.0.13", "6.14.1.39", "6.10.0.21", "6.8.3.0", "6.6.0.12", "6.4.0.2", "6.2.0.47" + ], + "android-versions": [ + "11.0.2.0", "10.3.1.4", "10.2.0.100", "10.1.3.7", "10.0.6.2" + ], + "bundle-default": "latest", + "bundles": [ + { + "symlink": "6_12_0", + "mono":"6.12", + "ios": "13.20", + "mac": "6.20", + "android": "11.0" + }, + { + "symlink": "6_10_0", + "mono":"6.10", + "ios": "13.18", + "mac": "6.18", + "android": "10.3" + }, + { + "symlink": "6_8_1", + "mono":"6.8", + "ios": "13.16", + "mac": "6.16", + "android": "10.2" + }, + { + "symlink": "6_8_0", + "mono": "6.8", + "ios": "13.14", + "mac": "6.14", + "android": "10.2" + }, + { + "symlink": "6_6_1", + "mono": "6.6", + "ios": "13.10", + "mac": "6.10", + "android": "10.1" + }, + { + "symlink": "6_6_0", + "mono": "6.6", + "ios": "13.8", + "mac": "6.8", + "android": "10.1" + }, + { + "symlink": "6_4_2", + "mono": "6.4", + "ios": "13.6", + "mac": "6.6", + "android": "10.0" + }, + { + "symlink": "6_4_1", + "mono": "6.4", + "ios": "13.4", + "mac": "6.4", + "android": "10.0" + }, + { + "symlink": "6_4_0", + "mono": "6.4", + "ios": "13.2", + "mac": "6.2", + "android": "10.0" + } + ] + }, + "java": { + "default": "8", + "versions": [ + "7", "8", "11", "12", "13", "14" + ] + }, + "android": { + "platform-list": [ + "android-30", "android-29", "android-28", "android-27", "android-26", "android-25", "android-24" + ], + "build-tools": [ + "30.0.2", "30.0.1", "30.0.0", "29.0.3", "29.0.2", "29.0.1", "29.0.0", "28.0.3", "28.0.2", "28.0.1", "28.0.0", "27.0.3", "27.0.2", "27.0.1", "27.0.0", "26.0.3", "26.0.2", "26.0.1", "26.0.0", "25.0.3", "25.0.2", "25.0.1", "25.0.0", "24.0.3", "24.0.2", "24.0.1", "24.0.0" + ], + "extra-list": [ + "android;m2repository", "google;m2repository", "google;google_play_services", "intel;Hardware_Accelerated_Execution_Manager", "m2repository;com;android;support;constraint;constraint-layout-solver;1.0.0-beta1", "m2repository;com;android;support;constraint;constraint-layout-solver;1.0.0-beta2", "m2repository;com;android;support;constraint;constraint-layout-solver;1.0.0-beta3", "m2repository;com;android;support;constraint;constraint-layout-solver;1.0.0-beta4", "m2repository;com;android;support;constraint;constraint-layout-solver;1.0.0-beta5", "m2repository;com;android;support;constraint;constraint-layout-solver;1.0.0", "m2repository;com;android;support;constraint;constraint-layout-solver;1.0.1", "m2repository;com;android;support;constraint;constraint-layout-solver;1.0.2", "m2repository;com;android;support;constraint;constraint-layout;1.0.0-beta1", "m2repository;com;android;support;constraint;constraint-layout;1.0.0-beta2", "m2repository;com;android;support;constraint;constraint-layout;1.0.0-beta3", "m2repository;com;android;support;constraint;constraint-layout;1.0.0-beta4", "m2repository;com;android;support;constraint;constraint-layout;1.0.0-beta5", "m2repository;com;android;support;constraint;constraint-layout;1.0.0", "m2repository;com;android;support;constraint;constraint-layout;1.0.1", "m2repository;com;android;support;constraint;constraint-layout;1.0.2" + ], + "addon-list": [ + "addon-google_apis-google-24", "addon-google_apis-google-23", "addon-google_apis-google-22", "addon-google_apis-google-21" + ] + }, + "powershellModules": [ + {"name": "Az"}, + {"name": "MarkdownPS"}, + {"name": "Pester"} + ], + "toolcache": [ + { + "name": "Python", + "url" : "https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json", + "arch": "x64", + "platform" : "darwin", + "versions": [ + "2.7.*", + "3.5.*", + "3.6.*", + "3.7.*", + "3.8.*" + ] + }, + { + "name": "PyPy", + "arch": "x64", + "platform" : "darwin", + "versions": [ + "2.7", + "3.6" + ] + }, + { + "name": "Node", + "url" : "https://raw.githubusercontent.com/actions/node-versions/main/versions-manifest.json", + "platform" : "darwin", + "arch": "x64", + "versions": [ + "8.*", + "10.*", + "12.*", + "14.*" + ] + }, + { + "name": "Go", + "url" : "https://raw.githubusercontent.com/actions/go-versions/main/versions-manifest.json", + "arch": "x64", + "platform" : "darwin", + "versions": [ + "1.11.*", + "1.12.*", + "1.13.*", + "1.14.*", + "1.15.*" + ] + } + ] +} \ No newline at end of file diff --git a/images/macos/toolsets/toolset-11.0.json b/images/macos/toolsets/toolset-11.0.json new file mode 100644 index 00000000..bab2c6f9 --- /dev/null +++ b/images/macos/toolsets/toolset-11.0.json @@ -0,0 +1,99 @@ +{ + "xcode": { + "default": "11.7", + "versions": [ + "12_beta", "11.7" + ] + }, + "xamarin": { + "vsmac": "8.7.5.19", + "mono-versions": [ + "6.12.0.93", "6.10.0.106" + ], + "ios-versions": [ + "13.20.2.2", "13.18.2.1" + ], + "mac-versions": [ + "6.20.2.2", "6.18.3.2" + ], + "android-versions": [ + "11.0.2.0", "10.3.1.4" + ], + "bundle-default": "latest", + "bundles": [ + { + "symlink": "6_12_0", + "mono":"6.12", + "ios": "13.20", + "mac": "6.20", + "android": "11.0" + }, + { + "symlink": "6_10_0", + "mono":"6.10", + "ios": "13.18", + "mac": "6.18", + "android": "10.3" + } + ] + }, + "java": { + "default": "8", + "versions": [ + "8", "11" + ] + }, + "android": { + "platform-list": [ + "android-30", "android-29", "android-28", "android-27" + ], + "build-tools": [ + "30.0.2", "30.0.1", "30.0.0", "29.0.3", "29.0.2", "29.0.1", "29.0.0", "28.0.3", "28.0.2", "28.0.1", "28.0.0", "27.0.3", "27.0.2", "27.0.1", "27.0.0" + ], + "extra-list": [ + "android;m2repository", "google;m2repository", "google;google_play_services", "intel;Hardware_Accelerated_Execution_Manager" + ], + "addon-list": [] + }, + "powershellModules": [ + {"name": "Az"}, + {"name": "MarkdownPS"}, + {"name": "Pester"} + ], + "toolcache": [ + { + "name": "Python", + "url" : "https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json", + "arch": "x64", + "platform" : "darwin", + "versions": [ + "2.7.*", + "3.5.*", + "3.6.*", + "3.7.*", + "3.8.*" + ] + }, + { + "name": "Node", + "url" : "https://raw.githubusercontent.com/actions/node-versions/main/versions-manifest.json", + "platform" : "darwin", + "arch": "x64", + "versions": [ + "10.*", + "12.*", + "14.*" + ] + }, + { + "name": "Go", + "url" : "https://raw.githubusercontent.com/actions/go-versions/main/versions-manifest.json", + "arch": "x64", + "platform" : "darwin", + "versions": [ + "1.14.*", + "1.15.*" + ] + } + ] +} \ No newline at end of file diff --git a/images/win/Windows2016-Azure.json b/images/win/Windows2016-Azure.json index 39dcb254..ca96a83a 100644 --- a/images/win/Windows2016-Azure.json +++ b/images/win/Windows2016-Azure.json @@ -9,7 +9,6 @@ "storage_account": "{{env `ARM_STORAGE_ACCOUNT`}}", "temp_resource_group_name": "{{env `TEMP_RESOURCE_GROUP_NAME`}}", "location": "{{env `ARM_RESOURCE_LOCATION`}}", - "ssh_password": "{{env `SSH_PASSWORD`}}", "virtual_network_name": "{{env `VNET_NAME`}}", "virtual_network_resource_group_name": "{{env `VNET_RESOURCE_GROUP`}}", "virtual_network_subnet_name": "{{env `VNET_SUBNET`}}", @@ -20,12 +19,9 @@ "root_folder": "C:", "toolset_json_path": "{{env `TEMP`}}\\toolset.json", "image_folder": "C:\\image", - "commit_file": "C:\\image\\commit.txt", "imagedata_file": "C:\\imagedata.json", - "metadata_file": "C:\\image\\metadata.txt", "helper_script_folder": "C:\\Program Files\\WindowsPowerShell\\Modules\\", "psmodules_root_folder": "C:\\Modules", - "commit_url": "LATEST", "install_user": "installer", "install_password": null, "capture_name_prefix": "packer", @@ -34,7 +30,7 @@ "github_feed_token": "{{env `GITHUB_FEED_TOKEN`}}", "announcements": "{{env `ANNOUNCEMENTS`}}" }, - "sensitive-variables": ["install_password", "ssh_password", "client_secret", "github_feed_token"], + "sensitive-variables": ["install_password", "client_secret", "github_feed_token"], "builders": [ { "name": "vhd", @@ -70,9 +66,7 @@ { "type": "powershell", "inline":[ - "New-Item -Path {{user `image_folder`}} -ItemType Directory -Force", - "Write-Output {{user `commit_url`}} > {{user `commit_file` }}", - "Write-Host (Get-Content -Path {{user `commit_file`}})" + "New-Item -Path {{user `image_folder`}} -ItemType Directory -Force" ] }, { @@ -217,6 +211,7 @@ "{{ template_dir }}/scripts/Installers/Install-AliyunCli.ps1", "{{ template_dir }}/scripts/Installers/Install-PostgreSQL.ps1", "{{ template_dir }}/scripts/Installers/Install-Packer.ps1", + "{{ template_dir }}/scripts/Installers/Install-Pulumi.ps1", "{{ template_dir }}/scripts/Installers/Install-JavaTools.ps1" ] }, @@ -327,7 +322,8 @@ { "type": "powershell", "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-WindowsUpdates.ps1" + "{{ template_dir }}/scripts/Installers/Install-WindowsUpdates.ps1", + "{{ template_dir }}/scripts/Installers/Configure-DynamicPort.ps1" ], "elevated_user": "{{user `install_user`}}", "elevated_password": "{{user `install_password`}}" diff --git a/images/win/Windows2016-Readme.md b/images/win/Windows2016-Readme.md index 9083803e..67117884 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) | - +| Announcements | +|-| +| [Replace SVN (1.8.17) by TortoiseSVN (1.14.x) on Windows images](https://github.com/actions/virtual-environments/issues/1318) | +*** # Microsoft Windows Server 2016 Datacenter -- OS Version: 10.0.14393 Build 3808 -- Image Version: 20200802.1 +- OS Version: 10.0.14393 Build 3866 +- Image Version: 20200827.1 ## Installed Software ### Language and Runtime @@ -12,12 +12,12 @@ - Java 1.8.0_265 (default) - Java 11.0.8 - Java 13.0.2 -- Python 3.7.8 +- Python 3.7.9 - Ruby 2.5.8p224 -- Go 1.14.6 -- PHP 7.4.7 -- Julia 1.4.2 -- Perl 5.30.2 +- Go 1.14.7 +- PHP 7.4.9 +- Julia 1.5.1 +- Perl 5.30.3 - Node 12.18.3 ### Package Management @@ -25,46 +25,48 @@ - Vcpkg 2020.06.15 - NPM 6.14.6 - Yarn 1.22.4 -- pip 20.2 (python 3.7) +- pip 20.2.2 (python 3.7) - Miniconda 4.6.14 - RubyGems 3.1.4 -- Helm 3.2.4 -- Composer 1.10.9 -- NuGet 5.6.0.6591 +- Helm 3.3.0 +- Composer 1.10.10 +- NuGet 5.7.0.6726 ### Project Management - Ant 1.10.5 - Maven 3.6.3 -- Gradle 6.5 +- Gradle 6.6 - sbt 1.3.13 ### Tools -- Azure CosmosDb Emulator 2.11.2.0 +- Azure CosmosDb Emulator 2.11.5.0 +- azcopy 10.6.0 - Bazel 3.4.1 -- Bazelisk 1.5.0 -- CMake 3.18.1 +- Bazelisk 1.6.1 +- CMake 3.18.2 - R 4.0.2 - Docker 19.03.11 - Docker-compose 1.26.2 - Git 2.28.0 - Git LFS 2.11.0 +- Google Cloud SDK 307.0.0 - InnoSetup 6.0.5 - jq 1.6 -- Kubectl 1.18.6 +- Kubectl 1.18.8 - Kind 0.8.1 - Mingw-w64 8.1.0 - MySQL 5.7.21.0 - Mercurial 5.0 -- NSIS 3.5.0.20200106 +- NSIS v3.06.1 - Newman 5.1.2 - OpenSSL 1.1.1 -- Packer 1.6.0 +- Packer 1.6.1 - SQLPS 1.0 - SQLServer PS 21.1.18226 -- Subversion (SVN) 1.8.17 -- ghc 8.10.1 +- Subversion (SVN) 1.14.0 +- ghc 8.10.2 - Cabal 3.2.0.0 -- Stack 2.3.1 +- Stack 2.3.3 - WinAppDriver 1.1.1809.18001 - zstd 1.4.0 - VSWhere 2.8.4 @@ -72,32 +74,31 @@ - yamllint 1.24.2 ### CLI Tools -- Azure CLI 2.9.1 -- azcopy 10.5.1 +- Azure CLI 2.11.0 - Azure DevOps CLI extension 0.18.0 -- AWS CLI 2.0.36 -- AWS SAM CLI 1.0.0 +- AWS CLI 2.0.43 +- AWS SAM CLI 1.1.0 - AWS Session Manager CLI 1.1.61.0 -- Alibaba Cloud CLI 3.0.26 -- Cloud Foundry CLI 6.51.0 +- Alibaba Cloud CLI 3.0.56 +- Cloud Foundry CLI 6.52.0 - Hub CLI 2.14.2 -- Google Cloud SDK 303.0.0 +- GitHub CLI gh version 0.11.1 (2020-07-28) https://github.com/cli/cli/releases/tag/v0.11.1 ### Rust Tools -- Rust 1.45.1 +- Rust 1.45.2 #### Packages -- bindgen 0.54.1 -- cbindgen 0.14.3 +- bindgen 0.55.1 +- cbindgen 0.14.4 - cargo-audit 0.12.0 - cargo-outdated v0.9.11 ### Browsers and webdrivers -- Google Chrome 84.0.4147.105 -- Chrome Driver 84.0.4147.30 -- Microsoft Edge 84.0.522.52 -- Microsoft Edge Driver 84.0.522.52 -- Mozilla Firefox 79.0 +- 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 - Gecko Driver 0.27.0 - IE Driver 3.150.1.0 @@ -136,8 +137,9 @@ Note: MSYS2 is pre-installed on image but not added to PATH. | 1.10.8 | x64 | GOROOT_1_10_X64 | | 1.11.13 | x64 | GOROOT_1_11_X64 | | 1.12.17 | x64 | GOROOT_1_12_X64 | -| 1.13.14 | x64 | GOROOT_1_13_X64 | -| 1.14.6 (Default) | x64 | GOROOT_1_14_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 | #### Node @@ -146,7 +148,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.7.0 | x64 | +| 14.8.0 | x64 | #### Python @@ -155,7 +157,7 @@ Note: MSYS2 is pre-installed on image but not added to PATH. | 2.7.18 | x64, x86 | | 3.5.4 | x64, x86 | | 3.6.8 | x64, x86 | -| 3.7.8 (Default) | x64, x86 | +| 3.7.9 (Default) | x64, x86 | | 3.8.5 | x64, x86 | @@ -178,22 +180,29 @@ Note: MSYS2 is pre-installed on image but not added to PATH. ### Databases #### PostgreSQL -| Version | UserName | Password | EnvironmentVariables | Path | ServiceName | ServiceStatus | ServiceStartType | -| ------- | -------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ | ----------------- | ------------- | ---------------- | -| 12.3 | postgres | root | PGBIN=C:\Program Files\PostgreSQL\12\bin;
PGDATA=C:\Program Files\PostgreSQL\12\data;
PGROOT=C:\Program Files\PostgreSQL\12 | C:\Program Files\PostgreSQL\12 | postgresql-x64-12 | Stopped | Disabled | +| Property | Value | +| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| ServiceName | postgresql-x64-12 | +| Version | 12.4 | +| ServiceStatus | Stopped | +| ServiceStartType | Disabled | +| EnvironmentVariables | PGBIN=C:\Program Files\PostgreSQL\12\bin
PGDATA=C:\Program Files\PostgreSQL\12\data
PGROOT=C:\Program Files\PostgreSQL\12 | +| Path | C:\Program Files\PostgreSQL\12 | +| UserName | postgres | +| Password | root | #### MongoDB | Version | ServiceName | ServiceStatus | ServiceStartType | | ------- | ----------- | ------------- | ---------------- | -| 4.2.8.0 | MongoDB | Running | Automatic | +| 4.4.0.0 | MongoDB | Running | Automatic | ### Visual Studio Enterprise 2017 | Name | Version | Path | | ----------------------------- | --------------- | -------------------------------------------------------------- | -| Visual Studio Enterprise 2017 | 15.9.28307.1216 | C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise | +| Visual Studio Enterprise 2017 | 15.9.28307.1234 | C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise | #### Workloads, components and extensions: @@ -441,22 +450,41 @@ Note: MSYS2 is pre-installed on image but not added to PATH. | WIX Toolset | 3.11.4516 | | WIX Toolset Studio 2017 Extension | 0.9.21.62588 | +#### Microsoft Visual C++: + +| Name | Architecture | Version | +| -------------------------------------------- | ------------ | ----------- | +| Microsoft Visual C++ 2010 Redistributable | x64 | 10.0.30319 | +| Microsoft Visual C++ 2010 Redistributable | x86 | 10.0.40219 | +| Microsoft Visual C++ 2012 Additional Runtime | x64 | 11.0.61030 | +| Microsoft Visual C++ 2012 Minimum Runtime | x64 | 11.0.61030 | +| Microsoft Visual C++ 2013 Additional Runtime | x64 | 12.0.40660 | +| Microsoft Visual C++ 2013 Minimum Runtime | x64 | 12.0.40660 | +| Microsoft Visual C++ 2013 Additional Runtime | x86 | 12.0.21005 | +| Microsoft Visual C++ 2013 Minimum Runtime | x86 | 12.0.21005 | +| Microsoft Visual C++ 2017 Debug Runtime | x64 | 14.16.27033 | +| Microsoft Visual C++ 2017 Debug Runtime | x86 | 14.16.27033 | +| Microsoft Visual C++ 2019 Additional Runtime | x64 | 14.26.28720 | +| Microsoft Visual C++ 2019 Minimum Runtime | x64 | 14.26.28720 | +| Microsoft Visual C++ 2019 Additional Runtime | x86 | 14.26.28720 | +| Microsoft Visual C++ 2019 Minimum Runtime | x86 | 14.26.28720 | + ### .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.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.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 3.1.100 3.1.101 3.1.102 3.1.103 3.1.104 3.1.105 3.1.106 3.1.200 3.1.201 3.1.202 3.1.300 3.1.301 3.1.302 +- 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 ### .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.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 `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 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 +- 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 `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 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 +- 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 `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.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 ### .NET Framework `Type: Developer Pack` @@ -482,7 +510,7 @@ All other versions are saved but not installed. | ------------------ | ------------------ | | DockerMsftProvider | 1.0.0.8 | | MarkdownPS | 1.9 | -| Pester | 3.4.0
5.0.2 | +| Pester | 3.4.0
5.0.3 | | PowerShellGet | 1.0.0.1
2.2.4.1 | | PSWindowsUpdate | 2.2.0.2 | | SqlServer | 21.1.18226 | @@ -507,8 +535,8 @@ All other versions are saved but not installed. | android-26 | Android SDK Platform 26, Revision 2 | | android-27 | Android SDK Platform 27, Revision 3 | | android-28 | Android SDK Platform 28, Revision 6 | -| android-29 | Android SDK Platform 29, Revision 4 | -| android-30 | Android SDK Platform 30, Revision 2 | +| android-29 | Android SDK Platform 29, Revision 5 | +| android-30 | Android SDK Platform 30, Revision 3 | ### Android SDK Build-Tools `Location C:\Program Files (x86)\Android\android-sdk\build-tools` @@ -546,6 +574,8 @@ All other versions are saved but not installed. | build-tools-29.0.2 | Android SDK Build-Tools, Revision 29.0.2 | | build-tools-29.0.3 | Android SDK Build-Tools, Revision 29.0.3 | | build-tools-30.0.0 | Android SDK Build-Tools, Revision 30.0.0 | +| build-tools-30.0.1 | Android SDK Build-Tools, Revision 30.0.1 | +| build-tools-30.0.2 | Android SDK Build-Tools, Revision 30.0.2 | ### Android Extra Packages | Package Name | Version | diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index a261ab17..b26f7754 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -9,7 +9,6 @@ "storage_account": "{{env `ARM_STORAGE_ACCOUNT`}}", "temp_resource_group_name": "{{env `TEMP_RESOURCE_GROUP_NAME`}}", "location": "{{env `ARM_RESOURCE_LOCATION`}}", - "ssh_password": "{{env `SSH_PASSWORD`}}", "virtual_network_name": "{{env `VNET_NAME`}}", "virtual_network_resource_group_name": "{{env `VNET_RESOURCE_GROUP`}}", "virtual_network_subnet_name": "{{env `VNET_SUBNET`}}", @@ -20,12 +19,9 @@ "root_folder": "C:", "toolset_json_path": "{{env `TEMP`}}\\toolset.json", "image_folder": "C:\\image", - "commit_file": "C:\\image\\commit.txt", "imagedata_file": "C:\\imagedata.json", - "metadata_file": "C:\\image\\metadata.txt", "helper_script_folder": "C:\\Program Files\\WindowsPowerShell\\Modules\\", "psmodules_root_folder": "C:\\Modules", - "commit_id": "LATEST", "install_user": "installer", "install_password": null, "capture_name_prefix": "packer", @@ -34,7 +30,7 @@ "github_feed_token": "{{env `GITHUB_FEED_TOKEN`}}", "announcements": "{{env `ANNOUNCEMENTS`}}" }, - "sensitive-variables": ["install_password", "ssh_password", "client_secret", "github_feed_token"], + "sensitive-variables": ["install_password", "client_secret", "github_feed_token"], "builders": [ { "name": "vhd", @@ -70,9 +66,7 @@ { "type": "powershell", "inline":[ - "New-Item -Path {{user `image_folder`}} -ItemType Directory -Force", - "Write-Output {{user `commit_id`}} > {{user `commit_file`}}", - "Write-Host (Get-Content -Path {{user `commit_file`}})" + "New-Item -Path {{user `image_folder`}} -ItemType Directory -Force" ] }, { @@ -206,6 +200,7 @@ "{{ template_dir }}/scripts/Installers/Install-NodeLts.ps1", "{{ template_dir }}/scripts/Installers/Install-7zip.ps1", "{{ template_dir }}/scripts/Installers/Install-Packer.ps1", + "{{ template_dir }}/scripts/Installers/Install-Pulumi.ps1", "{{ template_dir }}/scripts/Installers/Install-JavaTools.ps1" ] }, @@ -326,7 +321,8 @@ { "type": "powershell", "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-WindowsUpdates.ps1" + "{{ template_dir }}/scripts/Installers/Install-WindowsUpdates.ps1", + "{{ template_dir }}/scripts/Installers/Configure-DynamicPort.ps1" ], "elevated_user": "{{user `install_user`}}", "elevated_password": "{{user `install_password`}}" diff --git a/images/win/Windows2019-Readme.md b/images/win/Windows2019-Readme.md index 54121cd1..c74d15f3 100644 --- a/images/win/Windows2019-Readme.md +++ b/images/win/Windows2019-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) | - +| Announcements | +|-| +| [Replace SVN (1.8.17) by TortoiseSVN (1.14.x) on Windows images](https://github.com/actions/virtual-environments/issues/1318) | +*** # Microsoft Windows Server 2019 Datacenter -- OS Version: 10.0.17763 Build 1339 -- Image Version: 20200802.1 +- OS Version: 10.0.17763 Build 1397 +- Image Version: 20200827.1 ## Enabled windows optional features - Windows Subsystem for Linux @@ -15,12 +15,12 @@ - Java 1.8.0_265 (default) - Java 11.0.8 - Java 13.0.2 -- Python 3.7.8 +- Python 3.7.9 - Ruby 2.5.8p224 -- Go 1.14.6 -- PHP 7.4.7 -- Julia 1.4.2 -- Perl 5.30.2 +- Go 1.14.7 +- PHP 7.4.9 +- Julia 1.5.1 +- Perl 5.30.3 - Node 12.18.3 ### Package Management @@ -28,46 +28,48 @@ - Vcpkg 2020.06.15 - NPM 6.14.6 - Yarn 1.22.4 -- pip 20.2 (python 3.7) +- pip 20.2.2 (python 3.7) - Miniconda 4.6.14 - RubyGems 3.1.4 -- Helm 3.2.4 -- Composer 1.10.9 -- NuGet 5.6.0.6591 +- Helm 3.3.0 +- Composer 1.10.10 +- NuGet 5.7.0.6726 ### Project Management - Ant 1.10.5 - Maven 3.6.3 -- Gradle 6.5 +- Gradle 6.6 - sbt 1.3.13 ### Tools -- Azure CosmosDb Emulator 2.11.2.0 +- Azure CosmosDb Emulator 2.11.5.0 +- azcopy 10.6.0 - Bazel 3.4.1 -- Bazelisk 1.5.0 -- CMake 3.18.1 +- Bazelisk 1.6.1 +- CMake 3.18.2 - R 4.0.2 - Docker 19.03.11 - Docker-compose 1.26.2 - Git 2.28.0 - Git LFS 2.11.0 +- Google Cloud SDK 307.0.0 - InnoSetup 6.0.5 - jq 1.6 -- Kubectl 1.18.6 +- Kubectl 1.18.8 - Kind 0.8.1 - Mingw-w64 8.1.0 - MySQL 5.7.21.0 - Mercurial 5.0 -- NSIS 3.5.0.20200106 +- NSIS v3.06.1 - Newman 5.1.2 - OpenSSL 1.1.1 -- Packer 1.6.0 +- Packer 1.6.1 - SQLPS 1.0 - SQLServer PS 21.1.18226 -- Subversion (SVN) 1.8.17 -- ghc 8.10.1 +- Subversion (SVN) 1.14.0 +- ghc 8.10.2 - Cabal 3.2.0.0 -- Stack 2.3.1 +- Stack 2.3.3 - WinAppDriver 1.1.1809.18001 - zstd 1.4.0 - VSWhere 2.8.4 @@ -75,32 +77,31 @@ - yamllint 1.24.2 ### CLI Tools -- Azure CLI 2.9.1 -- azcopy 10.5.1 +- Azure CLI 2.11.0 - Azure DevOps CLI extension 0.18.0 -- AWS CLI 2.0.36 -- AWS SAM CLI 1.0.0 +- AWS CLI 2.0.43 +- AWS SAM CLI 1.1.0 - AWS Session Manager CLI 1.1.61.0 -- Alibaba Cloud CLI 3.0.26 -- Cloud Foundry CLI 6.51.0 +- Alibaba Cloud CLI 3.0.56 +- Cloud Foundry CLI 6.52.0 - Hub CLI 2.14.2 -- Google Cloud SDK 303.0.0 +- GitHub CLI gh version 0.11.1 (2020-07-28) https://github.com/cli/cli/releases/tag/v0.11.1 ### Rust Tools -- Rust 1.45.1 +- Rust 1.45.2 #### Packages -- bindgen 0.54.1 -- cbindgen 0.14.3 +- bindgen 0.55.1 +- cbindgen 0.14.4 - cargo-audit 0.12.0 - cargo-outdated v0.9.11 ### Browsers and webdrivers -- Google Chrome 84.0.4147.105 -- Chrome Driver 84.0.4147.30 -- Microsoft Edge 84.0.522.52 -- Microsoft Edge Driver 84.0.522.52 -- Mozilla Firefox 79.0 +- 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 - Gecko Driver 0.27.0 - IE Driver 3.150.1.0 @@ -139,8 +140,9 @@ Note: MSYS2 is pre-installed on image but not added to PATH. | 1.10.8 | x64 | GOROOT_1_10_X64 | | 1.11.13 | x64 | GOROOT_1_11_X64 | | 1.12.17 | x64 | GOROOT_1_12_X64 | -| 1.13.14 | x64 | GOROOT_1_13_X64 | -| 1.14.6 (Default) | x64 | GOROOT_1_14_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 | #### Node @@ -149,7 +151,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.7.0 | x64 | +| 14.8.0 | x64 | #### Python @@ -158,7 +160,7 @@ Note: MSYS2 is pre-installed on image but not added to PATH. | 2.7.18 | x64, x86 | | 3.5.4 | x64, x86 | | 3.6.8 | x64, x86 | -| 3.7.8 (Default) | x64, x86 | +| 3.7.9 (Default) | x64, x86 | | 3.8.5 | x64, x86 | @@ -181,28 +183,35 @@ Note: MSYS2 is pre-installed on image but not added to PATH. ### Databases #### PostgreSQL -| Version | UserName | Password | EnvironmentVariables | Path | ServiceName | ServiceStatus | ServiceStartType | -| ------- | -------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ | ----------------- | ------------- | ---------------- | -| 12.3 | postgres | root | PGBIN=C:\Program Files\PostgreSQL\12\bin;
PGDATA=C:\Program Files\PostgreSQL\12\data;
PGROOT=C:\Program Files\PostgreSQL\12 | C:\Program Files\PostgreSQL\12 | postgresql-x64-12 | Stopped | Disabled | +| Property | Value | +| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| ServiceName | postgresql-x64-12 | +| Version | 12.4 | +| ServiceStatus | Stopped | +| ServiceStartType | Disabled | +| EnvironmentVariables | PGBIN=C:\Program Files\PostgreSQL\12\bin
PGDATA=C:\Program Files\PostgreSQL\12\data
PGROOT=C:\Program Files\PostgreSQL\12 | +| Path | C:\Program Files\PostgreSQL\12 | +| UserName | postgres | +| Password | root | #### MongoDB | Version | ServiceName | ServiceStatus | ServiceStartType | | ------- | ----------- | ------------- | ---------------- | -| 4.2.8.0 | MongoDB | Running | Automatic | +| 4.4.0.0 | MongoDB | Running | Automatic | ### Visual Studio Enterprise 2019 -| Name | Version | Path | -| ----------------------------- | ------------- | -------------------------------------------------------------- | -| Visual Studio Enterprise 2019 | 16.6.30320.27 | C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise | +| Name | Version | Path | +| ----------------------------- | -------------- | -------------------------------------------------------------- | +| Visual Studio Enterprise 2019 | 16.7.30413.136 | C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise | #### Workloads, components and extensions: | Package | Version | | ------------------------------------------------------------------------- | -------------- | -| Component.Android.NDK.R16B | 16.6.30317.111 | +| Component.Android.NDK.R16B | 16.7.30411.121 | | Component.Android.SDK25.Private | 16.0.28625.61 | | Component.Android.SDK28 | 16.2.29003.222 | | Component.Ant | 1.9.3.8 | @@ -211,22 +220,22 @@ Note: MSYS2 is pre-installed on image but not added to PATH. | Component.MDD.Android | 16.0.28517.75 | | Component.MDD.Linux | 16.5.29515.121 | | Component.MDD.Linux.GCC.arm | 16.5.29515.121 | -| Component.Microsoft.VisualStudio.LiveShare | 1.0.1998 | +| Component.Microsoft.VisualStudio.LiveShare | 1.0.2518 | | Component.Microsoft.VisualStudio.RazorExtension | 16.0.28714.129 | | Component.Microsoft.VisualStudio.Tools.Applications | 16.0.29425.2 | | Component.Microsoft.VisualStudio.Web.AzureFunctions | 16.0.28714.129 | | Component.Microsoft.Web.LibraryManager | 16.0.28315.86 | | Component.Microsoft.Windows.DriverKit | 10.0.19030.0 | | Component.OpenJDK | 16.1.28811.260 | -| Component.UnityEngine.x64 | 16.5.29515.121 | +| Component.UnityEngine.x64 | 16.7.30310.162 | | Component.Unreal | 16.1.28810.153 | | Component.Unreal.Android | 16.1.28810.153 | | Component.WixToolset.VisualStudioExtension.Dev16 | 1.0.0.4 | | Component.WixToolset.VisualStudioExtension.Schemas3 | 1.0.0.4 | | Component.WixToolset.VisualStudioExtension.Schemas4 | 1.0.0.4 | -| Component.Xamarin | 16.6.30013.169 | +| Component.Xamarin | 16.7.30310.162 | | Component.Xamarin.RemotedSimulator | 16.0.28315.86 | -| Microsoft.Component.Azure.DataLake.Tools | 16.6.30013.169 | +| Microsoft.Component.Azure.DataLake.Tools | 16.7.30310.162 | | Microsoft.Component.MSBuild | 16.5.29515.121 | | Microsoft.Component.NetFX.Native | 16.5.29515.121 | | Microsoft.Component.PythonTools | 16.5.29515.121 | @@ -241,10 +250,10 @@ Note: MSYS2 is pre-installed on image but not added to PATH. | Microsoft.Net.Component.4.6.1.TargetingPack | 16.0.28517.75 | | Microsoft.Net.Component.4.6.2.TargetingPack | 16.0.28517.75 | | Microsoft.Net.Component.4.6.TargetingPack | 16.0.28517.75 | -| Microsoft.Net.Component.4.7.1.TargetingPack | 16.6.30027.131 | +| Microsoft.Net.Component.4.7.1.TargetingPack | 16.7.30310.162 | | Microsoft.Net.Component.4.7.2.SDK | 16.4.29409.204 | -| Microsoft.Net.Component.4.7.2.TargetingPack | 16.6.30027.131 | -| Microsoft.Net.Component.4.7.TargetingPack | 16.6.30027.131 | +| Microsoft.Net.Component.4.7.2.TargetingPack | 16.7.30310.162 | +| Microsoft.Net.Component.4.7.TargetingPack | 16.7.30310.162 | | Microsoft.Net.Component.4.8.SDK | 16.4.29313.120 | | Microsoft.Net.Component.4.TargetingPack | 16.0.28517.75 | | Microsoft.Net.ComponentGroup.4.6.2.DeveloperTools | 16.3.29207.166 | @@ -252,17 +261,17 @@ Note: MSYS2 is pre-installed on image but not added to PATH. | Microsoft.Net.ComponentGroup.4.7.DeveloperTools | 16.3.29207.166 | | Microsoft.Net.ComponentGroup.DevelopmentPrerequisites | 16.3.29207.166 | | Microsoft.Net.ComponentGroup.TargetingPacks.Common | 16.0.28516.191 | -| Microsoft.Net.Core.Component.SDK.2.1 | 16.6.30309.148 | +| Microsoft.Net.Core.Component.SDK.2.1 | 16.7.30406.193 | | Microsoft.NetCore.Component.DevelopmentTools | 16.5.29721.120 | -| Microsoft.NetCore.Component.Runtime.3.1 | 16.6.30309.148 | -| Microsoft.NetCore.Component.SDK | 16.6.30309.148 | +| Microsoft.NetCore.Component.Runtime.3.1 | 16.7.30406.193 | +| Microsoft.NetCore.Component.SDK | 16.7.30406.193 | | Microsoft.NetCore.Component.Web | 16.5.29721.120 | | Microsoft.VisualStudio.Component.AppInsights.Tools | 16.5.29515.121 | | Microsoft.VisualStudio.Component.AspNet45 | 16.0.28315.86 | | Microsoft.VisualStudio.Component.Azure.AuthoringTools | 16.0.28625.61 | | Microsoft.VisualStudio.Component.Azure.ClientLibs | 16.0.28315.86 | -| Microsoft.VisualStudio.Component.Azure.Compute.Emulator | 16.6.30013.169 | -| Microsoft.VisualStudio.Component.Azure.Kubernetes.Tools | 16.0.28625.61 | +| Microsoft.VisualStudio.Component.Azure.Compute.Emulator | 16.7.30310.162 | +| Microsoft.VisualStudio.Component.Azure.Kubernetes.Tools | 16.7.30310.162 | | Microsoft.VisualStudio.Component.Azure.Powershell | 16.5.29515.121 | | Microsoft.VisualStudio.Component.Azure.ResourceManager.Tools | 16.4.29409.204 | | Microsoft.VisualStudio.Component.Azure.ServiceFabric.Tools | 16.4.29313.120 | @@ -278,9 +287,9 @@ Note: MSYS2 is pre-installed on image but not added to PATH. | Microsoft.VisualStudio.Component.Debugger.JustInTime | 16.0.28517.75 | | Microsoft.VisualStudio.Component.Debugger.Snapshot | 16.5.29813.82 | | Microsoft.VisualStudio.Component.Debugger.TimeTravel | 16.5.29515.121 | -| Microsoft.VisualStudio.Component.DiagnosticTools | 16.5.29515.121 | +| Microsoft.VisualStudio.Component.DiagnosticTools | 16.7.30310.162 | | Microsoft.VisualStudio.Component.DockerTools | 16.4.29409.204 | -| Microsoft.VisualStudio.Component.DotNetModelBuilder | 16.6.30013.169 | +| Microsoft.VisualStudio.Component.DotNetModelBuilder | 16.7.30322.227 | | Microsoft.VisualStudio.Component.DslTools | 16.0.28315.86 | | Microsoft.VisualStudio.Component.EntityFramework | 16.0.28315.86 | | Microsoft.VisualStudio.Component.FSharp | 16.0.28315.86 | @@ -293,11 +302,11 @@ Note: MSYS2 is pre-installed on image but not added to PATH. | Microsoft.VisualStudio.Component.IntelliCode | 0.2 | | Microsoft.VisualStudio.Component.IntelliTrace.FrontEnd | 16.5.29515.121 | | Microsoft.VisualStudio.Component.JavaScript.Diagnostics | 16.0.28517.75 | -| Microsoft.VisualStudio.Component.JavaScript.TypeScript | 16.5.29721.120 | +| Microsoft.VisualStudio.Component.JavaScript.TypeScript | 16.7.30310.162 | | Microsoft.VisualStudio.Component.LinqToSql | 16.0.28625.61 | | Microsoft.VisualStudio.Component.LiveUnitTesting | 16.1.28811.260 | | Microsoft.VisualStudio.Component.ManagedDesktop.Core | 16.4.29318.151 | -| Microsoft.VisualStudio.Component.ManagedDesktop.Prerequisites | 16.6.30013.169 | +| Microsoft.VisualStudio.Component.ManagedDesktop.Prerequisites | 16.7.30310.162 | | Microsoft.VisualStudio.Component.Merq | 16.2.29012.281 | | Microsoft.VisualStudio.Component.MonoDebugger | 16.0.28517.75 | | Microsoft.VisualStudio.Component.MSODBC.SQL | 16.0.28625.61 | @@ -305,9 +314,9 @@ Note: MSYS2 is pre-installed on image but not added to PATH. | Microsoft.VisualStudio.Component.Node.Tools | 16.5.29515.121 | | Microsoft.VisualStudio.Component.NuGet | 16.1.28829.92 | | Microsoft.VisualStudio.Component.NuGet.BuildTools | 16.1.28829.92 | -| Microsoft.VisualStudio.Component.PortableLibrary | 16.0.28517.75 | +| Microsoft.VisualStudio.Component.PortableLibrary | 16.7.30310.162 | | Microsoft.VisualStudio.Component.Roslyn.Compiler | 16.0.28714.129 | -| Microsoft.VisualStudio.Component.Roslyn.LanguageServices | 16.6.30013.169 | +| Microsoft.VisualStudio.Component.Roslyn.LanguageServices | 16.7.30310.162 | | Microsoft.VisualStudio.Component.Sharepoint.Tools | 16.4.29409.204 | | Microsoft.VisualStudio.Component.SQL.ADAL | 16.0.28517.75 | | Microsoft.VisualStudio.Component.SQL.CLR | 16.0.28315.86 | @@ -318,11 +327,11 @@ Note: MSYS2 is pre-installed on image but not added to PATH. | Microsoft.VisualStudio.Component.TestTools.CodedUITest | 16.0.28327.66 | | Microsoft.VisualStudio.Component.TestTools.WebLoadTest | 16.0.28625.61 | | Microsoft.VisualStudio.Component.TextTemplating | 16.0.28625.61 | -| Microsoft.VisualStudio.Component.TypeScript.3.8 | 16.0.29813.82 | +| Microsoft.VisualStudio.Component.TypeScript.3.9 | 16.0.30322.227 | | Microsoft.VisualStudio.Component.Unity | 16.0.28315.86 | | Microsoft.VisualStudio.Component.UWP.VC.ARM64 | 16.3.29207.166 | -| Microsoft.VisualStudio.Component.VC.14.25.x86.x64 | 16.6.30013.169 | -| Microsoft.VisualStudio.Component.VC.140 | 16.0.28625.61 | +| Microsoft.VisualStudio.Component.VC.14.25.x86.x64 | 16.7.30310.162 | +| Microsoft.VisualStudio.Component.VC.140 | 16.7.30310.162 | | Microsoft.VisualStudio.Component.VC.ASAN | 16.5.29515.121 | | Microsoft.VisualStudio.Component.VC.ATL | 16.4.29313.120 | | Microsoft.VisualStudio.Component.VC.ATL.ARM | 16.4.29313.120 | @@ -332,11 +341,11 @@ Note: MSYS2 is pre-installed on image but not added to PATH. | Microsoft.VisualStudio.Component.VC.ATL.Spectre | 16.5.29515.121 | | Microsoft.VisualStudio.Component.VC.ATLMFC | 16.4.29313.120 | | Microsoft.VisualStudio.Component.VC.ATLMFC.Spectre | 16.5.29721.120 | -| Microsoft.VisualStudio.Component.VC.CLI.Support | 16.6.30013.169 | +| Microsoft.VisualStudio.Component.VC.CLI.Support | 16.7.30310.162 | | Microsoft.VisualStudio.Component.VC.CMake.Project | 16.3.29103.31 | -| Microsoft.VisualStudio.Component.VC.CoreIde | 16.0.28625.61 | +| Microsoft.VisualStudio.Component.VC.CoreIde | 16.7.30310.162 | | Microsoft.VisualStudio.Component.VC.DiagnosticTools | 16.5.29515.121 | -| Microsoft.VisualStudio.Component.VC.Llvm.Clang | 16.6.30027.131 | +| Microsoft.VisualStudio.Component.VC.Llvm.Clang | 16.7.30310.162 | | Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset | 16.3.29207.166 | | Microsoft.VisualStudio.Component.VC.MFC.ARM | 16.4.29313.120 | | Microsoft.VisualStudio.Component.VC.MFC.ARM.Spectre | 16.5.29721.120 | @@ -344,17 +353,17 @@ Note: MSYS2 is pre-installed on image but not added to PATH. | Microsoft.VisualStudio.Component.VC.MFC.ARM64.Spectre | 16.5.29721.120 | | Microsoft.VisualStudio.Component.VC.Redist.14.Latest | 16.5.29515.121 | | Microsoft.VisualStudio.Component.VC.Redist.MSM | 16.5.29515.121 | -| Microsoft.VisualStudio.Component.VC.Runtimes.ARM.Spectre | 16.6.30013.169 | -| Microsoft.VisualStudio.Component.VC.Runtimes.ARM64.Spectre | 16.6.30013.169 | -| Microsoft.VisualStudio.Component.VC.Runtimes.x86.x64.Spectre | 16.6.30013.169 | +| Microsoft.VisualStudio.Component.VC.Runtimes.ARM.Spectre | 16.7.30310.162 | +| Microsoft.VisualStudio.Component.VC.Runtimes.ARM64.Spectre | 16.7.30310.162 | +| Microsoft.VisualStudio.Component.VC.Runtimes.x86.x64.Spectre | 16.7.30310.162 | | Microsoft.VisualStudio.Component.VC.TestAdapterForBoostTest | 16.0.28517.75 | | Microsoft.VisualStudio.Component.VC.TestAdapterForGoogleTest | 16.0.28517.75 | -| Microsoft.VisualStudio.Component.VC.Tools.ARM | 16.6.30013.169 | -| Microsoft.VisualStudio.Component.VC.Tools.ARM64 | 16.6.30013.169 | -| Microsoft.VisualStudio.Component.VC.Tools.x86.x64 | 16.6.30013.169 | -| Microsoft.VisualStudio.Component.VC.v141.ARM | 16.6.30013.169 | +| Microsoft.VisualStudio.Component.VC.Tools.ARM | 16.7.30310.162 | +| Microsoft.VisualStudio.Component.VC.Tools.ARM64 | 16.7.30310.162 | +| Microsoft.VisualStudio.Component.VC.Tools.x86.x64 | 16.7.30310.162 | +| Microsoft.VisualStudio.Component.VC.v141.ARM | 16.7.30310.162 | | Microsoft.VisualStudio.Component.VC.v141.ARM.Spectre | 16.5.29515.121 | -| Microsoft.VisualStudio.Component.VC.v141.ARM64 | 16.6.30013.169 | +| Microsoft.VisualStudio.Component.VC.v141.ARM64 | 16.7.30310.162 | | Microsoft.VisualStudio.Component.VC.v141.ARM64.Spectre | 16.5.29515.121 | | Microsoft.VisualStudio.Component.VC.v141.ATL | 16.0.28625.61 | | Microsoft.VisualStudio.Component.VC.v141.ATL.ARM.Spectre | 16.5.29721.120 | @@ -364,79 +373,98 @@ Note: MSYS2 is pre-installed on image but not added to PATH. | Microsoft.VisualStudio.Component.VC.v141.MFC.ARM.Spectre | 16.0.28625.61 | | Microsoft.VisualStudio.Component.VC.v141.MFC.ARM64.Spectre | 16.0.28625.61 | | Microsoft.VisualStudio.Component.VC.v141.MFC.Spectre | 16.0.28625.61 | -| Microsoft.VisualStudio.Component.VC.v141.x86.x64 | 16.6.30013.169 | +| Microsoft.VisualStudio.Component.VC.v141.x86.x64 | 16.7.30310.162 | | Microsoft.VisualStudio.Component.VC.v141.x86.x64.Spectre | 16.5.29515.121 | | Microsoft.VisualStudio.Component.VSSDK | 16.0.28315.86 | | Microsoft.VisualStudio.Component.Wcf.Tooling | 16.0.28625.61 | | Microsoft.VisualStudio.Component.Web | 16.0.28517.75 | | Microsoft.VisualStudio.Component.WebDeploy | 16.0.28517.75 | | Microsoft.VisualStudio.Component.Windows10SDK | 16.4.29409.204 | -| Microsoft.VisualStudio.Component.Windows10SDK.16299 | 16.6.30027.131 | -| Microsoft.VisualStudio.Component.Windows10SDK.17134 | 16.6.30027.131 | +| Microsoft.VisualStudio.Component.Windows10SDK.16299 | 16.7.30310.162 | +| Microsoft.VisualStudio.Component.Windows10SDK.17134 | 16.7.30310.162 | | Microsoft.VisualStudio.Component.Windows10SDK.17763 | 16.0.28517.75 | | Microsoft.VisualStudio.Component.Windows10SDK.18362 | 16.1.28829.92 | -| Microsoft.VisualStudio.Component.Windows10SDK.19041 | 16.6.30107.105 | +| Microsoft.VisualStudio.Component.Windows10SDK.19041 | 16.7.30310.162 | | Microsoft.VisualStudio.Component.WinXP | 16.1.28811.260 | | Microsoft.VisualStudio.Component.Workflow | 16.0.28315.86 | | Microsoft.VisualStudio.ComponentGroup.ArchitectureTools.Native | 16.0.28621.142 | | Microsoft.VisualStudio.ComponentGroup.Azure.CloudServices | 16.4.29409.204 | -| Microsoft.VisualStudio.ComponentGroup.Azure.Prerequisites | 16.4.29409.204 | +| Microsoft.VisualStudio.ComponentGroup.Azure.Prerequisites | 16.7.30310.162 | | Microsoft.VisualStudio.ComponentGroup.Azure.ResourceManager.Tools | 16.0.28528.71 | | Microsoft.VisualStudio.ComponentGroup.AzureFunctions | 16.0.28621.142 | -| Microsoft.VisualStudio.ComponentGroup.MSIX.Packaging | 16.4.29409.204 | +| Microsoft.VisualStudio.ComponentGroup.MSIX.Packaging | 16.7.30310.162 | | Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core | 16.2.29012.281 | -| Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang | 16.6.30027.131 | +| Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang | 16.7.30310.162 | | Microsoft.VisualStudio.ComponentGroup.UWP.NetCoreAndStandard | 16.3.29102.218 | | Microsoft.VisualStudio.ComponentGroup.UWP.Support | 16.4.29409.204 | | Microsoft.VisualStudio.ComponentGroup.UWP.Xamarin | 16.5.29514.35 | | Microsoft.VisualStudio.ComponentGroup.VisualStudioExtension.Prerequisites | 16.4.29318.151 | | Microsoft.VisualStudio.ComponentGroup.Web | 16.4.29318.151 | | Microsoft.VisualStudio.ComponentGroup.Web.CloudTools | 16.2.29003.222 | -| Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions | 16.6.30013.169 | +| Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions | 16.7.30310.162 | | Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions.CMake | 16.3.29207.166 | | Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions.TemplateEngine | 16.0.28315.86 | | Microsoft.VisualStudio.Workload.Azure | 16.4.29409.204 | | Microsoft.VisualStudio.Workload.CoreEditor | 16.0.28315.86 | | Microsoft.VisualStudio.Workload.Data | 16.0.28720.110 | | Microsoft.VisualStudio.Workload.DataScience | 16.0.28720.110 | -| Microsoft.VisualStudio.Workload.ManagedDesktop | 16.6.30013.169 | +| Microsoft.VisualStudio.Workload.ManagedDesktop | 16.7.30310.162 | | Microsoft.VisualStudio.Workload.ManagedGame | 16.5.29514.35 | | Microsoft.VisualStudio.Workload.NativeCrossPlat | 16.4.29409.204 | | Microsoft.VisualStudio.Workload.NativeDesktop | 16.5.29514.35 | | Microsoft.VisualStudio.Workload.NativeGame | 16.5.29514.35 | | Microsoft.VisualStudio.Workload.NativeMobile | 16.5.29514.35 | -| Microsoft.VisualStudio.Workload.NetCoreTools | 16.6.30013.169 | +| Microsoft.VisualStudio.Workload.NetCoreTools | 16.7.30310.162 | | Microsoft.VisualStudio.Workload.NetCrossPlat | 16.5.29514.35 | | Microsoft.VisualStudio.Workload.NetWeb | 16.4.29409.204 | | Microsoft.VisualStudio.Workload.Node | 16.1.28825.262 | | Microsoft.VisualStudio.Workload.Office | 16.3.29207.166 | | Microsoft.VisualStudio.Workload.Python | 16.0.28621.142 | -| Microsoft.VisualStudio.Workload.Universal | 16.6.30020.46 | +| Microsoft.VisualStudio.Workload.Universal | 16.7.30310.162 | | Microsoft.VisualStudio.Workload.VisualStudioExtension | 16.4.29409.204 | | SSDT Microsoft Analysis Services Projects | 2.9.12 | -| SSDT SQL Server Integration Services Projects | 3.8 | +| SSDT SQL Server Integration Services Projects | 3.9 | | SSDT Microsoft Reporting Services Projects | 2.6.7 | | Windows Driver Kit | 3.11.4516 | | Windows Driver Kit Visual Studio Extension | 10.1.19041.1 | | WIX Toolset | 3.11.4516 | | WIX Toolset Studio 2019 Extension | 1.0.0.4 | +#### Microsoft Visual C++: + +| Name | Architecture | Version | +| -------------------------------------------- | ------------ | ----------- | +| Microsoft Visual C++ 2010 Redistributable | x64 | 10.0.40219 | +| Microsoft Visual C++ 2010 Redistributable | x86 | 10.0.40219 | +| Microsoft Visual C++ 2012 Additional Runtime | x64 | 11.0.61030 | +| Microsoft Visual C++ 2012 Minimum Runtime | x64 | 11.0.61030 | +| Microsoft Visual C++ 2013 Additional Runtime | x64 | 12.0.40660 | +| Microsoft Visual C++ 2013 Minimum Runtime | x64 | 12.0.40660 | +| Microsoft Visual C++ 2013 Additional Runtime | x86 | 12.0.21005 | +| Microsoft Visual C++ 2013 Minimum Runtime | x86 | 12.0.21005 | +| Microsoft Visual C++ 2019 Additional Runtime | x64 | 14.27.29016 | +| Microsoft Visual C++ 2019 Debug Runtime | x64 | 14.27.29016 | +| Microsoft Visual C++ 2019 Minimum Runtime | x64 | 14.27.29016 | +| Microsoft Visual C++ 2019 Additional Runtime | x86 | 14.27.29016 | +| Microsoft Visual C++ 2019 Debug Runtime | x86 | 14.27.29016 | +| Microsoft Visual C++ 2019 Minimum Runtime | x86 | 14.27.29016 | + ### .NET Core SDK `Location C:\Program Files\dotnet\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.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.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.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 3.1.100 3.1.101 3.1.102 3.1.103 3.1.104 3.1.105 3.1.106 3.1.200 3.1.201 3.1.202 3.1.300 3.1.301 3.1.302 +- 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 ### .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.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 `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 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 +- 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 `Location: C:\Program Files\dotnet\shared\Microsoft.NETCore.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 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 +- 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 `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.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 ### .NET Framework `Type: Developer Pack` @@ -462,7 +490,7 @@ All other versions are saved but not installed. | ------------------ | ------------------ | | DockerMsftProvider | 1.0.0.8 | | MarkdownPS | 1.9 | -| Pester | 3.4.0
5.0.2 | +| Pester | 3.4.0
5.0.3 | | PowerShellGet | 1.0.0.1
2.2.4.1 | | PSWindowsUpdate | 2.2.0.2 | | SqlServer | 21.1.18226 | @@ -487,8 +515,8 @@ All other versions are saved but not installed. | android-26 | Android SDK Platform 26, Revision 2 | | android-27 | Android SDK Platform 27, Revision 3 | | android-28 | Android SDK Platform 28, rev 6, Revision 6 | -| android-29 | Android SDK Platform 29, Revision 4 | -| android-30 | Android SDK Platform 30, Revision 2 | +| android-29 | Android SDK Platform 29, Revision 5 | +| android-30 | Android SDK Platform 30, Revision 3 | ### Android SDK Build-Tools `Location C:\Program Files (x86)\Android\android-sdk\build-tools` @@ -526,6 +554,8 @@ All other versions are saved but not installed. | build-tools-29.0.2 | Android SDK Build-Tools, Revision 29.0.2 | | build-tools-29.0.3 | Android SDK Build-Tools, Revision 29.0.3 | | build-tools-30.0.0 | Android SDK Build-Tools, Revision 30.0.0 | +| build-tools-30.0.1 | Android SDK Build-Tools, Revision 30.0.1 | +| build-tools-30.0.2 | Android SDK Build-Tools, Revision 30.0.2 | ### Android Extra Packages | Package Name | Version | diff --git a/images/win/scripts/Installers/Configure-DynamicPort.ps1 b/images/win/scripts/Installers/Configure-DynamicPort.ps1 new file mode 100644 index 00000000..88e8ae20 --- /dev/null +++ b/images/win/scripts/Installers/Configure-DynamicPort.ps1 @@ -0,0 +1,14 @@ +# https://support.microsoft.com/en-us/help/929851/the-default-dynamic-port-range-for-tcp-ip-has-changed-in-windows-vista +# The new default start port is 49152, and the new default end port is 65535. +# Default port configuration was changed during image generation by Visual Studio Enterprise Installer to: +# Protocol tcp Dynamic Port Range +# --------------------------------- +# Start Port : 1024 +# Number of Ports : 64511 +Write-Host "Set the dynamic port range to start at port 49152 and to end at the 65536 (16384 ports)" +$null = netsh int ipv4 set dynamicport tcp start=49152 num=16384 +$null = netsh int ipv4 set dynamicport udp start=49152 num=16384 +$null = netsh int ipv6 set dynamicport tcp start=49152 num=16384 +$null = netsh int ipv6 set dynamicport udp start=49152 num=16384 + +Invoke-PesterTests -TestFile "WindowsFeatures" -TestName "DynamicPorts" \ No newline at end of file diff --git a/images/win/scripts/Installers/Initialize-VM.ps1 b/images/win/scripts/Installers/Initialize-VM.ps1 index 550eb8a3..bd4619ca 100644 --- a/images/win/scripts/Installers/Initialize-VM.ps1 +++ b/images/win/scripts/Installers/Initialize-VM.ps1 @@ -119,6 +119,11 @@ if (Test-IsWin16) { Choco-Install -PackageName vcredist140 } +if (Test-IsWin19) { + # Install vcredist2010 + Choco-Install -PackageName vcredist2010 +} + # Expand disk size of OS drive New-Item -Path d:\ -Name cmds.txt -ItemType File -Force Add-Content -Path d:\cmds.txt "SELECT VOLUME=C`r`nEXTEND" diff --git a/images/win/scripts/Installers/Install-DACFx.ps1 b/images/win/scripts/Installers/Install-DACFx.ps1 index 92db0e4e..fb50af0d 100644 --- a/images/win/scripts/Installers/Install-DACFx.ps1 +++ b/images/win/scripts/Installers/Install-DACFx.ps1 @@ -6,7 +6,7 @@ Import-Module -Name ImageHelpers -Force $InstallerName = "DacFramework.msi" -$InstallerUrl = "https://go.microsoft.com/fwlink/?linkid=2128142" +$InstallerUrl = "https://go.microsoft.com/fwlink/?linkid=2134206" Install-Binary -Url $InstallerUrl -Name $InstallerName diff --git a/images/win/scripts/Installers/Install-DotnetSDK.ps1 b/images/win/scripts/Installers/Install-DotnetSDK.ps1 index 5b3cec5b..7b91c7ac 100644 --- a/images/win/scripts/Installers/Install-DotnetSDK.ps1 +++ b/images/win/scripts/Installers/Install-DotnetSDK.ps1 @@ -62,7 +62,7 @@ function InstallAllValidSdks() # Consider all channels except preview/eol channels. # Sort the channels in ascending order - $dotnetChannels = $dotnetChannels.'releases-index' | Where-Object { (!$_."support-phase".Equals('preview') -and !$_."support-phase".Equals('eol')) } | Sort-Object { [Version] $_."channel-version" } + $dotnetChannels = $dotnetChannels.'releases-index' | Where-Object { (!$_."support-phase".Equals('preview') -and !$_."support-phase".Equals('eol') -and !$_."support-phase".Equals('rc')) } | Sort-Object { [Version] $_."channel-version" } # Download installation script. $installationName = "dotnet-install.ps1" diff --git a/images/win/scripts/Installers/Install-GoogleCloudSDK.ps1 b/images/win/scripts/Installers/Install-GoogleCloudSDK.ps1 index 7123e3e4..03b9e8dd 100644 --- a/images/win/scripts/Installers/Install-GoogleCloudSDK.ps1 +++ b/images/win/scripts/Installers/Install-GoogleCloudSDK.ps1 @@ -8,4 +8,4 @@ $googleCloudSDKInstaller = "https://dl.google.com/dl/cloudsdk/channels/rapid/Goo $argumentList = @("/S", "/allusers", "/noreporting") Install-Binary -Url $googleCloudSDKInstaller -Name "GoogleCloudSDKInstaller.exe" -ArgumentList $argumentList -Invoke-PesterTests -TestFile "Tools" -TestName "GoogleCouldSDK" \ No newline at end of file +Invoke-PesterTests -TestFile "Tools" -TestName "GoogleCloudSDK" diff --git a/images/win/scripts/Installers/Install-JavaTools.ps1 b/images/win/scripts/Installers/Install-JavaTools.ps1 index 759d132f..04a56a91 100644 --- a/images/win/scripts/Installers/Install-JavaTools.ps1 +++ b/images/win/scripts/Installers/Install-JavaTools.ps1 @@ -119,7 +119,7 @@ setx M2_REPO $m2_repo /M setx MAVEN_OPTS $maven_opts /M # Download cobertura jars -$uri = 'https://ayera.dl.sourceforge.net/project/cobertura/cobertura/2.1.1/cobertura-2.1.1-bin.zip' +$uri = 'https://downloads.sourceforge.net/project/cobertura/cobertura/2.1.1/cobertura-2.1.1-bin.zip' $coberturaPath = "C:\cobertura-2.1.1" $archivePath = Start-DownloadWithRetry -Url $uri -Name "cobertura.zip" diff --git a/images/win/scripts/Installers/Install-MongoDB.ps1 b/images/win/scripts/Installers/Install-MongoDB.ps1 index df86927b..177300e9 100644 --- a/images/win/scripts/Installers/Install-MongoDB.ps1 +++ b/images/win/scripts/Installers/Install-MongoDB.ps1 @@ -3,7 +3,7 @@ ## Desc: Install MongoDB #################################################################################### -Choco-Install -PackageName mongodb -ArgumentList @("--version","4.2.8") +Choco-Install -PackageName mongodb $mongoPath = (Get-CimInstance Win32_Service -Filter "Name LIKE 'mongodb'").PathName $mongoBin = Split-Path -Path $mongoPath.split('"')[1] Add-MachinePathItem "$mongoBin" diff --git a/images/win/scripts/Installers/Install-NodeLts.ps1 b/images/win/scripts/Installers/Install-NodeLts.ps1 index 518d8f65..8dc4559e 100644 --- a/images/win/scripts/Installers/Install-NodeLts.ps1 +++ b/images/win/scripts/Installers/Install-NodeLts.ps1 @@ -17,11 +17,11 @@ Choco-Install -PackageName nodejs-lts -ArgumentList "--force" Add-MachinePathItem $PrefixPath $env:Path = Get-MachinePath -setx NPM_CONFIG_PREFIX $PrefixPath /M -$env:NPM_CONFIG_PREFIX = $PrefixPath +setx npm_config_prefix $PrefixPath /M +$env:npm_config_prefix = $PrefixPath -setx NPM_CONFIG_CACHE $CachePath /M -$env:NPM_CONFIG_CACHE = $CachePath +setx npm_config_cache $CachePath /M +$env:npm_config_cache = $CachePath npm config set registry http://registry.npmjs.org/ @@ -35,4 +35,4 @@ npm install -g lerna npm install -g node-sass npm install -g newman -Invoke-PesterTests -TestFile "Node" \ No newline at end of file +Invoke-PesterTests -TestFile "Node" diff --git a/images/win/scripts/Installers/Install-Pulumi.ps1 b/images/win/scripts/Installers/Install-Pulumi.ps1 new file mode 100644 index 00000000..5ba1851f --- /dev/null +++ b/images/win/scripts/Installers/Install-Pulumi.ps1 @@ -0,0 +1,8 @@ +################################################################################ +## File: Install-Pulumi.ps1 +## Desc: Install Pulumi +################################################################################ + +Choco-Install -PackageName pulumi + +Invoke-PesterTests -TestFile "Tools" -TestName "Pulumi" \ No newline at end of file diff --git a/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 b/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 index 2e69132e..eb8b35f0 100644 --- a/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 +++ b/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 @@ -94,6 +94,7 @@ $markdown += New-MDList -Style Unordered -Lines @( (Get-NewmanVersion), (Get-OpenSSLVersion), (Get-PackerVersion), + (Get-PulumiVersion), (Get-SQLPSVersion), (Get-SQLServerPSVersion), (Get-SVNVersion), @@ -173,6 +174,11 @@ $markdown += New-MDNewLine $markdown += ((Get-VisualStudioComponents) + (Get-VisualStudioExtensions)) | New-MDTable $markdown += New-MDNewLine +$markdown += New-MDHeader "Microsoft Visual C++:" -Level 4 +$markdown += New-MDNewLine +$markdown += Get-VisualCPPComponents | New-MDTable +$markdown += New-MDNewLine + $markdown += New-MDHeader ".NET Core SDK" -Level 3 $sdk = Get-DotnetSdks $markdown += "``Location $($sdk.Path)``" diff --git a/images/win/scripts/SoftwareReport/SoftwareReport.Tools.psm1 b/images/win/scripts/SoftwareReport/SoftwareReport.Tools.psm1 index fb1beddc..e7235408 100644 --- a/images/win/scripts/SoftwareReport/SoftwareReport.Tools.psm1 +++ b/images/win/scripts/SoftwareReport/SoftwareReport.Tools.psm1 @@ -107,6 +107,10 @@ function Get-PackerVersion { return "Packer $(packer --version)" } +function Get-PulumiVersion { + return "Pulumi $(pulumi version)" +} + function Get-SQLPSVersion { $module = Get-Module -Name SQLPS -ListAvailable $version = $module.Version @@ -222,5 +226,24 @@ function Get-NewmanVersion { } function Get-GHVersion { - return "GitHub CLI $(gh --version)" + ($(gh --version) | Select-String -Pattern "gh version") -match "gh version (?\d+\.\d+\.\d+)" | Out-Null + $ghVersion = $Matches.Version + return "GitHub CLI $ghVersion" +} + +function Get-VisualCPPComponents { + $vcpp = Get-CimInstance -ClassName Win32_Product -Filter "Name LIKE 'Microsoft Visual C++%'" + $vcpp | Sort-Object Name, Version | ForEach-Object { + $isMatch = $_.Name -match "^(?Microsoft Visual C\+\+ \d{4})\s+(?\w{3})\s+(?.+)\s+-" + if ($isMatch) { + $name = '{0} {1}' -f $matches["Name"], $matches["Ext"] + $arch = $matches["Arch"].ToLower() + $version = $_.Version + [PSCustomObject]@{ + Name = $name + Architecture = $arch + Version = $version + } + } + } } \ No newline at end of file diff --git a/images/win/scripts/Tests/Browsers.Tests.ps1 b/images/win/scripts/Tests/Browsers.Tests.ps1 index 7dbce458..b1b4a760 100644 --- a/images/win/scripts/Tests/Browsers.Tests.ps1 +++ b/images/win/scripts/Tests/Browsers.Tests.ps1 @@ -17,13 +17,14 @@ Describe "Chrome" { Context "Browser" { $chromeRegPath = "HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe" + $chromePath = (Get-ItemProperty $chromeRegPath).'(default)' It "Chrome '' registry path exists" -TestCases @{chromeRegPath = $chromeRegPath} { $chromeRegPath | Should -Exist } - It "Chrome VersionInfo registry value exists" -TestCases @{chromeRegPath = $chromeRegPath} { - $versionInfo = (Get-Item (Get-ItemProperty $chromeRegPath).'(Default)').VersionInfo + It "Chrome VersionInfo registry value exists" -TestCases @{chromePath = $chromePath} { + $versionInfo = (Get-Item $chromePath).VersionInfo $versionInfo | Should -Not -BeNullOrEmpty } @@ -41,8 +42,10 @@ Describe "Chrome" { Get-NetFirewallRule -DisplayName BlockGoogleUpdate | Should -Not -BeNullOrEmpty } - It "chrome.exe is installed" { - "${env:ProgramFiles(x86)}\Google\Chrome\Application\chrome.exe" | Should -Exist + It " is installed" -TestCases @{chromePath = $chromePath} { + $chromeName = (Get-Item $chromePath).Name + $chromePath | Should -Exist + $chromeName | Should -BeExactly "chrome.exe" } } } diff --git a/images/win/scripts/Tests/DotnetSDK.Tests.ps1 b/images/win/scripts/Tests/DotnetSDK.Tests.ps1 index 1598b337..373e1d47 100644 --- a/images/win/scripts/Tests/DotnetSDK.Tests.ps1 +++ b/images/win/scripts/Tests/DotnetSDK.Tests.ps1 @@ -1,6 +1,6 @@ $releaseIndexUrl = "https://raw.githubusercontent.com/dotnet/core/master/release-notes/releases-index.json" $dotnetChannels = (New-Object system.net.webclient).DownloadString($releaseIndexUrl) | ConvertFrom-Json -$dotnetVersions = $dotnetChannels.'releases-index' | Where-Object { (!$_."support-phase".Equals('preview') -and !$_."support-phase".Equals('eol')) } | Select-Object -ExpandProperty "channel-version" +$dotnetVersions = $dotnetChannels.'releases-index' | Where-Object { (!$_."support-phase".Equals('preview') -and !$_."support-phase".Equals('eol') -and !$_."support-phase".Equals('rc')) } | Select-Object -ExpandProperty "channel-version" Describe "Dotnet SDK" { diff --git a/images/win/scripts/Tests/Tools.Tests.ps1 b/images/win/scripts/Tests/Tools.Tests.ps1 index 4470dda0..242ae296 100644 --- a/images/win/scripts/Tests/Tools.Tests.ps1 +++ b/images/win/scripts/Tests/Tools.Tests.ps1 @@ -139,7 +139,7 @@ Describe "InnoSetup" { } } -Describe "GoogleCouldSDK" { +Describe "GoogleCloudSDK" { It "" -TestCases @( @{ ToolName = "bq" } @{ ToolName = "gcloud" } @@ -196,6 +196,12 @@ Describe "PowerShell Core" { } } +Describe "Pulumi" { + It "pulumi" { + "pulumi version" | Should -ReturnZeroExitCode + } +} + Describe "Sbt" { It "sbt" { "sbt --version" | Should -ReturnZeroExitCode diff --git a/images/win/scripts/Tests/WindowsFeatures.Tests.ps1 b/images/win/scripts/Tests/WindowsFeatures.Tests.ps1 index 7e5ec0a1..f4c955e3 100644 --- a/images/win/scripts/Tests/WindowsFeatures.Tests.ps1 +++ b/images/win/scripts/Tests/WindowsFeatures.Tests.ps1 @@ -32,10 +32,28 @@ Describe "ContainersFeature" { } Describe "DiskSpace" { - it "The image has enough disk space"{ + It "The image has enough disk space"{ $availableSpaceMB = [math]::Round((Get-PSDrive -Name C).Free / 1MB) $minimumFreeSpaceMB = 18 * 1024 $availableSpaceMB | Should -BeGreaterThan $minimumFreeSpaceMB } +} + +Describe "DynamicPorts" { + It "Test TCP dynamicport start=49152 num=16384" { + $tcpPorts = Get-NetTCPSetting | Where-Object {$_.SettingName -ne "Automatic"} | Where-Object { + $_.DynamicPortRangeStartPort -ne 49152 -or $_.DynamicPortRangeNumberOfPorts -ne 16384 + } + + $tcpPorts | Should -BeNullOrEmpty + } + + It "Test UDP dynamicport start=49152 num=16384" { + $udpPorts = Get-NetUDPSetting | Where-Object { + $_.DynamicPortRangeStartPort -ne 49152 -or $_.DynamicPortRangeNumberOfPorts -ne 16384 + } + + $udpPorts | Should -BeNullOrEmpty + } } \ No newline at end of file diff --git a/images/win/toolsets/toolset-2016.json b/images/win/toolsets/toolset-2016.json index c72289f5..a76246e6 100644 --- a/images/win/toolsets/toolset-2016.json +++ b/images/win/toolsets/toolset-2016.json @@ -120,7 +120,8 @@ "3.5.0", "3.8.0", "4.3.0", - "4.4.0" + "4.4.0", + "4.6.0" ] } ], @@ -129,7 +130,7 @@ "android-30", "android-29", "android-28", "android-27", "android-26", "android-25", "android-24", "android-23", "android-22", "android-21", "android-19" ], "build_tools": [ - "30.0.0", "29.0.3", "29.0.2", "29.0.1", "29.0.0", "28.0.3", "28.0.2", "28.0.1", "28.0.0", "27.0.3", "27.0.2", "27.0.1", "27.0.0", "26.0.3", "26.0.2", "26.0.1", "26.0.0", "25.0.3", "25.0.2", "25.0.1", "25.0.0", "24.0.3", "24.0.2", "24.0.1", "24.0.0", "23.0.3", "23.0.2", "23.0.1", "22.0.1", "21.1.2", "20.0.0", "19.1.0" + "30.0.2", "30.0.1", "30.0.0", "29.0.3", "29.0.2", "29.0.1", "29.0.0", "28.0.3", "28.0.2", "28.0.1", "28.0.0", "27.0.3", "27.0.2", "27.0.1", "27.0.0", "26.0.3", "26.0.2", "26.0.1", "26.0.0", "25.0.3", "25.0.2", "25.0.1", "25.0.0", "24.0.3", "24.0.2", "24.0.1", "24.0.0", "23.0.3", "23.0.2", "23.0.1", "22.0.1", "21.1.2", "20.0.0", "19.1.0" ], "extra_list": [ "android;m2repository", diff --git a/images/win/toolsets/toolset-2019.json b/images/win/toolsets/toolset-2019.json index 51b5b65f..a2a7ec4a 100644 --- a/images/win/toolsets/toolset-2019.json +++ b/images/win/toolsets/toolset-2019.json @@ -129,7 +129,8 @@ "3.5.0", "3.8.0", "4.3.0", - "4.4.0" + "4.4.0", + "4.6.0" ] } ], @@ -138,7 +139,7 @@ "android-30", "android-29", "android-28", "android-27", "android-26", "android-25", "android-24", "android-23", "android-22", "android-21", "android-19" ], "build_tools": [ - "30.0.0", "29.0.3", "29.0.2", "29.0.1", "29.0.0", "28.0.3", "28.0.2", "28.0.1", "28.0.0", "27.0.3", "27.0.2", "27.0.1", "27.0.0", "26.0.3", "26.0.2", "26.0.1", "26.0.0", "25.0.3", "25.0.2", "25.0.1", "25.0.0", "24.0.3", "24.0.2", "24.0.1", "24.0.0", "23.0.3", "23.0.2", "23.0.1", "22.0.1", "21.1.2", "20.0.0", "19.1.0" + "30.0.2", "30.0.1", "30.0.0", "29.0.3", "29.0.2", "29.0.1", "29.0.0", "28.0.3", "28.0.2", "28.0.1", "28.0.0", "27.0.3", "27.0.2", "27.0.1", "27.0.0", "26.0.3", "26.0.2", "26.0.1", "26.0.0", "25.0.3", "25.0.2", "25.0.1", "25.0.0", "24.0.3", "24.0.2", "24.0.1", "24.0.0", "23.0.3", "23.0.2", "23.0.1", "22.0.1", "21.1.2", "20.0.0", "19.1.0" ], "extra_list": [ "android;m2repository", @@ -238,6 +239,7 @@ "Microsoft.VisualStudio.ComponentGroup.Azure.ResourceManager.Tools", "Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang", "Microsoft.VisualStudio.ComponentGroup.Web.CloudTools", + "Microsoft.VisualStudio.ComponentGroup.UWP.VC", "Microsoft.VisualStudio.Workload.Azure", "Microsoft.VisualStudio.Workload.Data", "Microsoft.VisualStudio.Workload.DataScience",