[macOS] Rename build scripts (#8887)

Co-authored-by: Alexey Ayupov <“alexey.ayupov@akvelon.com”>
This commit is contained in:
Alexey-Ayupov
2023-11-28 02:25:03 +01:00
committed by GitHub
parent e1e621e78c
commit 5e82420a74
100 changed files with 764 additions and 515 deletions

View File

@@ -1,9 +1,10 @@
################################################################################ ################################################################################
## File: toolset.ps1 ## File: Install-Toolset.ps1
## Team: CI-Build ## Team: CI-Build
## Desc: Install toolset ## Desc: Install toolset
################################################################################ ################################################################################
Import-Module "~/image-generation/helpers/Tests.Helpers.psm1"
Import-Module "~/image-generation/tests/Helpers.psm1"
Import-Module "~/image-generation/helpers/Common.Helpers.psm1" Import-Module "~/image-generation/helpers/Common.Helpers.psm1"
Function Install-Asset { Function Install-Asset {
@@ -55,4 +56,4 @@ foreach ($tool in $tools) {
} }
} }
Invoke-PesterTests "Toolcache" Invoke-PesterTests "Toolcache"

View File

@@ -1,3 +1,8 @@
################################################################################
## File: Install-Xcode.ps1
## Desc: Install Xcode
################################################################################
$ErrorActionPreference = "Stop" $ErrorActionPreference = "Stop"
Import-Module "$env:HOME/image-generation/helpers/Common.Helpers.psm1" Import-Module "$env:HOME/image-generation/helpers/Common.Helpers.psm1"

View File

@@ -1,3 +1,8 @@
################################################################################
## File: Update-XcodeSimulators.ps1
## Desc: Check available Xcode simulators and create missing ones
################################################################################
$ErrorActionPreference = "Stop" $ErrorActionPreference = "Stop"
Import-Module "$env:HOME/image-generation/helpers/Xcode.Helpers.psm1" -DisableNameChecking Import-Module "$env:HOME/image-generation/helpers/Xcode.Helpers.psm1" -DisableNameChecking
@@ -48,4 +53,4 @@ Get-XcodeInfoList | Out-Null
Write-Host "Validating and fixing Xcode simulators..." Write-Host "Validating and fixing Xcode simulators..."
Get-BrokenXcodeSimulatorsList | ForEach-Object { Get-BrokenXcodeSimulatorsList | ForEach-Object {
Ensure-SimulatorInstalled -RuntimeId $_.RuntimeId -DeviceId $_.DeviceId -SimulatorName $_.SimulatorName -XcodeVersion $_.XcodeVersion Ensure-SimulatorInstalled -RuntimeId $_.RuntimeId -DeviceId $_.DeviceId -SimulatorName $_.SimulatorName -XcodeVersion $_.XcodeVersion
} }

View File

@@ -1,8 +0,0 @@
#!/bin/bash -e -o pipefail
source ~/utils/utils.sh
brew_smart_install httpd
sudo sed -Ei '' 's/Listen .*/Listen 80/' $(brew --prefix)/etc/httpd/httpd.conf
invoke_tests "WebServers" "Apache"

View File

@@ -1,9 +0,0 @@
#!/bin/bash -e -o pipefail
source ~/utils/utils.sh
echo Installing bicep cli...
brew tap azure/bicep
brew_smart_install bicep
invoke_tests "Common" "Bicep"

View File

@@ -1,7 +0,0 @@
#!/bin/bash -e -o pipefail
###########################################################################
# The script removes local Homebrew cache
#
###########################################################################
rm -rf "$(brew --cache)"

View File

@@ -1,8 +1,11 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: configure-auto-updates.sh
## Desc: Disabling automatic updates
################################################################################
# Disabling automatic updates
sudo softwareupdate --schedule off sudo softwareupdate --schedule off
defaults write com.apple.SoftwareUpdate AutomaticDownload -int 0 defaults write com.apple.SoftwareUpdate AutomaticDownload -int 0
defaults write com.apple.SoftwareUpdate CriticalUpdateInstall -int 0 defaults write com.apple.SoftwareUpdate CriticalUpdateInstall -int 0
defaults write com.apple.commerce AutoUpdate -bool false defaults write com.apple.commerce AutoUpdate -bool false
defaults write com.apple.SoftwareUpdate AutomaticCheckEnabled -bool false defaults write com.apple.SoftwareUpdate AutomaticCheckEnabled -bool false

View File

@@ -1,7 +1,10 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
# This script was taken from https://github.com/timsutton/osx-vm-templates/blob/master/scripts/autologin.sh ## File: configure-autologin.sh
# Distributed by MIT license, license can be found at the bottom of this script ## Desc: add a Daemon to re-detect the attached network interfaces after vm is booted.
## Maintainer: @timsutton
## script was taken from https://github.com/timsutton/osx-vm-templates/blob/master/scripts/autologin.sh
################################################################################
echo "Enabling automatic GUI login for the '$USERNAME' user.." echo "Enabling automatic GUI login for the '$USERNAME' user.."
@@ -15,4 +18,4 @@ Copyright (c) 2013-2017 Timothy Sutton
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
' '

View File

@@ -1,6 +1,10 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: configure-hostname.sh
## Desc: Change the hostname at startup to prevent duplicates
## Hostname and Computername should contain .local in name to avoid name resolution issues
################################################################################
# Add script for changing hostname to run on startup to prevent duplicate hostnames across the environment. Hostname and Computername should contain .local in name to avoid name resolution issues
tee -a /usr/local/bin/change_hostname.sh > /dev/null <<\EOF tee -a /usr/local/bin/change_hostname.sh > /dev/null <<\EOF
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
@@ -25,4 +29,4 @@ sudo tee -a /Library/LaunchDaemons/change_hostname.plist > /dev/null <<\EOF
<true/> <true/>
</dict> </dict>
</plist> </plist>
EOF EOF

View File

@@ -1,4 +1,8 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: configure-machine.sh
## Desc: Configure guest OS settings
################################################################################
source ~/utils/utils.sh source ~/utils/utils.sh

View File

@@ -1,4 +1,8 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: configure-max-files-limitation.sh
## Desc: Configure max files limitation
################################################################################
Launch_Daemons="/Library/LaunchDaemons" Launch_Daemons="/Library/LaunchDaemons"
@@ -39,4 +43,3 @@ chmod 0644 "${Launch_Daemons}/limit.maxfiles.plist"
echo "Done, limit.maxfiles has been updated" echo "Done, limit.maxfiles has been updated"

View File

@@ -1,11 +1,11 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: configure-network-interface-detection.sh
## Desc: add a Daemon to re-detect the attached network interfaces after vm is booted.
## Maintainer: @timsutton
## script was taken from https://github.com/timsutton/osx-vm-templates/blob/master/scripts/add-network-interface-detection.sh
################################################################################
# This script was taken from https://github.com/timsutton/osx-vm-templates/blob/master/scripts/add-network-interface-detection.sh
# Distributed by MIT license, license can be found at the bottom of this script
# This script adds a Mac OS Launch Daemon, which runs every time the
# machine is booted. The daemon will re-detect the attached network
# interfaces. If this is not done, network devices may not work.
PLIST=/Library/LaunchDaemons/sonoma.detectnewhardware.plist PLIST=/Library/LaunchDaemons/sonoma.detectnewhardware.plist
cat <<EOF > "${PLIST}" cat <<EOF > "${PLIST}"
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
@@ -37,4 +37,4 @@ Copyright (c) 2013-2017 Timothy Sutton
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
' '

View File

@@ -1,4 +1,8 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: configure-ntpconf.sh
## Desc: Configure NTP servers and set the timezone to UTC
################################################################################
echo Additional NTP servers adding into /etc/ntp.conf file... echo Additional NTP servers adding into /etc/ntp.conf file...
cat > /etc/ntp.conf << EOF cat > /etc/ntp.conf << EOF

View File

@@ -1,4 +1,8 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: configure-preimagedata.sh
## Desc: Configure data used in the image
################################################################################
source ~/utils/utils.sh source ~/utils/utils.sh

View File

@@ -1,4 +1,8 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: configure-screensaver.sh
## Desc: Configure screensaver
################################################################################
# set screensaver idleTime to 0, to prevent turning screensaver on # set screensaver idleTime to 0, to prevent turning screensaver on
macUUID=`ioreg -rd1 -c IOPlatformExpertDevice | grep -i "UUID" | cut -c27-62` macUUID=`ioreg -rd1 -c IOPlatformExpertDevice | grep -i "UUID" | cut -c27-62`

View File

@@ -1,4 +1,8 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: configure-shell.sh
## Desc: Configure shell to use bash
################################################################################
source ~/utils/utils.sh source ~/utils/utils.sh
arch=$(get_arch) arch=$(get_arch)
@@ -11,4 +15,4 @@ sudo chsh -s /bin/bash root
if [[ $arch == "arm64" ]]; then if [[ $arch == "arm64" ]]; then
echo "Adding Homebrew environment to bash" echo "Adding Homebrew environment to bash"
/opt/homebrew/bin/brew shellenv >> ~/.bashrc /opt/homebrew/bin/brew shellenv >> ~/.bashrc
fi fi

View File

@@ -1,4 +1,8 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: configure-ssh.sh
## Desc: Configure ssh
################################################################################
[[ ! -d ~/.ssh ]] && mkdir ~/.ssh 2>/dev/null [[ ! -d ~/.ssh ]] && mkdir ~/.ssh 2>/dev/null
chmod 777 ~/.ssh chmod 777 ~/.ssh

View File

@@ -1,4 +1,8 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: configure-system.sh
## Desc: Post deployment system configuration actions
################################################################################
source ~/utils/utils.sh source ~/utils/utils.sh

View File

@@ -1,6 +1,8 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
# This script adds permissions, which are required for some installed tools to work properly, to the TCC.db ## File: configure-tccdb-macos.sh
## Desc: Configure permissions to the TCC.db
################################################################################
source ~/utils/utils.sh source ~/utils/utils.sh

View File

@@ -1,4 +1,8 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: configure-windows.sh
## Desc: Close open windows
################################################################################
source ~/utils/utils.sh source ~/utils/utils.sh

View File

