diff --git a/.ci/Jenkinsfile b/.ci/Jenkinsfile index 45d68e97e9..d0d10ecc28 100644 --- a/.ci/Jenkinsfile +++ b/.ci/Jenkinsfile @@ -471,15 +471,13 @@ def generateStepForWindows(Map params = [:]){ deleteDir() unstash 'source' dir(BASE_DIR) { - powershell label: 'Install tools', script: ".\\.ci\\scripts\\windows\\install-tools.ps1" + installTools([ [tool: 'nodejs', version: "${version}" ] ]) bat label: 'Tool versions', script: ''' npm --version node --version ''' bat 'npm install' - bat ''' - node test/test.js - ''' + bat 'node test/test.js' } } catch(e){ error(e.toString()) diff --git a/.ci/scripts/windows/install-tools.ps1 b/.ci/scripts/windows/install-tools.ps1 deleted file mode 100644 index 3d9c44e6c1..0000000000 --- a/.ci/scripts/windows/install-tools.ps1 +++ /dev/null @@ -1,12 +0,0 @@ -# Abort with non zero exit code on errors -$ErrorActionPreference = "Stop" - -Write-Host "List environment variables ..." -Get-ChildItem Env: | Sort Name | Format-Table -Wrap -AutoSize - -Write-Host("Getting latest Nodejs version for {0} ..." -f $env:VERSION) -& choco list nodejs --exact --by-id-only --all | Select-String -Pattern "nodejs $env:VERSION" -$Version = $(choco list nodejs --exact --by-id-only --all) | Select-String -Pattern "nodejs $env:VERSION" | %{$_.ToString().split(" ")[1]} | sort {[version] $_} | Select-Object -Last 1 - -Write-Host("Installing Nodejs {0} ..." -f $Version) -& choco install nodejs --no-progress -y --version "$Version"