Avoid race condition between builders
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Danny Bessems 2021-02-14 12:32:40 +01:00
parent 7d969cc0f4
commit b3e33a7027
2 changed files with 6 additions and 3 deletions

View File

@ -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}}'"
]
}
]]

View File

@ -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