update of scripts for native windows agent
This commit is contained in:
parent
1127782f09
commit
adf51c6551
4 changed files with 135 additions and 112 deletions
|
@ -27,7 +27,7 @@ choco install git
|
|||
|
||||
Write-Host "Mounting result storage..."
|
||||
Install-WindowsFeature NFS-Client
|
||||
net use E: \\results.local\exports
|
||||
net use E: \\results.local\exports /PERSISTENT:YES
|
||||
|
||||
Set-Location D:\
|
||||
git clone https://github.com/google/llvm-premerge-checks
|
|
@ -12,9 +12,10 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
. ${PSScriptRoot}\common.ps1
|
||||
|
||||
Write-Host "Installing Visual Studio build tools..."
|
||||
choco install visualcpp-build-tools --version 15.0.26228.20170424 -y --params "'/IncludeOptional'"
|
||||
choco install -y visualcpp-build-tools --version 15.0.26228.20170424 -y --params "'/IncludeOptional'"
|
||||
Write-Host 'Waiting for Visual C++ Build Tools to finish'
|
||||
Wait-Process -Name vs_installer
|
||||
|
||||
|
@ -25,9 +26,9 @@ choco install -y git python2 ninja gnuwin cmake
|
|||
pip install psutil
|
||||
|
||||
Write-Host "Setting environment variables..."
|
||||
$Env:PYTHONIOENCODING=UTF-8
|
||||
$Env:path = $Env:path + ';c:\Program Files (x86)\GnuWin32\bin;C:\Program Files\CMake\bin'
|
||||
|
||||
[System.Environment]::SetEnvironmentVariable('PYTHONIOENCODING', 'UTF-8', [System.EnvironmentVariableTarget]::User)
|
||||
$oldpath=[System.Environment]::GetEnvironmentVariable('path',[System.EnvironmentVariableTarget]::User)
|
||||
[System.Environment]::SetEnvironmentVariable('path', $oldpath + 'c:\Program Files (x86)\GnuWin32\bin;C:\Program Files\CMake\bin', [System.EnvironmentVariableTarget]::User)
|
||||
# support long file names during git checkout
|
||||
Write-Host "Setting git config..."
|
||||
git config --system core.longpaths true
|
22
scripts/windows_agent_start.ps1
Normal file
22
scripts/windows_agent_start.ps1
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Copyright 2019 Google LLC
|
||||
#
|
||||
# Licensed under the the Apache License v2.0 with LLVM Exceptions (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://llvm.org/LICENSE.txt
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
|
||||
. ${PSScriptRoot}\common.ps1
|
||||
|
||||
$JENKINS_SERVER="jenkins.local"
|
||||
$AGENT_ROOT="D:\"
|
||||
$SWARM_PLUGIN_JAR="C:\jenkins\swarm-client.jar"
|
||||
|
||||
java -jar ${SWARM_PLUGIN_JAR} -master http://${JENKINS_SERVER}:8080 -executors 1 -fsroot ${AGENT_ROOT} -labels windows
|
Loading…
Reference in a new issue