Skip to content

Commit

Permalink
Added Windows 2022 variables
Browse files Browse the repository at this point in the history
  • Loading branch information
ElstonLewis committed Sep 16, 2024
1 parent 91d187b commit e98dcee
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ switch(OS) {
case "Windows Server 2019":
base_name = "WindowsServer-2019"
packer_script = "windows.pkr.hcl"
product_codes = "0002"
break

case "Windows Server 2019 SQL Server Web 2019":
Expand Down Expand Up @@ -107,6 +108,12 @@ switch(OS) {
base_name = "Windows-10"
packer_script = "windows.pkr.hcl"
break

case "Windows Server 2022":
base_name = "WindowsServer-2022"
packer_script = "windows.pkr.hcl"
product_codes = "0002"
break
}

def source_omi = [
Expand Down
6 changes: 6 additions & 0 deletions windows.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ variable "volsize" {
default = "50"
}

variable "product_codes" {
type = string
default = "${env("OUTSCALE_PRODUCT_CODES")}"
}

packer {
required_plugins {
windows-update = {
Expand Down Expand Up @@ -46,6 +51,7 @@ source "outscale-bsu" "windows" {
winrm_insecure = true
winrm_use_ssl = true
winrm_username = "Administrator"
omi_product_codes = ["${var.product_codes}"]
}

build {
Expand Down

0 comments on commit e98dcee

Please sign in to comment.