From 8922c7b5bfab73d55acfba59c3291bec9a0b9804 Mon Sep 17 00:00:00 2001 From: Mikhail Koliada <88318005+mikhailkoliada@users.noreply.github.com> Date: Fri, 26 Nov 2021 11:52:02 +0300 Subject: [PATCH] [Windows] pin mysql release version in toolset (#4590) --- images/win/scripts/Installers/Install-MysqlCli.ps1 | 6 +++--- images/win/scripts/Tests/Databases.Tests.ps1 | 6 +++--- images/win/toolsets/toolset-2016.json | 5 +++-- images/win/toolsets/toolset-2019.json | 5 +++-- images/win/toolsets/toolset-2022.json | 5 +++-- 5 files changed, 15 insertions(+), 12 deletions(-) diff --git a/images/win/scripts/Installers/Install-MysqlCli.ps1 b/images/win/scripts/Installers/Install-MysqlCli.ps1 index f9c422e63..af07d5ad2 100644 --- a/images/win/scripts/Installers/Install-MysqlCli.ps1 +++ b/images/win/scripts/Installers/Install-MysqlCli.ps1 @@ -11,9 +11,9 @@ $ArgumentList = ("/install", "/quiet", "/norestart") Install-Binary -Url $InstallerURI -Name $InstallerName -ArgumentList $ArgumentList ## Downloading mysql -$MysqlMajorMinor = (Get-ToolsetContent).Mysql.version -$MysqlFullVersion = ((Invoke-WebRequest -Uri https://dev.mysql.com/downloads/mysql/${MysqlMajorMinor}.html).Content | Select-String -Pattern "${MysqlMajorMinor}\.\d+").Matches.Value -$MysqlVersionUrl = "https://dev.mysql.com/get/Downloads/MySQL-${MysqlMajorMinor}/mysql-${MysqlFullVersion}-winx64.zip" +$MysqlMajorVersion = (Get-ToolsetContent).mysql.major_version +$MysqlFullVersion = (Get-ToolsetContent).mysql.full_version +$MysqlVersionUrl = "https://dev.mysql.com/get/Downloads/MySQL-${MysqlMajorVersion}/mysql-${MysqlFullVersion}-winx64.zip" $MysqlArchPath = Start-DownloadWithRetry -Url $MysqlVersionUrl -Name "mysql.zip" diff --git a/images/win/scripts/Tests/Databases.Tests.ps1 b/images/win/scripts/Tests/Databases.Tests.ps1 index adf8c983c..ac6b3106f 100644 --- a/images/win/scripts/Tests/Databases.Tests.ps1 +++ b/images/win/scripts/Tests/Databases.Tests.ps1 @@ -65,7 +65,7 @@ Describe "PostgreSQL" { Describe "MySQL" { It "MySQL CLI" { - $MysqlMajorMinor = (Get-ToolsetContent).Mysql.version - mysql -V | Should -BeLike "*${MysqlMajorMinor}*" + $MysqlMajorVersion = (Get-ToolsetContent).mysql.major_version + mysql -V | Should -BeLike "*${MysqlMajorVersion}*" } -} \ No newline at end of file +} diff --git a/images/win/toolsets/toolset-2016.json b/images/win/toolsets/toolset-2016.json index 05943d9d4..3e21da8ca 100644 --- a/images/win/toolsets/toolset-2016.json +++ b/images/win/toolsets/toolset-2016.json @@ -421,8 +421,9 @@ "node": { "default": "16" }, - "Mysql": { - "version": "5.7" + "mysql": { + "major_version": "5.7", + "full_version": "5.7.35" }, "mongodb": { "version": "5.0" diff --git a/images/win/toolsets/toolset-2019.json b/images/win/toolsets/toolset-2019.json index 3334fc0c7..89b18bb3c 100644 --- a/images/win/toolsets/toolset-2019.json +++ b/images/win/toolsets/toolset-2019.json @@ -453,8 +453,9 @@ "node": { "default": "16" }, - "Mysql": { - "version": "5.7" + "mysql": { + "major_version": "5.7", + "full_version": "5.7.35" }, "mongodb": { "version": "5.0" diff --git a/images/win/toolsets/toolset-2022.json b/images/win/toolsets/toolset-2022.json index 18add708b..a99f6da5f 100644 --- a/images/win/toolsets/toolset-2022.json +++ b/images/win/toolsets/toolset-2022.json @@ -305,8 +305,9 @@ "node": { "default": "16" }, - "Mysql": { - "version": "8.0" + "mysql": { + "major_version": "8.0", + "full_version": "8.0.26" }, "mongodb": { "version": "5.0"