Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Windows 2022 variables #78

Merged
merged 1 commit into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading