Merge branch 'master' of github.com:actions/virtual-environments into v-ivnosa/add-gcc-gfort-clang

This commit is contained in:
Ivan Nosar
2020-02-04 18:24:21 +03:00
21 changed files with 754 additions and 562 deletions

View File

@@ -25,6 +25,7 @@ apt-fast install -y --no-install-recommends \
locales \ locales \
netcat \ netcat \
openssh-client \ openssh-client \
parallel \
rsync \ rsync \
shellcheck \ shellcheck \
sudo \ sudo \
@@ -55,7 +56,7 @@ apt-fast install -y --no-install-recommends \
# Run tests to determine that the software installed as expected # Run tests to determine that the software installed as expected
echo "Testing to make sure that script performed as expected, and basic scenarios work" echo "Testing to make sure that script performed as expected, and basic scenarios work"
for cmd in curl file ftp jq netcat ssh rsync shellcheck sudo telnet time unzip upx wget zip; do for cmd in curl file ftp jq netcat ssh parallel rsync shellcheck sudo telnet time unzip upx wget zip; do
if ! command -v $cmd; then if ! command -v $cmd; then
echo "$cmd was not installed" echo "$cmd was not installed"
exit 1 exit 1
@@ -78,6 +79,7 @@ DocumentInstalledItemIndent "libunwind8"
DocumentInstalledItemIndent "locales" DocumentInstalledItemIndent "locales"
DocumentInstalledItemIndent "netcat" DocumentInstalledItemIndent "netcat"
DocumentInstalledItemIndent "openssh-client" DocumentInstalledItemIndent "openssh-client"
DocumentInstalledItemIndent "parallel"
DocumentInstalledItemIndent "rsync" DocumentInstalledItemIndent "rsync"
DocumentInstalledItemIndent "shellcheck" DocumentInstalledItemIndent "shellcheck"
DocumentInstalledItemIndent "sudo" DocumentInstalledItemIndent "sudo"

View File

@@ -7,7 +7,7 @@
source $HELPER_SCRIPTS/apt.sh source $HELPER_SCRIPTS/apt.sh
source $HELPER_SCRIPTS/document.sh source $HELPER_SCRIPTS/document.sh
LATEST_DOTNET_PACKAGE=dotnet-sdk-3.0 LATEST_DOTNET_PACKAGES=("dotnet-sdk-3.0" "dotnet-sdk-3.1")
LSB_RELEASE=$(lsb_release -rs) LSB_RELEASE=$(lsb_release -rs)
@@ -30,21 +30,23 @@ mksamples()
set -e set -e
echo "Determing if .NET Core ($LATEST_DOTNET_PACKAGE) is installed" for latest_package in ${LATEST_DOTNET_PACKAGES[@]}; do
if ! IsInstalled $LATEST_DOTNET_PACKAGE; then echo "Determing if .NET Core ($latest_package) is installed"
echo "Could not find .NET Core ($LATEST_DOTNET_PACKAGE), installing..." if ! IsInstalled $latest_package; then
wget -q https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb echo "Could not find .NET Core ($latest_package), installing..."
dpkg -i packages-microsoft-prod.deb curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
apt-get update mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
apt-get install apt-transport-https sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-bionic-prod bionic main" > /etc/apt/sources.list.d/dotnetdev.list'
apt-get update apt-get install apt-transport-https
apt-get install $LATEST_DOTNET_PACKAGE apt-get update
else apt-get install $latest_package -y
echo ".NET Core ($LATEST_DOTNET_PACKAGE) is already installed" else
fi echo ".NET Core ($latest_package) is already installed"
fi
done
# Get list of all released SDKs from channels which are not end-of-life or preview # Get list of all released SDKs from channels which are not end-of-life or preview
release_urls=("https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.1/releases.json" "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json" "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.1/releases.json") release_urls=("https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.1/releases.json" "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json" "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/3.0/releases.json" "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/3.1/releases.json")
sdks=() sdks=()
for release_url in ${release_urls[@]}; do for release_url in ${release_urls[@]}; do
echo "${release_url}" echo "${release_url}"

View File

