Skip to content

Commit cd7ec66

Browse files
committed
Shorten capture_name_prefix
While including "stemcell" and the OS and version makes it obvious what the final VHD file is, there is a 23 character limit for the capture_name_prefix in Packer. The storage account + capture_container_name should already make it obvious that it is a stemcell, and is of a particular OS, so only include the version as the prefix.
1 parent 1e79328 commit cd7ec66

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/packer/config/azure.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def builders
3333
'temp_resource_group_name' => "#{@vm_prefix}-#{Time.now.to_i}",
3434
'storage_account' => @storage_account,
3535
'capture_container_name' => @os,
36-
'capture_name_prefix' => "bosh-stemcell-#{@os}-#{@version}",
36+
'capture_name_prefix' => "#{@version}",
3737
'image_publisher' => 'MicrosoftWindowsServer',
3838
'image_offer' => ENV['BASE_IMAGE_OFFER'],
3939
'image_sku' => ENV['BASE_IMAGE'],

spec/packer/config/azure_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
'temp_resource_group_name' => "some-vm-prefix-#{Time.now.to_i}",
4141
'storage_account' => 'some-storage-account',
4242
'capture_container_name' => 'test-os',
43-
'capture_name_prefix' => 'bosh-stemcell-test-os-2019.9999',
43+
'capture_name_prefix' => '2019.9999',
4444
'image_publisher' => 'MicrosoftWindowsServer',
4545
'image_offer' => 'some-base-image-offer',
4646
'image_sku' => 'some-base-image',

0 commit comments

Comments
 (0)