early-access version 2853

This commit is contained in:
pineappleEA
2022-07-23 03:01:36 +02:00
parent 1f2b5081b5
commit 1f111bb69c
8955 changed files with 418777 additions and 999 deletions

View File

@@ -0,0 +1,35 @@
require 'json'
configuration = JSON.parse(File.read("#{__dir__}/vagrant-box-configuration.json"))
Vagrant.configure('2') do |config|
config.vm.box = 'vcpkg/macos-base'
config.vm.synced_folder '.', '/Users/vagrant/shared'
config.vm.provision 'shell',
run: 'once',
name: 'Install Xcode Command Line Tools: attach dmg file',
inline: 'hdiutil attach shared/clt.dmg -mountpoint /Volumes/setup-installer',
privileged: false
config.vm.provision 'shell',
run: 'once',
name: 'Install Xcode Command Line Tools: run installer',
inline: 'installer -pkg "/Volumes/setup-installer/Command Line Tools.pkg" -target /',
privileged: true
config.vm.provision 'shell',
run: 'once',
name: 'Install XCode Command Line Tools: detach dmg file',
inline: 'hdiutil detach /Volumes/setup-installer',
privileged: false
config.vm.provision 'shell',
run: 'once',
name: 'Install brew',
inline: '/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"',
privileged: false
config.vm.provision 'shell',
run: 'once',
name: 'Install brew applications',
inline: "brew install #{configuration['brew'].join(' ')} && brew install --cask #{configuration['brew-cask'].join(' ')}",
privileged: false
end

View File

@@ -0,0 +1,67 @@
require 'json'
configuration = JSON.parse(File.read("#{__dir__}/vagrant-configuration.json"))
server = {
:machine_name => configuration['machine_name'],
:box => configuration['box_name'],
:box_version => configuration['box_version'],
:ram => 24000,
:cpu => 11
}
azure_agent_url = 'https://vstsagentpackage.azureedge.net/agent/2.198.3/vsts-agent-osx-x64-2.198.3.tar.gz'
devops_url = configuration['devops_url']
agent_pool = configuration['agent_pool']
pat = configuration['pat']
Vagrant.configure('2') do |config|
config.vm.box = server[:box]
config.vm.box_version = server[:box_version]
config.vm.synced_folder '.', '/vagrant', disabled: true
config.vm.provider 'parallels' do |prl|
prl.memory = server[:ram]
prl.cpus = server[:cpu]
end
config.vm.provision 'shell',
run: 'once',
name: 'Create the data directory',
inline: "mkdir ~/Data",
privileged: false
config.vm.provision 'shell',
run: 'once',
name: 'Download azure agent',
inline: "curl -s -o ~/Downloads/azure-agent.tar.gz #{azure_agent_url}",
privileged: false
config.vm.provision 'shell',
run: 'once',
name: 'Unpack azure agent',
inline: 'mkdir myagent; cd myagent; tar xf ~/Downloads/azure-agent.tar.gz',
privileged: false
config.vm.provision 'shell',
run: 'once',
name: 'Add VM to azure agent pool',
inline: "cd ~/myagent;\
./config.sh --unattended \
--url #{devops_url} \
--work ~/Data/work \
--auth pat --token #{pat} \
--pool #{agent_pool} \
--agent #{server[:machine_name]} \
--replace \
--acceptTeeEula",
privileged: false
# Start listening for jobs
config.vm.provision 'shell',
run: 'always',
name: 'Start running azure pipelines',
inline: 'cd /Users/vagrant/myagent;\
nohup ./run.sh&',
privileged: false
end

View File

