Avoid race condition between builders
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
7d969cc0f4
commit
b3e33a7027
@ -236,7 +236,8 @@
|
||||
" -VMName '{{user `vm_guestos`}}-{{user `vm_name`}}' \\",
|
||||
" -VSphereFQDN '{{user `vcenter_server`}}' \\",
|
||||
" -VSphereUsername '{{user `vsphere_username`}}' \\",
|
||||
" -VSpherePassword '{{user `vsphere_password`}}'"
|
||||
" -VSpherePassword '{{user `vsphere_password`}}' \\",
|
||||
" -BuildName '{{build_name}}'"
|
||||
]
|
||||
}
|
||||
]]
|
||||
|
@ -7,7 +7,9 @@ Param(
|
||||
[Parameter(Mandatory)]
|
||||
[string]$VSphereUsername,
|
||||
[Parameter(Mandatory)]
|
||||
[string]$VSpherePassword
|
||||
[string]$VSpherePassword,
|
||||
[Parameter(Mandatory)]
|
||||
[string]$BuildName
|
||||
)
|
||||
|
||||
$PowerCliConfigurationSplat = @{
|
||||
@ -43,7 +45,7 @@ If ([boolean](Get-VM @GetVMSplat)) {
|
||||
Disconnect-VIServer * -Confirm:$False
|
||||
|
||||
$RemoveItemSplat = @{
|
||||
Path = '/scratch/*'
|
||||
Path = "/scratch/$($BuildName)/*"
|
||||
Recurse = $True
|
||||
Force = $True
|
||||
Confirm = $False
|
||||
|
Loading…
Reference in New Issue
Block a user