From 90f5a25c661f6652cc83df58e8adb9ff6875f6ab Mon Sep 17 00:00:00 2001 From: Konstantin Tokarev Date: Tue, 13 Sep 2016 19:30:02 +0300 Subject: [PATCH] Update Ruby on Win10 QtWebKit requires newer Ruby than version installed on Windows 10 builders. Task-number: QTQAINFRA-997 Change-Id: Id4f917a824daaab4aeb1445a3a16906663208b6d Reviewed-by: Simon Hausmann --- coin/provisioning/common/helpers.ps1 | 20 +++++++++++++++++++ coin/provisioning/common/ruby.ps1 | 7 +++++++ .../provisioning/qtci-windows-10-x86/ruby.ps1 | 1 + .../qtci-windows-10-x86_64/ruby.ps1 | 1 + 4 files changed, 29 insertions(+) create mode 100644 coin/provisioning/common/ruby.ps1 create mode 100644 coin/provisioning/qtci-windows-10-x86/ruby.ps1 create mode 100644 coin/provisioning/qtci-windows-10-x86_64/ruby.ps1 diff --git a/coin/provisioning/common/helpers.ps1 b/coin/provisioning/common/helpers.ps1 index d7b957f3..055ce0a7 100644 --- a/coin/provisioning/common/helpers.ps1 +++ b/coin/provisioning/common/helpers.ps1 @@ -29,3 +29,23 @@ function Extract-Zip $destinationFolder = $shell.Namespace($Destination) $destinationFolder.CopyHere($zipfile.Items(), 16) } + +function BadParam +{ + Param ([string]$Description) + throw("You must specify $Description") +} + +function Download +{ + Param ( + [string] $OfficialUrl = $(BadParam("the official download URL")), + [string] $CachedUrl = $(BadParam("the locally cached URL")), + [string] $Destination = $(BadParam("a download target location")) + ) + try { + Invoke-WebRequest -UseBasicParsing $CachedUrl -OutFile $Destination + } catch { + Invoke-WebRequest -UseBasicParsing $OfficialUrl -OutFile $Destination + } +} diff --git a/coin/provisioning/common/ruby.ps1 b/coin/provisioning/common/ruby.ps1 new file mode 100644 index 00000000..343bacfc --- /dev/null +++ b/coin/provisioning/common/ruby.ps1 @@ -0,0 +1,7 @@ +. "$PSScriptRoot\helpers.ps1" + +$installer = "c:\users\qt\downloads\rubyinstaller-2.3.1.exe" + +Download https://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.3.1.exe http://ci-files01-hki.ci.local/input/ruby/rubyinstaller-2.3.1.exe $installer +Verify-Checksum $installer "FF377F6F313849C3B0CD72EEC1EFFA436F0E4A36" +& $installer /DIR=C:\ruby /VERYSILENT diff --git a/coin/provisioning/qtci-windows-10-x86/ruby.ps1 b/coin/provisioning/qtci-windows-10-x86/ruby.ps1 new file mode 100644 index 00000000..587a4c10 --- /dev/null +++ b/coin/provisioning/qtci-windows-10-x86/ruby.ps1 @@ -0,0 +1 @@ +. "$PSScriptRoot\..\common\ruby.ps1" diff --git a/coin/provisioning/qtci-windows-10-x86_64/ruby.ps1 b/coin/provisioning/qtci-windows-10-x86_64/ruby.ps1 new file mode 100644 index 00000000..587a4c10 --- /dev/null +++ b/coin/provisioning/qtci-windows-10-x86_64/ruby.ps1 @@ -0,0 +1 @@ +. "$PSScriptRoot\..\common\ruby.ps1"