Skip to content

Commit

Permalink
hotfix: use same VM size for azure + correct image_version variable
Browse files Browse the repository at this point in the history
Signed-off-by: Damien Duportal <[email protected]>
  • Loading branch information
dduportal committed Sep 16, 2021
1 parent 5eb707b commit 097c69a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Jenkinsfile_k8s
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
'''
}
}
Expand Down
5 changes: 3 additions & 2 deletions jenkins-agent.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down Expand Up @@ -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" {
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 097c69a

Please sign in to comment.