@@ -1,51 +1,40 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
################################################################################
# What is this for? ## File: configure-xcode-simulators.rb
# This script fixes an issue appeared for some Xcode users where it would show long identifiers ## Desc: List all simulators, find duplicate type and delete them.
# in the list of simulators instead of usual short names. This is caused by duplicate simulators ## Maintainer: @vlas-voloshin
# being sometimes created after switching between Xcode versions, with the same ## script was taken from https://gist.github.com/vlas-voloshin/f9982128200345cd3fb7
# device type + runtime pair occurring more than once in your list of available simulators. ################################################################################
# Instead of showing the same simulator name twice, Xcode defaults to simulator identifiers.
#
# What it does?
# The script queries Xcode's `simctl` utility for all simulators you have, finds duplicate type + runtime pairs,
# and offers you to delete them. After that, Xcode should return to displaying the list of simulators normally.
# When searching for duplicates, the script sorts simulators by their creation time to make sure it deletes
# the copy that was created more recently.
#
# License
# This script was taken from https://gist.github.com/vlas-voloshin/f9982128200345cd3fb7 and some modifications made
# Distributed by MIT license, license can be found at the bottom of this script
class SimDevice class SimDevice
attr_accessor :runtime attr_accessor :runtime
attr_accessor :name attr_accessor :name
attr_accessor :identifier attr_accessor :identifier
attr_accessor :timestamp attr_accessor :timestamp
def initialize(runtime, name, identifier, timestamp) def initialize(runtime, name, identifier, timestamp)
@runtime = runtime @runtime = runtime
@name = name @name = name
@identifier = identifier @identifier = identifier
@timestamp = timestamp @timestamp = timestamp
end end
def to_s def to_s
return "#{@name} - #{@runtime} (#{@identifier}) [#{@timestamp}]" return "#{@name} - #{@runtime} (#{@identifier}) [#{@timestamp}]"
end end
def equivalent_to_device(device) def equivalent_to_device(device)
return @runtime == device.runtime && @name == device.name return @runtime == device.runtime && @name == device.name
end end
end end
# Executes a shell command and returns the result from stdout # Executes a shell command and returns the result from stdout
def execute_simctl_command(command) def execute_simctl_command(command)
return %x[xcrun simctl #{command}] return %x[xcrun simctl #{command}]
end end
# Retrieves the creation date/time of simulator with specified identifier # Retrieves the creation date/time of simulator with specified identifier
def simulator_creation_date(identifier) def simulator_creation_date(identifier)
directory = Dir.home() + "/Library/Developer/CoreSimulator/Devices/" + identifier directory = Dir.home() + "/Library/Developer/CoreSimulator/Devices/" + identifier
@@ -60,14 +49,14 @@ class SimDevice
return Time.now return Time.now
end end
end end
# Deletes specified simulator # Deletes specified simulator
def delete_device(device) def delete_device(device)
execute_simctl_command("delete #{device.identifier}") execute_simctl_command("delete #{device.identifier}")
end end
puts("Searching for simulators...") puts("Searching for simulators...")
# Retrieve the list of existing simulators # Retrieve the list of existing simulators
devices = [] devices = []
runtime = "" runtime = ""
@@ -87,10 +76,10 @@ class SimDevice
devices.push(device) devices.push(device)
end end
end end
# Sort the simulators by their creation timestamp, ascending # Sort the simulators by their creation timestamp, ascending
devices = devices.sort { |a, b| a.timestamp <=> b.timestamp } devices = devices.sort { |a, b| a.timestamp <=> b.timestamp }
duplicates = {} duplicates = {}
# Enumerate all devices except for the last one # Enumerate all devices except for the last one
for i in 0..devices.count-2 for i in 0..devices.count-2
@@ -106,12 +95,12 @@ class SimDevice
end end
end end
end end
if duplicates.count == 0 if duplicates.count == 0
puts("You don't have duplicate simulators!") puts("You don't have duplicate simulators!")
exit() exit()
end end
puts("Looks like you have #{duplicates.count} duplicate simulator#{duplicates.count > 1 ? "s" : ""}:") puts("Looks like you have #{duplicates.count} duplicate simulator#{duplicates.count > 1 ? "s" : ""}:")
duplicates.each_pair do |duplicate, original| duplicates.each_pair do |duplicate, original|
puts puts
@@ -120,14 +109,14 @@ class SimDevice
puts("#{original}") puts("#{original}")
end end
puts puts
puts("Each duplicate was determined as the one created later than the 'original'.") puts("Each duplicate was determined as the one created later than the 'original'.")
puts("Deleting...") puts("Deleting...")
duplicates.each_key do |duplicate| duplicates.each_key do |duplicate|
delete_device(duplicate) delete_device(duplicate)
end end
puts("Done!") puts("Done!")
=begin =begin
@@ -152,4 +141,4 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. SOFTWARE.
=end =end

View File

@@ -1,13 +1,12 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: configure-xcode-symlinks.sh
## Desc: Link the existing Xcodes into the correct location for provisionator.
## This is maintained for backwards compatibility only. Do not add new xcodes here.
################################################################################
source ~/utils/utils.sh source ~/utils/utils.sh
# Link the existing Xcodes into the correct location for provisionator.
# These symlinks are necessary for Xamarin team to make sure that xamarin-provisionator can find them.
# Old style provisionator directories. This is maintained for
# backwards compatibility only. Do not add new xcodes here.
ln -sf /Applications/Xcode_8.app /Applications/Xcode8.app ln -sf /Applications/Xcode_8.app /Applications/Xcode8.app
ln -sf /Applications/Xcode_8.1.app /Applications/Xcode81.app ln -sf /Applications/Xcode_8.1.app /Applications/Xcode81.app
ln -sf /Applications/Xcode_9.app /Applications/Xcode9.app ln -sf /Applications/Xcode_9.app /Applications/Xcode9.app
@@ -17,4 +16,4 @@ ln -sf /Applications/Xcode_9.3.app /Applications/Xcode93.app
ln -sf /Applications/Xcode_9.3.app /Applications/Xcode_9.3_beta.app ln -sf /Applications/Xcode_9.3.app /Applications/Xcode_9.3_beta.app
ln -sf /Applications/Xcode_9.4.app /Applications/Xcode_9.4-beta.app ln -sf /Applications/Xcode_9.4.app /Applications/Xcode_9.4-beta.app
ln -sf /Applications/Xcode_9.4.app /Applications/Xcode_9.4_beta.app ln -sf /Applications/Xcode_9.4.app /Applications/Xcode_9.4_beta.app
ln -sf /Applications/Xcode_9.4.app /Applications/Xcode_9.4_beta_2.app ln -sf /Applications/Xcode_9.4.app /Applications/Xcode_9.4_beta_2.app

View File

@@ -1,4 +1,8 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: configure-xcode.sh
## Desc: Configure Xcode after installation
################################################################################
source ~/utils/utils.sh source ~/utils/utils.sh
XCODE_LIST=($(get_toolset_value '.xcode.versions | reverse | .[].link')) XCODE_LIST=($(get_toolset_value '.xcode.versions | reverse | .[].link'))

View File

@@ -1,9 +1,7 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################ ################################################################################
## File: action-archive-cache.sh ## File: install-actions-cache.sh
## Desc: Download latest release from https://github.com/actions/action-verions ## Desc: Download latest release from https://github.com/actions/action-versions
## and un-tar to $HOME/actionarchivecache
## Maintainer: #actions-runtime and @TingluoHuang ## Maintainer: #actions-runtime and @TingluoHuang
################################################################################ ################################################################################

View File

@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: install-android-sdk.sh
## Desc: Install Android SDK, NDK and tools
################################################################################
source ~/utils/utils.sh source ~/utils/utils.sh
function filter_components_by_version { function filter_components_by_version {

View File

@@ -0,0 +1,12 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-apache.sh
## Desc: Install Apache HTTP Server
################################################################################
source ~/utils/utils.sh
brew_smart_install httpd
sudo sed -Ei '' 's/Listen .*/Listen 80/' $(brew --prefix)/etc/httpd/httpd.conf
invoke_tests "WebServers" "Apache"

View File

@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: install-audiodevice.sh
## Desc: Install audio device
################################################################################
source ~/utils/utils.sh source ~/utils/utils.sh
echo "install switchaudio-osx" echo "install switchaudio-osx"

View File

@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: install-aws-tools.sh
## Desc: Install the AWS CLI, Session Manager plugin for the AWS CLI, and AWS SAM CLI
################################################################################
source ~/utils/utils.sh source ~/utils/utils.sh
echo Installing aws... echo Installing aws...

View File

@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: install-azcopy.sh
## Desc: Install AzCopy
################################################################################
source ~/utils/utils.sh source ~/utils/utils.sh
arch=$(get_arch) arch=$(get_arch)

View File

@@ -0,0 +1,13 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-bicep.sh
## Desc: Install bicep cli
################################################################################
source ~/utils/utils.sh
echo Installing bicep cli...
brew tap azure/bicep
brew_smart_install bicep
invoke_tests "Common" "Bicep"

View File

@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: install-chrome.sh
## Desc: Install chrome and chrome for testing browsers
################################################################################
source ~/utils/utils.sh source ~/utils/utils.sh
arch=$(get_arch) arch=$(get_arch)

View File

@@ -1,4 +1,8 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: install-cocoapods.sh
## Desc: Install Cocoapods
################################################################################
# Setup the Cocoapods # Setup the Cocoapods
echo "Installing Cocoapods..." echo "Installing Cocoapods..."

View File

@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: install-codeql-bundle.sh
## Desc: Install CodeQL bundle
################################################################################
source ~/utils/utils.sh source ~/utils/utils.sh
# Retrieve the CLI version of the latest CodeQL bundle. # Retrieve the CLI version of the latest CodeQL bundle.

View File

@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: install-common-utils.sh
## Desc: Install utils listed in toolset file
################################################################################
source ~/utils/utils.sh source ~/utils/utils.sh
# Download and install YQ in cases when it is not available in the formulae as for macOS 11: https://formulae.brew.sh/formula/yq # Download and install YQ in cases when it is not available in the formulae as for macOS 11: https://formulae.brew.sh/formula/yq

View File

@@ -1,11 +1,9 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: install-dotnet.sh
## Desc: Install dotnet
################################################################################
###########################################################################
# The main idea of this script is to automate dotnet installs
# Based on:
# https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script
#
###########################################################################
source ~/utils/utils.sh source ~/utils/utils.sh
export DOTNET_CLI_TELEMETRY_OPTOUT=1 export DOTNET_CLI_TELEMETRY_OPTOUT=1

View File

@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: install-edge.sh
## Desc: Install edge browser
################################################################################
source ~/utils/utils.sh source ~/utils/utils.sh
echo "Installing Microsoft Edge..." echo "Installing Microsoft Edge..."

View File

@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: install-firefox.sh
## Desc: Install firefox browser
################################################################################
source ~/utils/utils.sh source ~/utils/utils.sh
echo "Installing Firefox..." echo "Installing Firefox..."

View File

@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: install-gcc.sh
## Desc: Install GCC
################################################################################
source ~/utils/utils.sh source ~/utils/utils.sh
gccVersions=$(get_toolset_value '.gcc.versions | .[]') gccVersions=$(get_toolset_value '.gcc.versions | .[]')

View File

@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: install-git.sh
## Desc: Install Git and Git LFS
################################################################################
source ~/utils/utils.sh source ~/utils/utils.sh
echo Installing Git... echo Installing Git...

View File

@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: install-golang.sh
## Desc: Install Go
################################################################################
source ~/utils/utils.sh source ~/utils/utils.sh
DEFAULT_GO_VERSION=$(get_toolset_value '.go.default') DEFAULT_GO_VERSION=$(get_toolset_value '.go.default')
@@ -8,4 +13,4 @@ brew_smart_install "go@${DEFAULT_GO_VERSION}"
# Create symlinks to preserve backward compatibility. Symlinks are not created when non-latest go is being installed # Create symlinks to preserve backward compatibility. Symlinks are not created when non-latest go is being installed
ln -sf $(brew --prefix go@${DEFAULT_GO_VERSION})/bin/* /usr/local/bin/ ln -sf $(brew --prefix go@${DEFAULT_GO_VERSION})/bin/* /usr/local/bin/
invoke_tests "Common" "Go" invoke_tests "Common" "Go"

View File

@@ -1,4 +1,8 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: install-haskell.sh
## Desc: Install Haskell
################################################################################
source ~/utils/utils.sh source ~/utils/utils.sh

View File

@@ -1,4 +1,8 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: install-homebrew.sh
## Desc: Install Homebrew
################################################################################
source ~/utils/utils.sh source ~/utils/utils.sh
@@ -36,4 +40,4 @@ echo "Installing wget..."
brew_smart_install "wget" brew_smart_install "wget"
# init brew bundle feature # init brew bundle feature
brew tap Homebrew/bundle brew tap Homebrew/bundle

View File

@@ -0,0 +1,13 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-llvm.sh
## Desc: Install LLVM
################################################################################
source ~/utils/utils.sh
llvmVersion=$(get_toolset_value '.llvm.version')
brew_smart_install "llvm@${llvmVersion}"
invoke_tests "LLVM"

View File

@@ -1,4 +1,8 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: install-miniconda.sh
## Desc: Install Miniconda
################################################################################
source ~/utils/utils.sh source ~/utils/utils.sh

View File

@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: install-mongodb.sh
## Desc: Install MongoDB
################################################################################
source ~/utils/utils.sh source ~/utils/utils.sh
# MongoDB object-value database # MongoDB object-value database

View File

@@ -1,8 +1,7 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################ ################################################################################
## File: mono.sh ## File: install-mono.sh
## Desc: Installs Mono Framework ## Desc: Install Mono Framework
################################################################################ ################################################################################
# Source utility functions # Source utility functions

View File

@@ -0,0 +1,12 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-nginx.sh
## Desc: Install Nginx
################################################################################
source ~/utils/utils.sh
brew_smart_install nginx
sudo sed -Ei '' 's/listen.*/listen 80;/' $(brew --prefix)/etc/nginx/nginx.conf
invoke_tests "WebServers" "Nginx"

View File

@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: install-node.sh
## Desc: Install Node.js
################################################################################
source ~/utils/utils.sh source ~/utils/utils.sh
defaultVersion=$(get_toolset_value '.node.default') defaultVersion=$(get_toolset_value '.node.default')

View File

@@ -1,8 +1,9 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
########################################################################### ################################################################################
# The script installs node version manager with node versions 10,12 and 14 ## File: install-nvm.sh
# ## Desc: Install node version manager
########################################################################### ################################################################################
source ~/utils/utils.sh source ~/utils/utils.sh
[ -n "$API_PAT" ] && authString=(-H "Authorization: token ${API_PAT}") [ -n "$API_PAT" ] && authString=(-H "Authorization: token ${API_PAT}")

View File

@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: install-openjdk.sh
## Desc: Install openjdk
################################################################################
source ~/utils/utils.sh source ~/utils/utils.sh
createEnvironmentVariable() { createEnvironmentVariable() {

View File

@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: install-openssl.sh
## Desc: Install openssl
################################################################################
source ~/utils/utils.sh source ~/utils/utils.sh
echo "Install openssl@1.1" echo "Install openssl@1.1"

View File

@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: install-php.sh
## Desc: Install PHP
################################################################################
source ~/utils/utils.sh source ~/utils/utils.sh
echo Installing PHP echo Installing PHP

View File

@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: install-pipx-packages.sh
## Desc: Install Pipx Packages
################################################################################
source ~/utils/utils.sh source ~/utils/utils.sh
export PATH="$PATH:/opt/pipx_bin" export PATH="$PATH:/opt/pipx_bin"

View File

@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: install-postgresql.sh
## Desc: Install PostgreSQL
################################################################################
source ~/utils/utils.sh source ~/utils/utils.sh
# Fetch PostgreSQL version to install from the toolset # Fetch PostgreSQL version to install from the toolset

View File

@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: install-powershell.sh
## Desc: Install PowerShell
################################################################################
source ~/utils/utils.sh source ~/utils/utils.sh
echo Installing PowerShell... echo Installing PowerShell...

View File

@@ -1,7 +1,7 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################ ################################################################################
## File: pypy.sh ## File: install-pypy.sh
## Desc: Installs PyPy ## Desc: Install PyPy
################################################################################ ################################################################################
source ~/utils/utils.sh source ~/utils/utils.sh

View File

@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: install-python.sh
## Desc: Install Python
################################################################################
source ~/utils/utils.sh source ~/utils/utils.sh
echo "Installing Python Tooling" echo "Installing Python Tooling"

View File

@@ -0,0 +1,8 @@
#!/bin/bash -e -o pipefail
################################################################################
## File: install-rosetta.sh
## Desc: Install Rosetta
################################################################################
echo 'Installing Rosetta'
/usr/sbin/softwareupdate --install-rosetta --agree-to-license

View File

@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: install-ruby.sh
## Desc: Install Ruby
################################################################################
source ~/utils/utils.sh source ~/utils/utils.sh
arch=$(get_arch) arch=$(get_arch)
@@ -52,4 +57,5 @@ if ! is_Arm64; then
fi fi
done done
fi fi
invoke_tests "Ruby.$arch" invoke_tests "Ruby.$arch"

View File

@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: install-rubygems.sh
## Desc: Install RubyGems
################################################################################
source ~/utils/utils.sh source ~/utils/utils.sh
echo Updating RubyGems... echo Updating RubyGems...

View File

@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: install-rust.sh
## Desc: Install Rust
################################################################################
source ~/utils/utils.sh source ~/utils/utils.sh
echo Installing Rustup... echo Installing Rustup...

View File

@@ -1,4 +1,8 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: install-safari.sh
## Desc: Install Safari browser
################################################################################
echo "Enabling safari driver..." echo "Enabling safari driver..."
# https://developer.apple.com/documentation/webkit/testing_with_webdriver_in_safari # https://developer.apple.com/documentation/webkit/testing_with_webdriver_in_safari
@@ -13,4 +17,4 @@ safari_plist="$HOME/Library/WebDriver/com.apple.Safari.plist"
/usr/libexec/PlistBuddy -c 'delete AllowRemoteAutomation' $safari_plist || true /usr/libexec/PlistBuddy -c 'delete AllowRemoteAutomation' $safari_plist || true
/usr/libexec/PlistBuddy -c 'add AllowRemoteAutomation bool true' $safari_plist /usr/libexec/PlistBuddy -c 'add AllowRemoteAutomation bool true' $safari_plist
invoke_tests "Browsers" "Safari" invoke_tests "Browsers" "Safari"

View File

@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: install-swiftlint.sh
## Desc: Install SwiftLint
################################################################################
source ~/utils/utils.sh source ~/utils/utils.sh
echo Installing Swiftlint... echo Installing Swiftlint...

View File

@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: install-vcpkg.sh
## Desc: Install vcpkg
################################################################################
source ~/utils/utils.sh source ~/utils/utils.sh
# Set env variable for vcpkg # Set env variable for vcpkg

View File

@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: install-visualstudio.sh
## Desc: Install Visual Studio
################################################################################
source ~/utils/utils.sh source ~/utils/utils.sh
source ~/utils/xamarin-utils.sh source ~/utils/xamarin-utils.sh

View File

@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: install-xamarin.sh
## Desc: Install Xamarin
################################################################################
source ~/utils/utils.sh source ~/utils/utils.sh
source ~/utils/xamarin-utils.sh source ~/utils/xamarin-utils.sh

View File

@@ -1,4 +1,9 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: install-xcode-clt.sh
## Desc: Install Xcode Command Line Tools
################################################################################
source ~/utils/utils.sh source ~/utils/utils.sh
is_clt_installed() { is_clt_installed() {
@@ -43,4 +48,4 @@ while ! is_clt_installed; do
((retries--)) ((retries--))
echo "Wait $sleepInterval seconds before the next check for installed Command Line Tools" echo "Wait $sleepInterval seconds before the next check for installed Command Line Tools"
sleep $sleepInterval sleep $sleepInterval
done done

View File

@@ -1,4 +1,8 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
################################################################################
## File: install-xcode-simulators.sh
## Desc: Install Xcode simulators
################################################################################
source ~/utils/utils.sh source ~/utils/utils.sh

View File

@@ -1,8 +0,0 @@
#!/bin/bash -e -o pipefail
source ~/utils/utils.sh
llvmVersion=$(get_toolset_value '.llvm.version')
brew_smart_install "llvm@${llvmVersion}"
invoke_tests "LLVM"

View File

@@ -1,8 +0,0 @@
#!/bin/bash -e -o pipefail
source ~/utils/utils.sh
brew_smart_install nginx
sudo sed -Ei '' 's/listen.*/listen 80;/' $(brew --prefix)/etc/nginx/nginx.conf
invoke_tests "WebServers" "Nginx"

View File

@@ -1,3 +0,0 @@
#!/bin/bash -e -o pipefail
shutdown -r now

View File

@@ -1,4 +0,0 @@
#!/bin/bash -e -o pipefail
echo 'Installing Rosetta'
/usr/sbin/softwareupdate --install-rosetta --agree-to-license

View File

@@ -17,7 +17,7 @@ Import-Module "$PSScriptRoot/SoftwareReport.Xamarin.psm1" -DisableNameChecking
Import-Module "$PSScriptRoot/SoftwareReport.Toolcache.psm1" -DisableNameChecking Import-Module "$PSScriptRoot/SoftwareReport.Toolcache.psm1" -DisableNameChecking
Import-Module "$PSScriptRoot/SoftwareReport.Browsers.psm1" -DisableNameChecking Import-Module "$PSScriptRoot/SoftwareReport.Browsers.psm1" -DisableNameChecking
Import-Module "$PSScriptRoot/SoftwareReport.WebServers.psm1" -DisableNameChecking Import-Module "$PSScriptRoot/SoftwareReport.WebServers.psm1" -DisableNameChecking
Import-Module "$PSScriptRoot/../helpers/SoftwareReport.Helpers.psm1" Import-Module "$PSScriptRoot/SoftwareReport.Helpers.psm1" -DisableNameChecking
Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1" Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
Import-Module "$PSScriptRoot/../helpers/Xcode.Helpers.psm1" Import-Module "$PSScriptRoot/../helpers/Xcode.Helpers.psm1"

View File

@@ -1,4 +1,4 @@
Import-Module "$PSScriptRoot/../helpers/SoftwareReport.Helpers.psm1" -DisableNameChecking Import-Module "$PSScriptRoot/SoftwareReport.Helpers.psm1" -DisableNameChecking
Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1" Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
function Split-TableRowByColumns { function Split-TableRowByColumns {

View File

@@ -1,5 +1,5 @@
#!/bin/bash -e -o pipefail #!/bin/bash -e -o pipefail
source $HOME/.bashrc source $HOME/.bashrc
pwsh -Command "Import-Module '$HOME/image-generation/helpers/Tests.Helpers.psm1' -DisableNameChecking pwsh -Command "Import-Module '$HOME/image-generation/tests/Helpers.psm1' -DisableNameChecking
Invoke-PesterTests -TestFile \"$1\" -TestName \"$2\"" Invoke-PesterTests -TestFile \"$1\" -TestName \"$2\""

View File

@@ -1,5 +1,5 @@
Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1" Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
Import-Module "$PSScriptRoot/../helpers/Tests.Helpers.psm1" -DisableNameChecking Import-Module "$PSScriptRoot/Helpers.psm1" -DisableNameChecking
Import-Module "$PSScriptRoot/../software-report/SoftwareReport.Android.psm1" -DisableNameChecking Import-Module "$PSScriptRoot/../software-report/SoftwareReport.Android.psm1" -DisableNameChecking
$os = Get-OSVersion $os = Get-OSVersion

View File

@@ -1,5 +1,5 @@
Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1" Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
Import-Module "$PSScriptRoot/../helpers/Tests.Helpers.psm1" -DisableNameChecking Import-Module "$PSScriptRoot/Helpers.psm1" -DisableNameChecking
$os = Get-OSVersion $os = Get-OSVersion

View File

@@ -1,4 +1,4 @@
Import-Module "$PSScriptRoot/Common.Helpers.psm1" Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
# Validates that tool is installed and in PATH # Validates that tool is installed and in PATH
function Validate-ToolExist($tool) { function Validate-ToolExist($tool) {
@@ -149,4 +149,4 @@ function Invoke-PesterTests {
$results $results
throw "Test run has failed" throw "Test run has failed"
} }
} }

View File

@@ -1,5 +1,5 @@
Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1" Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
Import-Module "$PSScriptRoot/../helpers/Tests.Helpers.psm1" -DisableNameChecking Import-Module "$PSScriptRoot/Helpers.psm1" -DisableNameChecking
$os = Get-OSVersion $os = Get-OSVersion
$arch = Get-Architecture $arch = Get-Architecture

View File

@@ -1,3 +1,5 @@
Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
Describe "Clang/LLVM" { Describe "Clang/LLVM" {
BeforeAll { BeforeAll {
$toolsetVersion = Get-ToolsetValue 'llvm.version' $toolsetVersion = Get-ToolsetValue 'llvm.version'
@@ -7,4 +9,4 @@ Describe "Clang/LLVM" {
$clangVersion = & "$(brew --prefix llvm@$toolsetVersion)/bin/clang" --version $clangVersion = & "$(brew --prefix llvm@$toolsetVersion)/bin/clang" --version
$clangVersion[0] | Should -BeLike "*${toolsetVersion}*" $clangVersion[0] | Should -BeLike "*${toolsetVersion}*"
} }
} }

View File

@@ -1,4 +1,4 @@
Import-Module "$PSScriptRoot/../helpers/Tests.Helpers.psm1" -DisableNameChecking Import-Module "$PSScriptRoot/Helpers.psm1" -DisableNameChecking
$os = Get-OSVersion $os = Get-OSVersion

View File

@@ -1,5 +1,5 @@
Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1" Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
Import-Module "$PSScriptRoot/../helpers/Tests.Helpers.psm1" -DisableNameChecking Import-Module "$PSScriptRoot/Helpers.psm1" -DisableNameChecking
$os = Get-OSVersion $os = Get-OSVersion

View File

@@ -1,5 +1,5 @@
Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1" Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
Import-Module "$PSScriptRoot/../helpers/Tests.Helpers.psm1" -DisableNameChecking Import-Module "$PSScriptRoot/Helpers.psm1" -DisableNameChecking
Describe "Powershell" { Describe "Powershell" {
Context "Powershell is installed" { Context "Powershell is installed" {
@@ -40,4 +40,4 @@ Describe "Powershell" {
} }
} }
} }
} }

View File

@@ -1,5 +1,5 @@
Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1" Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
Import-Module "$PSScriptRoot/../helpers/Tests.Helpers.psm1" -DisableNameChecking Import-Module "$PSScriptRoot/Helpers.psm1" -DisableNameChecking
$os = Get-OSVersion $os = Get-OSVersion

View File

@@ -1,5 +1,5 @@
Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1" Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
Import-Module "$PSScriptRoot/../helpers/Tests.Helpers.psm1" -DisableNameChecking Import-Module "$PSScriptRoot/Helpers.psm1" -DisableNameChecking
$os = Get-OSVersion $os = Get-OSVersion

View File

@@ -1,5 +1,5 @@
Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1" Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
Import-Module "$PSScriptRoot/../helpers/Tests.Helpers.psm1" -DisableNameChecking Import-Module "$PSScriptRoot/Helpers.psm1" -DisableNameChecking
$os = Get-OSVersion $os = Get-OSVersion

View File

@@ -1,3 +1,3 @@
Import-Module "$PSScriptRoot/../helpers/Tests.Helpers.psm1" -DisableNameChecking Import-Module "$PSScriptRoot/Helpers.psm1" -DisableNameChecking
Invoke-PesterTests "*" Invoke-PesterTests "*"

View File

@@ -1,5 +1,5 @@
Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1" Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
Import-Module "$PSScriptRoot/../helpers/Tests.Helpers.psm1" -DisableNameChecking Import-Module "$PSScriptRoot/Helpers.psm1" -DisableNameChecking
$arch = Get-Architecture $arch = Get-Architecture
$os = Get-OSVersion $os = Get-OSVersion

View File

@@ -1,4 +1,4 @@
Import-Module "$PSScriptRoot/../helpers/Tests.Helpers.psm1" Import-Module "$PSScriptRoot/Helpers.psm1"
$toolsets = Get-ChildItem -Path $PSScriptRoot -Filter "toolset-*.json" $toolsets = Get-ChildItem -Path $PSScriptRoot -Filter "toolset-*.json"
@@ -141,4 +141,4 @@ $toolsets | ForEach-Object {
} }
} }
} }

View File

@@ -1,5 +1,5 @@
Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1" Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
Import-Module "$PSScriptRoot/../helpers/Tests.Helpers.psm1" -DisableNameChecking Import-Module "$PSScriptRoot/Helpers.psm1" -DisableNameChecking
$os = Get-OSVersion $os = Get-OSVersion
if ($os.IsVentura -or $os.IsSonoma) { if ($os.IsVentura -or $os.IsSonoma) {

View File

@@ -1,6 +1,6 @@
Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1" Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
Import-Module "$PSScriptRoot/../helpers/Xcode.Helpers.psm1" Import-Module "$PSScriptRoot/../helpers/Xcode.Helpers.psm1"
Import-Module "$PSScriptRoot/../helpers/Tests.Helpers.psm1" -DisableNameChecking Import-Module "$PSScriptRoot/Helpers.psm1" -DisableNameChecking
$ARCH = Get-Architecture $ARCH = Get-Architecture
$xcodeVersions = Get-ToolsetValue "xcode.$ARCH.versions" $xcodeVersions = Get-ToolsetValue "xcode.$ARCH.versions"
@@ -133,4 +133,4 @@ Describe "Xcode Simulators Naming" -Skip:(-not $os.IsMonterey) {
$foundSimulators | Should -HaveCount 1 $foundSimulators | Should -HaveCount 1
$foundSimulators[0].deviceTypeIdentifier | Should -Be $DeviceId $foundSimulators[0].deviceTypeIdentifier | Should -Be $DeviceId
} }
} }

