mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-24 10:28:10 +08:00
[macOS] Support null builder for anka MacOS templates (#9385)
This commit is contained in:
@@ -11,12 +11,27 @@ locals {
|
||||
image_folder = "/Users/${var.vm_username}/image-generation"
|
||||
}
|
||||
|
||||
variable "builder_type" {
|
||||
type = string
|
||||
default = "veertu-anka-vm-clone"
|
||||
validation {
|
||||
condition = contains(["veertu-anka-vm-clone", "null"], var.builder_type)
|
||||
error_message = "The builder_type value must be one of [veertu-anka-vm-clone, null]."
|
||||
}
|
||||
}
|
||||
|
||||
variable "source_vm_name" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "source_vm_tag" {
|
||||
type = string
|
||||
default = ""
|
||||
}
|
||||
|
||||
variable "socks_proxy" {
|
||||
type = string
|
||||
default = ""
|
||||
}
|
||||
|
||||
variable "build_id" {
|
||||
@@ -72,8 +87,15 @@ source "veertu-anka-vm-clone" "template" {
|
||||
stop_vm = "true"
|
||||
}
|
||||
|
||||
source "null" "template" {
|
||||
ssh_host = "${var.source_vm_name}"
|
||||
ssh_username = "${var.vm_username}"
|
||||
ssh_password = "${var.vm_password}"
|
||||
ssh_proxy_host = "${var.socks_proxy}"
|
||||
}
|
||||
|
||||
build {
|
||||
sources = ["source.veertu-anka-vm-clone.template"]
|
||||
sources = ["source.${var.builder_type}.template"]
|
||||
|
||||
provisioner "shell" {
|
||||
inline = ["mkdir ${local.image_folder}"]
|
||||
|
||||
@@ -11,12 +11,27 @@ locals {
|
||||
image_folder = "/Users/${var.vm_username}/image-generation"
|
||||
}
|
||||
|
||||
variable "builder_type" {
|
||||
type = string
|
||||
default = "veertu-anka-vm-clone"
|
||||
validation {
|
||||
condition = contains(["veertu-anka-vm-clone", "null"], var.builder_type)
|
||||
error_message = "The builder_type value must be one of [veertu-anka-vm-clone, null]."
|
||||
}
|
||||
}
|
||||
|
||||
variable "source_vm_name" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "source_vm_tag" {
|
||||
type = string
|
||||
default = ""
|
||||
}
|
||||
|
||||
variable "socks_proxy" {
|
||||
type = string
|
||||
default = ""
|
||||
}
|
||||
|
||||
variable "build_id" {
|
||||
@@ -72,8 +87,15 @@ source "veertu-anka-vm-clone" "template" {
|
||||
stop_vm = "true"
|
||||
}
|
||||
|
||||
source "null" "template" {
|
||||
ssh_host = "${var.source_vm_name}"
|
||||
ssh_username = "${var.vm_username}"
|
||||
ssh_password = "${var.vm_password}"
|
||||
ssh_proxy_host = "${var.socks_proxy}"
|
||||
}
|
||||
|
||||
build {
|
||||
sources = ["source.veertu-anka-vm-clone.template"]
|
||||
sources = ["source.${var.builder_type}.template"]
|
||||
|
||||
provisioner "shell" {
|
||||
inline = ["mkdir ${local.image_folder}"]
|
||||
|
||||
@@ -11,12 +11,27 @@ locals {
|
||||
image_folder = "/Users/${var.vm_username}/image-generation"
|
||||
}
|
||||
|
||||
variable "builder_type" {
|
||||
type = string
|
||||
default = "veertu-anka-vm-clone"
|
||||
validation {
|
||||
condition = contains(["veertu-anka-vm-clone", "null"], var.builder_type)
|
||||
error_message = "The builder_type value must be one of [veertu-anka-vm-clone, null]."
|
||||
}
|
||||
}
|
||||
|
||||
variable "source_vm_name" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "source_vm_tag" {
|
||||
type = string
|
||||
default = ""
|
||||
}
|
||||
|
||||
variable "socks_proxy" {
|
||||
type = string
|
||||
default = ""
|
||||
}
|
||||
|
||||
variable "build_id" {
|
||||
@@ -73,8 +88,15 @@ source "veertu-anka-vm-clone" "template" {
|
||||
log_level = "debug"
|
||||
}
|
||||
|
||||
source "null" "template" {
|
||||
ssh_host = "${var.source_vm_name}"
|
||||
ssh_username = "${var.vm_username}"
|
||||
ssh_password = "${var.vm_password}"
|
||||
ssh_proxy_host = "${var.socks_proxy}"
|
||||
}
|
||||
|
||||
build {
|
||||
sources = ["source.veertu-anka-vm-clone.template"]
|
||||
sources = ["source.${var.builder_type}.template"]
|
||||
|
||||
provisioner "shell" {
|
||||
inline = ["mkdir ${local.image_folder}"]
|
||||
|
||||
@@ -11,12 +11,27 @@ locals {
|
||||
image_folder = "/Users/${var.vm_username}/image-generation"
|
||||
}
|
||||
|
||||
variable "builder_type" {
|
||||
type = string
|
||||
default = "veertu-anka-vm-clone"
|
||||
validation {
|
||||
condition = contains(["veertu-anka-vm-clone", "null"], var.builder_type)
|
||||
error_message = "The builder_type value must be one of [veertu-anka-vm-clone, null]."
|
||||
}
|
||||
}
|
||||
|
||||
variable "source_vm_name" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "source_vm_tag" {
|
||||
type = string
|
||||
default = ""
|
||||
}
|
||||
|
||||
variable "socks_proxy" {
|
||||
type = string
|
||||
default = ""
|
||||
}
|
||||
|
||||
variable "build_id" {
|
||||
@@ -72,8 +87,15 @@ source "veertu-anka-vm-clone" "template" {
|
||||
stop_vm = "true"
|
||||
}
|
||||
|
||||
source "null" "template" {
|
||||
ssh_host = "${var.source_vm_name}"
|
||||
ssh_username = "${var.vm_username}"
|
||||
ssh_password = "${var.vm_password}"
|
||||
ssh_proxy_host = "${var.socks_proxy}"
|
||||
}
|
||||
|
||||
build {
|
||||
sources = ["source.veertu-anka-vm-clone.template"]
|
||||
sources = ["source.${var.builder_type}.template"]
|
||||
|
||||
provisioner "shell" {
|
||||
inline = ["mkdir ${local.image_folder}"]
|
||||
|
||||
@@ -11,12 +11,27 @@ locals {
|
||||
image_folder = "/Users/${var.vm_username}/image-generation"
|
||||
}
|
||||
|
||||
variable "builder_type" {
|
||||
type = string
|
||||
default = "veertu-anka-vm-clone"
|
||||
validation {
|
||||
condition = contains(["veertu-anka-vm-clone", "null"], var.builder_type)
|
||||
error_message = "The builder_type value must be one of [veertu-anka-vm-clone, null]."
|
||||
}
|
||||
}
|
||||
|
||||
variable "source_vm_name" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "source_vm_tag" {
|
||||
type = string
|
||||
default = ""
|
||||
}
|
||||
|
||||
variable "socks_proxy" {
|
||||
type = string
|
||||
default = ""
|
||||
}
|
||||
|
||||
variable "build_id" {
|
||||
@@ -73,8 +88,15 @@ source "veertu-anka-vm-clone" "template" {
|
||||
log_level = "debug"
|
||||
}
|
||||
|
||||
source "null" "template" {
|
||||
ssh_host = "${var.source_vm_name}"
|
||||
ssh_username = "${var.vm_username}"
|
||||
ssh_password = "${var.vm_password}"
|
||||
ssh_proxy_host = "${var.socks_proxy}"
|
||||
}
|
||||
|
||||
build {
|
||||
sources = ["source.veertu-anka-vm-clone.template"]
|
||||
sources = ["source.${var.builder_type}.template"]
|
||||
|
||||
provisioner "shell" {
|
||||
inline = ["mkdir ${local.image_folder}"]
|
||||
|
||||
Reference in New Issue
Block a user