[Ubuntu] reduce disks size in packer template (#9251)
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
# The $env:AGENT_NAME and $env:RUNNER_NAME are predefined variables for the ADO pipelines and for the GitHub actions respectively.
|
# The $env:AGENT_NAME and $env:RUNNER_NAME are predefined variables for the ADO pipelines and for the GitHub actions respectively.
|
||||||
# If the test is running on the ADO pipeline or on the GitHub actions, the test will be skipped
|
# If the test is running on the ADO pipeline or on the GitHub actions, the test will be skipped
|
||||||
Describe "Disk free space" -Skip:(-not [String]::IsNullOrEmpty($env:AGENT_NAME) -or -not [String]::IsNullOrEmpty($env:RUNNER_NAME)) {
|
Describe "Disk free space" -Skip:(-not [String]::IsNullOrEmpty($env:AGENT_NAME) -or -not [String]::IsNullOrEmpty($env:RUNNER_NAME)) {
|
||||||
It "Image has more than 31GB free space" {
|
It "Image has enough free space" {
|
||||||
$freeSpace = (Get-PSDrive "/").Free
|
$freeSpace = (Get-PSDrive "/").Free
|
||||||
$freeSpace | Should -BeGreaterOrEqual 31GB
|
$freeSpace | Should -BeGreaterOrEqual 17GB
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ source "azure-arm" "build_image" {
|
|||||||
location = "${var.location}"
|
location = "${var.location}"
|
||||||
managed_image_name = "${local.managed_image_name}"
|
managed_image_name = "${local.managed_image_name}"
|
||||||
managed_image_resource_group_name = "${var.managed_image_resource_group_name}"
|
managed_image_resource_group_name = "${var.managed_image_resource_group_name}"
|
||||||
os_disk_size_gb = "86"
|
os_disk_size_gb = "75"
|
||||||
os_type = "Linux"
|
os_type = "Linux"
|
||||||
private_virtual_network_with_public_ip = "${var.private_virtual_network_with_public_ip}"
|
private_virtual_network_with_public_ip = "${var.private_virtual_network_with_public_ip}"
|
||||||
subscription_id = "${var.subscription_id}"
|
subscription_id = "${var.subscription_id}"
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ source "azure-arm" "build_image" {
|
|||||||
location = "${var.location}"
|
location = "${var.location}"
|
||||||
managed_image_name = "${local.managed_image_name}"
|
managed_image_name = "${local.managed_image_name}"
|
||||||
managed_image_resource_group_name = "${var.managed_image_resource_group_name}"
|
managed_image_resource_group_name = "${var.managed_image_resource_group_name}"
|
||||||
os_disk_size_gb = "86"
|
os_disk_size_gb = "75"
|
||||||
os_type = "Linux"
|
os_type = "Linux"
|
||||||
private_virtual_network_with_public_ip = "${var.private_virtual_network_with_public_ip}"
|
private_virtual_network_with_public_ip = "${var.private_virtual_network_with_public_ip}"
|
||||||
subscription_id = "${var.subscription_id}"
|
subscription_id = "${var.subscription_id}"
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ source "azure-arm" "build_image" {
|
|||||||
|
|
||||||
// VM Configuration
|
// VM Configuration
|
||||||
vm_size = "${var.vm_size}"
|
vm_size = "${var.vm_size}"
|
||||||
os_disk_size_gb = "86"
|
os_disk_size_gb = "75"
|
||||||
os_type = "Linux"
|
os_type = "Linux"
|
||||||
|
|
||||||
dynamic "azure_tag" {
|
dynamic "azure_tag" {
|
||||||
|
|||||||
Reference in New Issue
Block a user