@@ -0,0 +1,53 @@
{
"$schema": "./installables.schema.json",
"Applications": [
{
"Name": "vagrant",
"VersionCommand": [ "vagrant", "-v" ],
"VersionRegex": "Vagrant (.*)",
"Version": "2.2.19",
"DmgUrl": "https://releases.hashicorp.com/vagrant/2.2.19/vagrant_2.2.19_x86_64.dmg",
"Sha256": "6307BE217813A11C9E106448BF232803031E434A08C8B2DF8C62FDC9E8543845",
"InstallerPath": "vagrant.pkg"
},
{
"Name": "Parallels",
"VersionCommand": [ "cat", "/Applications/Parallels Desktop.app/Contents/Info.plist" ],
"VersionRegex": "<key>CFBundleShortVersionString</key>[\\n\\t ]*<string>([0-9.]+)</string>",
"Version": "17.1.1",
"DmgUrl": "https://download.parallels.com/desktop/v17/17.1.1-51537/ParallelsDesktop-17.1.1-51537.dmg",
"Sha256": "BD7BE2DF4D1B3508C127CF1D9C1EF93CDDA63384BCF3893A77FBC9F1169765A9",
"InstallationCommands": [
[ "bash", "-c", "ps x | grep 'Parallels Desktop' | grep -v 'grep' | sed -E 's/^ *([0-9]+).*(\\/Applications.*)$/\\1: \\2/'" ],
[ "bash", "-c", "ps x | grep 'Parallels Desktop' | grep -v 'grep' | sed -E 's/^ *([0-9]+).*$/\\1/' | xargs -p kill" ],
[ "sudo", "rm", "-rf", "/Applications/Parallels Desktop.app" ],
[ "sudo", "cp", "-r", "/Volumes/setup-installer/Parallels Desktop.app", "/Applications" ],
[ "sudo", "/Applications/Parallels Desktop.app/Contents/MacOS/inittool2", "init", "-b", "/Applications/Parallels Desktop.app" ]
]
},
{
"Name": "osxfuse",
"VersionCommand": [ "cat", "/Library/Filesystems/macfuse.fs/Contents/version.plist" ],
"VersionRegex": "<key>CFBundleVersion</key>[\\n\\t ]*<string>([0-9.]+)</string>",
"Version": "4.2.4",
"DmgUrl": "https://github.com/osxfuse/osxfuse/releases/download/macfuse-4.2.4/macfuse-4.2.4.dmg",
"Sha256": "82A2C30B3A7BF56AA2755C0C192FB50D9EECC3FE42505AB4E8679B50306188BD",
"InstallerPath": "Install macFUSE.pkg"
},
{
"Name": "sshfs",
"VersionCommand": [ "sshfs", "--version" ],
"VersionRegex": "SSHFS version [0-9.]* \\(OSXFUSE SSHFS (.*)\\)",
"Version": "2.5.0",
"PkgUrl": "https://github.com/osxfuse/sshfs/releases/download/osxfuse-sshfs-2.5.0/sshfs-2.5.0.pkg",
"Sha256": "F8F4F71814273EA42DBE6CD92199F7CFF418571FFD1B10C0608878D3472D2162"
}
],
"VagrantPlugins": [
{
"Name": "vagrant-parallels",
"Version": "2.2.4"
}
]
}

View File

@@ -0,0 +1,66 @@
{
"$schema": "https://json-schema.org/draft-07/schema",
"type": "object",
"definitions": {
"sha256": {
"type": "string",
"pattern": "[A-Z0-9]{64}"
}
},
"required": [
"Applications",
"VagrantPlugins"
],
"properties": {
"Applications": {
"type": "array",
"items": {
"type": "object",
"properties": {
"Name": {
"type": "string"
},
"VersionCommand": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 1
},
"VersionRegex": {
"type": "string",
"format": "regex"
},
"Version": {
"type": "string"
},
"DmgUrl": {
"type": "string",
"format": "uri"
},
"Sha256": {
"$ref": "#/definitions/sha256"
},
"InstallerPath": {
"type": "string"
}
}
}
},
"VagrantPlugins": {
"type": "array",
"items": {
"type": "object",
"required": [ "Name", "Version" ],
"properties": {
"Name": {
"type": "string"
},
"Version": {
"type": "string"
}
}
}
}
}
}

View File

@@ -0,0 +1,25 @@
{
"$schema": "./vagrant-box-configuration.schema.json",
"brew": [
"autoconf-archive",
"autoconf",
"automake",
"bison",
"cmake",
"gettext",
"gfortran",
"gperf",
"gtk-doc",
"libtool",
"meson",
"mono",
"nasm",
"ninja",
"pkg-config",
"texinfo",
"yasm"
],
"brew-cask": [
"powershell"
]
}

View File

@@ -0,0 +1,18 @@
{
"$schema": "https://json-schema.org/draft-07/schema",
"type": "object",
"required": [
"brew",
"brew-cask"
],
"properties": {
"brew": {
"type": "array",
"items": { "type": "string" }
},
"brew-cask": {
"type": "array",
"items": { "type": "string" }
}
}
}

View File

@@ -0,0 +1,35 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"type": "object",
"required": [
"pat",
"agent_pool",
"devops_url",
"machine_name",
"box_name",
"box_version"
],
"properties": {
"pat": {
"type": "string"
},
"agent_pool": {
"type": "string"
},
"devops_url": {
"type": "string"
},
"machine_name": {
"type": "string"
},
"box_name": {
"type": "string"
},
"box_version": {
"type": "string"
}
}
}