Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .pipelines/templates/MockOB.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,7 @@ stages:

- publish: ${{ variables.ob_outputDirectory }}
artifact: ${{ variables.ob_customArtifactName }}
condition: always()
condition: succeeded()
- publish: ${{ variables.ob_outputDirectory }}
artifact: ${{ variables.ob_customArtifactName }}_failed_$(System.JobAttempt)
condition: not(succeeded())
19 changes: 19 additions & 0 deletions tools/storm/servicing/utils/azure/azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,25 @@ func (cfg AzureConfig) DeployAzureVM(vmName string, user string, buildId string)
return fmt.Errorf("failed to create Azure resource group: %w", err)
}

if cfg.SubnetId != "" {
// Loop until subnet resource is available
for {
vnetResourceArgs := []string{
"resource", "show",
"--ids", cfg.SubnetId,
}
out, err := cfg.CallAzCli(vnetResourceArgs, true)
if err == nil {
// Subnet found, continue with test
logrus.Tracef("Subnet (%v) found to be available: %v", cfg.SubnetId, out)
break
}
// Log and retry
logrus.Tracef("Waiting for subnet (%v) to be available: %v", cfg.SubnetId, out)
time.Sleep(time.Second)
}
}

imageVersion := cfg.GetImageVersion(buildId, false)

// Create the VM
Expand Down
Loading