@@ -118,9 +118,12 @@ apt-get install -y --no-install-recommends zsync
echo "Install curl" echo "Install curl"
apt-get install -y --no-install-recommends curl apt-get install -y --no-install-recommends curl
echo "Install parallel"
apt-get install -y --no-install-recommends parallel
# Run tests to determine that the software installed as expected # Run tests to determine that the software installed as expected
echo "Testing to make sure that script performed as expected, and basic scenarios work" echo "Testing to make sure that script performed as expected, and basic scenarios work"
for cmd in curl file ftp jq netcat ssh rsync shellcheck sudo telnet time unzip wget zip; do for cmd in curl file ftp jq netcat ssh parallel rsync shellcheck sudo telnet time unzip wget zip; do
if ! command -v $cmd; then if ! command -v $cmd; then
echo "$cmd was not installed" echo "$cmd was not installed"
exit 1 exit 1
@@ -143,6 +146,7 @@ DocumentInstalledItemIndent "libunwind8"
DocumentInstalledItemIndent "locales" DocumentInstalledItemIndent "locales"
DocumentInstalledItemIndent "netcat" DocumentInstalledItemIndent "netcat"
DocumentInstalledItemIndent "openssh-client" DocumentInstalledItemIndent "openssh-client"
DocumentInstalledItemIndent "parallel"
DocumentInstalledItemIndent "rsync" DocumentInstalledItemIndent "rsync"
DocumentInstalledItemIndent "shellcheck" DocumentInstalledItemIndent "shellcheck"
DocumentInstalledItemIndent "sudo" DocumentInstalledItemIndent "sudo"

View File

@@ -7,7 +7,7 @@
source $HELPER_SCRIPTS/apt.sh source $HELPER_SCRIPTS/apt.sh
source $HELPER_SCRIPTS/document.sh source $HELPER_SCRIPTS/document.sh
LATEST_DOTNET_PACKAGE=dotnet-sdk-3.0 LATEST_DOTNET_PACKAGES=("dotnet-sdk-3.0" "dotnet-sdk-3.1")
LSB_RELEASE=$(lsb_release -rs) LSB_RELEASE=$(lsb_release -rs)
@@ -30,21 +30,23 @@ mksamples()
set -e set -e
echo "Determing if .NET Core ($LATEST_DOTNET_PACKAGE) is installed" for latest_package in ${LATEST_DOTNET_PACKAGES[@]}; do
if ! IsInstalled $LATEST_DOTNET_PACKAGE; then echo "Determing if .NET Core ($latest_package) is installed"
echo "Could not find .NET Core ($LATEST_DOTNET_PACKAGE), installing..." if ! IsInstalled $latest_package; then
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg echo "Could not find .NET Core ($latest_package), installing..."
mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-bionic-prod bionic main" > /etc/apt/sources.list.d/dotnetdev.list' mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
apt-get install apt-transport-https sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-bionic-prod bionic main" > /etc/apt/sources.list.d/dotnetdev.list'
apt-get update apt-get install apt-transport-https
apt-get install $LATEST_DOTNET_PACKAGE -y apt-get update
else apt-get install $latest_package -y
echo ".NET Core ($LATEST_DOTNET_PACKAGE) is already installed" else
fi echo ".NET Core ($latest_package) is already installed"
fi
done
# Get list of all released SDKs from channels which are not end-of-life or preview # Get list of all released SDKs from channels which are not end-of-life or preview
release_urls=("https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.1/releases.json" "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json" "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/3.0/releases.json") release_urls=("https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.1/releases.json" "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json" "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/3.0/releases.json" "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/3.1/releases.json")
sdks=() sdks=()
for release_url in ${release_urls[@]}; do for release_url in ${release_urls[@]}; do
echo "${release_url}" echo "${release_url}"

View File

