mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-20 06:29:50 +00:00
[Windows] mysql: bump mysql version (#4059)
This commit is contained in:
committed by
GitHub
parent
1326521a2a
commit
5de032f30d
@@ -3,11 +3,6 @@
|
|||||||
## Desc: Install Mysql CLI
|
## Desc: Install Mysql CLI
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
## Downloading mysql jar
|
|
||||||
$MysqlVersionName = "mysql-5.7.21-winx64"
|
|
||||||
$MysqlVersionUrl = "https://dev.mysql.com/get/Downloads/MySQL-5.7/${MysqlVersionName}.zip"
|
|
||||||
$MysqlPath = "C:\$MysqlVersionName\bin"
|
|
||||||
|
|
||||||
# Installing visual c++ redistibutable package.
|
# Installing visual c++ redistibutable package.
|
||||||
$InstallerName = "vcredist_x64.exe"
|
$InstallerName = "vcredist_x64.exe"
|
||||||
$InstallerURI = "https://download.microsoft.com/download/0/5/6/056dcda9-d667-4e27-8001-8a0c6971d6b1/${InstallerName}"
|
$InstallerURI = "https://download.microsoft.com/download/0/5/6/056dcda9-d667-4e27-8001-8a0c6971d6b1/${InstallerName}"
|
||||||
@@ -15,16 +10,25 @@ $ArgumentList = ("/install", "/quiet", "/norestart")
|
|||||||
|
|
||||||
Install-Binary -Url $InstallerURI -Name $InstallerName -ArgumentList $ArgumentList
|
Install-Binary -Url $InstallerURI -Name $InstallerName -ArgumentList $ArgumentList
|
||||||
|
|
||||||
# MySQL disabled TLS 1.0 support on or about Jul-14-2018. Need to make sure TLS 1.2 is enabled.
|
## Downloading mysql
|
||||||
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor "Tls12"
|
if (Test-IsWin22) {
|
||||||
|
$MysqlVersionName = "mysql-8.0.26-winx64"
|
||||||
|
$MysqlVersionUrl = "https://dev.mysql.com/get/Downloads/MySQL-8/${MysqlVersionName}.zip"
|
||||||
|
} else {
|
||||||
|
$MysqlVersionName = "mysql-5.7.35-winx64"
|
||||||
|
$MysqlVersionUrl = "https://dev.mysql.com/get/Downloads/MySQL-5.7/${MysqlVersionName}.zip"
|
||||||
|
}
|
||||||
|
|
||||||
# Get the latest mysql command line tools .
|
$MysqlArchPath = Start-DownloadWithRetry -Url $MysqlVersionUrl -Name "mysql.zip"
|
||||||
$mysqlArchPath = Start-DownloadWithRetry -Url $MysqlVersionUrl -Name "mysql.zip"
|
|
||||||
|
|
||||||
# Expand the zip
|
# Expand the zip
|
||||||
Extract-7Zip -Path $mysqlArchPath -DestinationPath "C:\"
|
Extract-7Zip -Path $MysqlArchPath -DestinationPath "C:\"
|
||||||
|
|
||||||
|
# Rename mysql-version to mysql folder
|
||||||
|
$MysqlPath = "C:\mysql"
|
||||||
|
Rename-Item -Path "C:\${MysqlVersionName}" -NewName $MysqlPath
|
||||||
|
|
||||||
# Adding mysql in system environment path
|
# Adding mysql in system environment path
|
||||||
Add-MachinePathItem $mysqlPath
|
Add-MachinePathItem "${MysqlPath}\bin"
|
||||||
|
|
||||||
Invoke-PesterTests -TestFile "Databases" -TestName "MySQL"
|
Invoke-PesterTests -TestFile "Databases" -TestName "MySQL"
|
||||||
Reference in New Issue
Block a user