Repository: archiva
Updated Branches:
  refs/heads/citest a28e1363a -> 7d0d6fcf5


Test


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/7d0d6fcf
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/7d0d6fcf
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/7d0d6fcf

Branch: refs/heads/citest
Commit: 7d0d6fcf56121fa89904d3122d2a5fac7c4f949c
Parents: a28e136
Author: Martin Stockhammer <[email protected]>
Authored: Sun May 14 20:57:11 2017 +0200
Committer: Martin Stockhammer <[email protected]>
Committed: Sun May 14 20:57:11 2017 +0200

----------------------------------------------------------------------
 src/ci/scripts/updateSeleniumDrivers.ps1 | 46 +++++++++++++++++----------
 1 file changed, 29 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/7d0d6fcf/src/ci/scripts/updateSeleniumDrivers.ps1
----------------------------------------------------------------------
diff --git a/src/ci/scripts/updateSeleniumDrivers.ps1 
b/src/ci/scripts/updateSeleniumDrivers.ps1
index 79752ba..a711d5e 100644
--- a/src/ci/scripts/updateSeleniumDrivers.ps1
+++ b/src/ci/scripts/updateSeleniumDrivers.ps1
@@ -33,27 +33,39 @@ $psVersion = $PSVersionTable.PSVersion
 
 Write-Output "PS-Version: $psVersion"
 
+$urls = @{
+  
"iedriver\2.53.1\win64\DriverServer.zip"="http://selenium-release.storage.googleapis.com/2.53/IEDriverServer_x64_2.53.1.zip";
+  
"iedriver\2.53.1\win32\DriverServer.zip"="http://selenium-release.storage.googleapis.com/2.53/IEDriverServer_Win32_2.53.1.zip";
+  
"iedriver\3.4.0\win64\DriverServer.zip"="http://selenium-release.storage.googleapis.com/3.4/IEDriverServer_x64_3.4.0.zip";
+  
"iedriver\3.4.0\win32\DriverServer.zip"="http://selenium-release.storage.googleapis.com/3.4/IEDriverServer_Win32_3.4.0.zip";
+  
"chromedriver\2.29\win32\DriverServer.zip"="https://chromedriver.storage.googleapis.com/2.29/chromedriver_win32.zip";
+  
"geckodriver\0.16.1\win32\DriverServer.zip"="https://github.com/mozilla/geckodriver/releases/download/v0.16.1/geckodriver-v0.16.1-win32.zip";
+  
"geckodriver\0.16.1\win64\DriverServer.zip"="https://github.com/mozilla/geckodriver/releases/download/v0.16.1/geckodriver-v0.16.1-win64.zip";
+}
 
+foreach ($h in $urls.GetEnumerator()) {
+  $url = $h.Value
+  $downloadFile = "C:\jenkins\tools\$($h.Name)"
+  $downloadDir = Split-Path $downloadFile -Parent
 
-$url = 
"http://selenium-release.storage.googleapis.com/2.53/IEDriverServer_x64_2.53.1.zip";
-$downloadFile = 
"C:\jenkins\tools\iedriver\2.53.1\win64\IEDriverServer_x64_2.53.1.zip"
-$downloadDir = Split-Path $downloadFile -Parent
+  if(!(Test-Path -Path $downloadDir )){
+    New-Item -ItemType directory -Path $downloadFile
 
-if(!(Test-Path -Path $downloadDir )){
-  New-Item -ItemType directory -Path $downloadFile
+  }
+  if ($Force -And (Test-Path -Path $downloadFile ) ) {
+    Remove-Item $downloadFile
+  }
 
-}
-if ($Force -And (Test-Path -Path $downloadFile ) ) {
-  Remove-Item $downloadFile
-}
+  if ($Force -Or !(Test-Path -Path $downloadFile )){
+    Invoke-WebRequest -Uri $url -OutFile $downloadFile
 
-if ($Force -Or !(Test-Path -Path $downloadFile )){
-  Invoke-WebRequest -Uri $url -OutFile $downloadFile
+    $shell = New-Object -ComObject shell.application
+    $zip = $shell.NameSpace($downloadFile)
+    foreach ($item in $zip.items()) {
+      $shell.Namespace($downloadDir).CopyHere($item)
+    }
 
-  $shell = New-Object -ComObject shell.application
-  $zip = $shell.NameSpace($downloadFile)
-  foreach ($item in $zip.items()) {
-    $shell.Namespace($downloadDir).CopyHere($item)
+    Write-Output "Driver $($h.Value)"
+    Get-ChildItem -Path $downloadDir
   }
-}
-
+}
\ No newline at end of file

Reply via email to