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`}}' \\",
|
" -VMName '{{user `vm_guestos`}}-{{user `vm_name`}}' \\",
|
||||||
" -VSphereFQDN '{{user `vcenter_server`}}' \\",
|
" -VSphereFQDN '{{user `vcenter_server`}}' \\",
|
||||||
" -VSphereUsername '{{user `vsphere_username`}}' \\",
|
" -VSphereUsername '{{user `vsphere_username`}}' \\",
|
||||||
" -VSpherePassword '{{user `vsphere_password`}}'"
|
" -VSpherePassword '{{user `vsphere_password`}}' \\",
|
||||||
|
" -BuildName '{{build_name}}'"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]]
|
]]
|
||||||
|
@ -7,7 +7,9 @@ Param(
|
|||||||
[Parameter(Mandatory)]
|
[Parameter(Mandatory)]
|
||||||
[string]$VSphereUsername,
|
[string]$VSphereUsername,
|
||||||
[Parameter(Mandatory)]
|
[Parameter(Mandatory)]
|
||||||
[string]$VSpherePassword
|
[string]$VSpherePassword,
|
||||||
|
[Parameter(Mandatory)]
|
||||||
|
[string]$BuildName
|
||||||
)
|
)
|
||||||
|
|
||||||
$PowerCliConfigurationSplat = @{
|
$PowerCliConfigurationSplat = @{
|
||||||
@ -43,7 +45,7 @@ If ([boolean](Get-VM @GetVMSplat)) {
|
|||||||
Disconnect-VIServer * -Confirm:$False
|
Disconnect-VIServer * -Confirm:$False
|
||||||
|
|
||||||
$RemoveItemSplat = @{
|
$RemoveItemSplat = @{
|
||||||
Path = '/scratch/*'
|
Path = "/scratch/$($BuildName)/*"
|
||||||
Recurse = $True
|
Recurse = $True
|
||||||
Force = $True
|
Force = $True
|
||||||
Confirm = $False
|
Confirm = $False
|
||||||
|
Loading…
Reference in New Issue
Block a user