[macos] add cookie based installation for Xcode (#7666)

This commit is contained in:
Shamil Mubarakshin
2023-06-03 18:15:48 +02:00
committed by GitHub
parent be83ef6796
commit afd68edefb
8 changed files with 92 additions and 0 deletions

View File

@@ -44,6 +44,11 @@ variable "xcode_install_password" {
sensitive = true
}
variable "xcversion_auth_cookie" {
type = string
default = ""
}
variable "vcpu_count" {
type = string
default = "6"
@@ -182,6 +187,15 @@ build {
]
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}"
}
provisioner "shell" {
inline = [
"mkdir -p ~/.fastlane/spaceship/${var.xcode_install_user}"
]
}
provisioner "file" {
destination = "~/.fastlane/spaceship/${var.xcode_install_user}/cookie"
source = "${var.xcversion_auth_cookie}"
}
provisioner "shell" {
script = "./provision/core/xcode.ps1"
environment_vars = [

View File

@@ -14,6 +14,7 @@
"github_api_pat": null,
"xcode_install_user": null,
"xcode_install_password": null,
"xcversion_auth_cookie": null,
"image_os": "macos11"
},
"builders": [
@@ -164,6 +165,15 @@
"API_PAT={{user `github_api_pat`}}"
]
},
{
"type": "shell",
"inline": "mkdir -p ~/.fastlane/spaceship/{{user `xcode_install_user`}}"
},
{
"type": "file",
"source": "{{user `xcversion_auth_cookie`}}",
"destination": "~/.fastlane/spaceship/{{user `xcode_install_user`}}/cookie"
},
{
"type": "shell",
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} pwsh -f {{ .Path }}",

View File

@@ -44,6 +44,11 @@ variable "xcode_install_password" {
sensitive = true
}
variable "xcversion_auth_cookie" {
type = string
default = ""
}
variable "vcpu_count" {
type = string
default = "6"
@@ -183,6 +188,15 @@ build {
]
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}"
}
provisioner "shell" {
inline = [
"mkdir -p ~/.fastlane/spaceship/${var.xcode_install_user}"
]
}
provisioner "file" {
destination = "~/.fastlane/spaceship/${var.xcode_install_user}/cookie"
source = "${var.xcversion_auth_cookie}"
}
provisioner "shell" {
script = "./provision/core/xcode.ps1"
environment_vars = [

View File

@@ -14,6 +14,7 @@
"github_api_pat": null,
"xcode_install_user": null,
"xcode_install_password": null,
"xcversion_auth_cookie": null,
"image_os": "macos12"
},
"builders": [
@@ -166,6 +167,15 @@
"USER_PASSWORD={{user `vm_password`}}"
]
},
{
"type": "shell",
"inline": "mkdir -p ~/.fastlane/spaceship/{{user `xcode_install_user`}}"
},
{
"type": "file",
"source": "{{user `xcversion_auth_cookie`}}",
"destination": "~/.fastlane/spaceship/{{user `xcode_install_user`}}/cookie"
},
{
"type": "shell",
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} pwsh -f {{ .Path }}",

View File

@@ -44,6 +44,11 @@ variable "xcode_install_password" {
sensitive = true
}
variable "xcversion_auth_cookie" {
type = string
default = ""
}
variable "vcpu_count" {
type = string
default = "6"
@@ -177,6 +182,15 @@ build {
]
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}"
}
provisioner "shell" {
inline = [
"mkdir -p ~/.fastlane/spaceship/${var.xcode_install_user}"
]
}
provisioner "file" {
destination = "~/.fastlane/spaceship/${var.xcode_install_user}/cookie"
source = "${var.xcversion_auth_cookie}"
}
provisioner "shell" {
script = "./provision/core/xcode.ps1"
environment_vars = [

View File

@@ -44,6 +44,11 @@ variable "xcode_install_password" {
sensitive = true
}
variable "xcversion_auth_cookie" {
type = string
default = ""
}
variable "vcpu_count" {
type = string
default = "6"
@@ -177,6 +182,15 @@ build {
]
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}"
}
provisioner "shell" {
inline = [
"mkdir -p ~/.fastlane/spaceship/${var.xcode_install_user}"
]
}
provisioner "file" {
destination = "~/.fastlane/spaceship/${var.xcode_install_user}/cookie"
source = "${var.xcversion_auth_cookie}"
}
provisioner "shell" {
script = "./provision/core/xcode.ps1"
environment_vars = [