-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap-robotframework
More file actions
27 lines (18 loc) · 1.31 KB
/
bootstrap-robotframework
File metadata and controls
27 lines (18 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
write "Bootstrap Robotframework"
$repo="robotframework-bootstrap-master"
$tmp_folder="C:\temp"
#$salt_inst_dir = "C:\salt"
$salt_inst_dir = "%ProgramFiles%\SALT Project\Salt"
$salt_file_root_path = "C:\ProgramData\Salt Project\Salt\srv"
# Download bootstrap git content as zip-file and extract it to tmp
Invoke-WebRequest -Uri https://github.com/PhilippLemke/robotframework-bootstrap/archive/refs/heads/master.zip -OutFile "$tmp_folder/$repo.zip"
Get-ChildItem $tmp_folder -Filter "$repo.zip" | Expand-Archive -DestinationPath $tmp_folder -Force
# Create Salt-Minion default file structure (locally)
New-Item -Path $salt_inst_dir -Force -Name $salt_file_root -ItemType "directory"
# Copy salt and pillar content from tmp to local minion
write "Copy-item -Force -Recurse $tmp_folder\$repo\salt -Destination $salt_file_root_path"
Copy-item -Force -Recurse "$tmp_folder\$repo\salt" -Destination "$salt_file_root_path\salt"
Copy-item -Force -Recurse "$tmp_folder\$repo\pillar" -Destination "$salt_file_root_path"
write "Cleanup $tmp_folder"
Remove-Item "$tmp_folder\$repo*" -Recurse
Start-Process -FilePath C:\Windows\System32\cmd.exe -verb runas -ArgumentList {/k C:\PROGRA~1\SALTPR~1\Salt\bin\python.exe -E -s C:\PROGRA~1\SALTPR~1\Salt\bin\Scripts\salt-call --local state.apply deploy-robotframework}