summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaurice Kalinowski <maurice.kalinowski@qt.io>2018-05-23 13:46:41 +0200
committerMaurice Kalinowski <maurice.kalinowski@qt.io>2018-05-25 10:25:55 +0000
commitb317ad80963fbba4e7723ab1f47a95efbcb88da2 (patch)
treee3ef02acc3b76c79886cc3f6b05272f15690c6e7
parent45709cec07594c950c64295e07be8dc42da963c0 (diff)
Remove hardcoded download path
Previously all files got downloaded to a hardcoded path, including the username for the CI machines. Usually, it does not fit the username of a local development machine, complicating to reproduce bugs. Introduce Get-(Default)DownloadLocation functions in helpers to specify the default download location. This helps to run the provisioning scripts on a local machine. Change-Id: I761a92bf5e3e774358756a95dddb9a5d6ee54db9 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
-rw-r--r--coin/provisioning/common/windows/3dstudio_3rdparty.ps13
-rw-r--r--coin/provisioning/common/windows/android-openssl.ps12
-rw-r--r--coin/provisioning/common/windows/cmake.ps12
-rw-r--r--coin/provisioning/common/windows/helpers.ps111
-rw-r--r--coin/provisioning/common/windows/jom.ps12
-rw-r--r--coin/provisioning/common/windows/libclang.ps12
-rw-r--r--coin/provisioning/common/windows/libusb.ps12
-rw-r--r--coin/provisioning/common/windows/mqtt_broker.ps12
-rw-r--r--coin/provisioning/common/windows/ninja.ps12
-rw-r--r--coin/provisioning/common/windows/winrtrunner.ps12
-rw-r--r--coin/provisioning/qtci-windows-10-x86_64/05-qnx_700.ps12
-rw-r--r--coin/provisioning/qtci-windows-7-x86/04-msys.ps12
12 files changed, 23 insertions, 11 deletions
diff --git a/coin/provisioning/common/windows/3dstudio_3rdparty.ps1 b/coin/provisioning/common/windows/3dstudio_3rdparty.ps1
index ed408b6c..049fdc1b 100644
--- a/coin/provisioning/common/windows/3dstudio_3rdparty.ps1
+++ b/coin/provisioning/common/windows/3dstudio_3rdparty.ps1
@@ -1,6 +1,7 @@
. "$PSScriptRoot\helpers.ps1"
-$zip = "c:\users\qt\downloads\Qt3DStudio-3rdparty-win64-CI.zip"
+$zip = Get-DownloadLocation "Qt3DStudio-3rdparty-win64-CI.zip"
+
$url = "http://ci-files01-hki.intra.qt.io/input/3rdparty/Qt3DStudio-3rdparty-win64-CI.zip"
Download $url $url $zip
diff --git a/coin/provisioning/common/windows/android-openssl.ps1 b/coin/provisioning/common/windows/android-openssl.ps1
index 53c2ee17..d838fcc8 100644
--- a/coin/provisioning/common/windows/android-openssl.ps1
+++ b/coin/provisioning/common/windows/android-openssl.ps1
@@ -40,7 +40,7 @@
# More info and building instructions can be found from http://doc.qt.io/qt-5/opensslsupport.html
$version = "1.0.2o"
-$zip = "c:\users\qt\downloads\openssl-$version.tar.gz"
+$zip = Get-DownloadLocation ("openssl-$version.tar.gz")
$sha1 = "a47faaca57b47a0d9d5fb085545857cc92062691"
$destination = "C:\Utils\openssl-android-master"
diff --git a/coin/provisioning/common/windows/cmake.ps1 b/coin/provisioning/common/windows/cmake.ps1
index ace68835..ec84d706 100644
--- a/coin/provisioning/common/windows/cmake.ps1
+++ b/coin/provisioning/common/windows/cmake.ps1
@@ -36,7 +36,7 @@
$majorminorversion = "3.6"
$version = "3.6.2"
-$zip = "c:\users\qt\downloads\cmake-" + $version + "-win32-x86.zip"
+$zip = Get-DownloadLocation ("cmake-" + $version + "-win32-x86.zip")
$officialurl = "https://cmake.org/files/v" + $majorminorversion + "/cmake-" + $version + "-win32-x86.zip"
$cachedurl = "\\ci-files01-hki.intra.qt.io\provisioning\cmake\cmake-" + $version + "-win32-x86.zip"
diff --git a/coin/provisioning/common/windows/helpers.ps1 b/coin/provisioning/common/windows/helpers.ps1
index 8a4b452e..28ccaeaf 100644
--- a/coin/provisioning/common/windows/helpers.ps1
+++ b/coin/provisioning/common/windows/helpers.ps1
@@ -68,6 +68,17 @@ function BadParam
throw("You must specify $Description")
}
+function Get-DefaultDownloadLocation
+{
+ return $env:USERPROFILE + "\downloads\"
+}
+
+function Get-DownloadLocation
+{
+ Param ([string]$TargetName = $(BadParam("a target filename")))
+ return (Get-DefaultDownloadLocation) + $TargetName
+}
+
function Download
{
Param (
diff --git a/coin/provisioning/common/windows/jom.ps1 b/coin/provisioning/common/windows/jom.ps1
index 68db6b17..7c59c61c 100644
--- a/coin/provisioning/common/windows/jom.ps1
+++ b/coin/provisioning/common/windows/jom.ps1
@@ -1,6 +1,6 @@
. "$PSScriptRoot\helpers.ps1"
-$zip = "c:\users\qt\downloads\jom_1_1_2.zip"
+$zip = Get-DownloadLocation "jom_1_1_2.zip"
Invoke-WebRequest -UseBasicParsing http://download.qt.io/official_releases/jom/jom_1_1_2.zip -OutFile $zip
Verify-Checksum $zip "80EE5678E714DE99DDAF5F7593AB04DB1C7928E4"
diff --git a/coin/provisioning/common/windows/libclang.ps1 b/coin/provisioning/common/windows/libclang.ps1
index db277134..b0705105 100644
--- a/coin/provisioning/common/windows/libclang.ps1
+++ b/coin/provisioning/common/windows/libclang.ps1
@@ -16,7 +16,7 @@ Get-Content "$PSScriptRoot\..\shared\sw_versions.txt" | Foreach-Object {
$libclang_version = $libclang_version -replace '["."]'
}
-$zip = "c:\users\qt\downloads\libclang.7z"
+$zip = Get-DownloadLocation "libclang.7z"
$baseDestination = "C:\Utils\libclang-" + $libclang_version + "-" + $toolchain
function setURL() {
diff --git a/coin/provisioning/common/windows/libusb.ps1 b/coin/provisioning/common/windows/libusb.ps1
index 3207131b..68375263 100644
--- a/coin/provisioning/common/windows/libusb.ps1
+++ b/coin/provisioning/common/windows/libusb.ps1
@@ -35,7 +35,7 @@
. "$PSScriptRoot\helpers.ps1"
-$archive = "C:\users\qt\downloads\libusb-1.0.21-ife3db79196-msvc2015.7z"
+$archive = Get-DownloadLocation "libusb-1.0.21-ife3db79196-msvc2015.7z"
$libusb_location = "C:\Utils\libusb-1.0"
Copy-Item \\ci-files01-hki.intra.qt.io\provisioning\libusb-1.0\libusb-1.0.21-ife3db79196-msvc2015.7z $archive
diff --git a/coin/provisioning/common/windows/mqtt_broker.ps1 b/coin/provisioning/common/windows/mqtt_broker.ps1
index 205d9c95..a80e23dd 100644
--- a/coin/provisioning/common/windows/mqtt_broker.ps1
+++ b/coin/provisioning/common/windows/mqtt_broker.ps1
@@ -34,7 +34,7 @@
. "$PSScriptRoot\helpers.ps1"
Write-Host "MQTT: Downloading Paho test broker..."
-$zip = "c:\users\qt\downloads\pahotest.zip"
+$zip = Get-DownloadLocation "pahotest.zip"
$externalUrl = "http://ci-files01-hki.ci.local/input/mqtt_broker/paho.mqtt.testing-c342c09dadc7a664d0a8befad1ca031f5a0b0bc0.zip"
$internalUrl = "https://github.com/eclipse/paho.mqtt.testing/archive/c342c09dadc7a664d0a8befad1ca031f5a0b0bc0.zip"
$sha1 = "532fe145096cdd8d679f425cbfd883289150c968"
diff --git a/coin/provisioning/common/windows/ninja.ps1 b/coin/provisioning/common/windows/ninja.ps1
index 5b6729f5..95932c61 100644
--- a/coin/provisioning/common/windows/ninja.ps1
+++ b/coin/provisioning/common/windows/ninja.ps1
@@ -1,6 +1,6 @@
. "$PSScriptRoot\helpers.ps1"
-$zip = "c:\users\qt\downloads\ninja-1.6.0-win-x86.zip"
+$zip = Get-DownloadLocation "ninja-1.6.0-win-x86.zip"
Download https://github.com/ninja-build/ninja/releases/download/v1.6.0/ninja-win.zip \\ci-files01-hki.intra.qt.io\provisioning\ninja\ninja-1.6.0-win-x86.zip $zip
Verify-Checksum $zip "E01093F6533818425F8EFB0843CED7DCAABEA3B2"
diff --git a/coin/provisioning/common/windows/winrtrunner.ps1 b/coin/provisioning/common/windows/winrtrunner.ps1
index 9cdd04ab..53955201 100644
--- a/coin/provisioning/common/windows/winrtrunner.ps1
+++ b/coin/provisioning/common/windows/winrtrunner.ps1
@@ -1,6 +1,6 @@
. "$PSScriptRoot\helpers.ps1"
-$zip = "c:\users\qt\downloads\winrtrunner.zip"
+$zip = Get-DownloadLocation "winrtrunner.zip"
$url = "http://download.qt.io/development_releases/prebuilt/winrtrunner/winrtrunner.zip"
Download $url $url $zip
diff --git a/coin/provisioning/qtci-windows-10-x86_64/05-qnx_700.ps1 b/coin/provisioning/qtci-windows-10-x86_64/05-qnx_700.ps1
index 991ccfa6..821c513e 100644
--- a/coin/provisioning/qtci-windows-10-x86_64/05-qnx_700.ps1
+++ b/coin/provisioning/qtci-windows-10-x86_64/05-qnx_700.ps1
@@ -35,7 +35,7 @@
# This script installs QNX SDP 7.0
-$zip = "c:\users\qt\downloads\qnx700.7z"
+$zip = Get-DownloadLocation "qnx700.7z"
$url = "http://ci-files01-hki.intra.qt.io/input/qnx/qnx700.7z"
Download $url $url $zip
diff --git a/coin/provisioning/qtci-windows-7-x86/04-msys.ps1 b/coin/provisioning/qtci-windows-7-x86/04-msys.ps1
index be52fb2a..24d7a5ca 100644
--- a/coin/provisioning/qtci-windows-7-x86/04-msys.ps1
+++ b/coin/provisioning/qtci-windows-7-x86/04-msys.ps1
@@ -5,7 +5,7 @@
$version = "1.0.11"
$url = "\\ci-files01-hki.intra.qt.io\provisioning\windows\msys-$version.7z"
-$zip = "c:\users\qt\downloads\msys-$version.7z"
+$zip = Get-DownloadLocation ("msys-$version.7z")
$sha1 = "22cd76f1263db8c72727a9537228c481ff33c285"
$destination = "C:\msys"