-
Notifications
You must be signed in to change notification settings - Fork 62
Adding quickstart for validate with Windows image #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you please share details on how this has been tested? |
||
| "location": "westus2", | ||
| "identity": { | ||
| "type": "UserAssigned", | ||
| "userAssignedIdentities": { | ||
| "/subscriptions/<subscriptionID>/resourceGroups/<resourceGroupName>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/<managedIdentity>": {} | ||
| } | ||
| }, | ||
| "properties": { | ||
| "source": { | ||
| "type": "PlatformImage", | ||
| "publisher": "MicrosoftWindowsDesktop", | ||
| "offer": "Windows-10", | ||
| "sku": "20h2-pro", | ||
| "version": "latest" | ||
| }, | ||
| "customize": [ | ||
| { | ||
| "type": "WindowsRestart", | ||
| "restartCommand": "shutdown /f /r /t 0 /c \"packer restart\"", | ||
| "restartCheckCommand": "", | ||
| "restartTimeout": "20m", | ||
| "name": "Restart Max" | ||
| }, | ||
| { | ||
| "type": "WindowsUpdate", | ||
| "searchCriteria": "IsInstalled=0", | ||
| "filters": [ | ||
| "exclude:$_.Title -like '*Preview*'", | ||
| "include:$true" | ||
| ], | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please fix indentation. |
||
| "updateLimit": 20 | ||
| }, | ||
| { | ||
| "type": "PowerShell", | ||
| "name": "PowerShell Cmds Customizer test", | ||
| "inline": [ | ||
| "Write-Host HelloCustomize", | ||
| "New-Item -ItemType file c:\\example_1.txt", | ||
| "echo $?", | ||
| "Write-Host ByeCustomize" | ||
| ] | ||
| } | ||
| ], | ||
| "validate": { | ||
| "continueDistributeOnFailure": false, | ||
| "inVMValidations": [ | ||
| { | ||
| "type": "PowerShell", | ||
| "name": "test PowerShell validator inline", | ||
| "inline": [ | ||
| "Write-Host HelloValidate", | ||
| "New-Item -ItemType file c:\\valdnfile_1.txt", | ||
| "echo $?", | ||
| "Write-Host ByeValidate" | ||
| ] | ||
| }, | ||
| { | ||
| "type": "PowerShell", | ||
| "name": "<scriptName>", | ||
| "scriptUri": "<scriptUri>", | ||
| "validExitCodes": [ | ||
| 0, | ||
| 1 | ||
| ] | ||
| } | ||
| ] | ||
| }, | ||
| "distribute": [ | ||
| { | ||
| "type": "SharedImage", | ||
| "galleryImageId": "/subscriptions/<subscriptionID>/resourceGroups/<resourceGroupName>/providers/Microsoft.Compute/galleries/<sharedImageGalName>/images/<imageDefName>", | ||
| "runOutputName": "<runOutputName>", | ||
| "replicationRegions": [ | ||
| "westus2" | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep the filename consistent with existing naming scheme.
If current scheme doesn't seem okay to you then please change the scheme for all of them - but the customer should have a consistent experience.