@@ -24,6 +24,7 @@ apt-get install -y \
ghc-8.6.4 \ ghc-8.6.4 \
ghc-8.6.5 \ ghc-8.6.5 \
ghc-8.8.1 \ ghc-8.8.1 \
ghc-8.8.2 \
cabal-install-2.0 \ cabal-install-2.0 \
cabal-install-2.2 \ cabal-install-2.2 \
cabal-install-2.4 \ cabal-install-2.4 \
@@ -35,7 +36,7 @@ curl -sSL https://raw.githubusercontent.com/commercialhaskell/stack/v2.1.3/etc/s
# Run tests to determine that the software installed as expected # Run tests to determine that the software installed as expected
echo "Testing to make sure that script performed as expected, and basic scenarios work" echo "Testing to make sure that script performed as expected, and basic scenarios work"
# Check all ghc versions # Check all ghc versions
for version in 8.0.2 8.2.2 8.4.4 8.6.2 8.6.3 8.6.4 8.6.5 8.8.1; do for version in 8.0.2 8.2.2 8.4.4 8.6.2 8.6.3 8.6.4 8.6.5 8.8.1 8.8.2; do
if ! command -v /opt/ghc/$version/bin/ghc; then if ! command -v /opt/ghc/$version/bin/ghc; then
echo "ghc $version was not installed" echo "ghc $version was not installed"
exit 1 exit 1
@@ -58,7 +59,7 @@ echo "Lastly, documenting what we added to the metadata file"
for version in 2.0 2.2 2.4 3.0; do for version in 2.0 2.2 2.4 3.0; do
DocumentInstalledItem "Haskell Cabal ($(/opt/cabal/$version/bin/cabal --version))" DocumentInstalledItem "Haskell Cabal ($(/opt/cabal/$version/bin/cabal --version))"
done done
for version in 8.0.2 8.2.2 8.4.4 8.6.2 8.6.3 8.6.4 8.6.5 8.8.1; do for version in 8.0.2 8.2.2 8.4.4 8.6.2 8.6.3 8.6.4 8.6.5 8.8.1 8.8.2; do
DocumentInstalledItem "GHC ($(/opt/ghc/$version/bin/ghc --version))" DocumentInstalledItem "GHC ($(/opt/ghc/$version/bin/ghc --version))"
done done
DocumentInstalledItem "Haskell Stack ($(stack --version))" DocumentInstalledItem "Haskell Stack ($(stack --version))"

View File

@@ -12,6 +12,9 @@ export ACCEPT_EULA=Y
# Install MySQL Client # Install MySQL Client
apt-get install mysql-client -y apt-get install mysql-client -y
# InstallMySQL database development files
apt-get install libmysqlclient-dev -y
# Install MySQL Server # Install MySQL Server
MYSQL_ROOT_PASSWORD=root MYSQL_ROOT_PASSWORD=root
echo "mysql-server mysql-server/root_password password $MYSQL_ROOT_PASSWORD" | debconf-set-selections echo "mysql-server mysql-server/root_password password $MYSQL_ROOT_PASSWORD" | debconf-set-selections

View File

@@ -0,0 +1,16 @@
#!/bin/bash
################################################################################
## File: postgresql.sh
## Desc: Installs Postgresql
################################################################################
# Source the helpers for use with the script
source $HELPER_SCRIPTS/document.sh
echo "Install libpq-dev"
apt-get install libpq-dev
echo "Install Postgresql Client"
apt-get install postgresql-client
DocumentInstalledItem "$(psql -V 2>&1 | cut -d ' ' -f 1,2,3)"

View File

@@ -77,9 +77,10 @@
"systemctl disable apt-daily.timer", "systemctl disable apt-daily.timer",
"systemctl disable apt-daily-upgrade.timer", "systemctl disable apt-daily-upgrade.timer",
"systemctl disable apt-daily-upgrade.service", "systemctl disable apt-daily-upgrade.service",
"echo '* soft nofile 50000 \n* hard nofile 50000' >> /etc/security/limits.conf", "echo '* soft nofile 65536 \n* hard nofile 65536' >> /etc/security/limits.conf",
"echo 'session required pam_limits.so' >> /etc/pam.d/common-session", "echo 'session required pam_limits.so' >> /etc/pam.d/common-session",
"echo 'session required pam_limits.so' >> /etc/pam.d/common-session-noninteractive" "echo 'session required pam_limits.so' >> /etc/pam.d/common-session-noninteractive",
"echo 'DefaultLimitNOFILE=65536' >> /etc/systemd/system.conf"
], ],
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
}, },
@@ -153,6 +154,7 @@
"{{template_dir}}/scripts/installers/phantomjs.sh", "{{template_dir}}/scripts/installers/phantomjs.sh",
"{{template_dir}}/scripts/installers/1604/php.sh", "{{template_dir}}/scripts/installers/1604/php.sh",
"{{template_dir}}/scripts/installers/pollinate.sh", "{{template_dir}}/scripts/installers/pollinate.sh",
"{{template_dir}}/scripts/installers/postgresql.sh",
"{{template_dir}}/scripts/installers/1604/powershellcore.sh", "{{template_dir}}/scripts/installers/1604/powershellcore.sh",
"{{template_dir}}/scripts/installers/ruby.sh", "{{template_dir}}/scripts/installers/ruby.sh",
"{{template_dir}}/scripts/installers/rust.sh", "{{template_dir}}/scripts/installers/rust.sh",

