diff --git a/Jenkinsfile_k8s b/Jenkinsfile_k8s index fcb2a8175..4ff9ccb0d 100644 --- a/Jenkinsfile_k8s +++ b/Jenkinsfile_k8s @@ -106,7 +106,7 @@ pipeline { sh ''' set -eu echo 'build_type = "prod"' >> "${PACKER_VARS_FILE}" - echo 'image_name = "'${TAG_NAME}'"' >> "${PACKER_VARS_FILE}" + echo 'image_version = "'${TAG_NAME}'"' >> "${PACKER_VARS_FILE}" ''' } } diff --git a/jenkins-agent.pkr.hcl b/jenkins-agent.pkr.hcl index 81c2072e2..c676f276b 100644 --- a/jenkins-agent.pkr.hcl +++ b/jenkins-agent.pkr.hcl @@ -90,6 +90,7 @@ locals { "azure-arm" = "packer" "amazon-ebs" = "Administrator" } + azure_vm_size = "Standard_DS4_v2" # Huge size requires - avoid https://docs.microsoft.com/en-us/azure/virtual-machines/linux/image-builder-troubleshoot#sysprep-timing and avoid full disk (DS2v2 only have 14 Gb SSD for system) azure_resource_group = "${var.build_type}-packer-images" azure_galleries = { "prod_packer_images" = ["East US", "East US 2"] @@ -185,7 +186,7 @@ build { image_publisher = "canonical" image_sku = "20_04-lts-gen2" os_type = "Linux" - vm_size = "Standard_DS4_v2" # Huge size requires - avoid https://docs.microsoft.com/en-us/azure/virtual-machines/linux/image-builder-troubleshoot#sysprep-timing and avoid full disk (DS2v2 only have 14 Gb SSD for system) + vm_size = local.azure_vm_size } provisioner "file" { @@ -233,8 +234,8 @@ build { image_offer = "WindowsServer" image_publisher = "MicrosoftWindowsServer" image_sku = "2019-Datacenter-Core-with-Containers-g2" + vm_size = local.azure_vm_size os_type = "Windows" - vm_size = "Standard_D4s_v3" os_disk_size_gb = 130 winrm_insecure = true winrm_timeout = "20m"