View File

@@ -100,22 +100,22 @@
"type": "shell", "type": "shell",
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}", "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}",
"scripts": [ "scripts": [
"./scripts/build/xcode-clt.sh", "./scripts/build/install-xcode-clt.sh",
"./scripts/build/homebrew.sh" "./scripts/build/install-homebrew.sh"
] ]
}, },
{ {
"type": "shell", "type": "shell",
"execute_command": "chmod +x {{ .Path }}; sudo {{ .Vars }} {{ .Path }}", "execute_command": "chmod +x {{ .Path }}; sudo {{ .Vars }} {{ .Path }}",
"scripts": [ "scripts": [
"./scripts/build/xcode-clt.sh", "./scripts/build/install-xcode-clt.sh",
"./scripts/build/add-network-interface-detection.sh", "./scripts/build/configure-network-interface-detection.sh",
"./scripts/build/autologin.sh", "./scripts/build/configure-autologin.sh",
"./scripts/build/disable-auto-updates.sh", "./scripts/build/configure-auto-updates.sh",
"./scripts/build/screensaver-off.sh", "./scripts/build/configure-screensaver.sh",
"./scripts/build/ntpconf.sh", "./scripts/build/configure-ntpconf.sh",
"./scripts/build/max-files.sh", "./scripts/build/configure-max-files-limitation.sh",
"./scripts/build/shell-change.sh" "./scripts/build/configure-shell.sh"
], ],
"environment_vars": [ "environment_vars": [
"PASSWORD={{user `vm_password`}}", "PASSWORD={{user `vm_password`}}",
@@ -126,7 +126,7 @@
"type": "shell", "type": "shell",
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}", "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}",
"scripts": [ "scripts": [
"./scripts/build/preimagedata.sh", "./scripts/build/configure-preimagedata.sh",
"./scripts/build/configure-ssh.sh", "./scripts/build/configure-ssh.sh",
"./scripts/build/configure-machine.sh" "./scripts/build/configure-machine.sh"
], ],
@@ -137,8 +137,11 @@
}, },
{ {
"type": "shell", "type": "shell",
"execute_command": "chmod +x {{ .Path }}; sudo {{ .Vars }} {{ .Path }}", "execute_command": "sudo {{ .Vars }} {{ .Path }}",
"script": "./scripts/build/reboot.sh", "inline": [
"echo 'Reboot VM'",
"shutdown -r now"
],
"expect_disconnect": true "expect_disconnect": true
}, },
{ {
@@ -146,17 +149,17 @@
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}", "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}",
"pause_before": "30s", "pause_before": "30s",
"scripts": [ "scripts": [
"./scripts/build/open_windows_check.sh", "./scripts/build/configure-windows.sh",
"./scripts/build/powershell.sh", "./scripts/build/install-powershell.sh",
"./scripts/build/dotnet.sh", "./scripts/build/install-dotnet.sh",
"./scripts/build/python.sh", "./scripts/build/install-python.sh",
"./scripts/build/azcopy.sh", "./scripts/build/install-azcopy.sh",
"./scripts/build/openssl.sh", "./scripts/build/install-openssl.sh",
"./scripts/build/ruby.sh", "./scripts/build/install-ruby.sh",
"./scripts/build/rubygem.sh", "./scripts/build/install-rubygems.sh",
"./scripts/build/git.sh", "./scripts/build/install-git.sh",
"./scripts/build/mongodb.sh", "./scripts/build/install-mongodb.sh",
"./scripts/build/node.sh" "./scripts/build/install-node.sh"
], ],
"environment_vars": [ "environment_vars": [
"API_PAT={{user `github_api_pat`}}" "API_PAT={{user `github_api_pat`}}"
@@ -165,7 +168,7 @@
{ {
"type": "shell", "type": "shell",
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} pwsh -f {{ .Path }}", "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} pwsh -f {{ .Path }}",
"script": "./scripts/build/xcode.ps1", "script": "./scripts/build/Install-Xcode.ps1",
"environment_vars": [ "environment_vars": [
"XCODE_INSTALL_STORAGE_URL={{user `xcode_install_storage_url`}}", "XCODE_INSTALL_STORAGE_URL={{user `xcode_install_storage_url`}}",
"XCODE_INSTALL_SAS={{user `xcode_install_sas`}}" "XCODE_INSTALL_SAS={{user `xcode_install_sas`}}"
@@ -173,44 +176,47 @@
}, },
{ {
"type": "shell", "type": "shell",
"execute_command": "chmod +x {{ .Path }}; sudo {{ .Vars }} {{ .Path }}", "execute_command": "sudo {{ .Vars }} {{ .Path }}",
"script": "./scripts/build/reboot.sh", "inline": [
"echo 'Reboot VM'",
"shutdown -r now"
],
"expect_disconnect": true "expect_disconnect": true
}, },
{ {
"type": "shell", "type": "shell",
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}", "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}",
"scripts": [ "scripts": [
"./scripts/build/action-archive-cache.sh", "./scripts/build/install-actions-cache.sh",
"./scripts/build/commonutils.sh", "./scripts/build/install-common-utils.sh",
"./scripts/build/llvm.sh", "./scripts/build/install-llvm.sh",
"./scripts/build/golang.sh", "./scripts/build/install-golang.sh",
"./scripts/build/swiftlint.sh", "./scripts/build/install-swiftlint.sh",
"./scripts/build/openjdk.sh", "./scripts/build/install-openjdk.sh",
"./scripts/build/php.sh", "./scripts/build/install-php.sh",
"./scripts/build/aws.sh", "./scripts/build/install-aws-tools.sh",
"./scripts/build/rust.sh", "./scripts/build/install-rust.sh",
"./scripts/build/gcc.sh", "./scripts/build/install-gcc.sh",
"./scripts/build/haskell.sh", "./scripts/build/install-haskell.sh",
"./scripts/build/cocoapods.sh", "./scripts/build/install-cocoapods.sh",
"./scripts/build/android-toolsets.sh", "./scripts/build/install-android-sdk.sh",
"./scripts/build/xamarin.sh", "./scripts/build/install-xamarin.sh",
"./scripts/build/vsmac.sh", "./scripts/build/install-visualstudio.sh",
"./scripts/build/nvm.sh", "./scripts/build/install-nvm.sh",
"./scripts/build/apache.sh", "./scripts/build/install-apache.sh",
"./scripts/build/nginx.sh", "./scripts/build/install-nginx.sh",
"./scripts/build/postgresql.sh", "./scripts/build/install-postgresql.sh",
"./scripts/build/audiodevice.sh", "./scripts/build/install-audiodevice.sh",
"./scripts/build/vcpkg.sh", "./scripts/build/install-vcpkg.sh",
"./scripts/build/miniconda.sh", "./scripts/build/install-miniconda.sh",
"./scripts/build/safari.sh", "./scripts/build/install-safari.sh",
"./scripts/build/chrome.sh", "./scripts/build/install-chrome.sh",
"./scripts/build/edge.sh", "./scripts/build/install-edge.sh",
"./scripts/build/firefox.sh", "./scripts/build/install-firefox.sh",
"./scripts/build/pypy.sh", "./scripts/build/install-pypy.sh",
"./scripts/build/pipx-packages.sh", "./scripts/build/install-pipx-packages.sh",
"./scripts/build/bicep.sh", "./scripts/build/install-bicep.sh",
"./scripts/build/codeql-bundle.sh" "./scripts/build/install-codeql-bundle.sh"
], ],
"environment_vars": [ "environment_vars": [
"API_PAT={{user `github_api_pat`}}" "API_PAT={{user `github_api_pat`}}"
@@ -220,21 +226,21 @@
"type": "shell", "type": "shell",
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} pwsh -f {{ .Path }}", "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} pwsh -f {{ .Path }}",
"scripts": [ "scripts": [
"./scripts/build/toolset.ps1", "./scripts/build/Install-Toolset.ps1",
"./scripts/build/configure-toolset.ps1" "./scripts/build/Configure-Toolset.ps1"
] ]
}, },
{ {
"type": "shell", "type": "shell",
"execute_command": "ruby {{ .Path }}", "execute_command": "ruby {{ .Path }}",
"scripts": [ "scripts": [
"./scripts/build/delete-duplicate-sims.rb" "./scripts/build/configure-xcode-simulators.rb"
] ]
}, },
{ {
"type": "shell", "type": "shell",
"inline": [ "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/software-report/Generate-SoftwareReport.ps1\" -OutputDirectory \"$HOME/image-generation/output/software-report\" -ImageName {{user `build_id`}}",
"pwsh -File \"$HOME/image-generation/tests/RunAll-Tests.ps1\"" "pwsh -File \"$HOME/image-generation/tests/RunAll-Tests.ps1\""
] ]
}, },
@@ -249,7 +255,7 @@
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}", "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}",
"scripts": [ "scripts": [
"./scripts/build/configure-hostname.sh", "./scripts/build/configure-hostname.sh",
"./scripts/build/finalize-vm.sh" "./scripts/build/configure-system.sh"
] ]
} }
] ]