View File

@@ -80,9 +80,10 @@
"systemctl disable apt-daily.timer", "systemctl disable apt-daily.timer",
"systemctl disable apt-daily-upgrade.timer", "systemctl disable apt-daily-upgrade.timer",
"systemctl disable apt-daily-upgrade.service", "systemctl disable apt-daily-upgrade.service",
"echo '* soft nofile 50000 \n* hard nofile 50000' >> /etc/security/limits.conf", "echo '* soft nofile 65536 \n* hard nofile 65536' >> /etc/security/limits.conf",
"echo 'session required pam_limits.so' >> /etc/pam.d/common-session", "echo 'session required pam_limits.so' >> /etc/pam.d/common-session",
"echo 'session required pam_limits.so' >> /etc/pam.d/common-session-noninteractive" "echo 'session required pam_limits.so' >> /etc/pam.d/common-session-noninteractive",
"echo 'DefaultLimitNOFILE=65536' >> /etc/systemd/system.conf"
], ],
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
}, },
@@ -156,6 +157,7 @@
"{{template_dir}}/scripts/installers/phantomjs.sh", "{{template_dir}}/scripts/installers/phantomjs.sh",
"{{template_dir}}/scripts/installers/1804/php.sh", "{{template_dir}}/scripts/installers/1804/php.sh",
"{{template_dir}}/scripts/installers/pollinate.sh", "{{template_dir}}/scripts/installers/pollinate.sh",
"{{template_dir}}/scripts/installers/postgresql.sh",
"{{template_dir}}/scripts/installers/1804/powershellcore.sh", "{{template_dir}}/scripts/installers/1804/powershellcore.sh",
"{{template_dir}}/scripts/installers/ruby.sh", "{{template_dir}}/scripts/installers/ruby.sh",
"{{template_dir}}/scripts/installers/rust.sh", "{{template_dir}}/scripts/installers/rust.sh",

View File

