1
0
Fork 0

Add step to schedule agent restart on windows

This commit is contained in:
Mikhail Goncharov 2020-07-17 18:37:29 +02:00
parent 95cdccb68f
commit 42d7237491
2 changed files with 288 additions and 838 deletions

View file

@ -131,11 +131,15 @@ To spawn a new windows agent:
$Env:CONDUIT_TOKEN = "conduit-api-token"
```
Pleas mind the length of the agent name as it will be in path and might cause some tests to fail due to 260 character limit.
1. Run
1. Clone scripts directory and start agent:
```powershell
git clone https://github.com/google/llvm-premerge-checks.git C:\llvm-premerge-checks
C:\llvm-premerge-checks\scripts\windows_agent_start_buildkite.ps1 [-workdir D:\] [-testing] [-version latest]
```
1. Add a task to start agent when machine restarts (make sure to pass correct parameters).
```
schtasks.exe /create /tn "Start Buildkite agent" /ru SYSTEM /SC ONSTART /DELAY 0005:00 /tr "powershell -command 'C:\llvm-premerge-checks\scripts\windows_agent_start_buildkite.ps1'"
```
### Jenkins
1. Create `c:\credentials` folder with `build-agent-results_key.json` to access cloud storage copy from one of the existing machines.

File diff suppressed because one or more lines are too long