mirror of
https://github.com/actions/runner-images.git
synced 2025-12-29 21:42:55 +08:00
263 lines
9.5 KiB
JSON
263 lines
9.5 KiB
JSON
{
|
|
"variables": {
|
|
"vcenter_server": null,
|
|
"vcenter_username": null,
|
|
"vcenter_password": null,
|
|
"vcenter_datacenter": null,
|
|
"cluster_or_esxi_host": null,
|
|
"esxi_datastore": null,
|
|
"build_id": null,
|
|
"baseimage_name": null,
|
|
"output_folder": null,
|
|
"vm_username": null,
|
|
"vm_password": null,
|
|
"github_api_pat": null,
|
|
"xcode_install_storage_url": null,
|
|
"xcode_install_sas": null,
|
|
"image_os": "macos12"
|
|
},
|
|
"builders": [
|
|
{
|
|
"type": "vsphere-clone",
|
|
"vcenter_server": "{{user `vcenter_server`}}",
|
|
"username": "{{user `vcenter_username`}}",
|
|
"password": "{{user `vcenter_password`}}",
|
|
"insecure_connection": true,
|
|
"datacenter": "{{ user `vcenter_datacenter` }}",
|
|
"template": "{{ user `baseimage_name` }}",
|
|
"folder": "{{user `output_folder` }}",
|
|
"host": "{{user `cluster_or_esxi_host`}}",
|
|
"datastore": "{{user `esxi_datastore`}}",
|
|
"vm_name": "{{user `build_id`}}",
|
|
"ssh_username": "{{user `vm_username`}}",
|
|
"ssh_password": "{{user `vm_password`}}",
|
|
"CPUs": "5",
|
|
"cpu_cores": "5",
|
|
"RAM": "24576",
|
|
"NestedHV": "true",
|
|
"shutdown_timeout": "15m"
|
|
}
|
|
],
|
|
"provisioners": [
|
|
{
|
|
"type": "shell",
|
|
"inline": "mkdir ~/image-generation"
|
|
},
|
|
{
|
|
"type": "file",
|
|
"sources": [
|
|
"./assets/xamarin-selector",
|
|
"./scripts/tests",
|
|
"./scripts/docs-gen",
|
|
"./scripts/helpers"
|
|
],
|
|
"destination": "~/image-generation/"
|
|
},
|
|
{
|
|
"type": "file",
|
|
"source": "../../helpers/software-report-base",
|
|
"destination": "~/image-generation/docs-gen/"
|
|
},
|
|
{
|
|
"type": "file",
|
|
"source": "./assets/add-certificate.swift",
|
|
"destination": "~/image-generation/add-certificate.swift"
|
|
},
|
|
{
|
|
"type": "file",
|
|
"source": "./assets/bashrc",
|
|
"destination": "~/.bashrc"
|
|
},
|
|
{
|
|
"type": "file",
|
|
"source": "./assets/bashprofile",
|
|
"destination": "~/.bash_profile"
|
|
},
|
|
{
|
|
"type": "file",
|
|
"source": "./assets/bootstrap-provisioner",
|
|
"destination": "~/bootstrap"
|
|
},
|
|
{
|
|
"type": "file",
|
|
"source": "./toolsets/toolset-12.json",
|
|
"destination": "~/image-generation/toolset.json"
|
|
},
|
|
{
|
|
"type": "shell",
|
|
"inline": [
|
|
"mv ~/image-generation/docs-gen ~/image-generation/software-report",
|
|
"mv ~/image-generation/xamarin-selector ~/image-generation/assets",
|
|
"mkdir ~/utils",
|
|
"mv ~/image-generation/helpers/confirm-identified-developers.scpt ~/utils",
|
|
"mv ~/image-generation/helpers/invoke-tests.sh ~/utils",
|
|
"mv ~/image-generation/helpers/utils.sh ~/utils",
|
|
"mv ~/image-generation/helpers/xamarin-utils.sh ~/utils"
|
|
],
|
|
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
|
|
},
|
|
{
|
|
"type": "shell",
|
|
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}",
|
|
"scripts": [
|
|
"./scripts/build/xcode-clt.sh",
|
|
"./scripts/build/homebrew.sh"
|
|
]
|
|
},
|
|
{
|
|
"type": "shell",
|
|
"execute_command": "chmod +x {{ .Path }}; sudo {{ .Vars }} {{ .Path }}",
|
|
"scripts": [
|
|
"./scripts/build/add-network-interface-detection.sh",
|
|
"./scripts/build/autologin.sh",
|
|
"./scripts/build/disable-auto-updates.sh",
|
|
"./scripts/build/screensaver-off.sh",
|
|
"./scripts/build/ntpconf.sh",
|
|
"./scripts/build/max-files.sh",
|
|
"./scripts/build/shell-change.sh"
|
|
],
|
|
"environment_vars": [
|
|
"PASSWORD={{user `vm_password`}}",
|
|
"USERNAME={{user `vm_username`}}"
|
|
]
|
|
},
|
|
{
|
|
"type": "shell",
|
|
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}",
|
|
"scripts": [
|
|
"./scripts/build/preimagedata.sh",
|
|
"./scripts/build/configure-ssh.sh",
|
|
"./scripts/build/configure-machine.sh"
|
|
],
|
|
"environment_vars": [
|
|
"IMAGE_VERSION={{user `build_id`}}",
|
|
"IMAGE_OS={{user `image_os`}}",
|
|
"PASSWORD={{user `vm_password`}}"
|
|
]
|
|
},
|
|
{
|
|
"type": "shell",
|
|
"execute_command": "chmod +x {{ .Path }}; sudo {{ .Vars }} {{ .Path }}",
|
|
"script": "./scripts/build/reboot.sh",
|
|
"expect_disconnect": true
|
|
},
|
|
{
|
|
"type": "shell",
|
|
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}",
|
|
"pause_before": "30s",
|
|
"scripts": [
|
|
"./scripts/build/open_windows_check.sh",
|
|
"./scripts/build/powershell.sh",
|
|
"./scripts/build/dotnet.sh",
|
|
"./scripts/build/python.sh",
|
|
"./scripts/build/azcopy.sh",
|
|
"./scripts/build/openssl.sh",
|
|
"./scripts/build/ruby.sh",
|
|
"./scripts/build/rubygem.sh",
|
|
"./scripts/build/git.sh",
|
|
"./scripts/build/mongodb.sh",
|
|
"./scripts/build/node.sh",
|
|
"./scripts/build/commonutils.sh"
|
|
],
|
|
"environment_vars": [
|
|
"API_PAT={{user `github_api_pat`}}",
|
|
"USER_PASSWORD={{user `vm_password`}}"
|
|
]
|
|
},
|
|
{
|
|
"type": "shell",
|
|
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} pwsh -f {{ .Path }}",
|
|
"script": "./scripts/build/xcode.ps1",
|
|
"environment_vars": [
|
|
"XCODE_INSTALL_STORAGE_URL={{user `xcode_install_storage_url`}}",
|
|
"XCODE_INSTALL_SAS={{user `xcode_install_sas`}}"
|
|
]
|
|
},
|
|
{
|
|
"type": "shell",
|
|
"execute_command": "chmod +x {{ .Path }}; sudo {{ .Vars }} {{ .Path }}",
|
|
"script": "./scripts/build/reboot.sh",
|
|
"expect_disconnect": true
|
|
},
|
|
{
|
|
"type": "shell",
|
|
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}",
|
|
"scripts": [
|
|
"./scripts/build/action-archive-cache.sh",
|
|
"./scripts/build/llvm.sh",
|
|
"./scripts/build/golang.sh",
|
|
"./scripts/build/swiftlint.sh",
|
|
"./scripts/build/openjdk.sh",
|
|
"./scripts/build/php.sh",
|
|
"./scripts/build/aws.sh",
|
|
"./scripts/build/rust.sh",
|
|
"./scripts/build/gcc.sh",
|
|
"./scripts/build/haskell.sh",
|
|
"./scripts/build/cocoapods.sh",
|
|
"./scripts/build/android-toolsets.sh",
|
|
"./scripts/build/xamarin.sh",
|
|
"./scripts/build/vsmac.sh",
|
|
"./scripts/build/nvm.sh",
|
|
"./scripts/build/apache.sh",
|
|
"./scripts/build/nginx.sh",
|
|
"./scripts/build/postgresql.sh",
|
|
"./scripts/build/audiodevice.sh",
|
|
"./scripts/build/vcpkg.sh",
|
|
"./scripts/build/miniconda.sh",
|
|
"./scripts/build/safari.sh",
|
|
"./scripts/build/chrome.sh",
|
|
"./scripts/build/edge.sh",
|
|
"./scripts/build/firefox.sh",
|
|
"./scripts/build/pypy.sh",
|
|
"./scripts/build/pipx-packages.sh",
|
|
"./scripts/build/bicep.sh",
|
|
"./scripts/build/codeql-bundle.sh"
|
|
],
|
|
"environment_vars": [
|
|
"API_PAT={{user `github_api_pat`}}"
|
|
]
|
|
},
|
|
{
|
|
"type": "shell",
|
|
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} pwsh -f {{ .Path }}",
|
|
"scripts": [
|
|
"./scripts/build/toolset.ps1",
|
|
"./scripts/build/configure-toolset.ps1"
|
|
]
|
|
},
|
|
{
|
|
"type": "shell",
|
|
"execute_command": "ruby {{ .Path }}",
|
|
"scripts": [
|
|
"./scripts/build/delete-duplicate-sims.rb"
|
|
]
|
|
},
|
|
{
|
|
"type": "shell",
|
|
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} pwsh -f {{ .Path }}",
|
|
"script": "./scripts/build/fix-xcode-simulators.ps1"
|
|
},
|
|
{
|
|
"type": "shell",
|
|
"inline": [
|
|
"pwsh -File \"$HOME/image-generation/software-report/SoftwareReport.Generator.ps1\" -OutputDirectory \"$HOME/image-generation/output/software-report\" -ImageName {{user `build_id`}}",
|
|
"pwsh -File \"$HOME/image-generation/tests/RunAll-Tests.ps1\""
|
|
]
|
|
},
|
|
{
|
|
"type": "file",
|
|
"direction": "download",
|
|
"source": "~/image-generation/output/*",
|
|
"destination": "../image-output/"
|
|
},
|
|
{
|
|
"type": "shell",
|
|
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}",
|
|
"scripts": [
|
|
"./scripts/build/configure-hostname.sh",
|
|
"./scripts/build/finalize-vm.sh"
|
|
]
|
|
}
|
|
]
|
|
}
|