@@ -354,6 +354,12 @@
"{{ template_dir }}/scripts/Installers/Install-Chrome.ps1" "{{ template_dir }}/scripts/Installers/Install-Chrome.ps1"
] ]
}, },
{
"type": "powershell",
"scripts":[
"{{ template_dir }}/scripts/Installers/Install-Edge.ps1"
]
},
{ {
"type": "powershell", "type": "powershell",
"scripts":[ "scripts":[
@@ -661,6 +667,12 @@
"{{ template_dir }}/scripts/Installers/Validate-Chrome.ps1" "{{ template_dir }}/scripts/Installers/Validate-Chrome.ps1"
] ]
}, },
{
"type": "powershell",
"scripts":[
"{{ template_dir }}/scripts/Installers/Validate-Edge.ps1"
]
},
{ {
"type": "powershell", "type": "powershell",
"scripts":[ "scripts":[

File diff suppressed because it is too large Load Diff

View File

@@ -323,6 +323,12 @@
"{{ template_dir }}/scripts/Installers/Install-Chrome.ps1" "{{ template_dir }}/scripts/Installers/Install-Chrome.ps1"
] ]
}, },
{
"type": "powershell",
"scripts":[
"{{ template_dir }}/scripts/Installers/Install-Edge.ps1"
]
},
{ {
"type": "powershell", "type": "powershell",
"scripts":[ "scripts":[
@@ -349,6 +355,12 @@
"elevated_user": "{{user `install_user`}}", "elevated_user": "{{user `install_user`}}",
"elevated_password": "{{user `install_password`}}" "elevated_password": "{{user `install_password`}}"
}, },
{
"type": "powershell",
"scripts":[
"{{ template_dir }}/scripts/Installers/Install-VSWhere.ps1"
]
},
{ {
"type": "powershell", "type": "powershell",
"scripts":[ "scripts":[
@@ -630,6 +642,12 @@
"{{ template_dir }}/scripts/Installers/Validate-Chrome.ps1" "{{ template_dir }}/scripts/Installers/Validate-Chrome.ps1"
] ]
}, },
{
"type": "powershell",
"scripts":[
"{{ template_dir }}/scripts/Installers/Validate-Edge.ps1"
]
},
{ {
"type": "powershell", "type": "powershell",
"scripts":[ "scripts":[
@@ -774,6 +792,12 @@
"{{ template_dir }}/scripts/Installers/Validate-Vcpkg.ps1" "{{ template_dir }}/scripts/Installers/Validate-Vcpkg.ps1"
] ]
}, },
{
"type": "powershell",
"scripts":[
"{{ template_dir }}/scripts/Installers/Validate-VSWhere.ps1"
]
},
{ {
"type": "powershell", "type": "powershell",
"scripts":[ "scripts":[

View File

@@ -0,0 +1,6 @@
################################################################################
## File: Install-Edge.ps1
## Desc: Install latest stable version of Microsoft Edge browser
################################################################################
choco install microsoft-edge -y

View File

@@ -17,11 +17,13 @@ catch {
Expand-Archive -Path $DriversZipFile -DestinationPath $DestinationPath -Force; Expand-Archive -Path $DriversZipFile -DestinationPath $DestinationPath -Force;
Remove-Item $DriversZipFile; Remove-Item $DriversZipFile;
$ChromeDriverPath = "$DestinationPath\SeleniumWebDrivers\ChromeDriver"; $ChromeDriverPath = "${DestinationPath}SeleniumWebDrivers\ChromeDriver";
Write-Host "Chrome driver path: [$ChromeDriverPath]"; Write-Host "Chrome driver path: [$ChromeDriverPath]";
Remove-Item -Path "$ChromeDriverPath\*" -Force; Remove-Item -Path "$ChromeDriverPath\*" -Force;
$ChromePath = (Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe').'(default)'; # Reinstall Chrome Web Driver
$RegistryPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths"
$ChromePath = (Get-ItemProperty "$RegistryPath\chrome.exe").'(default)';
[version]$ChromeVersion = [System.Diagnostics.FileVersionInfo]::GetVersionInfo($ChromePath).ProductVersion; [version]$ChromeVersion = [System.Diagnostics.FileVersionInfo]::GetVersionInfo($ChromePath).ProductVersion;
Write-Host "Chrome version: [$ChromeVersion]"; Write-Host "Chrome version: [$ChromeVersion]";
@@ -44,16 +46,39 @@ Write-Host "Chrome driver install....";
Expand-Archive -Path "$ChromeDriverPath\chromedriver_win32.zip" -DestinationPath $ChromeDriverPath -Force; Expand-Archive -Path "$ChromeDriverPath\chromedriver_win32.zip" -DestinationPath $ChromeDriverPath -Force;
Remove-Item -Path "$ChromeDriverPath\chromedriver_win32.zip" -Force; Remove-Item -Path "$ChromeDriverPath\chromedriver_win32.zip" -Force;
Write-Host "Setting the environment variables"; # Install Microsoft Edge Web Driver
Write-Host "Microsoft Edge driver download...."
$EdgeDriverPath = "${DestinationPath}SeleniumWebDrivers\EdgeDriver"
if (-not (Test-Path -Path $EdgeDriverPath)) {
New-Item -Path $EdgeDriverPath -ItemType "directory"
}
$EdgePath = (Get-ItemProperty "$RegistryPath\msedge.exe").'(default)'
[version]$EdgeVersion = [System.Diagnostics.FileVersionInfo]::GetVersionInfo($EdgePath).ProductVersion
$EdgeDriverVersionUrl = "https://msedgedriver.azureedge.net/LATEST_RELEASE_$($EdgeVersion.Major)"
$EdgeDriverVersionFile = "$EdgeDriverPath\versioninfo.txt"
Invoke-WebRequest -Uri $EdgeDriverVersionUrl -OutFile $EdgeDriverVersionFile
$EdgeDriverLatestVersion = Get-Content -Path $EdgeDriverVersionFile
$EdgeDriverDownloadUrl="https://msedgedriver.azureedge.net/${EdgeDriverLatestVersion}/edgedriver_win64.zip"
$DestFile = "$EdgeDriverPath\edgedriver_win64.zip"
Invoke-WebRequest -Uri $EdgeDriverDownloadUrl -OutFile $DestFile
Write-Host "Microsoft Edge driver install...."
Expand-Archive -Path $DestFile -DestinationPath $EdgeDriverPath -Force
Remove-Item -Path $DestFile -Force
Write-Host "Setting the environment variables"
setx IEWebDriver "C:\SeleniumWebDrivers\IEDriver" /M; setx IEWebDriver "C:\SeleniumWebDrivers\IEDriver" /M;
setx GeckoWebDriver "C:\SeleniumWebDrivers\GeckoDriver" /M; setx GeckoWebDriver "C:\SeleniumWebDrivers\GeckoDriver" /M;
setx ChromeWebDriver "C:\SeleniumWebDrivers\ChromeDriver" /M; setx ChromeWebDriver "$ChromeDriverPath" /M;
setx EdgeWebDriver "$EdgeDriverPath" /M;
$regEnvKey = 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\'; $regEnvKey = 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\';
$PathValue = Get-ItemPropertyValue -Path $regEnvKey -Name 'Path'; $PathValue = Get-ItemPropertyValue -Path $regEnvKey -Name 'Path';
$PathValue += ";C:\SeleniumWebDrivers\ChromeDriver\"; $PathValue += ";$ChromeDriverPath\";
$PathValue += ";$EdgeDriverPath\";
Set-ItemProperty -Path $regEnvKey -Name 'Path' -Value $PathValue; Set-ItemProperty -Path $regEnvKey -Name 'Path' -Value $PathValue;
exit 0; exit 0;

View File

@@ -0,0 +1,6 @@
################################################################################
## File: Install-VSWhere.ps1
## Desc: Install latest stable version of VSWhere
################################################################################
choco install vswhere -y

View File

@@ -0,0 +1,25 @@
################################################################################
## File: Validate-Edge.ps1
## Desc: Validate Microsoft Edge installation.
################################################################################
$RegistryKey = "HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\msedge.exe"
if (Test-Path $RegistryKey)
{
$SoftwareName = "Microsoft Edge"
$VersionInfo = (Get-Item (Get-ItemProperty $RegistryKey).'(Default)').VersionInfo
$VersionInfo
$Description = @"
_version:_
$($VersionInfo.FileVersion)
"@
Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
exit 0
}
else
{
Write-Host "Microsoft Edge is not installed."
exit 1
}

View File

@@ -6,24 +6,36 @@
$IEDriverPath = $env:IEWebDriver $IEDriverPath = $env:IEWebDriver
$GeckoDriverPath = $env:GeckoWebDriver $GeckoDriverPath = $env:GeckoWebDriver
$ChromeDriverPath = $env:ChromeWebDriver $ChromeDriverPath = $env:ChromeWebDriver
$EdgeDriverPath = $env:EdgeWebDriver
if (
($IEDriverPath -like "C:\SeleniumWebDrivers\IEDriver") -and
($GeckoDriverPath -like "C:\SeleniumWebDrivers\GeckoDriver") -and
($ChromeDriverPath -like "C:\SeleniumWebDrivers\ChromeDriver") -and
($EdgeDriverPath -like "C:\SeleniumWebDrivers\EdgeDriver")
)
{
if(($IEDriverPath -like "C:\SeleniumWebDrivers\IEDriver") -and ($GeckoDriverPath -like "C:\SeleniumWebDrivers\GeckoDriver") -and ($ChromeDriverPath -like "C:\SeleniumWebDrivers\ChromeDriver"))
{
Write-Host "IEDriver installed at " Write-Host "IEDriver installed at "
(Get-Item "C:\SeleniumWebDrivers\IEDriver\IEDriverServer.exe").VersionInfo (Get-Item "$IEDriverPath\IEDriverServer.exe").VersionInfo
Write-Host "Gecko Driver installed at " Write-Host "Gecko Driver installed at "
(Get-Item "C:\SeleniumWebDrivers\GeckoDriver\geckodriver.exe").VersionInfo (Get-Item "$GeckoDriverPath\geckodriver.exe").VersionInfo
Write-Host "Chrome Driver installed at " Write-Host "Chrome Driver installed at "
(Get-Item "C:\SeleniumWebDrivers\ChromeDriver\chromedriver.exe").VersionInfo (Get-Item "$ChromeDriverPath\chromedriver.exe").VersionInfo
$chromedriverversion = Get-Content -Path "C:\SeleniumWebDrivers\ChromeDriver\versioninfo.txt"
$geckodriverversion = Get-Content -Path "C:\SeleniumWebDrivers\GeckoDriver\versioninfo.txt" Write-Host "Edge Driver installed at "
$iedriverversion = Get-Content -Path "C:\SeleniumWebDrivers\IEDriver\versioninfo.txt" (Get-Item "$EdgeDriverPath\msedgedriver.exe").VersionInfo
$versionFileName = "versioninfo.txt";
$chromedriverversion = Get-Content -Path "$IEDriverPath\$versionFileName"
$geckodriverversion = Get-Content -Path "$GeckoDriverPath\$versionFileName"
$iedriverversion = Get-Content -Path "$ChromeDriverPath\$versionFileName"
$edgedriverversion = Get-Content -Path "$EdgeDriverPath\$versionFileName"
# Adding description of the software to Markdown # Adding description of the software to Markdown
$SoftwareName = "Selenium Web Drivers" $SoftwareName = "Selenium Web Drivers"
@@ -54,10 +66,18 @@ $iedriverversion
_Environment:_ _Environment:_
* IEWebDriver: location of IEDriverServer.exe * IEWebDriver: location of IEDriverServer.exe
#### Microsoft Edge Driver
_version:_
$edgedriverversion
_Environment:_
* EdgeWebDriver: location of msedgedriver.exe
"@ "@
Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
exit 0 exit 0
} }
else else

View File

@@ -0,0 +1,25 @@
################################################################################
## File: Validate-VSWhere.ps1
## Desc: Validate vswhere
################################################################################
if(Get-Command -Name 'vswhere')
{
Write-Host "vswhere $(vswhere) on path"
}
else
{
Write-Host "vswhere is not on path"
exit 1
}
# Adding description of the software to Markdown
$SoftwareName = "VSWhere"
$VswhereVersion = $(vswhere)
$Description = @"
_Version_: $VswhereVersion<br/>
* PATH: contains location of vswhere.exe
"@
Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description

View File

@@ -92,6 +92,7 @@ else {
} }
# Run the installer # Run the installer
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor "Tls12"
Invoke-Expression ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')) Invoke-Expression ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
# Turn off confirmation # Turn off confirmation

View File

@@ -92,6 +92,7 @@ else {
} }
# Run the installer # Run the installer
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor "Tls12"
Invoke-Expression ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')) Invoke-Expression ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
# Turn off confirmation # Turn off confirmation

View File

@@ -113,6 +113,7 @@ $WorkLoads = '--allWorkloads --includeRecommended ' + `
'--add Microsoft.VisualStudio.Component.Windows10SDK.17134 ' + ` '--add Microsoft.VisualStudio.Component.Windows10SDK.17134 ' + `
'--add Microsoft.VisualStudio.Component.Windows10SDK.17763 ' + ` '--add Microsoft.VisualStudio.Component.Windows10SDK.17763 ' + `
'--add Microsoft.VisualStudio.Component.Windows10SDK.18362 ' + ` '--add Microsoft.VisualStudio.Component.Windows10SDK.18362 ' + `
'--add Microsoft.VisualStudio.Component.WinXP ' + `
'--add Microsoft.VisualStudio.ComponentGroup.Azure.CloudServices ' + ` '--add Microsoft.VisualStudio.ComponentGroup.Azure.CloudServices ' + `
'--add Microsoft.VisualStudio.ComponentGroup.Azure.ResourceManager.Tools ' + ` '--add Microsoft.VisualStudio.ComponentGroup.Azure.ResourceManager.Tools ' + `
'--add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang ' + ` '--add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang ' + `