View File

@@ -129,21 +129,21 @@ build {
} }
provisioner "shell" { provisioner "shell" {
scripts = [ scripts = [
"./scripts/build/xcode-clt.sh", "./scripts/build/install-xcode-clt.sh",
"./scripts/build/homebrew.sh" "./scripts/build/install-homebrew.sh"
] ]
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}" execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}"
} }
provisioner "shell" { provisioner "shell" {
scripts = [ scripts = [
"./scripts/build/configure-tccdb-macos.sh", "./scripts/build/configure-tccdb-macos.sh",
"./scripts/build/add-network-interface-detection.sh", "./scripts/build/configure-network-interface-detection.sh",
"./scripts/build/autologin.sh", "./scripts/build/configure-autologin.sh",
"./scripts/build/disable-auto-updates.sh", "./scripts/build/configure-auto-updates.sh",
"./scripts/build/screensaver-off.sh", "./scripts/build/configure-screensaver.sh",
"./scripts/build/ntpconf.sh", "./scripts/build/configure-ntpconf.sh",
"./scripts/build/max-files.sh", "./scripts/build/configure-max-files-limitation.sh",
"./scripts/build/shell-change.sh" "./scripts/build/configure-shell.sh"
] ]
environment_vars = [ environment_vars = [
"PASSWORD=${var.vm_password}", "PASSWORD=${var.vm_password}",
@@ -153,7 +153,7 @@ build {
} }
provisioner "shell" { provisioner "shell" {
scripts = [ scripts = [
"./scripts/build/preimagedata.sh", "./scripts/build/configure-preimagedata.sh",
"./scripts/build/configure-ssh.sh", "./scripts/build/configure-ssh.sh",
"./scripts/build/configure-machine.sh" "./scripts/build/configure-machine.sh"
] ]
@@ -165,25 +165,25 @@ build {
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}" execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}"
} }
provisioner "shell" { provisioner "shell" {
script = "./scripts/build/reboot.sh" execute_command = "source $HOME/.bash_profile; sudo {{ .Vars }} {{ .Path }}"
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; sudo {{ .Vars }} {{ .Path }}"
expect_disconnect = true expect_disconnect = true
inline = ["echo 'Reboot VM'", "shutdown -r now"]
} }
provisioner "shell" { provisioner "shell" {
pause_before = "30s" pause_before = "30s"
scripts = [ scripts = [
"./scripts/build/open_windows_check.sh", "./scripts/build/configure-windows.sh",
"./scripts/build/powershell.sh", "./scripts/build/install-powershell.sh",
"./scripts/build/dotnet.sh", "./scripts/build/install-dotnet.sh",
"./scripts/build/python.sh", "./scripts/build/install-python.sh",
"./scripts/build/azcopy.sh", "./scripts/build/install-azcopy.sh",
"./scripts/build/openssl.sh", "./scripts/build/install-openssl.sh",
"./scripts/build/ruby.sh", "./scripts/build/install-ruby.sh",
"./scripts/build/rubygem.sh", "./scripts/build/install-rubygems.sh",
"./scripts/build/git.sh", "./scripts/build/install-git.sh",
"./scripts/build/mongodb.sh", "./scripts/build/install-mongodb.sh",
"./scripts/build/node.sh", "./scripts/build/install-node.sh",
"./scripts/build/commonutils.sh" "./scripts/build/install-common-utils.sh"
] ]
environment_vars = [ environment_vars = [
"API_PAT=${var.github_api_pat}", "API_PAT=${var.github_api_pat}",
@@ -192,7 +192,7 @@ build {
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}" execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}"
} }
provisioner "shell" { provisioner "shell" {
script = "./scripts/build/xcode.ps1" script = "./scripts/build/Install-Xcode.ps1"
environment_vars = [ environment_vars = [
"XCODE_INSTALL_STORAGE_URL=${var.xcode_install_storage_url}", "XCODE_INSTALL_STORAGE_URL=${var.xcode_install_storage_url}",
"XCODE_INSTALL_SAS=${var.xcode_install_sas}" "XCODE_INSTALL_SAS=${var.xcode_install_sas}"
@@ -200,41 +200,41 @@ build {
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} pwsh -f {{ .Path }}" execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} pwsh -f {{ .Path }}"
} }
provisioner "shell" { provisioner "shell" {
script = "./scripts/build/reboot.sh" execute_command = "source $HOME/.bash_profile; sudo {{ .Vars }} {{ .Path }}"
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; sudo {{ .Vars }} {{ .Path }}"
expect_disconnect = true expect_disconnect = true
inline = ["echo 'Reboot VM'", "shutdown -r now"]
} }
provisioner "shell" { provisioner "shell" {
scripts = [ scripts = [
"./scripts/build/action-archive-cache.sh", "./scripts/build/install-actions-cache.sh",
"./scripts/build/llvm.sh", "./scripts/build/install-llvm.sh",
"./scripts/build/golang.sh", "./scripts/build/install-golang.sh",
"./scripts/build/swiftlint.sh", "./scripts/build/install-swiftlint.sh",
"./scripts/build/openjdk.sh", "./scripts/build/install-openjdk.sh",
"./scripts/build/php.sh", "./scripts/build/install-php.sh",
"./scripts/build/aws.sh", "./scripts/build/install-aws-tools.sh",
"./scripts/build/rust.sh", "./scripts/build/install-rust.sh",
"./scripts/build/gcc.sh", "./scripts/build/install-gcc.sh",
"./scripts/build/haskell.sh", "./scripts/build/install-haskell.sh",
"./scripts/build/cocoapods.sh", "./scripts/build/install-cocoapods.sh",
"./scripts/build/android-toolsets.sh", "./scripts/build/install-android-sdk.sh",
"./scripts/build/xamarin.sh", "./scripts/build/install-xamarin.sh",
"./scripts/build/vsmac.sh", "./scripts/build/install-visualstudio.sh",
"./scripts/build/nvm.sh", "./scripts/build/install-nvm.sh",
"./scripts/build/apache.sh", "./scripts/build/install-apache.sh",
"./scripts/build/nginx.sh", "./scripts/build/install-nginx.sh",
"./scripts/build/postgresql.sh", "./scripts/build/install-postgresql.sh",
"./scripts/build/audiodevice.sh", "./scripts/build/install-audiodevice.sh",
"./scripts/build/vcpkg.sh", "./scripts/build/install-vcpkg.sh",
"./scripts/build/miniconda.sh", "./scripts/build/install-miniconda.sh",
"./scripts/build/safari.sh", "./scripts/build/install-safari.sh",
"./scripts/build/chrome.sh", "./scripts/build/install-chrome.sh",
"./scripts/build/edge.sh", "./scripts/build/install-edge.sh",
"./scripts/build/firefox.sh", "./scripts/build/install-firefox.sh",
"./scripts/build/pypy.sh", "./scripts/build/install-pypy.sh",
"./scripts/build/pipx-packages.sh", "./scripts/build/install-pipx-packages.sh",
"./scripts/build/bicep.sh", "./scripts/build/install-bicep.sh",
"./scripts/build/codeql-bundle.sh" "./scripts/build/install-codeql-bundle.sh"
] ]
environment_vars = [ environment_vars = [
"API_PAT=${var.github_api_pat}" "API_PAT=${var.github_api_pat}"
@@ -243,22 +243,22 @@ build {
} }
provisioner "shell" { provisioner "shell" {
scripts = [ scripts = [
"./scripts/build/toolset.ps1", "./scripts/build/Install-Toolset.ps1",
"./scripts/build/configure-toolset.ps1" "./scripts/build/Configure-Toolset.ps1"
] ]
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} pwsh -f {{ .Path }}" execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} pwsh -f {{ .Path }}"
} }
provisioner "shell" { provisioner "shell" {
script = "./scripts/build/delete-duplicate-sims.rb" script = "./scripts/build/configure-xcode-simulators.rb"
execute_command = "source $HOME/.bash_profile; ruby {{ .Path }}" execute_command = "source $HOME/.bash_profile; ruby {{ .Path }}"
} }
provisioner "shell" { provisioner "shell" {
script = "./scripts/build/fix-xcode-simulators.ps1" script = "./scripts/build/Update-XcodeSimulators.ps1"
execute_command = "chmod +x {{ .Path }}; {{ .Vars }} pwsh -f {{ .Path }}" execute_command = "chmod +x {{ .Path }}; {{ .Vars }} pwsh -f {{ .Path }}"
} }
provisioner "shell" { provisioner "shell" {
inline = [ inline = [
"pwsh -File \"$HOME/image-generation/software-report/SoftwareReport.Generator.ps1\" -OutputDirectory \"$HOME/image-generation/output/software-report\" -ImageName ${var.build_id}", "pwsh -File \"$HOME/image-generation/software-report/Generate-SoftwareReport.ps1\" -OutputDirectory \"$HOME/image-generation/output/software-report\" -ImageName ${var.build_id}",
"pwsh -File \"$HOME/image-generation/tests/RunAll-Tests.ps1\"" "pwsh -File \"$HOME/image-generation/tests/RunAll-Tests.ps1\""
] ]
execute_command = "source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}" execute_command = "source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}"
@@ -271,7 +271,7 @@ build {
provisioner "shell" { provisioner "shell" {
scripts = [ scripts = [
"./scripts/build/configure-hostname.sh", "./scripts/build/configure-hostname.sh",
"./scripts/build/finalize-vm.sh" "./scripts/build/configure-system.sh"
] ]
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}" execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}"
} }

View File

@@ -100,21 +100,21 @@
"type": "shell", "type": "shell",
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}", "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}",
"scripts": [ "scripts": [
"./scripts/build/xcode-clt.sh", "./scripts/build/install-xcode-clt.sh",
"./scripts/build/homebrew.sh" "./scripts/build/install-homebrew.sh"
] ]
}, },
{ {
"type": "shell", "type": "shell",
"execute_command": "chmod +x {{ .Path }}; sudo {{ .Vars }} {{ .Path }}", "execute_command": "chmod +x {{ .Path }}; sudo {{ .Vars }} {{ .Path }}",
"scripts": [ "scripts": [
"./scripts/build/add-network-interface-detection.sh", "./scripts/build/configure-network-interface-detection.sh",
"./scripts/build/autologin.sh", "./scripts/build/configure-autologin.sh",
"./scripts/build/disable-auto-updates.sh", "./scripts/build/configure-auto-updates.sh",
"./scripts/build/screensaver-off.sh", "./scripts/build/configure-screensaver.sh",
"./scripts/build/ntpconf.sh", "./scripts/build/configure-ntpconf.sh",
"./scripts/build/max-files.sh", "./scripts/build/configure-max-files-limitation.sh",
"./scripts/build/shell-change.sh" "./scripts/build/configure-shell.sh"
], ],
"environment_vars": [ "environment_vars": [
"PASSWORD={{user `vm_password`}}", "PASSWORD={{user `vm_password`}}",
@@ -125,7 +125,7 @@
"type": "shell", "type": "shell",
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}", "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}",
"scripts": [ "scripts": [
"./scripts/build/preimagedata.sh", "./scripts/build/configure-preimagedata.sh",
"./scripts/build/configure-ssh.sh", "./scripts/build/configure-ssh.sh",
"./scripts/build/configure-machine.sh" "./scripts/build/configure-machine.sh"
], ],
@@ -137,8 +137,11 @@
}, },
{ {
"type": "shell", "type": "shell",
"execute_command": "chmod +x {{ .Path }}; sudo {{ .Vars }} {{ .Path }}", "execute_command": "sudo {{ .Vars }} {{ .Path }}",
"script": "./scripts/build/reboot.sh", "inline": [
"echo 'Reboot VM'",
"shutdown -r now"
],
"expect_disconnect": true "expect_disconnect": true
}, },
{ {
@@ -146,18 +149,18 @@
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}", "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}",
"pause_before": "30s", "pause_before": "30s",
"scripts": [ "scripts": [
"./scripts/build/open_windows_check.sh", "./scripts/build/configure-windows.sh",
"./scripts/build/powershell.sh", "./scripts/build/install-powershell.sh",
"./scripts/build/dotnet.sh", "./scripts/build/install-dotnet.sh",
"./scripts/build/python.sh", "./scripts/build/install-python.sh",
"./scripts/build/azcopy.sh", "./scripts/build/install-azcopy.sh",
"./scripts/build/openssl.sh", "./scripts/build/install-openssl.sh",
"./scripts/build/ruby.sh", "./scripts/build/install-ruby.sh",
"./scripts/build/rubygem.sh", "./scripts/build/install-rubygems.sh",
"./scripts/build/git.sh", "./scripts/build/install-git.sh",
"./scripts/build/mongodb.sh", "./scripts/build/install-mongodb.sh",
"./scripts/build/node.sh", "./scripts/build/install-node.sh",
"./scripts/build/commonutils.sh" "./scripts/build/install-common-utils.sh"
], ],
"environment_vars": [ "environment_vars": [
"API_PAT={{user `github_api_pat`}}", "API_PAT={{user `github_api_pat`}}",
@@ -167,7 +170,7 @@
{ {
"type": "shell", "type": "shell",
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} pwsh -f {{ .Path }}", "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} pwsh -f {{ .Path }}",
"script": "./scripts/build/xcode.ps1", "script": "./scripts/build/Install-Xcode.ps1",
"environment_vars": [ "environment_vars": [
"XCODE_INSTALL_STORAGE_URL={{user `xcode_install_storage_url`}}", "XCODE_INSTALL_STORAGE_URL={{user `xcode_install_storage_url`}}",
"XCODE_INSTALL_SAS={{user `xcode_install_sas`}}" "XCODE_INSTALL_SAS={{user `xcode_install_sas`}}"
@@ -175,43 +178,46 @@
}, },
{ {
"type": "shell", "type": "shell",
"execute_command": "chmod +x {{ .Path }}; sudo {{ .Vars }} {{ .Path }}", "execute_command": "sudo {{ .Vars }} {{ .Path }}",
"script": "./scripts/build/reboot.sh", "inline": [
"echo 'Reboot VM'",
"shutdown -r now"
],
"expect_disconnect": true "expect_disconnect": true
}, },
{ {
"type": "shell", "type": "shell",
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}", "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}",
"scripts": [ "scripts": [
"./scripts/build/action-archive-cache.sh", "./scripts/build/install-actions-cache.sh",
"./scripts/build/llvm.sh", "./scripts/build/install-llvm.sh",
"./scripts/build/golang.sh", "./scripts/build/install-golang.sh",
"./scripts/build/swiftlint.sh", "./scripts/build/install-swiftlint.sh",
"./scripts/build/openjdk.sh", "./scripts/build/install-openjdk.sh",
"./scripts/build/php.sh", "./scripts/build/install-php.sh",
"./scripts/build/aws.sh", "./scripts/build/install-aws-tools.sh",
"./scripts/build/rust.sh", "./scripts/build/install-rust.sh",
"./scripts/build/gcc.sh", "./scripts/build/install-gcc.sh",
"./scripts/build/haskell.sh", "./scripts/build/install-haskell.sh",
"./scripts/build/cocoapods.sh", "./scripts/build/install-cocoapods.sh",
"./scripts/build/android-toolsets.sh", "./scripts/build/install-android-sdk.sh",
"./scripts/build/xamarin.sh", "./scripts/build/install-xamarin.sh",
"./scripts/build/vsmac.sh", "./scripts/build/install-visualstudio.sh",
"./scripts/build/nvm.sh", "./scripts/build/install-nvm.sh",
"./scripts/build/apache.sh", "./scripts/build/install-apache.sh",
"./scripts/build/nginx.sh", "./scripts/build/install-nginx.sh",
"./scripts/build/postgresql.sh", "./scripts/build/install-postgresql.sh",
"./scripts/build/audiodevice.sh", "./scripts/build/install-audiodevice.sh",
"./scripts/build/vcpkg.sh", "./scripts/build/install-vcpkg.sh",
"./scripts/build/miniconda.sh", "./scripts/build/install-miniconda.sh",
"./scripts/build/safari.sh", "./scripts/build/install-safari.sh",
"./scripts/build/chrome.sh", "./scripts/build/install-chrome.sh",
"./scripts/build/edge.sh", "./scripts/build/install-edge.sh",
"./scripts/build/firefox.sh", "./scripts/build/install-firefox.sh",
"./scripts/build/pypy.sh", "./scripts/build/install-pypy.sh",
"./scripts/build/pipx-packages.sh", "./scripts/build/install-pipx-packages.sh",
"./scripts/build/bicep.sh", "./scripts/build/install-bicep.sh",
"./scripts/build/codeql-bundle.sh" "./scripts/build/install-codeql-bundle.sh"
], ],
"environment_vars": [ "environment_vars": [
"API_PAT={{user `github_api_pat`}}" "API_PAT={{user `github_api_pat`}}"
@@ -221,26 +227,26 @@
"type": "shell", "type": "shell",
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} pwsh -f {{ .Path }}", "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} pwsh -f {{ .Path }}",
"scripts": [ "scripts": [
"./scripts/build/toolset.ps1", "./scripts/build/Install-Toolset.ps1",
"./scripts/build/configure-toolset.ps1" "./scripts/build/Configure-Toolset.ps1"
] ]
}, },
{ {
"type": "shell", "type": "shell",
"execute_command": "ruby {{ .Path }}", "execute_command": "ruby {{ .Path }}",
"scripts": [ "scripts": [
"./scripts/build/delete-duplicate-sims.rb" "./scripts/build/configure-xcode-simulators.rb"
] ]
}, },
{ {
"type": "shell", "type": "shell",
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} pwsh -f {{ .Path }}", "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} pwsh -f {{ .Path }}",
"script": "./scripts/build/fix-xcode-simulators.ps1" "script": "./scripts/build/Update-XcodeSimulators.ps1"
}, },
{ {
"type": "shell", "type": "shell",
"inline": [ "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/software-report/Generate-SoftwareReport.ps1\" -OutputDirectory \"$HOME/image-generation/output/software-report\" -ImageName {{user `build_id`}}",
"pwsh -File \"$HOME/image-generation/tests/RunAll-Tests.ps1\"" "pwsh -File \"$HOME/image-generation/tests/RunAll-Tests.ps1\""
] ]
}, },
@@ -255,7 +261,7 @@
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}", "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} {{ .Path }}",
"scripts": [ "scripts": [
"./scripts/build/configure-hostname.sh", "./scripts/build/configure-hostname.sh",
"./scripts/build/finalize-vm.sh" "./scripts/build/configure-system.sh"
] ]
} }
] ]

View File

@@ -129,17 +129,17 @@ build {
} }
provisioner "shell" { provisioner "shell" {
scripts = [ scripts = [
"./scripts/build/xcode-clt.sh", "./scripts/build/install-xcode-clt.sh",
"./scripts/build/homebrew.sh" "./scripts/build/install-homebrew.sh"
] ]
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}" execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}"
} }
provisioner "shell" { provisioner "shell" {
scripts = [ scripts = [
"./scripts/build/configure-tccdb-macos.sh", "./scripts/build/configure-tccdb-macos.sh",
"./scripts/build/disable-auto-updates.sh", "./scripts/build/configure-auto-updates.sh",
"./scripts/build/ntpconf.sh", "./scripts/build/configure-ntpconf.sh",
"./scripts/build/shell-change.sh" "./scripts/build/configure-shell.sh"
] ]
environment_vars = [ environment_vars = [
"PASSWORD=${var.vm_password}", "PASSWORD=${var.vm_password}",
@@ -149,7 +149,7 @@ build {
} }
provisioner "shell" { provisioner "shell" {
scripts = [ scripts = [
"./scripts/build/preimagedata.sh", "./scripts/build/configure-preimagedata.sh",
"./scripts/build/configure-ssh.sh", "./scripts/build/configure-ssh.sh",
"./scripts/build/configure-machine.sh" "./scripts/build/configure-machine.sh"
] ]
@@ -161,25 +161,25 @@ build {
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}" execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}"
} }
provisioner "shell" { provisioner "shell" {
script = "./scripts/build/reboot.sh" execute_command = "source $HOME/.bash_profile; sudo {{ .Vars }} {{ .Path }}"
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; sudo {{ .Vars }} {{ .Path }}"
expect_disconnect = true expect_disconnect = true
inline = ["echo 'Reboot VM'", "shutdown -r now"]
} }
provisioner "shell" { provisioner "shell" {
pause_before = "30s" pause_before = "30s"
scripts = [ scripts = [
"./scripts/build/open_windows_check.sh", "./scripts/build/configure-windows.sh",
"./scripts/build/powershell.sh", "./scripts/build/install-powershell.sh",
"./scripts/build/mono.sh", "./scripts/build/install-mono.sh",
"./scripts/build/dotnet.sh", "./scripts/build/install-dotnet.sh",
"./scripts/build/python.sh", "./scripts/build/install-python.sh",
"./scripts/build/azcopy.sh", "./scripts/build/install-azcopy.sh",
"./scripts/build/openssl.sh", "./scripts/build/install-openssl.sh",
"./scripts/build/ruby.sh", "./scripts/build/install-ruby.sh",
"./scripts/build/rubygem.sh", "./scripts/build/install-rubygems.sh",
"./scripts/build/git.sh", "./scripts/build/install-git.sh",
"./scripts/build/node.sh", "./scripts/build/install-node.sh",
"./scripts/build/commonutils.sh" "./scripts/build/install-common-utils.sh"
] ]
environment_vars = [ environment_vars = [
"API_PAT=${var.github_api_pat}", "API_PAT=${var.github_api_pat}",
@@ -188,7 +188,7 @@ build {
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}" execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}"
} }
provisioner "shell" { provisioner "shell" {
script = "./scripts/build/xcode.ps1" script = "./scripts/build/Install-Xcode.ps1"
environment_vars = [ environment_vars = [
"XCODE_INSTALL_STORAGE_URL=${var.xcode_install_storage_url}", "XCODE_INSTALL_STORAGE_URL=${var.xcode_install_storage_url}",
"XCODE_INSTALL_SAS=${var.xcode_install_sas}" "XCODE_INSTALL_SAS=${var.xcode_install_sas}"
@@ -196,31 +196,31 @@ build {
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} pwsh -f {{ .Path }}" execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} pwsh -f {{ .Path }}"
} }
provisioner "shell" { provisioner "shell" {
script = "./scripts/build/reboot.sh" execute_command = "source $HOME/.bash_profile; sudo {{ .Vars }} {{ .Path }}"
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; sudo {{ .Vars }} {{ .Path }}"
expect_disconnect = true expect_disconnect = true
inline = ["echo 'Reboot VM'", "shutdown -r now"]
} }
provisioner "shell" { provisioner "shell" {
scripts = [ scripts = [
"./scripts/build/action-archive-cache.sh", "./scripts/build/install-actions-cache.sh",
"./scripts/build/llvm.sh", "./scripts/build/install-llvm.sh",
"./scripts/build/swiftlint.sh", "./scripts/build/install-swiftlint.sh",
"./scripts/build/openjdk.sh", "./scripts/build/install-openjdk.sh",
"./scripts/build/php.sh", "./scripts/build/install-php.sh",
"./scripts/build/aws.sh", "./scripts/build/install-aws-tools.sh",
"./scripts/build/rust.sh", "./scripts/build/install-rust.sh",
"./scripts/build/gcc.sh", "./scripts/build/install-gcc.sh",
"./scripts/build/cocoapods.sh", "./scripts/build/install-cocoapods.sh",
"./scripts/build/android-toolsets.sh", "./scripts/build/install-android-sdk.sh",
"./scripts/build/apache.sh", "./scripts/build/install-apache.sh",
"./scripts/build/vcpkg.sh", "./scripts/build/install-vcpkg.sh",
"./scripts/build/safari.sh", "./scripts/build/install-safari.sh",
"./scripts/build/chrome.sh", "./scripts/build/install-chrome.sh",
"./scripts/build/edge.sh", "./scripts/build/install-edge.sh",
"./scripts/build/firefox.sh", "./scripts/build/install-firefox.sh",
"./scripts/build/pypy.sh", "./scripts/build/install-pypy.sh",
"./scripts/build/bicep.sh", "./scripts/build/install-bicep.sh",
"./scripts/build/codeql-bundle.sh" "./scripts/build/install-codeql-bundle.sh"
] ]
environment_vars = [ environment_vars = [
"API_PAT=${var.github_api_pat}" "API_PAT=${var.github_api_pat}"
@@ -229,18 +229,18 @@ build {
} }
provisioner "shell" { provisioner "shell" {
scripts = [ scripts = [
"./scripts/build/toolset.ps1", "./scripts/build/Install-Toolset.ps1",
"./scripts/build/configure-toolset.ps1" "./scripts/build/Configure-Toolset.ps1"
] ]
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} pwsh -f {{ .Path }}" execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} pwsh -f {{ .Path }}"
} }
provisioner "shell" { provisioner "shell" {
script = "./scripts/build/delete-duplicate-sims.rb" script = "./scripts/build/configure-xcode-simulators.rb"
execute_command = "source $HOME/.bash_profile; ruby {{ .Path }}" execute_command = "source $HOME/.bash_profile; ruby {{ .Path }}"
} }
provisioner "shell" { provisioner "shell" {
inline = [ inline = [
"pwsh -File \"$HOME/image-generation/software-report/SoftwareReport.Generator.ps1\" -OutputDirectory \"$HOME/image-generation/output/software-report\" -ImageName ${var.build_id}", "pwsh -File \"$HOME/image-generation/software-report/Generate-SoftwareReport.ps1\" -OutputDirectory \"$HOME/image-generation/output/software-report\" -ImageName ${var.build_id}",
"pwsh -File \"$HOME/image-generation/tests/RunAll-Tests.ps1\"" "pwsh -File \"$HOME/image-generation/tests/RunAll-Tests.ps1\""
] ]
execute_command = "source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}" execute_command = "source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}"
@@ -250,11 +250,15 @@ build {
direction = "download" direction = "download"
source = "./image-generation/output/" source = "./image-generation/output/"
} }
provisioner "shell" {
inline = [
"rm -rf \"$(brew --cache)\""
]
}
provisioner "shell" { provisioner "shell" {
scripts = [ scripts = [
"./scripts/build/configure-hostname.sh", "./scripts/build/configure-hostname.sh",
"./scripts/build/cleanup-brew.sh", "./scripts/build/configure-system.sh"
"./scripts/build/finalize-vm.sh"
] ]
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}" execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}"
} }

View File

@@ -130,18 +130,18 @@ build {
} }
provisioner "shell" { provisioner "shell" {
scripts = [ scripts = [
"./scripts/build/xcode-clt.sh", "./scripts/build/install-xcode-clt.sh",
"./scripts/build/homebrew.sh", "./scripts/build/install-homebrew.sh",
"./scripts/build/rosetta.sh" "./scripts/build/install-rosetta.sh"
] ]
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}" execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}"
} }
provisioner "shell" { provisioner "shell" {
scripts = [ scripts = [
"./scripts/build/configure-tccdb-macos.sh", "./scripts/build/configure-tccdb-macos.sh",
"./scripts/build/disable-auto-updates.sh", "./scripts/build/configure-auto-updates.sh",
"./scripts/build/ntpconf.sh", "./scripts/build/configure-ntpconf.sh",
"./scripts/build/shell-change.sh" "./scripts/build/configure-shell.sh"
] ]
environment_vars = [ environment_vars = [
"PASSWORD=${var.vm_password}", "PASSWORD=${var.vm_password}",
@@ -151,7 +151,7 @@ build {
} }
provisioner "shell" { provisioner "shell" {
scripts = [ scripts = [
"./scripts/build/preimagedata.sh", "./scripts/build/configure-preimagedata.sh",
"./scripts/build/configure-ssh.sh", "./scripts/build/configure-ssh.sh",
"./scripts/build/configure-machine.sh" "./scripts/build/configure-machine.sh"
] ]
@@ -163,24 +163,24 @@ build {
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}" execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}"
} }
provisioner "shell" { provisioner "shell" {
script = "./scripts/build/reboot.sh" execute_command = "source $HOME/.bash_profile; sudo {{ .Vars }} {{ .Path }}"
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; sudo {{ .Vars }} {{ .Path }}"
expect_disconnect = true expect_disconnect = true
inline = ["echo 'Reboot VM'", "shutdown -r now"]
} }
provisioner "shell" { provisioner "shell" {
pause_before = "30s" pause_before = "30s"
scripts = [ scripts = [
"./scripts/build/open_windows_check.sh", "./scripts/build/configure-windows.sh",
"./scripts/build/powershell.sh", "./scripts/build/install-powershell.sh",
"./scripts/build/mono.sh", "./scripts/build/install-mono.sh",
"./scripts/build/dotnet.sh", "./scripts/build/install-dotnet.sh",
"./scripts/build/azcopy.sh", "./scripts/build/install-azcopy.sh",
"./scripts/build/openssl.sh", "./scripts/build/install-openssl.sh",
"./scripts/build/ruby.sh", "./scripts/build/install-ruby.sh",
"./scripts/build/rubygem.sh", "./scripts/build/install-rubygems.sh",
"./scripts/build/git.sh", "./scripts/build/install-git.sh",
"./scripts/build/node.sh", "./scripts/build/install-node.sh",
"./scripts/build/commonutils.sh" "./scripts/build/install-common-utils.sh"
] ]
environment_vars = [ environment_vars = [
"API_PAT=${var.github_api_pat}", "API_PAT=${var.github_api_pat}",
@@ -189,7 +189,7 @@ build {
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}" execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}"
} }
provisioner "shell" { provisioner "shell" {
script = "./scripts/build/xcode.ps1" script = "./scripts/build/Install-Xcode.ps1"
environment_vars = [ environment_vars = [
"XCODE_INSTALL_STORAGE_URL=${var.xcode_install_storage_url}", "XCODE_INSTALL_STORAGE_URL=${var.xcode_install_storage_url}",
"XCODE_INSTALL_SAS=${var.xcode_install_sas}" "XCODE_INSTALL_SAS=${var.xcode_install_sas}"
@@ -197,24 +197,24 @@ build {
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} pwsh -f {{ .Path }}" execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} pwsh -f {{ .Path }}"
} }
provisioner "shell" { provisioner "shell" {
script = "./scripts/build/reboot.sh" execute_command = "source $HOME/.bash_profile; sudo {{ .Vars }} {{ .Path }}"
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; sudo {{ .Vars }} {{ .Path }}"
expect_disconnect = true expect_disconnect = true
inline = ["echo 'Reboot VM'", "shutdown -r now"]
} }
provisioner "shell" { provisioner "shell" {
scripts = [ scripts = [
"./scripts/build/action-archive-cache.sh", "./scripts/build/install-actions-cache.sh",
"./scripts/build/llvm.sh", "./scripts/build/install-llvm.sh",
"./scripts/build/openjdk.sh", "./scripts/build/install-openjdk.sh",
"./scripts/build/aws.sh", "./scripts/build/install-aws-tools.sh",
"./scripts/build/rust.sh", "./scripts/build/install-rust.sh",
"./scripts/build/gcc.sh", "./scripts/build/install-gcc.sh",
"./scripts/build/cocoapods.sh", "./scripts/build/install-cocoapods.sh",
"./scripts/build/android-toolsets.sh", "./scripts/build/install-android-sdk.sh",
"./scripts/build/safari.sh", "./scripts/build/install-safari.sh",
"./scripts/build/chrome.sh", "./scripts/build/install-chrome.sh",
"./scripts/build/bicep.sh", "./scripts/build/install-bicep.sh",
"./scripts/build/codeql-bundle.sh" "./scripts/build/install-codeql-bundle.sh"
] ]
environment_vars = [ environment_vars = [
"API_PAT=${var.github_api_pat}" "API_PAT=${var.github_api_pat}"
@@ -223,18 +223,18 @@ build {
} }
provisioner "shell" { provisioner "shell" {
scripts = [ scripts = [
"./scripts/build/toolset.ps1", "./scripts/build/Install-Toolset.ps1",
"./scripts/build/configure-toolset.ps1" "./scripts/build/Configure-Toolset.ps1"
] ]
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} pwsh -f {{ .Path }}" execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} pwsh -f {{ .Path }}"
} }
provisioner "shell" { provisioner "shell" {
script = "./scripts/build/delete-duplicate-sims.rb" script = "./scripts/build/configure-xcode-simulators.rb"
execute_command = "source $HOME/.bash_profile; ruby {{ .Path }}" execute_command = "source $HOME/.bash_profile; ruby {{ .Path }}"
} }
provisioner "shell" { provisioner "shell" {
inline = [ inline = [
"pwsh -File \"$HOME/image-generation/software-report/SoftwareReport.Generator.ps1\" -OutputDirectory \"$HOME/image-generation/output/software-report\" -ImageName ${var.build_id}", "pwsh -File \"$HOME/image-generation/software-report/Generate-SoftwareReport.ps1\" -OutputDirectory \"$HOME/image-generation/output/software-report\" -ImageName ${var.build_id}",
"pwsh -File \"$HOME/image-generation/tests/RunAll-Tests.ps1\"" "pwsh -File \"$HOME/image-generation/tests/RunAll-Tests.ps1\""
] ]
execute_command = "source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}" execute_command = "source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}"

View File

@@ -129,17 +129,17 @@ build {
} }
provisioner "shell" { provisioner "shell" {
scripts = [ scripts = [
"./scripts/build/xcode-clt.sh", "./scripts/build/install-xcode-clt.sh",
"./scripts/build/homebrew.sh" "./scripts/build/install-homebrew.sh"
] ]
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}" execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}"
} }
provisioner "shell" { provisioner "shell" {
scripts = [ scripts = [
"./scripts/build/configure-tccdb-macos.sh", "./scripts/build/configure-tccdb-macos.sh",
"./scripts/build/disable-auto-updates.sh", "./scripts/build/configure-auto-updates.sh",
"./scripts/build/ntpconf.sh", "./scripts/build/configure-ntpconf.sh",
"./scripts/build/shell-change.sh" "./scripts/build/configure-shell.sh"
] ]
environment_vars = [ environment_vars = [
"PASSWORD=${var.vm_password}", "PASSWORD=${var.vm_password}",
@@ -149,7 +149,7 @@ build {
} }
provisioner "shell" { provisioner "shell" {
scripts = [ scripts = [
"./scripts/build/preimagedata.sh", "./scripts/build/configure-preimagedata.sh",
"./scripts/build/configure-ssh.sh", "./scripts/build/configure-ssh.sh",
"./scripts/build/configure-machine.sh" "./scripts/build/configure-machine.sh"
] ]
@@ -161,25 +161,25 @@ build {
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}" execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}"
} }
provisioner "shell" { provisioner "shell" {
script = "./scripts/build/reboot.sh" execute_command = "source $HOME/.bash_profile; sudo {{ .Vars }} {{ .Path }}"
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; sudo {{ .Vars }} {{ .Path }}"
expect_disconnect = true expect_disconnect = true
inline = ["echo 'Reboot VM'", "shutdown -r now"]
} }
provisioner "shell" { provisioner "shell" {
pause_before = "30s" pause_before = "30s"
scripts = [ scripts = [
"./scripts/build/open_windows_check.sh", "./scripts/build/configure-windows.sh",
"./scripts/build/powershell.sh", "./scripts/build/install-powershell.sh",
"./scripts/build/mono.sh", "./scripts/build/install-mono.sh",
"./scripts/build/dotnet.sh", "./scripts/build/install-dotnet.sh",
"./scripts/build/python.sh", "./scripts/build/install-python.sh",
"./scripts/build/azcopy.sh", "./scripts/build/install-azcopy.sh",
"./scripts/build/openssl.sh", "./scripts/build/install-openssl.sh",
"./scripts/build/ruby.sh", "./scripts/build/install-ruby.sh",
"./scripts/build/rubygem.sh", "./scripts/build/install-rubygems.sh",
"./scripts/build/git.sh", "./scripts/build/install-git.sh",
"./scripts/build/node.sh", "./scripts/build/install-node.sh",
"./scripts/build/commonutils.sh" "./scripts/build/install-common-utils.sh"
] ]
environment_vars = [ environment_vars = [
"API_PAT=${var.github_api_pat}", "API_PAT=${var.github_api_pat}",
@@ -188,7 +188,7 @@ build {
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}" execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}"
} }
provisioner "shell" { provisioner "shell" {
script = "./scripts/build/xcode.ps1" script = "./scripts/build/Install-Xcode.ps1"
environment_vars = [ environment_vars = [
"XCODE_INSTALL_STORAGE_URL=${var.xcode_install_storage_url}", "XCODE_INSTALL_STORAGE_URL=${var.xcode_install_storage_url}",
"XCODE_INSTALL_SAS=${var.xcode_install_sas}" "XCODE_INSTALL_SAS=${var.xcode_install_sas}"
@@ -196,31 +196,31 @@ build {
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} pwsh -f {{ .Path }}" execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} pwsh -f {{ .Path }}"
} }
provisioner "shell" { provisioner "shell" {
script = "./scripts/build/reboot.sh" execute_command = "source $HOME/.bash_profile; sudo {{ .Vars }} {{ .Path }}"
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; sudo {{ .Vars }} {{ .Path }}"
expect_disconnect = true expect_disconnect = true
inline = ["echo 'Reboot VM'", "shutdown -r now"]
} }
provisioner "shell" { provisioner "shell" {
scripts = [ scripts = [
"./scripts/build/action-archive-cache.sh", "./scripts/build/install-actions-cache.sh",
"./scripts/build/llvm.sh", "./scripts/build/install-llvm.sh",
"./scripts/build/swiftlint.sh", "./scripts/build/install-swiftlint.sh",
"./scripts/build/openjdk.sh", "./scripts/build/install-openjdk.sh",
"./scripts/build/php.sh", "./scripts/build/install-php.sh",
"./scripts/build/aws.sh", "./scripts/build/install-aws-tools.sh",
"./scripts/build/rust.sh", "./scripts/build/install-rust.sh",
"./scripts/build/gcc.sh", "./scripts/build/install-gcc.sh",
"./scripts/build/cocoapods.sh", "./scripts/build/install-cocoapods.sh",
"./scripts/build/android-toolsets.sh", "./scripts/build/install-android-sdk.sh",
"./scripts/build/apache.sh", "./scripts/build/install-apache.sh",
"./scripts/build/vcpkg.sh", "./scripts/build/install-vcpkg.sh",
"./scripts/build/safari.sh", "./scripts/build/install-safari.sh",
"./scripts/build/chrome.sh", "./scripts/build/install-chrome.sh",
"./scripts/build/edge.sh", "./scripts/build/install-edge.sh",
"./scripts/build/firefox.sh", "./scripts/build/install-firefox.sh",
"./scripts/build/pypy.sh", "./scripts/build/install-pypy.sh",
"./scripts/build/bicep.sh", "./scripts/build/install-bicep.sh",
"./scripts/build/codeql-bundle.sh" "./scripts/build/install-codeql-bundle.sh"
] ]
environment_vars = [ environment_vars = [
"API_PAT=${var.github_api_pat}" "API_PAT=${var.github_api_pat}"
@@ -228,12 +228,12 @@ build {
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}" execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}"
} }
provisioner "shell" { provisioner "shell" {
script = "./scripts/build/delete-duplicate-sims.rb" script = "./scripts/build/configure-xcode-simulators.rb"
execute_command = "source $HOME/.bash_profile; ruby {{ .Path }}" execute_command = "source $HOME/.bash_profile; ruby {{ .Path }}"
} }
provisioner "shell" { provisioner "shell" {
inline = [ inline = [
"pwsh -File \"$HOME/image-generation/software-report/SoftwareReport.Generator.ps1\" -OutputDirectory \"$HOME/image-generation/output/software-report\" -ImageName ${var.build_id}" "pwsh -File \"$HOME/image-generation/software-report/Generate-SoftwareReport.ps1\" -OutputDirectory \"$HOME/image-generation/output/software-report\" -ImageName ${var.build_id}"
] ]
execute_command = "source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}" execute_command = "source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}"
} }
@@ -242,11 +242,15 @@ build {
direction = "download" direction = "download"
source = "./image-generation/output/" source = "./image-generation/output/"
} }
provisioner "shell" {
inline = [
"rm -rf \"$(brew --cache)\""
]
}
provisioner "shell" { provisioner "shell" {
scripts = [ scripts = [
"./scripts/build/configure-hostname.sh", "./scripts/build/configure-hostname.sh",
"./scripts/build/cleanup-brew.sh", "./scripts/build/configure-system.sh"
"./scripts/build/finalize-vm.sh"
] ]
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}" execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}"
} }

View File

@@ -130,18 +130,18 @@ build {
} }
provisioner "shell" { provisioner "shell" {
scripts = [ scripts = [
"./scripts/build/xcode-clt.sh", "./scripts/build/install-xcode-clt.sh",
"./scripts/build/homebrew.sh", "./scripts/build/install-homebrew.sh",
"./scripts/build/rosetta.sh" "./scripts/build/install-rosetta.sh"
] ]
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}" execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}"
} }
provisioner "shell" { provisioner "shell" {
scripts = [ scripts = [
"./scripts/build/configure-tccdb-macos.sh", "./scripts/build/configure-tccdb-macos.sh",
"./scripts/build/disable-auto-updates.sh", "./scripts/build/configure-auto-updates.sh",
"./scripts/build/ntpconf.sh", "./scripts/build/configure-ntpconf.sh",
"./scripts/build/shell-change.sh" "./scripts/build/configure-shell.sh"
] ]
environment_vars = [ environment_vars = [
"PASSWORD=${var.vm_password}", "PASSWORD=${var.vm_password}",
@@ -151,7 +151,7 @@ build {
} }
provisioner "shell" { provisioner "shell" {
scripts = [ scripts = [
"./scripts/build/preimagedata.sh", "./scripts/build/configure-preimagedata.sh",
"./scripts/build/configure-ssh.sh", "./scripts/build/configure-ssh.sh",
"./scripts/build/configure-machine.sh" "./scripts/build/configure-machine.sh"
] ]
@@ -163,24 +163,24 @@ build {
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}" execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}"
} }
provisioner "shell" { provisioner "shell" {
script = "./scripts/build/reboot.sh" execute_command = "source $HOME/.bash_profile; sudo {{ .Vars }} {{ .Path }}"
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; sudo {{ .Vars }} {{ .Path }}"
expect_disconnect = true expect_disconnect = true
inline = ["echo 'Reboot VM'", "shutdown -r now"]
} }
provisioner "shell" { provisioner "shell" {
pause_before = "30s" pause_before = "30s"
scripts = [ scripts = [
"./scripts/build/open_windows_check.sh", "./scripts/build/configure-windows.sh",
"./scripts/build/powershell.sh", "./scripts/build/install-powershell.sh",
"./scripts/build/mono.sh", "./scripts/build/install-mono.sh",
"./scripts/build/dotnet.sh", "./scripts/build/install-dotnet.sh",
"./scripts/build/azcopy.sh", "./scripts/build/install-azcopy.sh",
"./scripts/build/openssl.sh", "./scripts/build/install-openssl.sh",
"./scripts/build/ruby.sh", "./scripts/build/install-ruby.sh",
"./scripts/build/rubygem.sh", "./scripts/build/install-rubygems.sh",
"./scripts/build/git.sh", "./scripts/build/install-git.sh",
"./scripts/build/node.sh", "./scripts/build/install-node.sh",
"./scripts/build/commonutils.sh" "./scripts/build/install-common-utils.sh"
] ]
environment_vars = [ environment_vars = [
"API_PAT=${var.github_api_pat}", "API_PAT=${var.github_api_pat}",
@@ -189,7 +189,7 @@ build {
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}" execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}"
} }
provisioner "shell" { provisioner "shell" {
script = "./scripts/build/xcode.ps1" script = "./scripts/build/Install-Xcode.ps1"
environment_vars = [ environment_vars = [
"XCODE_INSTALL_STORAGE_URL=${var.xcode_install_storage_url}", "XCODE_INSTALL_STORAGE_URL=${var.xcode_install_storage_url}",
"XCODE_INSTALL_SAS=${var.xcode_install_sas}" "XCODE_INSTALL_SAS=${var.xcode_install_sas}"
@@ -197,24 +197,24 @@ build {
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} pwsh -f {{ .Path }}" execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} pwsh -f {{ .Path }}"
} }
provisioner "shell" { provisioner "shell" {
script = "./scripts/build/reboot.sh" execute_command = "source $HOME/.bash_profile; sudo {{ .Vars }} {{ .Path }}"
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; sudo {{ .Vars }} {{ .Path }}"
expect_disconnect = true expect_disconnect = true
inline = ["echo 'Reboot VM'", "shutdown -r now"]
} }
provisioner "shell" { provisioner "shell" {
scripts = [ scripts = [
"./scripts/build/action-archive-cache.sh", "./scripts/build/install-actions-cache.sh",
"./scripts/build/llvm.sh", "./scripts/build/install-llvm.sh",
"./scripts/build/openjdk.sh", "./scripts/build/install-openjdk.sh",
"./scripts/build/aws.sh", "./scripts/build/install-aws-tools.sh",
"./scripts/build/rust.sh", "./scripts/build/install-rust.sh",
"./scripts/build/gcc.sh", "./scripts/build/install-gcc.sh",
"./scripts/build/cocoapods.sh", "./scripts/build/install-cocoapods.sh",
"./scripts/build/android-toolsets.sh", "./scripts/build/install-android-sdk.sh",
"./scripts/build/safari.sh", "./scripts/build/install-safari.sh",
"./scripts/build/chrome.sh", "./scripts/build/install-chrome.sh",
"./scripts/build/bicep.sh", "./scripts/build/install-bicep.sh",
"./scripts/build/codeql-bundle.sh" "./scripts/build/install-codeql-bundle.sh"
] ]
environment_vars = [ environment_vars = [
"API_PAT=${var.github_api_pat}" "API_PAT=${var.github_api_pat}"
@@ -222,12 +222,12 @@ build {
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}" execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}"
} }
provisioner "shell" { provisioner "shell" {
script = "./scripts/build/delete-duplicate-sims.rb" script = "./scripts/build/configure-xcode-simulators.rb"
execute_command = "source $HOME/.bash_profile; ruby {{ .Path }}" execute_command = "source $HOME/.bash_profile; ruby {{ .Path }}"
} }
provisioner "shell" { provisioner "shell" {
inline = [ inline = [
"pwsh -File \"$HOME/image-generation/software-report/SoftwareReport.Generator.ps1\" -OutputDirectory \"$HOME/image-generation/output/software-report\" -ImageName ${var.build_id}" "pwsh -File \"$HOME/image-generation/software-report/Generate-SoftwareReport.ps1\" -OutputDirectory \"$HOME/image-generation/output/software-report\" -ImageName ${var.build_id}"
] ]
execute_command = "source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}" execute_command = "source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}"
} }