Make sure `/Users/runner` exists in `xcode` variant (#152)
A follow-up to #145. It seems right now only base variant preserves the symlink. `xcode` and `runner` are missing it and my guess it's due to disk resizing. This change adds a validation script, so we verify `/Users/runner` folder exists in every variant.
This commit is contained in:
parent
d594e1add0
commit
6f7ef84825
|
|
@ -21,5 +21,5 @@ packer build -var macos_version=sonoma templates/base.pkr.hcl
|
|||
## Building Xcode Image
|
||||
|
||||
```bash
|
||||
packer build -var macos_version=sonoma -var xcode_version=15.3 templates/xcode.pkr.hcl
|
||||
packer build -var macos_version=sonoma -var xcode_version="[15.3]" templates/xcode.pkr.hcl
|
||||
```
|
||||
|
|
@ -121,4 +121,12 @@ build {
|
|||
provisioner "shell" {
|
||||
script = "scripts/automationmodetool.expect"
|
||||
}
|
||||
|
||||
// some other health checks
|
||||
provisioner "shell" {
|
||||
inline = [
|
||||
"source ~/.zprofile",
|
||||
"test -d /Users/runner"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,6 +60,13 @@ build {
|
|||
script = "scripts/install-actions-runner.sh"
|
||||
}
|
||||
|
||||
// make sure our workaround from base is still valid
|
||||
provisioner "shell" {
|
||||
inline = [
|
||||
"sudo ln -s /Users/admin /Users/runner || true"
|
||||
]
|
||||
}
|
||||
|
||||
provisioner "shell" {
|
||||
inline = [
|
||||
"source ~/.zprofile",
|
||||
|
|
@ -158,7 +165,7 @@ build {
|
|||
]
|
||||
}
|
||||
|
||||
// check there is at least 20GB of free space and fail if not
|
||||
// check there is at least 15GB of free space and fail if not
|
||||
provisioner "shell" {
|
||||
inline = [
|
||||
"source ~/.zprofile",
|
||||
|
|
@ -167,4 +174,12 @@ build {
|
|||
"[[ $FREE_MB -gt 15000 ]] && echo OK || exit 1"
|
||||
]
|
||||
}
|
||||
|
||||
// some other health checks
|
||||
provisioner "shell" {
|
||||
inline = [
|
||||
"source ~/.zprofile",
|
||||
"test -d /Users/runner"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue