diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9e430481..b730b995 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -40,10 +40,10 @@ Here are a few things you can do that will increase the likelihood of your pull ### Windows -- Add a script that will install the tool and put the script in the `scripts/build` folder. +- Add a script that will install the tool and put the script in the `scripts/build` folder. There are a bunch of helper functions that could simplify your code: `Choco-Install`, `Install-Binary`, `Install-VsixExtension`, `Start-DownloadWithRetry`, `Test-IsWin19`, `Test-IsWin22` (find the full list of helpers in [ImageHelpers.psm1](images/windows/scripts/helpers/ImageHelpers.psm1)). -- Add a script that will validate the tool installation and put the script in the `scripts/tests` folder. -We use [Pester v5](https://github.com/pester/pester) for validation scripts. If the tests for the tool are complex enough, create a separate `*.Tests.ps1`. Otherwise, use `Tools.Tests.ps1` for simple tests. +- Add a script that will validate the tool installation and put the script in the `scripts/tests` folder. +We use [Pester v5](https://github.com/pester/pester) for validation scripts. If the tests for the tool are complex enough, create a separate `*.Tests.ps1`. Otherwise, use `Tools.Tests.ps1` for simple tests. Add `Invoke-PesterTests -TestFile [-TestName ]` at the end of the installation script to make sure that your tests will be run. - Add changes to the software report generator `images/windows/scripts/docs-gen/SoftwareReport.Generator.ps1`. The software report generator is used to generate an image's README file, e.g. [Windows2019-Readme.md](images/windows/Windows2019-Readme.md) and uses [MarkdownPS](https://github.com/Sarafian/MarkdownPS). @@ -53,7 +53,7 @@ Add `Invoke-PesterTests -TestFile [-TestName ]` at Use existing scripts such as [github-cli.sh](images/ubuntu/scripts/build/github-cli.sh) as a starting point. - Use [helpers](images/ubuntu/scripts/helpers/install.sh) to simplify installation process. - Validation part should `exit 1` if any issue with installation. -- Add changes to the software report generator `images/ubuntu/scripts/docs-gen/SoftwareReport.Generator.ps1`. The software report generator is used to generate an image's README file, e.g. [Ubuntu2004-Readme.md](images/ubuntu/Ubuntu2004-README.md) and it uses [MarkdownPS](https://github.com/Sarafian/MarkdownPS). +- Add changes to the software report generator `images/ubuntu/scripts/docs-gen/Generate-SoftwareReport.ps1`. The software report generator is used to generate an image's README file, e.g. [Ubuntu2004-Readme.md](images/ubuntu/Ubuntu2004-README.md) and it uses [MarkdownPS](https://github.com/Sarafian/MarkdownPS). ### macOS diff --git a/images.CI/linux-and-win/build-image.ps1 b/images.CI/linux-and-win/build-image.ps1 index 47b6cd67..e44b9872 100644 --- a/images.CI/linux-and-win/build-image.ps1 +++ b/images.CI/linux-and-win/build-image.ps1 @@ -50,7 +50,6 @@ packer build -var "client_id=$ClientId" ` -var "virtual_network_name=$VirtualNetworkName" ` -var "virtual_network_resource_group_name=$VirtualNetworkRG" ` -var "virtual_network_subnet_name=$VirtualNetworkSubnet" ` - -var "run_validation_diskspace=$env:RUN_VALIDATION_FLAG" ` -color=false ` $TemplatePath ` | Where-Object { diff --git a/images/ubuntu/scripts/build/Configure-Toolset.ps1 b/images/ubuntu/scripts/build/Configure-Toolset.ps1 index c35866bf..657915f3 100644 --- a/images/ubuntu/scripts/build/Configure-Toolset.ps1 +++ b/images/ubuntu/scripts/build/Configure-Toolset.ps1 @@ -4,7 +4,7 @@ ## Desc: Configure toolset ################################################################################ -Import-Module "$env:HELPER_SCRIPTS/Tests.Helpers.psm1" -DisableNameChecking +Import-Module "$env:HELPER_SCRIPTS/../tests/Helpers.psm1" -DisableNameChecking function Get-ToolsetToolFullPath { diff --git a/images/ubuntu/scripts/build/Install-AzureModules.ps1 b/images/ubuntu/scripts/build/Install-PowerShellAzModules.ps1 similarity index 80% rename from images/ubuntu/scripts/build/Install-AzureModules.ps1 rename to images/ubuntu/scripts/build/Install-PowerShellAzModules.ps1 index e30c26f0..081c8c45 100644 --- a/images/ubuntu/scripts/build/Install-AzureModules.ps1 +++ b/images/ubuntu/scripts/build/Install-PowerShellAzModules.ps1 @@ -1,7 +1,12 @@ +################################################################################ +## File: Install-PowerShellAzModules.ps1 +## Desc: Install Az modules for PowerShell +################################################################################ + $ErrorActionPreference = "Stop" $ProgressPreference = "SilentlyContinue" -Import-Module "$env:HELPER_SCRIPTS/Tests.Helpers.psm1" -DisableNameChecking +Import-Module "$env:HELPER_SCRIPTS/../tests/Helpers.psm1" -DisableNameChecking # Get modules content from toolset $modules = (Get-ToolsetContent).azureModules diff --git a/images/ubuntu/scripts/build/Install-PowerShellModules.ps1 b/images/ubuntu/scripts/build/Install-PowerShellModules.ps1 index 8a41d7ed..82e09f38 100644 --- a/images/ubuntu/scripts/build/Install-PowerShellModules.ps1 +++ b/images/ubuntu/scripts/build/Install-PowerShellModules.ps1 @@ -1,7 +1,12 @@ +################################################################################ +## File: Install-PowerShellModules.ps1 +## Desc: Install modules for PowerShell +################################################################################ + $ErrorActionPreference = "Stop" $ProgressPreference = "SilentlyContinue" -Import-Module "$env:HELPER_SCRIPTS/Tests.Helpers.psm1" -DisableNameChecking +Import-Module "$env:HELPER_SCRIPTS/../tests/Helpers.psm1" -DisableNameChecking # Specifies the installation policy Set-PSRepository -InstallationPolicy Trusted -Name PSGallery diff --git a/images/ubuntu/scripts/build/apt-mock-remove.sh b/images/ubuntu/scripts/build/apt-mock-remove.sh deleted file mode 100644 index 12cab6d2..00000000 --- a/images/ubuntu/scripts/build/apt-mock-remove.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -e - -prefix=/usr/local/bin - -for tool in apt apt-get apt-fast apt-key;do - sudo rm -f $prefix/$tool -done diff --git a/images/ubuntu/scripts/build/cleanup.sh b/images/ubuntu/scripts/build/cleanup.sh index 8120144f..c6cf5e5d 100644 --- a/images/ubuntu/scripts/build/cleanup.sh +++ b/images/ubuntu/scripts/build/cleanup.sh @@ -1,4 +1,8 @@ #!/bin/bash -e +################################################################################ +## File: cleanup.sh +## Desc: Perform cleanup +################################################################################ # before cleanup before=$(df / -Pm | awk 'NR==2{print $4}') @@ -31,4 +35,11 @@ after=$(df / -Pm | awk 'NR==2{print $4}') echo "Delta : $(($after-$before)) MB" # delete symlink for tests running -rm -f /usr/local/bin/invoke_tests \ No newline at end of file +rm -f /usr/local/bin/invoke_tests + +# remove apt mock +prefix=/usr/local/bin + +for tool in apt apt-get apt-fast apt-key;do + sudo rm -f $prefix/$tool +done diff --git a/images/ubuntu/scripts/build/complete-snap-setup.sh b/images/ubuntu/scripts/build/complete-snap-setup.sh deleted file mode 100644 index 09cd8edd..00000000 --- a/images/ubuntu/scripts/build/complete-snap-setup.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -e -################################################################################ -## File: snap-environment.sh -## Desc: Update /etc/environment to include /snap/bin in PATH -## because /etc/profile.d is ignored by `--norc` shell launch option -################################################################################ - -# Source the helpers -source $HELPER_SCRIPTS/etc-environment.sh - -# Update /etc/environemnt -prependEtcEnvironmentPath "/snap/bin" diff --git a/images/ubuntu/scripts/build/apt-mock.sh b/images/ubuntu/scripts/build/configure-apt-mock.sh similarity index 76% rename from images/ubuntu/scripts/build/apt-mock.sh rename to images/ubuntu/scripts/build/configure-apt-mock.sh index 08a14a12..18af3ca0 100644 --- a/images/ubuntu/scripts/build/apt-mock.sh +++ b/images/ubuntu/scripts/build/configure-apt-mock.sh @@ -1,6 +1,9 @@ #!/bin/bash -e - -# A temporary workaround for https://github.com/Azure/azure-linux-extensions/issues/1238 +################################################################################ +## File: configure-apt-mock.sh +## Desc: A temporary workaround for https://github.com/Azure/azure-linux-extensions/issues/1238. +## Cleaned up during configure-cleanup.sh. +################################################################################ prefix=/usr/local/bin diff --git a/images/ubuntu/scripts/build/apt-ubuntu-archive.sh b/images/ubuntu/scripts/build/configure-apt-sources.sh similarity index 80% rename from images/ubuntu/scripts/build/apt-ubuntu-archive.sh rename to images/ubuntu/scripts/build/configure-apt-sources.sh index db444522..6b2ec4c9 100644 --- a/images/ubuntu/scripts/build/apt-ubuntu-archive.sh +++ b/images/ubuntu/scripts/build/configure-apt-sources.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: apt-ubuntu-archive.sh -## Desc: Script for configuring apt sources. https://manpages.ubuntu.com/manpages/jammy/en/man1/apt-transport-mirror.1.html +## File: configure-apt-sources.sh +## Desc: Configure apt sources with failover from Azure to Ubuntu archives. ################################################################################ touch /etc/apt/apt-mirrors.txt @@ -12,4 +12,4 @@ printf "http://security.ubuntu.com/ubuntu/\tpriority:3\n" | tee -a /etc/apt/apt- sed -i 's/http:\/\/azure.archive.ubuntu.com\/ubuntu\//mirror+file:\/etc\/apt\/apt-mirrors.txt/' /etc/apt/sources.list -cp -f /etc/apt/sources.list /etc/cloud/templates/sources.list.ubuntu.tmpl \ No newline at end of file +cp -f /etc/apt/sources.list /etc/cloud/templates/sources.list.ubuntu.tmpl diff --git a/images/ubuntu/scripts/build/apt.sh b/images/ubuntu/scripts/build/configure-apt.sh similarity index 86% rename from images/ubuntu/scripts/build/apt.sh rename to images/ubuntu/scripts/build/configure-apt.sh index 72575749..f4bb76ae 100644 --- a/images/ubuntu/scripts/build/apt.sh +++ b/images/ubuntu/scripts/build/configure-apt.sh @@ -1,4 +1,8 @@ #!/bin/bash -e +################################################################################ +## File: configure-apt.sh +## Desc: Configure apt, install jq and apt-fast packages. +################################################################################ # Stop and disable apt-daily upgrade services; systemctl stop apt-daily.timer diff --git a/images/ubuntu/scripts/build/dpkg-config.sh b/images/ubuntu/scripts/build/configure-dpkg.sh similarity index 81% rename from images/ubuntu/scripts/build/dpkg-config.sh rename to images/ubuntu/scripts/build/configure-dpkg.sh index d8523b34..9ebfdfbe 100644 --- a/images/ubuntu/scripts/build/dpkg-config.sh +++ b/images/ubuntu/scripts/build/configure-dpkg.sh @@ -1,4 +1,8 @@ #!/bin/bash -e +################################################################################ +## File: configure-dpkg.sh +## Desc: Configure dpkg +################################################################################ # This is the anti-frontend. It never interacts with you at all, # and makes the default answers be used for all questions. It diff --git a/images/ubuntu/scripts/build/configure-environment.sh b/images/ubuntu/scripts/build/configure-environment.sh index f7973d54..1725f35b 100644 --- a/images/ubuntu/scripts/build/configure-environment.sh +++ b/images/ubuntu/scripts/build/configure-environment.sh @@ -1,4 +1,8 @@ #!/bin/bash -e +################################################################################ +## File: configure-environment.sh +## Desc: Configure system and environment +################################################################################ # Source the helpers for use with the script source $HELPER_SCRIPTS/os.sh diff --git a/images/ubuntu/scripts/build/preimagedata.sh b/images/ubuntu/scripts/build/configure-image-data.sh similarity index 78% rename from images/ubuntu/scripts/build/preimagedata.sh rename to images/ubuntu/scripts/build/configure-image-data.sh index cc932532..fb873d1d 100644 --- a/images/ubuntu/scripts/build/preimagedata.sh +++ b/images/ubuntu/scripts/build/configure-image-data.sh @@ -1,4 +1,8 @@ #!/bin/bash -e +################################################################################ +## File: configure-image-data.sh +## Desc: Create a file with image data and documentation links +################################################################################ imagedata_file=$IMAGEDATA_FILE image_version=$IMAGE_VERSION diff --git a/images/ubuntu/scripts/build/limits.sh b/images/ubuntu/scripts/build/configure-limits.sh similarity index 72% rename from images/ubuntu/scripts/build/limits.sh rename to images/ubuntu/scripts/build/configure-limits.sh index c064f3a5..e6cb0fe6 100644 --- a/images/ubuntu/scripts/build/limits.sh +++ b/images/ubuntu/scripts/build/configure-limits.sh @@ -1,4 +1,8 @@ #!/bin/bash -e +################################################################################ +## File: configure-limits.sh +## Desc: Configure limits +################################################################################ echo 'session required pam_limits.so' >> /etc/pam.d/common-session echo 'session required pam_limits.so' >> /etc/pam.d/common-session-noninteractive diff --git a/images/ubuntu/scripts/build/snap.sh b/images/ubuntu/scripts/build/configure-snap.sh similarity index 55% rename from images/ubuntu/scripts/build/snap.sh rename to images/ubuntu/scripts/build/configure-snap.sh index 6d38c2e0..aa0de806 100644 --- a/images/ubuntu/scripts/build/snap.sh +++ b/images/ubuntu/scripts/build/configure-snap.sh @@ -1,4 +1,15 @@ #!/bin/bash -e +################################################################################ +## File: configure-snap.sh +## Desc: Configure snap +################################################################################ + +source $HELPER_SCRIPTS/etc-environment.sh + +# Update /etc/environment to include /snap/bin in PATH +# because /etc/profile.d is ignored by `--norc` shell launch option + +prependEtcEnvironmentPath "/snap/bin" # Put snapd auto refresh on hold # as it may generate too much traffic on Canonical's snap server diff --git a/images/ubuntu/scripts/build/post-deployment.sh b/images/ubuntu/scripts/build/configure-system.sh similarity index 86% rename from images/ubuntu/scripts/build/post-deployment.sh rename to images/ubuntu/scripts/build/configure-system.sh index 255c2441..2b36e1ed 100644 --- a/images/ubuntu/scripts/build/post-deployment.sh +++ b/images/ubuntu/scripts/build/configure-system.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: post-deployment.sh -## Desc: Post deployment actions +## File: configure-system.sh +## Desc: Post deployment system configuration actions ################################################################################ mv -f /imagegeneration/post-generation /opt @@ -20,7 +20,7 @@ ENVPATH=${ENVPATH%"\""} echo "PATH=$ENVPATH" | sudo tee -a /etc/environment echo "Updated /etc/environment: $(cat /etc/environment)" -# Clean yarn and npm cache +# Сlean yarn and npm cache if yarn --version > /dev/null then yarn cache clean diff --git a/images/ubuntu/scripts/build/example.sh b/images/ubuntu/scripts/build/example.sh deleted file mode 100644 index 58e71b06..00000000 --- a/images/ubuntu/scripts/build/example.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -e -################################################################################ -## File: example.sh -## Desc: This is an example script that can be copied to add a new software -## installer to the image -################################################################################ - -# Test to see if the software in question is already installed, if not install it -echo "Checking to see if the installer script has already been run" -if [ -z $EXAMPLE_VAR ]; then - $EXAMPLE_VAR=1.0.0 -else - echo "Example variable already set to $EXAMPLE_VAR" -fi - -# Run tests to determine that the software installed as expected -echo "Testing to make sure that script performed as expected, and basic scenarios work" -if [ -z $EXAMPLE_VAR ]; then - echo "EXAMPLE_VAR variable was not set as expected" - exit 1 -else - echo "EXAMPLE_VAR was set properly" -fi diff --git a/images/ubuntu/scripts/build/action-archive-cache.sh b/images/ubuntu/scripts/build/install-actions-cache.sh similarity index 91% rename from images/ubuntu/scripts/build/action-archive-cache.sh rename to images/ubuntu/scripts/build/install-actions-cache.sh index c54c7d06..1aa6f538 100644 --- a/images/ubuntu/scripts/build/action-archive-cache.sh +++ b/images/ubuntu/scripts/build/install-actions-cache.sh @@ -1,8 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: action-archive-cache.sh -## Desc: Download latest release from https://github.com/actions/action-verions -## and un-tar to /opt/actionarchivecache +## File: install-actions-cache.sh +## Desc: Download latest release from https://github.com/actions/action-versions ## Maintainer: #actions-runtime and @TingluoHuang ################################################################################ diff --git a/images/ubuntu/scripts/build/aliyun-cli.sh b/images/ubuntu/scripts/build/install-aliyun-cli.sh similarity index 95% rename from images/ubuntu/scripts/build/aliyun-cli.sh rename to images/ubuntu/scripts/build/install-aliyun-cli.sh index 33a8bf08..95bcc2f4 100644 --- a/images/ubuntu/scripts/build/aliyun-cli.sh +++ b/images/ubuntu/scripts/build/install-aliyun-cli.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: aliyun-cli.sh -## Desc: Installs Alibaba Cloud CLI +## File: install-aliyun-cli.sh +## Desc: Install Alibaba Cloud CLI ## Supply chain security: Alibaba Cloud CLI - checksum validation ################################################################################ diff --git a/images/ubuntu/scripts/build/android.sh b/images/ubuntu/scripts/build/install-android-sdk.sh similarity index 98% rename from images/ubuntu/scripts/build/android.sh rename to images/ubuntu/scripts/build/install-android-sdk.sh index a8358f96..6a94a7a8 100644 --- a/images/ubuntu/scripts/build/android.sh +++ b/images/ubuntu/scripts/build/install-android-sdk.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: android.sh -## Desc: Installs Android SDK +## File: install-android-sdk.sh +## Desc: Install Android SDK and tools ################################################################################ # Source the helpers for use with the script diff --git a/images/ubuntu/scripts/build/apache.sh b/images/ubuntu/scripts/build/install-apache.sh similarity index 85% rename from images/ubuntu/scripts/build/apache.sh rename to images/ubuntu/scripts/build/install-apache.sh index fef2e555..439fb409 100644 --- a/images/ubuntu/scripts/build/apache.sh +++ b/images/ubuntu/scripts/build/install-apache.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: apache.sh -## Desc: Installs Apache HTTP Server +## File: install-apache.sh +## Desc: Install Apache HTTP Server ################################################################################ # Install Apache diff --git a/images/ubuntu/scripts/build/apt-common.sh b/images/ubuntu/scripts/build/install-apt-common.sh similarity index 79% rename from images/ubuntu/scripts/build/apt-common.sh rename to images/ubuntu/scripts/build/install-apt-common.sh index 6fa1063b..7a63390d 100644 --- a/images/ubuntu/scripts/build/apt-common.sh +++ b/images/ubuntu/scripts/build/install-apt-common.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: apt-common.sh -## Desc: Installs basic command line utilities and dev packages +## File: install-apt-common.sh +## Desc: Install basic command line utilities and dev packages ################################################################################ source $HELPER_SCRIPTS/install.sh @@ -12,4 +12,4 @@ for package in $common_packages $cmd_packages; do apt-get install -y --no-install-recommends $package done -invoke_tests "Apt" \ No newline at end of file +invoke_tests "Apt" diff --git a/images/ubuntu/scripts/build/apt-vital.sh b/images/ubuntu/scripts/build/install-apt-vital.sh similarity index 80% rename from images/ubuntu/scripts/build/apt-vital.sh rename to images/ubuntu/scripts/build/install-apt-vital.sh index f2aca618..69c18bea 100644 --- a/images/ubuntu/scripts/build/apt-vital.sh +++ b/images/ubuntu/scripts/build/install-apt-vital.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: apt-vital.sh -## Desc: Installs vital command line utilities +## File: install-apt-vital.sh +## Desc: Install vital command line utilities ################################################################################ source $HELPER_SCRIPTS/install.sh diff --git a/images/ubuntu/scripts/build/aws.sh b/images/ubuntu/scripts/build/install-aws-tools.sh similarity index 91% rename from images/ubuntu/scripts/build/aws.sh rename to images/ubuntu/scripts/build/install-aws-tools.sh index 7cb8d67c..d5ee0576 100644 --- a/images/ubuntu/scripts/build/aws.sh +++ b/images/ubuntu/scripts/build/install-aws-tools.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: aws.sh -## Desc: Installs the AWS CLI, Session Manager plugin for the AWS CLI, and AWS SAM CLI +## File: install-aws-tools.sh +## Desc: Install the AWS CLI, Session Manager plugin for the AWS CLI, and AWS SAM CLI ## Supply chain security: AWS SAM CLI - checksum validation ################################################################################ diff --git a/images/ubuntu/scripts/build/azcopy.sh b/images/ubuntu/scripts/build/install-azcopy.sh similarity index 86% rename from images/ubuntu/scripts/build/azcopy.sh rename to images/ubuntu/scripts/build/install-azcopy.sh index e8fc5fe4..f06df251 100644 --- a/images/ubuntu/scripts/build/azcopy.sh +++ b/images/ubuntu/scripts/build/install-azcopy.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: azcopy.sh -## Desc: Installs AzCopy +## File: install-azcopy.sh +## Desc: Install AzCopy ################################################################################ source $HELPER_SCRIPTS/install.sh @@ -14,4 +14,4 @@ chmod +x /usr/local/bin/azcopy # Create azcopy 10 alias for backward compatibility ln -sf /usr/local/bin/azcopy /usr/local/bin/azcopy10 -invoke_tests "Tools" "azcopy" \ No newline at end of file +invoke_tests "Tools" "azcopy" diff --git a/images/ubuntu/scripts/build/azure-cli.sh b/images/ubuntu/scripts/build/install-azure-cli.sh similarity index 90% rename from images/ubuntu/scripts/build/azure-cli.sh rename to images/ubuntu/scripts/build/install-azure-cli.sh index bca11b8b..eef93fe1 100644 --- a/images/ubuntu/scripts/build/azure-cli.sh +++ b/images/ubuntu/scripts/build/install-azure-cli.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: azure-cli.sh -## Desc: Installed Azure CLI (az) +## File: install-azure-cli.sh +## Desc: Install Azure CLI (az) ################################################################################ # Install Azure CLI (instructions taken from https://docs.microsoft.com/en-us/cli/azure/install-azure-cli) diff --git a/images/ubuntu/scripts/build/azure-devops-cli.sh b/images/ubuntu/scripts/build/install-azure-devops-cli.sh similarity index 79% rename from images/ubuntu/scripts/build/azure-devops-cli.sh rename to images/ubuntu/scripts/build/install-azure-devops-cli.sh index b7a3f529..969497ea 100644 --- a/images/ubuntu/scripts/build/azure-devops-cli.sh +++ b/images/ubuntu/scripts/build/install-azure-devops-cli.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: azure-devops-cli.sh -## Desc: Installed Azure DevOps CLI (az devops) +## File: install-azure-devops-cli.sh +## Desc: Install Azure DevOps CLI (az devops) ################################################################################ # AZURE_EXTENSION_DIR shell variable defines where modules are installed @@ -12,4 +12,4 @@ echo "AZURE_EXTENSION_DIR=$AZURE_EXTENSION_DIR" | tee -a /etc/environment # install azure devops Cli extension az extension add -n azure-devops -invoke_tests "CLI.Tools" "Azure DevOps CLI" \ No newline at end of file +invoke_tests "CLI.Tools" "Azure DevOps CLI" diff --git a/images/ubuntu/scripts/build/bazel.sh b/images/ubuntu/scripts/build/install-bazel.sh similarity index 79% rename from images/ubuntu/scripts/build/bazel.sh rename to images/ubuntu/scripts/build/install-bazel.sh index 4596b912..46d13998 100644 --- a/images/ubuntu/scripts/build/bazel.sh +++ b/images/ubuntu/scripts/build/install-bazel.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: bazel.sh -## Desc: Installs Bazel and Bazelisk (A user-friendly launcher for Bazel) +## File: install-bazel.sh +## Desc: Install Bazel and Bazelisk (A user-friendly launcher for Bazel) ################################################################################ source $HELPER_SCRIPTS/install.sh diff --git a/images/ubuntu/scripts/build/bicep.sh b/images/ubuntu/scripts/build/install-bicep.sh similarity index 84% rename from images/ubuntu/scripts/build/bicep.sh rename to images/ubuntu/scripts/build/install-bicep.sh index 20c0482c..a568ba73 100644 --- a/images/ubuntu/scripts/build/bicep.sh +++ b/images/ubuntu/scripts/build/install-bicep.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: bicep.sh -## Desc: Installs bicep cli +## File: install-bicep.sh +## Desc: Install bicep cli ################################################################################ source $HELPER_SCRIPTS/install.sh @@ -13,4 +13,4 @@ chmod +x ./bicep.bin # Add bicep to PATH (requires admin) sudo mv ./bicep.bin /usr/local/bin/bicep -invoke_tests "Tools" "Bicep" \ No newline at end of file +invoke_tests "Tools" "Bicep" diff --git a/images/ubuntu/scripts/build/clang.sh b/images/ubuntu/scripts/build/install-clang.sh similarity index 95% rename from images/ubuntu/scripts/build/clang.sh rename to images/ubuntu/scripts/build/install-clang.sh index 1c97364f..02dbe119 100644 --- a/images/ubuntu/scripts/build/clang.sh +++ b/images/ubuntu/scripts/build/install-clang.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: clang.sh -## Desc: Installs Clang compiler +## File: install-clang.sh +## Desc: Install Clang compiler ################################################################################ # Source the helpers for use with the script diff --git a/images/ubuntu/scripts/build/cmake.sh b/images/ubuntu/scripts/build/install-cmake.sh similarity index 95% rename from images/ubuntu/scripts/build/cmake.sh rename to images/ubuntu/scripts/build/install-cmake.sh index 588f9295..fed29cba 100644 --- a/images/ubuntu/scripts/build/cmake.sh +++ b/images/ubuntu/scripts/build/install-cmake.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: cmake.sh -## Desc: Installs CMake +## File: install-cmake.sh +## Desc: Install CMake ## Supply chain security: CMake - checksum validation ################################################################################ diff --git a/images/ubuntu/scripts/build/codeql-bundle.sh b/images/ubuntu/scripts/build/install-codeql-bundle.sh similarity index 94% rename from images/ubuntu/scripts/build/codeql-bundle.sh rename to images/ubuntu/scripts/build/install-codeql-bundle.sh index 3b62955c..9cc01bed 100644 --- a/images/ubuntu/scripts/build/codeql-bundle.sh +++ b/images/ubuntu/scripts/build/install-codeql-bundle.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: codeql-bundle.sh -## Desc: Install the CodeQL CLI Bundle to the toolcache. +## File: install-codeql-bundle.sh +## Desc: Install CodeQL CLI Bundle to the toolcache. ################################################################################ source $HELPER_SCRIPTS/install.sh diff --git a/images/ubuntu/scripts/build/containers.sh b/images/ubuntu/scripts/build/install-container-tools.sh similarity index 92% rename from images/ubuntu/scripts/build/containers.sh rename to images/ubuntu/scripts/build/install-container-tools.sh index 38a9d89a..be659b6f 100644 --- a/images/ubuntu/scripts/build/containers.sh +++ b/images/ubuntu/scripts/build/install-container-tools.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: containers.sh -## Desc: Installs container tools: podman, buildah and skopeo onto the image +## File: install-container-tools.sh +## Desc: Install container tools: podman, buildah and skopeo onto the image ################################################################################ source $HELPER_SCRIPTS/os.sh diff --git a/images/ubuntu/scripts/build/docker-compose.sh b/images/ubuntu/scripts/build/install-docker-compose.sh similarity index 91% rename from images/ubuntu/scripts/build/docker-compose.sh rename to images/ubuntu/scripts/build/install-docker-compose.sh index 8720c3f2..3cd844ad 100644 --- a/images/ubuntu/scripts/build/docker-compose.sh +++ b/images/ubuntu/scripts/build/install-docker-compose.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: docker-compose.sh -## Desc: Installs Docker Compose v1 +## File: install-docker-compose.sh +## Desc: Install Docker Compose v1 ## Supply chain security: Docker Compose v1 - checksum validation ################################################################################ diff --git a/images/ubuntu/scripts/build/docker.sh b/images/ubuntu/scripts/build/install-docker.sh similarity index 98% rename from images/ubuntu/scripts/build/docker.sh rename to images/ubuntu/scripts/build/install-docker.sh index a11fbd19..817cc247 100644 --- a/images/ubuntu/scripts/build/docker.sh +++ b/images/ubuntu/scripts/build/install-docker.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: docker.sh -## Desc: Installs docker onto the image +## File: install-docker.sh +## Desc: Install docker onto the image ## Supply chain security: Docker Compose v2, amazon-ecr-credential-helper - checksum validation ################################################################################ diff --git a/images/ubuntu/scripts/build/dotnetcore-sdk.sh b/images/ubuntu/scripts/build/install-dotnetcore-sdk.sh similarity index 98% rename from images/ubuntu/scripts/build/dotnetcore-sdk.sh rename to images/ubuntu/scripts/build/install-dotnetcore-sdk.sh index bc9cbd8e..30f38d9b 100644 --- a/images/ubuntu/scripts/build/dotnetcore-sdk.sh +++ b/images/ubuntu/scripts/build/install-dotnetcore-sdk.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: dotnetcore-sdk.sh -## Desc: Installs .NET Core SDK +## File: install-dotnetcore-sdk.sh +## Desc: Install .NET Core SDK ################################################################################ source $HELPER_SCRIPTS/etc-environment.sh diff --git a/images/ubuntu/scripts/build/erlang.sh b/images/ubuntu/scripts/build/install-erlang.sh similarity index 93% rename from images/ubuntu/scripts/build/erlang.sh rename to images/ubuntu/scripts/build/install-erlang.sh index 229760f1..a0e730f8 100644 --- a/images/ubuntu/scripts/build/erlang.sh +++ b/images/ubuntu/scripts/build/install-erlang.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: erlang.sh -## Desc: Installs erlang +## File: install-erlang.sh +## Desc: Install erlang and rebar3 ################################################################################ # Source the helpers for use with the script diff --git a/images/ubuntu/scripts/build/firefox.sh b/images/ubuntu/scripts/build/install-firefox.sh similarity index 97% rename from images/ubuntu/scripts/build/firefox.sh rename to images/ubuntu/scripts/build/install-firefox.sh index 5ac72a81..18b55046 100644 --- a/images/ubuntu/scripts/build/firefox.sh +++ b/images/ubuntu/scripts/build/install-firefox.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: firefox.sh -## Desc: Installs Firefox +## File: install-firefox.sh +## Desc: Install Firefox ################################################################################ # Source the helpers for use with the script diff --git a/images/ubuntu/scripts/build/gcc.sh b/images/ubuntu/scripts/build/install-gcc-compilers.sh similarity index 85% rename from images/ubuntu/scripts/build/gcc.sh rename to images/ubuntu/scripts/build/install-gcc-compilers.sh index 24f1a7cd..cdefcfdb 100644 --- a/images/ubuntu/scripts/build/gcc.sh +++ b/images/ubuntu/scripts/build/install-gcc-compilers.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: gcc.sh -## Desc: Installs GNU C++ +## File: install-gcc-compilers.sh +## Desc: Install GNU C++ compilers ################################################################################ # Source the helpers for use with the script @@ -25,4 +25,4 @@ for version in ${versions[*]}; do InstallGcc $version done -invoke_tests "Tools" "gcc" \ No newline at end of file +invoke_tests "Tools" "gcc" diff --git a/images/ubuntu/scripts/build/gfortran.sh b/images/ubuntu/scripts/build/install-gfortran.sh similarity index 85% rename from images/ubuntu/scripts/build/gfortran.sh rename to images/ubuntu/scripts/build/install-gfortran.sh index 6b4ae3f6..c0dcdcc1 100644 --- a/images/ubuntu/scripts/build/gfortran.sh +++ b/images/ubuntu/scripts/build/install-gfortran.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: gfortran.sh -## Desc: Installs GNU Fortran +## File: install-gfortran.sh +## Desc: Install GNU Fortran ################################################################################ source $HELPER_SCRIPTS/install.sh source $HELPER_SCRIPTS/os.sh @@ -24,4 +24,4 @@ do InstallFortran $version done -invoke_tests "Tools" "gfortran" \ No newline at end of file +invoke_tests "Tools" "gfortran" diff --git a/images/ubuntu/scripts/build/git-lfs.sh b/images/ubuntu/scripts/build/install-git-lfs.sh similarity index 91% rename from images/ubuntu/scripts/build/git-lfs.sh rename to images/ubuntu/scripts/build/install-git-lfs.sh index a379a7c0..26209746 100644 --- a/images/ubuntu/scripts/build/git-lfs.sh +++ b/images/ubuntu/scripts/build/install-git-lfs.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: git-lfs.sh -## Desc: Installs Git-lfs +## File: install-git-lfs.sh +## Desc: Install Git-lfs ################################################################################ # Source the helpers for use with the script diff --git a/images/ubuntu/scripts/build/git.sh b/images/ubuntu/scripts/build/install-git.sh similarity index 94% rename from images/ubuntu/scripts/build/git.sh rename to images/ubuntu/scripts/build/install-git.sh index 9e7e8c47..385df085 100644 --- a/images/ubuntu/scripts/build/git.sh +++ b/images/ubuntu/scripts/build/install-git.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: git.sh -## Desc: Installs Git +## File: install-git.sh +## Desc: Install Git and Git-FTP ################################################################################ # Source the helpers for use with the script diff --git a/images/ubuntu/scripts/build/github-cli.sh b/images/ubuntu/scripts/build/install-github-cli.sh similarity index 93% rename from images/ubuntu/scripts/build/github-cli.sh rename to images/ubuntu/scripts/build/install-github-cli.sh index 303cafa6..65e3cddc 100644 --- a/images/ubuntu/scripts/build/github-cli.sh +++ b/images/ubuntu/scripts/build/install-github-cli.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: github-cli.sh -## Desc: Installs GitHub CLI +## File: install-github-cli.sh +## Desc: Install GitHub CLI ## Must be run as non-root user after homebrew ## Supply chain security: GitHub CLI - checksum validation ################################################################################ diff --git a/images/ubuntu/scripts/build/google-chrome.sh b/images/ubuntu/scripts/build/install-google-chrome.sh similarity index 96% rename from images/ubuntu/scripts/build/google-chrome.sh rename to images/ubuntu/scripts/build/install-google-chrome.sh index fabb4219..059a33c8 100644 --- a/images/ubuntu/scripts/build/google-chrome.sh +++ b/images/ubuntu/scripts/build/install-google-chrome.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: google-chrome.sh -## Desc: Installs google-chrome, chromedriver and chromium +## File: install-google-chrome.sh +## Desc: Install google-chrome, chromedriver and chromium ################################################################################ # Source the helpers for use with the script @@ -83,4 +83,4 @@ ln -s $CHROMIUM_BIN /usr/bin/chromium ln -s $CHROMIUM_BIN /usr/bin/chromium-browser invoke_tests "Browsers" "Chrome" -invoke_tests "Browsers" "Chromium" \ No newline at end of file +invoke_tests "Browsers" "Chromium" diff --git a/images/ubuntu/scripts/build/google-cloud-cli.sh b/images/ubuntu/scripts/build/install-google-cloud-cli.sh similarity index 91% rename from images/ubuntu/scripts/build/google-cloud-cli.sh rename to images/ubuntu/scripts/build/install-google-cloud-cli.sh index 88708155..cd6fd2d8 100644 --- a/images/ubuntu/scripts/build/google-cloud-cli.sh +++ b/images/ubuntu/scripts/build/install-google-cloud-cli.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: google-cloud-cli.sh -## Desc: Installs the Google Cloud CLI +## File: install-google-cloud-cli.sh +## Desc: Install the Google Cloud CLI ################################################################################ REPO_URL="https://packages.cloud.google.com/apt" diff --git a/images/ubuntu/scripts/build/haskell.sh b/images/ubuntu/scripts/build/install-haskell.sh similarity index 95% rename from images/ubuntu/scripts/build/haskell.sh rename to images/ubuntu/scripts/build/install-haskell.sh index 4a7f6347..3e279654 100644 --- a/images/ubuntu/scripts/build/haskell.sh +++ b/images/ubuntu/scripts/build/install-haskell.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: haskell.sh -## Desc: Installs Haskell +## File: install-haskell.sh +## Desc: Install Haskell, GHCup, Cabal and Stack ################################################################################ # Source the helpers for use with the script diff --git a/images/ubuntu/scripts/build/heroku.sh b/images/ubuntu/scripts/build/install-heroku.sh similarity index 81% rename from images/ubuntu/scripts/build/heroku.sh rename to images/ubuntu/scripts/build/install-heroku.sh index 5c81325f..b432729e 100644 --- a/images/ubuntu/scripts/build/heroku.sh +++ b/images/ubuntu/scripts/build/install-heroku.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: heroku.sh -## Desc: This script installs Heroku CLI. Based on instructions found here: https://devcenter.heroku.com/articles/heroku-cli +## File: install-heroku.sh +## Desc: Install Heroku CLI. Based on instructions found here: https://devcenter.heroku.com/articles/heroku-cli ################################################################################ ## Install Heroku CLI diff --git a/images/ubuntu/scripts/build/hhvm.sh b/images/ubuntu/scripts/build/install-hhvm.sh similarity index 88% rename from images/ubuntu/scripts/build/hhvm.sh rename to images/ubuntu/scripts/build/install-hhvm.sh index 98823310..49591a51 100644 --- a/images/ubuntu/scripts/build/hhvm.sh +++ b/images/ubuntu/scripts/build/install-hhvm.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: hhvm.sh -## Desc: Installs hhvm +## File: install-hhvm.sh +## Desc: Install HHVM ################################################################################ apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xB4112585D386EB94 diff --git a/images/ubuntu/scripts/build/homebrew.sh b/images/ubuntu/scripts/build/install-homebrew.sh similarity index 94% rename from images/ubuntu/scripts/build/homebrew.sh rename to images/ubuntu/scripts/build/install-homebrew.sh index d1337214..8f94e469 100644 --- a/images/ubuntu/scripts/build/homebrew.sh +++ b/images/ubuntu/scripts/build/install-homebrew.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: homebrew.sh -## Desc: Installs the Homebrew on Linux +## File: install-homebrew.sh +## Desc: Install Homebrew on Linux ## Caveat: Brew MUST NOT be used to install any tool during the image build to avoid dependencies, which may come along with the tool ################################################################################ diff --git a/images/ubuntu/scripts/build/java-tools.sh b/images/ubuntu/scripts/build/install-java-tools.sh similarity index 98% rename from images/ubuntu/scripts/build/java-tools.sh rename to images/ubuntu/scripts/build/install-java-tools.sh index cc15bbe3..faa9451e 100644 --- a/images/ubuntu/scripts/build/java-tools.sh +++ b/images/ubuntu/scripts/build/install-java-tools.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: java-tools.sh -## Desc: Installs Java and related tooling (Ant, Gradle, Maven) +## File: install-java-tools.sh +## Desc: Install Java and related tooling (Ant, Gradle, Maven) ################################################################################ source $HELPER_SCRIPTS/install.sh diff --git a/images/ubuntu/scripts/build/julia.sh b/images/ubuntu/scripts/build/install-julia.sh similarity index 93% rename from images/ubuntu/scripts/build/julia.sh rename to images/ubuntu/scripts/build/install-julia.sh index 715a5ea3..4c491d2c 100644 --- a/images/ubuntu/scripts/build/julia.sh +++ b/images/ubuntu/scripts/build/install-julia.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: julia.sh -## Desc: Installs Julia, and adds Julia to the path +## File: install-julia.sh +## Desc: Install Julia and add to the path ################################################################################ # Source the helpers for use with the script diff --git a/images/ubuntu/scripts/build/kotlin.sh b/images/ubuntu/scripts/build/install-kotlin.sh similarity index 94% rename from images/ubuntu/scripts/build/kotlin.sh rename to images/ubuntu/scripts/build/install-kotlin.sh index 92758750..1995a66e 100644 --- a/images/ubuntu/scripts/build/kotlin.sh +++ b/images/ubuntu/scripts/build/install-kotlin.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: kotlin.sh -## Desc: Installs Kotlin +## File: install-kotlin.sh +## Desc: Install Kotlin ## Supply chain security: Kotlin - checksum validation ################################################################################ diff --git a/images/ubuntu/scripts/build/kubernetes-tools.sh b/images/ubuntu/scripts/build/install-kubernetes-tools.sh similarity index 98% rename from images/ubuntu/scripts/build/kubernetes-tools.sh rename to images/ubuntu/scripts/build/install-kubernetes-tools.sh index 12935cc3..0806c981 100644 --- a/images/ubuntu/scripts/build/kubernetes-tools.sh +++ b/images/ubuntu/scripts/build/install-kubernetes-tools.sh @@ -1,6 +1,6 @@ #!/bin/bash -e ################################################################################ -## File: kubernetes-tools.sh +## File: install-kubernetes-tools.sh ## Desc: Installs kubectl, helm, kustomize ## Supply chain security: KIND, minikube - checksum validation ################################################################################ diff --git a/images/ubuntu/scripts/build/leiningen.sh b/images/ubuntu/scripts/build/install-leiningen.sh similarity index 85% rename from images/ubuntu/scripts/build/leiningen.sh rename to images/ubuntu/scripts/build/install-leiningen.sh index 2197b02e..69845f9e 100644 --- a/images/ubuntu/scripts/build/leiningen.sh +++ b/images/ubuntu/scripts/build/install-leiningen.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: leiningen.sh -## Desc: Installs Leiningen +## File: install-leiningen.sh +## Desc: Install Leiningen ################################################################################ LEIN_BIN=/usr/local/bin/lein @@ -16,4 +16,4 @@ LEIN_JAR=$(find $LEIN_HOME -name "leiningen-*-standalone.jar") echo "LEIN_JAR=$LEIN_JAR" | tee -a /etc/environment echo "LEIN_HOME=$LEIN_HOME" | tee -a /etc/environment -invoke_tests "Tools" "Leiningen" \ No newline at end of file +invoke_tests "Tools" "Leiningen" diff --git a/images/ubuntu/scripts/build/microsoft-edge.sh b/images/ubuntu/scripts/build/install-microsoft-edge.sh similarity index 95% rename from images/ubuntu/scripts/build/microsoft-edge.sh rename to images/ubuntu/scripts/build/install-microsoft-edge.sh index 5cf105cb..c8c42cd2 100644 --- a/images/ubuntu/scripts/build/microsoft-edge.sh +++ b/images/ubuntu/scripts/build/install-microsoft-edge.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: microsoft-edge.sh -## Desc: Installs Microsoft Edge +## File: install-microsoft-edge.sh +## Desc: Install Microsoft Edge and WebDriver ################################################################################ source $HELPER_SCRIPTS/install.sh diff --git a/images/ubuntu/scripts/build/miniconda.sh b/images/ubuntu/scripts/build/install-miniconda.sh similarity index 85% rename from images/ubuntu/scripts/build/miniconda.sh rename to images/ubuntu/scripts/build/install-miniconda.sh index 8a68c802..9e6daf85 100644 --- a/images/ubuntu/scripts/build/miniconda.sh +++ b/images/ubuntu/scripts/build/install-miniconda.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: miniconda.sh -## Desc: Installs miniconda +## File: install-miniconda.sh +## Desc: Install miniconda ################################################################################ # Install Miniconda @@ -15,4 +15,4 @@ echo "CONDA=$CONDA" | tee -a /etc/environment ln -s $CONDA/bin/conda /usr/bin/conda -invoke_tests "Tools" "Conda" \ No newline at end of file +invoke_tests "Tools" "Conda" diff --git a/images/ubuntu/scripts/build/mongodb.sh b/images/ubuntu/scripts/build/install-mongodb.sh similarity index 93% rename from images/ubuntu/scripts/build/mongodb.sh rename to images/ubuntu/scripts/build/install-mongodb.sh index 78348003..063d7b31 100644 --- a/images/ubuntu/scripts/build/mongodb.sh +++ b/images/ubuntu/scripts/build/install-mongodb.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: mongodb.sh -## Desc: Installs Mongo DB +## File: install-mongodb.sh +## Desc: Install Mongo DB ################################################################################ # Source the helpers diff --git a/images/ubuntu/scripts/build/mono.sh b/images/ubuntu/scripts/build/install-mono.sh similarity index 96% rename from images/ubuntu/scripts/build/mono.sh rename to images/ubuntu/scripts/build/install-mono.sh index 4819765d..ebeb0a75 100644 --- a/images/ubuntu/scripts/build/mono.sh +++ b/images/ubuntu/scripts/build/install-mono.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: mono.sh -## Desc: Installs Mono +## File: install-mono.sh +## Desc: Install Mono ################################################################################ source $HELPER_SCRIPTS/os.sh diff --git a/images/ubuntu/scripts/build/repos.sh b/images/ubuntu/scripts/build/install-ms-repos.sh similarity index 83% rename from images/ubuntu/scripts/build/repos.sh rename to images/ubuntu/scripts/build/install-ms-repos.sh index 0a2a0813..26eb8f47 100644 --- a/images/ubuntu/scripts/build/repos.sh +++ b/images/ubuntu/scripts/build/install-ms-repos.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: repos.sh -## Desc: Installs official Microsoft package repos for the distribution +## File: install-ms-repos.sh +## Desc: Install official Microsoft package repos for the distribution ################################################################################ LSB_RELEASE=$(lsb_release -rs) diff --git a/images/ubuntu/scripts/build/mssql-cmd-tools.sh b/images/ubuntu/scripts/build/install-mssql-tools.sh similarity index 85% rename from images/ubuntu/scripts/build/mssql-cmd-tools.sh rename to images/ubuntu/scripts/build/install-mssql-tools.sh index 092023e9..20d99473 100644 --- a/images/ubuntu/scripts/build/mssql-cmd-tools.sh +++ b/images/ubuntu/scripts/build/install-mssql-tools.sh @@ -1,6 +1,6 @@ #!/bin/bash -e ################################################################################ -## File: mssql-cmd-tools.sh +## File: install-mssql-tools.sh ## Desc: Install MS SQL Server client tools (https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-setup-tools?view=sql-server-2017) ################################################################################ @@ -11,4 +11,4 @@ apt-get install -y mssql-tools unixodbc-dev apt-get -f install ln -s /opt/mssql-tools/bin/* /usr/local/bin/ -invoke_tests "Tools" "MSSQLCommandLineTools" \ No newline at end of file +invoke_tests "Tools" "MSSQLCommandLineTools" diff --git a/images/ubuntu/scripts/build/mysql.sh b/images/ubuntu/scripts/build/install-mysql.sh similarity index 93% rename from images/ubuntu/scripts/build/mysql.sh rename to images/ubuntu/scripts/build/install-mysql.sh index 5e650d7e..9ff05155 100644 --- a/images/ubuntu/scripts/build/mysql.sh +++ b/images/ubuntu/scripts/build/install-mysql.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: mysql.sh -## Desc: Installs MySQL Client +## File: install-mysql.sh +## Desc: Install MySQL Client ################################################################################ source $HELPER_SCRIPTS/os.sh diff --git a/images/ubuntu/scripts/build/nginx.sh b/images/ubuntu/scripts/build/install-nginx.sh similarity index 87% rename from images/ubuntu/scripts/build/nginx.sh rename to images/ubuntu/scripts/build/install-nginx.sh index 48b33756..6bb6137a 100644 --- a/images/ubuntu/scripts/build/nginx.sh +++ b/images/ubuntu/scripts/build/install-nginx.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: nginx.sh -## Desc: Installs Nginx +## File: install-nginx.sh +## Desc: Install Nginx ################################################################################ # Install Nginx diff --git a/images/ubuntu/scripts/build/nodejs.sh b/images/ubuntu/scripts/build/install-nodejs.sh similarity index 90% rename from images/ubuntu/scripts/build/nodejs.sh rename to images/ubuntu/scripts/build/install-nodejs.sh index 46ef75b8..dd96adc8 100644 --- a/images/ubuntu/scripts/build/nodejs.sh +++ b/images/ubuntu/scripts/build/install-nodejs.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: nodejs.sh -## Desc: Installs Node.js LTS and related tooling (Gulp, Grunt) +## File: install-nodejs.sh +## Desc: Install Node.js LTS and related tooling (Gulp, Grunt) ################################################################################ # Source the helpers for use with the script diff --git a/images/ubuntu/scripts/build/nvm.sh b/images/ubuntu/scripts/build/install-nvm.sh similarity index 93% rename from images/ubuntu/scripts/build/nvm.sh rename to images/ubuntu/scripts/build/install-nvm.sh index 71ae4b8d..1857ac31 100644 --- a/images/ubuntu/scripts/build/nvm.sh +++ b/images/ubuntu/scripts/build/install-nvm.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: nvm.sh -## Desc: Installs Nvm +## File: install-nvm.sh +## Desc: Install Nvm ################################################################################ export NVM_DIR="/etc/skel/.nvm" diff --git a/images/ubuntu/scripts/build/oc.sh b/images/ubuntu/scripts/build/install-oc-cli.sh similarity index 84% rename from images/ubuntu/scripts/build/oc.sh rename to images/ubuntu/scripts/build/install-oc-cli.sh index 27edfa94..36ec8479 100644 --- a/images/ubuntu/scripts/build/oc.sh +++ b/images/ubuntu/scripts/build/install-oc-cli.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: oc.sh -## Desc: Installs the OC CLI +## File: install-oc-cli.sh +## Desc: Install the OC CLI ################################################################################ source $HELPER_SCRIPTS/install.sh @@ -12,4 +12,4 @@ PACKAGE_TAR_NAME="oc.tar.gz" download_with_retries $DOWNLOAD_URL "/tmp" $PACKAGE_TAR_NAME tar xzf "/tmp/$PACKAGE_TAR_NAME" -C "/usr/local/bin" oc -invoke_tests "CLI.Tools" "OC CLI" \ No newline at end of file +invoke_tests "CLI.Tools" "OC CLI" diff --git a/images/ubuntu/scripts/build/oras-cli.sh b/images/ubuntu/scripts/build/install-oras-cli.sh similarity index 93% rename from images/ubuntu/scripts/build/oras-cli.sh rename to images/ubuntu/scripts/build/install-oras-cli.sh index 294e3b9c..f8481a91 100644 --- a/images/ubuntu/scripts/build/oras-cli.sh +++ b/images/ubuntu/scripts/build/install-oras-cli.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: oras-cli.sh -## Desc: Installs ORAS CLI +## File: install-oras-cli.sh +## Desc: Install ORAS CLI ## Supply chain security: ORAS CLI - checksum validation ################################################################################ diff --git a/images/ubuntu/scripts/build/packer.sh b/images/ubuntu/scripts/build/install-packer.sh similarity index 86% rename from images/ubuntu/scripts/build/packer.sh rename to images/ubuntu/scripts/build/install-packer.sh index 2433963c..cdcdc567 100644 --- a/images/ubuntu/scripts/build/packer.sh +++ b/images/ubuntu/scripts/build/install-packer.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: packer.sh -## Desc: Installs packer +## File: install-packer.sh +## Desc: Install packer ################################################################################ source $HELPER_SCRIPTS/install.sh @@ -13,4 +13,4 @@ download_with_retries "${URL}" "/tmp" "${ZIP_NAME}" unzip -qq "/tmp/${ZIP_NAME}" -d /usr/local/bin rm -f "/tmp/${ZIP_NAME}" -invoke_tests "Tools" "Packer" \ No newline at end of file +invoke_tests "Tools" "Packer" diff --git a/images/ubuntu/scripts/build/phantomjs.sh b/images/ubuntu/scripts/build/install-phantomjs.sh similarity index 93% rename from images/ubuntu/scripts/build/phantomjs.sh rename to images/ubuntu/scripts/build/install-phantomjs.sh index 1be03c83..721cd685 100644 --- a/images/ubuntu/scripts/build/phantomjs.sh +++ b/images/ubuntu/scripts/build/install-phantomjs.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: phantomjs.sh -## Desc: Installs PhantomJS +## File: install-phantomjs.sh +## Desc: Install PhantomJS ################################################################################ # Source the helpers for use with the script diff --git a/images/ubuntu/scripts/build/php.sh b/images/ubuntu/scripts/build/install-php.sh similarity index 98% rename from images/ubuntu/scripts/build/php.sh rename to images/ubuntu/scripts/build/install-php.sh index 68e15410..3f8ce40d 100644 --- a/images/ubuntu/scripts/build/php.sh +++ b/images/ubuntu/scripts/build/install-php.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: php.sh -## Desc: Installs php +## File: install-php.sh +## Desc: Install php ################################################################################ # Source the helpers for use with the script diff --git a/images/ubuntu/scripts/build/pipx-packages.sh b/images/ubuntu/scripts/build/install-pipx-packages.sh similarity index 93% rename from images/ubuntu/scripts/build/pipx-packages.sh rename to images/ubuntu/scripts/build/install-pipx-packages.sh index c5aeace6..14262d12 100644 --- a/images/ubuntu/scripts/build/pipx-packages.sh +++ b/images/ubuntu/scripts/build/install-pipx-packages.sh @@ -1,6 +1,6 @@ #!/bin/bash -e ################################################################################ -## File: pipx-packages.sh +## File: install-pipx-packages.sh ## Desc: Install tools via pipx ################################################################################ source $HELPER_SCRIPTS/install.sh @@ -28,4 +28,4 @@ for package in $pipx_packages; do done -invoke_tests "Common" "PipxPackages" \ No newline at end of file +invoke_tests "Common" "PipxPackages" diff --git a/images/ubuntu/scripts/build/postgresql.sh b/images/ubuntu/scripts/build/install-postgresql.sh similarity index 94% rename from images/ubuntu/scripts/build/postgresql.sh rename to images/ubuntu/scripts/build/install-postgresql.sh index 845adffc..f7e16c31 100644 --- a/images/ubuntu/scripts/build/postgresql.sh +++ b/images/ubuntu/scripts/build/install-postgresql.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: postgresql.sh -## Desc: Installs PostgreSQL +## File: install-postgresql.sh +## Desc: Install PostgreSQL ################################################################################ # Source the helpers diff --git a/images/ubuntu/scripts/build/powershellcore.sh b/images/ubuntu/scripts/build/install-powershell.sh similarity index 82% rename from images/ubuntu/scripts/build/powershellcore.sh rename to images/ubuntu/scripts/build/install-powershell.sh index 4b4f206c..b2a0069b 100644 --- a/images/ubuntu/scripts/build/powershellcore.sh +++ b/images/ubuntu/scripts/build/install-powershell.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: powershellcore.sh -## Desc: Installs powershellcore +## File: install-powershell.sh +## Desc: Install PowerShell Core ################################################################################ source $HELPER_SCRIPTS/install.sh diff --git a/images/ubuntu/scripts/build/pulumi.sh b/images/ubuntu/scripts/build/install-pulumi.sh similarity index 94% rename from images/ubuntu/scripts/build/pulumi.sh rename to images/ubuntu/scripts/build/install-pulumi.sh index 769d3282..19fce9a4 100644 --- a/images/ubuntu/scripts/build/pulumi.sh +++ b/images/ubuntu/scripts/build/install-pulumi.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: pulumi.sh -## Desc: Installs Pulumi +## File: install-pulumi.sh +## Desc: Install Pulumi ## Supply chain security: Pulumi - checksum validation ################################################################################ diff --git a/images/ubuntu/scripts/build/pypy.sh b/images/ubuntu/scripts/build/install-pypy.sh similarity index 98% rename from images/ubuntu/scripts/build/pypy.sh rename to images/ubuntu/scripts/build/install-pypy.sh index 5c8e373c..e4797c0e 100644 --- a/images/ubuntu/scripts/build/pypy.sh +++ b/images/ubuntu/scripts/build/install-pypy.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: pypy.sh -## Desc: Installs PyPy +## File: install-pypy.sh +## Desc: Install PyPy ################################################################################ source $HELPER_SCRIPTS/install.sh diff --git a/images/ubuntu/scripts/build/python.sh b/images/ubuntu/scripts/build/install-python.sh similarity index 94% rename from images/ubuntu/scripts/build/python.sh rename to images/ubuntu/scripts/build/install-python.sh index bd2daed5..70321af9 100644 --- a/images/ubuntu/scripts/build/python.sh +++ b/images/ubuntu/scripts/build/install-python.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: python.sh -## Desc: Installs Python 2/3 +## File: install-python.sh +## Desc: Install Python 3 ################################################################################ set -e diff --git a/images/ubuntu/scripts/build/r.sh b/images/ubuntu/scripts/build/install-rlang.sh similarity index 90% rename from images/ubuntu/scripts/build/r.sh rename to images/ubuntu/scripts/build/install-rlang.sh index 79ede293..a463b0d6 100644 --- a/images/ubuntu/scripts/build/r.sh +++ b/images/ubuntu/scripts/build/install-rlang.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: r.sh -## Desc: Installs R +## File: install-rlang.sh +## Desc: Install R ################################################################################ # Source the helpers for use with the script @@ -19,4 +19,4 @@ apt-get install r-base rm /etc/apt/sources.list.d/rlang.list rm /usr/share/keyrings/rlang.gpg -invoke_tests "Tools" "R" \ No newline at end of file +invoke_tests "Tools" "R" diff --git a/images/ubuntu/scripts/build/ruby.sh b/images/ubuntu/scripts/build/install-ruby.sh similarity index 94% rename from images/ubuntu/scripts/build/ruby.sh rename to images/ubuntu/scripts/build/install-ruby.sh index 5c25fe69..de5de806 100644 --- a/images/ubuntu/scripts/build/ruby.sh +++ b/images/ubuntu/scripts/build/install-ruby.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: ruby.sh -## Desc: Installs Ruby requirements and ruby gems +## File: install-ruby.sh +## Desc: Install Ruby requirements and ruby gems ################################################################################ source $HELPER_SCRIPTS/os.sh @@ -54,4 +54,4 @@ for TOOLSET_VERSION in ${TOOLSET_VERSIONS[@]}; do fi done -invoke_tests "Tools" "Ruby" \ No newline at end of file +invoke_tests "Tools" "Ruby" diff --git a/images/ubuntu/scripts/build/runner-package.sh b/images/ubuntu/scripts/build/install-runner-package.sh similarity index 87% rename from images/ubuntu/scripts/build/runner-package.sh rename to images/ubuntu/scripts/build/install-runner-package.sh index 1e8b063e..569a4a61 100644 --- a/images/ubuntu/scripts/build/runner-package.sh +++ b/images/ubuntu/scripts/build/install-runner-package.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: runner-package.sh -## Desc: Downloads and Installs runner package +## File: install-runner-package.sh +## Desc: Download and Install runner package ################################################################################ # Source the helpers for use with the script diff --git a/images/ubuntu/scripts/build/rust.sh b/images/ubuntu/scripts/build/install-rust.sh similarity index 94% rename from images/ubuntu/scripts/build/rust.sh rename to images/ubuntu/scripts/build/install-rust.sh index adec5a65..b046b75f 100644 --- a/images/ubuntu/scripts/build/rust.sh +++ b/images/ubuntu/scripts/build/install-rust.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: rust.sh -## Desc: Installs Rust +## File: install-rust.sh +## Desc: Install Rust ################################################################################ # Source the helpers for use with the script diff --git a/images/ubuntu/scripts/build/sbt.sh b/images/ubuntu/scripts/build/install-sbt.sh similarity index 85% rename from images/ubuntu/scripts/build/sbt.sh rename to images/ubuntu/scripts/build/install-sbt.sh index 39734d53..ff90abce 100644 --- a/images/ubuntu/scripts/build/sbt.sh +++ b/images/ubuntu/scripts/build/install-sbt.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: sbt.sh -## Desc: Installs sbt +## File: install-sbt.sh +## Desc: Install sbt ################################################################################ source $HELPER_SCRIPTS/install.sh @@ -12,4 +12,4 @@ download_with_retries "$downloadUrl" "/tmp" "sbt.tgz" tar zxf /tmp/sbt.tgz -C /usr/share ln -s /usr/share/sbt/bin/sbt /usr/bin/sbt -invoke_tests "Tools" "Sbt" \ No newline at end of file +invoke_tests "Tools" "Sbt" diff --git a/images/ubuntu/scripts/build/selenium.sh b/images/ubuntu/scripts/build/install-selenium.sh similarity index 90% rename from images/ubuntu/scripts/build/selenium.sh rename to images/ubuntu/scripts/build/install-selenium.sh index 494c19ce..b974ef14 100644 --- a/images/ubuntu/scripts/build/selenium.sh +++ b/images/ubuntu/scripts/build/install-selenium.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: selenium.sh -## Desc: Installs selenium server +## File: install-selenium.sh +## Desc: Install selenium server ################################################################################ # Source the helpers for use with the script @@ -15,7 +15,7 @@ SELENIUM_JAR_NAME="$SELENIUM_BINARY_NAME.jar" SELENIUM_DOWNLOAD_URL=$(get_github_package_download_url "SeleniumHQ/selenium" "contains(\"${SELENIUM_BINARY_NAME}-${SELENIUM_MAJOR_VERSION}\") and endswith(\".jar\")") download_with_retries $SELENIUM_DOWNLOAD_URL $SELENIUM_JAR_PATH $SELENIUM_JAR_NAME -# Create an epmty file to retrive selenium version +# Create an epmty file to retrive selenium version SELENIUM_FULL_VERSION=$(echo $SELENIUM_DOWNLOAD_URL | awk -F"${SELENIUM_BINARY_NAME}-|.jar" '{print $2}') touch "$SELENIUM_JAR_PATH/$SELENIUM_BINARY_NAME-$SELENIUM_FULL_VERSION" diff --git a/images/ubuntu/scripts/build/sqlpackage.sh b/images/ubuntu/scripts/build/install-sqlpackage.sh similarity index 97% rename from images/ubuntu/scripts/build/sqlpackage.sh rename to images/ubuntu/scripts/build/install-sqlpackage.sh index d0f9c27b..7623bd95 100644 --- a/images/ubuntu/scripts/build/sqlpackage.sh +++ b/images/ubuntu/scripts/build/install-sqlpackage.sh @@ -1,6 +1,6 @@ #!/bin/bash -e ################################################################################ -## File: sqlpackage.sh +## File: install-sqlpackage.sh ## Desc: Install SqlPackage CLI to DacFx (https://docs.microsoft.com/sql/tools/sqlpackage/sqlpackage-download#get-sqlpackage-net-core-for-linux) ################################################################################ diff --git a/images/ubuntu/scripts/build/swift.sh b/images/ubuntu/scripts/build/install-swift.sh similarity index 97% rename from images/ubuntu/scripts/build/swift.sh rename to images/ubuntu/scripts/build/install-swift.sh index 97bcc76a..68d5dc19 100644 --- a/images/ubuntu/scripts/build/swift.sh +++ b/images/ubuntu/scripts/build/install-swift.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: swift.sh -## Desc: Installs Swift +## File: install-swift.sh +## Desc: Install Swift ################################################################################ # Source the helpers for use with the script diff --git a/images/ubuntu/scripts/build/terraform.sh b/images/ubuntu/scripts/build/install-terraform.sh similarity index 85% rename from images/ubuntu/scripts/build/terraform.sh rename to images/ubuntu/scripts/build/install-terraform.sh index 0e8f5553..c2da2d63 100644 --- a/images/ubuntu/scripts/build/terraform.sh +++ b/images/ubuntu/scripts/build/install-terraform.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: terraform.sh -## Desc: Installs terraform +## File: install-terraform.sh +## Desc: Install terraform ################################################################################ source $HELPER_SCRIPTS/install.sh @@ -13,4 +13,4 @@ download_with_retries "${URL}" "/tmp" "${ZIP_NAME}" unzip -qq "/tmp/${ZIP_NAME}" -d /usr/local/bin rm -f "/tmp/${ZIP_NAME}" -invoke_tests "Tools" "Terraform" \ No newline at end of file +invoke_tests "Tools" "Terraform" diff --git a/images/ubuntu/scripts/build/vcpkg.sh b/images/ubuntu/scripts/build/install-vcpkg.sh similarity index 90% rename from images/ubuntu/scripts/build/vcpkg.sh rename to images/ubuntu/scripts/build/install-vcpkg.sh index cfc4448d..b4544740 100644 --- a/images/ubuntu/scripts/build/vcpkg.sh +++ b/images/ubuntu/scripts/build/install-vcpkg.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: vcpkg.sh -## Desc: Installs vcpkg +## File: install-vcpkg.sh +## Desc: Install vcpkg ################################################################################ # Set env variable for vcpkg @@ -24,4 +24,4 @@ ln -sf $VCPKG_INSTALLATION_ROOT/vcpkg /usr/local/bin rm -rf /root/.vcpkg $HOME/.vcpkg -invoke_tests "Tools" "Vcpkg" \ No newline at end of file +invoke_tests "Tools" "Vcpkg" diff --git a/images/ubuntu/scripts/build/yq.sh b/images/ubuntu/scripts/build/install-yq.sh similarity index 93% rename from images/ubuntu/scripts/build/yq.sh rename to images/ubuntu/scripts/build/install-yq.sh index fa1192c2..677a84cb 100644 --- a/images/ubuntu/scripts/build/yq.sh +++ b/images/ubuntu/scripts/build/install-yq.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: yq.sh -## Desc: Installs YQ +## File: install-yq.sh +## Desc: Install YQ ## Supply chain security: YQ - checksum validation ################################################################################ diff --git a/images/ubuntu/scripts/build/zstd.sh b/images/ubuntu/scripts/build/install-zstd.sh similarity index 96% rename from images/ubuntu/scripts/build/zstd.sh rename to images/ubuntu/scripts/build/install-zstd.sh index ebd8df86..9c3b6c59 100644 --- a/images/ubuntu/scripts/build/zstd.sh +++ b/images/ubuntu/scripts/build/install-zstd.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: zstd.sh -## Desc: Installs zstd +## File: install-zstd.sh +## Desc: Install zstd ## Supply chain security: zstd - checksum validation ################################################################################ diff --git a/images/ubuntu/scripts/build/reboot.sh b/images/ubuntu/scripts/build/reboot.sh deleted file mode 100644 index d1bdf7ee..00000000 --- a/images/ubuntu/scripts/build/reboot.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -e -################################################################################ -## File: reboot.sh -## Desc: Reboot VM -################################################################################ - -echo "Reboot VM" -sudo reboot diff --git a/images/ubuntu/scripts/build/sphinx.sh b/images/ubuntu/scripts/build/sphinx.sh deleted file mode 100644 index d81d9303..00000000 --- a/images/ubuntu/scripts/build/sphinx.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -e -################################################################################ -## File: sphinx.sh -## Desc: Installs Sphinx -################################################################################ - - -# Install Sphinx -apt-get install -y sphinxsearch - -invoke_tests "Tools" "Sphinx" \ No newline at end of file diff --git a/images/ubuntu/scripts/build/validate-disk-space.sh b/images/ubuntu/scripts/build/validate-disk-space.sh deleted file mode 100644 index 94962630..00000000 --- a/images/ubuntu/scripts/build/validate-disk-space.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -e -################################################################################ -## File: validate-disk-space.sh -## Desc: Validate free disk space -################################################################################ - -availableSpaceMB=$(df / -hm | sed 1d | awk '{ print $4}') -minimumFreeSpaceMB=15000 - -echo "Available disk space: $availableSpaceMB MB" - -if [ $RUN_VALIDATION != "true" ]; then - echo "Skipping validation disk space..." - exit 0 -fi - -if [ $availableSpaceMB -le $minimumFreeSpaceMB ]; then - echo "Not enough disk space on the image (minimum available space: $minimumFreeSpaceMB MB)" - exit 1 -fi diff --git a/images/ubuntu/scripts/docs-gen/SoftwareReport.Generator.ps1 b/images/ubuntu/scripts/docs-gen/Generate-SoftwareReport.ps1 similarity index 99% rename from images/ubuntu/scripts/docs-gen/SoftwareReport.Generator.ps1 rename to images/ubuntu/scripts/docs-gen/Generate-SoftwareReport.ps1 index 0aef771b..d3a7b64f 100644 --- a/images/ubuntu/scripts/docs-gen/SoftwareReport.Generator.ps1 +++ b/images/ubuntu/scripts/docs-gen/Generate-SoftwareReport.ps1 @@ -15,7 +15,7 @@ Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Browsers.psm1") -DisableN Import-Module (Join-Path $PSScriptRoot "SoftwareReport.CachedTools.psm1") -DisableNameChecking Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Common.psm1") -DisableNameChecking Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Databases.psm1") -DisableNameChecking -Import-Module "$PSScriptRoot/../helpers/SoftwareReport.Helpers.psm1" -DisableNameChecking +Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Helpers.psm1") -DisableNameChecking Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1" -DisableNameChecking Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Java.psm1") -DisableNameChecking Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Rust.psm1") -DisableNameChecking diff --git a/images/ubuntu/scripts/helpers/SoftwareReport.Helpers.psm1 b/images/ubuntu/scripts/docs-gen/SoftwareReport.Helpers.psm1 similarity index 100% rename from images/ubuntu/scripts/helpers/SoftwareReport.Helpers.psm1 rename to images/ubuntu/scripts/docs-gen/SoftwareReport.Helpers.psm1 diff --git a/images/ubuntu/scripts/helpers/invoke-tests.sh b/images/ubuntu/scripts/helpers/invoke-tests.sh index 8aac32eb..7bef3c4d 100644 --- a/images/ubuntu/scripts/helpers/invoke-tests.sh +++ b/images/ubuntu/scripts/helpers/invoke-tests.sh @@ -4,5 +4,5 @@ ## Desc: Helper function for invoking tests ################################################################################ -pwsh -Command "Import-Module '$HELPER_SCRIPTS/Tests.Helpers.psm1' -DisableNameChecking +pwsh -Command "Import-Module '$HELPER_SCRIPTS/../tests/Helpers.psm1' -DisableNameChecking Invoke-PesterTests -TestFile \"$1\" -TestName \"$2\"" diff --git a/images/ubuntu/scripts/helpers/os.sh b/images/ubuntu/scripts/helpers/os.sh index 26827fae..894ee025 100644 --- a/images/ubuntu/scripts/helpers/os.sh +++ b/images/ubuntu/scripts/helpers/os.sh @@ -1,7 +1,7 @@ #!/bin/bash -e ################################################################################ -## File: install-helpers.sh -## Desc: Helper functions for installing tools +## File: os.sh +## Desc: Helper functions for OS releases ################################################################################ function isUbuntu20 @@ -17,4 +17,4 @@ function isUbuntu22 function getOSVersionLabel { lsb_release -cs -} \ No newline at end of file +} diff --git a/images/ubuntu/scripts/helpers/Tests.Helpers.psm1 b/images/ubuntu/scripts/tests/Helpers.psm1 similarity index 100% rename from images/ubuntu/scripts/helpers/Tests.Helpers.psm1 rename to images/ubuntu/scripts/tests/Helpers.psm1 diff --git a/images/ubuntu/scripts/tests/RunAll-Tests.ps1 b/images/ubuntu/scripts/tests/RunAll-Tests.ps1 index 015491cd..7ac54608 100644 --- a/images/ubuntu/scripts/tests/RunAll-Tests.ps1 +++ b/images/ubuntu/scripts/tests/RunAll-Tests.ps1 @@ -1,3 +1,3 @@ -Import-Module "$PSScriptRoot/../helpers/Tests.Helpers.psm1" -DisableNameChecking +Import-Module "$PSScriptRoot/Helpers.psm1" -DisableNameChecking -Invoke-PesterTests "*" \ No newline at end of file +Invoke-PesterTests "*" diff --git a/images/ubuntu/scripts/tests/System.Tests.ps1 b/images/ubuntu/scripts/tests/System.Tests.ps1 new file mode 100644 index 00000000..333db232 --- /dev/null +++ b/images/ubuntu/scripts/tests/System.Tests.ps1 @@ -0,0 +1,6 @@ +Describe "Disk free space" { + It "Image has more than 15GB free space" { + $freeSpace = (Get-PSDrive "/").Free + $freeSpace | Should -BeGreaterOrEqual 15GB + } +} diff --git a/images/ubuntu/templates/ubuntu-20.04.json b/images/ubuntu/templates/ubuntu-20.04.json index 2d00e076..e1d36d39 100644 --- a/images/ubuntu/templates/ubuntu-20.04.json +++ b/images/ubuntu/templates/ubuntu-20.04.json @@ -22,7 +22,6 @@ "managed_image_name": "packer-ubuntu20-dev", "image_version": "dev", "image_os": "ubuntu20", - "run_validation_diskspace": "false", "dockerhub_login": "{{env `DOCKERHUB_LOGIN`}}", "dockerhub_password": "{{env `DOCKERHUB_PASSWORD`}}" }, @@ -66,15 +65,15 @@ }, { "type": "shell", - "script": "{{template_dir}}/../scripts/build/apt-mock.sh", + "script": "{{template_dir}}/../scripts/build/configure-apt-mock.sh", "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" }, { "type": "shell", "scripts": [ - "{{template_dir}}/../scripts/build/repos.sh", - "{{template_dir}}/../scripts/build/apt-ubuntu-archive.sh", - "{{template_dir}}/../scripts/build/apt.sh" + "{{template_dir}}/../scripts/build/install-ms-repos.sh", + "{{template_dir}}/../scripts/build/configure-apt-sources.sh", + "{{template_dir}}/../scripts/build/configure-apt.sh" ], "environment_vars": [ "DEBIAN_FRONTEND=noninteractive" @@ -83,7 +82,7 @@ }, { "type": "shell", - "script": "{{template_dir}}/../scripts/build/limits.sh", + "script": "{{template_dir}}/../scripts/build/configure-limits.sh", "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" }, { @@ -126,7 +125,7 @@ { "type": "shell", "scripts": [ - "{{template_dir}}/../scripts/build/preimagedata.sh" + "{{template_dir}}/../scripts/build/configure-image-data.sh" ], "environment_vars": [ "IMAGE_VERSION={{user `image_version`}}", @@ -149,7 +148,7 @@ { "type": "shell", "scripts": [ - "{{template_dir}}/../scripts/build/apt-vital.sh" + "{{template_dir}}/../scripts/build/install-apt-vital.sh" ], "environment_vars": [ "HELPER_SCRIPTS={{user `helper_script_folder`}}", @@ -161,8 +160,7 @@ { "type": "shell", "scripts": [ - "{{template_dir}}/../scripts/build/complete-snap-setup.sh", - "{{template_dir}}/../scripts/build/powershellcore.sh" + "{{template_dir}}/../scripts/build/install-powershell.sh" ], "environment_vars": [ "HELPER_SCRIPTS={{user `helper_script_folder`}}" @@ -173,7 +171,7 @@ "type": "shell", "scripts": [ "{{template_dir}}/../scripts/build/Install-PowerShellModules.ps1", - "{{template_dir}}/../scripts/build/Install-AzureModules.ps1" + "{{template_dir}}/../scripts/build/Install-PowerShellAzModules.ps1" ], "environment_vars": [ "HELPER_SCRIPTS={{user `helper_script_folder`}}", @@ -184,70 +182,70 @@ { "type": "shell", "scripts": [ - "{{template_dir}}/../scripts/build/action-archive-cache.sh", - "{{template_dir}}/../scripts/build/runner-package.sh", - "{{template_dir}}/../scripts/build/apt-common.sh", - "{{template_dir}}/../scripts/build/azcopy.sh", - "{{template_dir}}/../scripts/build/azure-cli.sh", - "{{template_dir}}/../scripts/build/azure-devops-cli.sh", - "{{template_dir}}/../scripts/build/bicep.sh", - "{{template_dir}}/../scripts/build/aliyun-cli.sh", - "{{template_dir}}/../scripts/build/apache.sh", - "{{template_dir}}/../scripts/build/aws.sh", - "{{template_dir}}/../scripts/build/clang.sh", - "{{template_dir}}/../scripts/build/swift.sh", - "{{template_dir}}/../scripts/build/cmake.sh", - "{{template_dir}}/../scripts/build/codeql-bundle.sh", - "{{template_dir}}/../scripts/build/containers.sh", - "{{template_dir}}/../scripts/build/dotnetcore-sdk.sh", - "{{template_dir}}/../scripts/build/erlang.sh", - "{{template_dir}}/../scripts/build/firefox.sh", - "{{template_dir}}/../scripts/build/microsoft-edge.sh", - "{{template_dir}}/../scripts/build/gcc.sh", - "{{template_dir}}/../scripts/build/gfortran.sh", - "{{template_dir}}/../scripts/build/git.sh", - "{{template_dir}}/../scripts/build/git-lfs.sh", - "{{template_dir}}/../scripts/build/github-cli.sh", - "{{template_dir}}/../scripts/build/google-chrome.sh", - "{{template_dir}}/../scripts/build/google-cloud-cli.sh", - "{{template_dir}}/../scripts/build/haskell.sh", - "{{template_dir}}/../scripts/build/heroku.sh", - "{{template_dir}}/../scripts/build/hhvm.sh", - "{{template_dir}}/../scripts/build/java-tools.sh", - "{{template_dir}}/../scripts/build/kubernetes-tools.sh", - "{{template_dir}}/../scripts/build/oc.sh", - "{{template_dir}}/../scripts/build/leiningen.sh", - "{{template_dir}}/../scripts/build/miniconda.sh", - "{{template_dir}}/../scripts/build/mono.sh", - "{{template_dir}}/../scripts/build/kotlin.sh", - "{{template_dir}}/../scripts/build/mysql.sh", - "{{template_dir}}/../scripts/build/mssql-cmd-tools.sh", - "{{template_dir}}/../scripts/build/sqlpackage.sh", - "{{template_dir}}/../scripts/build/nginx.sh", - "{{template_dir}}/../scripts/build/nvm.sh", - "{{template_dir}}/../scripts/build/nodejs.sh", - "{{template_dir}}/../scripts/build/bazel.sh", - "{{template_dir}}/../scripts/build/oras-cli.sh", - "{{template_dir}}/../scripts/build/phantomjs.sh", - "{{template_dir}}/../scripts/build/php.sh", - "{{template_dir}}/../scripts/build/postgresql.sh", - "{{template_dir}}/../scripts/build/pulumi.sh", - "{{template_dir}}/../scripts/build/ruby.sh", - "{{template_dir}}/../scripts/build/r.sh", - "{{template_dir}}/../scripts/build/rust.sh", - "{{template_dir}}/../scripts/build/julia.sh", - "{{template_dir}}/../scripts/build/sbt.sh", - "{{template_dir}}/../scripts/build/selenium.sh", - "{{template_dir}}/../scripts/build/terraform.sh", - "{{template_dir}}/../scripts/build/packer.sh", - "{{template_dir}}/../scripts/build/vcpkg.sh", - "{{template_dir}}/../scripts/build/dpkg-config.sh", - "{{template_dir}}/../scripts/build/mongodb.sh", - "{{template_dir}}/../scripts/build/yq.sh", - "{{template_dir}}/../scripts/build/android.sh", - "{{template_dir}}/../scripts/build/pypy.sh", - "{{template_dir}}/../scripts/build/python.sh", - "{{template_dir}}/../scripts/build/zstd.sh" + "{{template_dir}}/../scripts/build/install-actions-cache.sh", + "{{template_dir}}/../scripts/build/install-runner-package.sh", + "{{template_dir}}/../scripts/build/install-apt-common.sh", + "{{template_dir}}/../scripts/build/install-azcopy.sh", + "{{template_dir}}/../scripts/build/install-azure-cli.sh", + "{{template_dir}}/../scripts/build/install-azure-devops-cli.sh", + "{{template_dir}}/../scripts/build/install-bicep.sh", + "{{template_dir}}/../scripts/build/install-aliyun-cli.sh", + "{{template_dir}}/../scripts/build/install-apache.sh", + "{{template_dir}}/../scripts/build/install-aws-tools.sh", + "{{template_dir}}/../scripts/build/install-clang.sh", + "{{template_dir}}/../scripts/build/install-swift.sh", + "{{template_dir}}/../scripts/build/install-cmake.sh", + "{{template_dir}}/../scripts/build/install-codeql-bundle.sh", + "{{template_dir}}/../scripts/build/install-container-tools.sh", + "{{template_dir}}/../scripts/build/install-dotnetcore-sdk.sh", + "{{template_dir}}/../scripts/build/install-erlang.sh", + "{{template_dir}}/../scripts/build/install-firefox.sh", + "{{template_dir}}/../scripts/build/install-microsoft-edge.sh", + "{{template_dir}}/../scripts/build/install-gcc-compilers.sh", + "{{template_dir}}/../scripts/build/install-gfortran.sh", + "{{template_dir}}/../scripts/build/install-git.sh", + "{{template_dir}}/../scripts/build/install-git-lfs.sh", + "{{template_dir}}/../scripts/build/install-github-cli.sh", + "{{template_dir}}/../scripts/build/install-google-chrome.sh", + "{{template_dir}}/../scripts/build/install-google-cloud-cli.sh", + "{{template_dir}}/../scripts/build/install-haskell.sh", + "{{template_dir}}/../scripts/build/install-heroku.sh", + "{{template_dir}}/../scripts/build/install-hhvm.sh", + "{{template_dir}}/../scripts/build/install-java-tools.sh", + "{{template_dir}}/../scripts/build/install-kubernetes-tools.sh", + "{{template_dir}}/../scripts/build/install-oc-cli.sh", + "{{template_dir}}/../scripts/build/install-leiningen.sh", + "{{template_dir}}/../scripts/build/install-miniconda.sh", + "{{template_dir}}/../scripts/build/install-mono.sh", + "{{template_dir}}/../scripts/build/install-kotlin.sh", + "{{template_dir}}/../scripts/build/install-mysql.sh", + "{{template_dir}}/../scripts/build/install-mssql-tools.sh", + "{{template_dir}}/../scripts/build/install-sqlpackage.sh", + "{{template_dir}}/../scripts/build/install-nginx.sh", + "{{template_dir}}/../scripts/build/install-nvm.sh", + "{{template_dir}}/../scripts/build/install-nodejs.sh", + "{{template_dir}}/../scripts/build/install-bazel.sh", + "{{template_dir}}/../scripts/build/install-oras-cli.sh", + "{{template_dir}}/../scripts/build/install-phantomjs.sh", + "{{template_dir}}/../scripts/build/install-php.sh", + "{{template_dir}}/../scripts/build/install-postgresql.sh", + "{{template_dir}}/../scripts/build/install-pulumi.sh", + "{{template_dir}}/../scripts/build/install-ruby.sh", + "{{template_dir}}/../scripts/build/install-rlang.sh", + "{{template_dir}}/../scripts/build/install-rust.sh", + "{{template_dir}}/../scripts/build/install-julia.sh", + "{{template_dir}}/../scripts/build/install-sbt.sh", + "{{template_dir}}/../scripts/build/install-selenium.sh", + "{{template_dir}}/../scripts/build/install-terraform.sh", + "{{template_dir}}/../scripts/build/install-packer.sh", + "{{template_dir}}/../scripts/build/install-vcpkg.sh", + "{{template_dir}}/../scripts/build/configure-dpkg.sh", + "{{template_dir}}/../scripts/build/install-mongodb.sh", + "{{template_dir}}/../scripts/build/install-yq.sh", + "{{template_dir}}/../scripts/build/install-android-sdk.sh", + "{{template_dir}}/../scripts/build/install-pypy.sh", + "{{template_dir}}/../scripts/build/install-python.sh", + "{{template_dir}}/../scripts/build/install-zstd.sh" ], "environment_vars": [ "HELPER_SCRIPTS={{user `helper_script_folder`}}", @@ -259,8 +257,8 @@ { "type": "shell", "scripts": [ - "{{template_dir}}/../scripts/build/docker-compose.sh", - "{{template_dir}}/../scripts/build/docker.sh" + "{{template_dir}}/../scripts/build/install-docker-compose.sh", + "{{template_dir}}/../scripts/build/install-docker.sh" ], "environment_vars": [ "HELPER_SCRIPTS={{user `helper_script_folder`}}", @@ -285,7 +283,7 @@ { "type": "shell", "scripts": [ - "{{template_dir}}/../scripts/build/pipx-packages.sh" + "{{template_dir}}/../scripts/build/install-pipx-packages.sh" ], "environment_vars": [ "HELPER_SCRIPTS={{user `helper_script_folder`}}", @@ -296,7 +294,7 @@ { "type": "shell", "scripts": [ - "{{template_dir}}/../scripts/build/homebrew.sh" + "{{template_dir}}/../scripts/build/install-homebrew.sh" ], "environment_vars": [ "HELPER_SCRIPTS={{user `helper_script_folder`}}", @@ -307,16 +305,22 @@ }, { "type": "shell", - "script": "{{template_dir}}/../scripts/build/snap.sh", + "scripts": [ + "{{template_dir}}/../scripts/build/configure-snap.sh" + ], + "environment_vars": [ + "HELPER_SCRIPTS={{user `helper_script_folder`}}" + ], "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" }, { "type": "shell", "expect_disconnect": true, - "scripts": [ - "{{template_dir}}/../scripts/build/reboot.sh" + "inline": [ + "echo 'Reboot VM'", + "sudo reboot" ], - "execute_command": "/bin/sh -c '{{ .Vars }} {{ .Path }}'" + "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" }, { "type": "shell", @@ -327,18 +331,13 @@ ], "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" }, - { - "type": "shell", - "script": "{{template_dir}}/../scripts/build/apt-mock-remove.sh", - "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" - }, { "type": "shell", "max_retries": 3, "start_retry_timeout": "2m", "inline": [ - "pwsh -Command Write-Host Running SoftwareReport.Generator.ps1 script", - "pwsh -File {{user `image_folder`}}/SoftwareReport/SoftwareReport.Generator.ps1 -OutputDirectory {{user `image_folder`}}", + "pwsh -Command Write-Host Running Generate-SoftwareReport.ps1 script", + "pwsh -File {{user `image_folder`}}/SoftwareReport/Generate-SoftwareReport.ps1 -OutputDirectory {{user `image_folder`}}", "pwsh -Command Write-Host Running RunAll-Tests.ps1 script", "pwsh -File {{user `image_folder`}}/tests/RunAll-Tests.ps1 -OutputDirectory {{user `image_folder`}}" ], @@ -362,7 +361,7 @@ { "type": "shell", "scripts":[ - "{{template_dir}}/../scripts/build/post-deployment.sh" + "{{template_dir}}/../scripts/build/configure-system.sh" ], "environment_vars":[ "HELPER_SCRIPT_FOLDER={{user `helper_script_folder`}}", @@ -371,15 +370,6 @@ ], "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" }, - { - "type": "shell", - "scripts":[ - "{{template_dir}}/../scripts/build/validate-disk-space.sh" - ], - "environment_vars": [ - "RUN_VALIDATION={{user `run_validation_diskspace`}}" - ] - }, { "type": "file", "source": "{{template_dir}}/../assets/ubuntu2004.conf", diff --git a/images/ubuntu/templates/ubuntu-22.04.pkr.hcl b/images/ubuntu/templates/ubuntu-22.04.pkr.hcl index ecf121d3..45aa217f 100644 --- a/images/ubuntu/templates/ubuntu-22.04.pkr.hcl +++ b/images/ubuntu/templates/ubuntu-22.04.pkr.hcl @@ -103,11 +103,6 @@ variable "managed_image_resource_group_name" { default = "${env("ARM_RESOURCE_GROUP")}" } -variable "run_validation_diskspace" { - type = bool - default = false -} - variable "subscription_id" { type = string default = "${env("ARM_SUBSCRIPTION_ID")}" @@ -185,22 +180,22 @@ build { provisioner "shell" { execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'" - script = "${path.root}/../scripts/build/apt-mock.sh" + script = "${path.root}/../scripts/build/configure-apt-mock.sh" } provisioner "shell" { environment_vars = ["DEBIAN_FRONTEND=noninteractive"] execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'" scripts = [ - "${path.root}/../scripts/build/repos.sh", - "${path.root}/../scripts/build/apt-ubuntu-archive.sh", - "${path.root}/../scripts/build/apt.sh" + "${path.root}/../scripts/build/install-ms-repos.sh", + "${path.root}/../scripts/build/configure-apt-sources.sh", + "${path.root}/../scripts/build/configure-apt.sh" ] } provisioner "shell" { execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'" - script = "${path.root}/../scripts/build/limits.sh" + script = "${path.root}/../scripts/build/configure-limits.sh" } provisioner "file" { @@ -243,7 +238,7 @@ build { provisioner "shell" { environment_vars = ["IMAGE_VERSION=${var.image_version}", "IMAGEDATA_FILE=${var.imagedata_file}"] execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'" - scripts = ["${path.root}/../scripts/build/preimagedata.sh"] + scripts = ["${path.root}/../scripts/build/configure-image-data.sh"] } provisioner "shell" { @@ -255,92 +250,92 @@ build { provisioner "shell" { environment_vars = ["DEBIAN_FRONTEND=noninteractive", "HELPER_SCRIPTS=${var.helper_script_folder}", "INSTALLER_SCRIPT_FOLDER=${var.installer_script_folder}"] execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'" - scripts = ["${path.root}/../scripts/build/apt-vital.sh"] + scripts = ["${path.root}/../scripts/build/install-apt-vital.sh"] } provisioner "shell" { environment_vars = ["HELPER_SCRIPTS=${var.helper_script_folder}"] execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'" - scripts = ["${path.root}/../scripts/build/complete-snap-setup.sh", "${path.root}/../scripts/build/powershellcore.sh"] + scripts = ["${path.root}/../scripts/build/install-powershell.sh"] } provisioner "shell" { environment_vars = ["HELPER_SCRIPTS=${var.helper_script_folder}", "INSTALLER_SCRIPT_FOLDER=${var.installer_script_folder}"] execute_command = "sudo sh -c '{{ .Vars }} pwsh -f {{ .Path }}'" - scripts = ["${path.root}/../scripts/build/Install-PowerShellModules.ps1", "${path.root}/../scripts/build/Install-AzureModules.ps1"] + scripts = ["${path.root}/../scripts/build/Install-PowerShellModules.ps1", "${path.root}/../scripts/build/Install-PowerShellAzModules.ps1"] } provisioner "shell" { environment_vars = ["HELPER_SCRIPTS=${var.helper_script_folder}", "INSTALLER_SCRIPT_FOLDER=${var.installer_script_folder}", "DEBIAN_FRONTEND=noninteractive"] execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'" scripts = [ - "${path.root}/../scripts/build/action-archive-cache.sh", - "${path.root}/../scripts/build/runner-package.sh", - "${path.root}/../scripts/build/apt-common.sh", - "${path.root}/../scripts/build/azcopy.sh", - "${path.root}/../scripts/build/azure-cli.sh", - "${path.root}/../scripts/build/azure-devops-cli.sh", - "${path.root}/../scripts/build/bicep.sh", - "${path.root}/../scripts/build/aliyun-cli.sh", - "${path.root}/../scripts/build/apache.sh", - "${path.root}/../scripts/build/aws.sh", - "${path.root}/../scripts/build/clang.sh", - "${path.root}/../scripts/build/swift.sh", - "${path.root}/../scripts/build/cmake.sh", - "${path.root}/../scripts/build/codeql-bundle.sh", - "${path.root}/../scripts/build/containers.sh", - "${path.root}/../scripts/build/dotnetcore-sdk.sh", - "${path.root}/../scripts/build/firefox.sh", - "${path.root}/../scripts/build/microsoft-edge.sh", - "${path.root}/../scripts/build/gcc.sh", - "${path.root}/../scripts/build/gfortran.sh", - "${path.root}/../scripts/build/git.sh", - "${path.root}/../scripts/build/git-lfs.sh", - "${path.root}/../scripts/build/github-cli.sh", - "${path.root}/../scripts/build/google-chrome.sh", - "${path.root}/../scripts/build/google-cloud-cli.sh", - "${path.root}/../scripts/build/haskell.sh", - "${path.root}/../scripts/build/heroku.sh", - "${path.root}/../scripts/build/java-tools.sh", - "${path.root}/../scripts/build/kubernetes-tools.sh", - "${path.root}/../scripts/build/oc.sh", - "${path.root}/../scripts/build/leiningen.sh", - "${path.root}/../scripts/build/miniconda.sh", - "${path.root}/../scripts/build/mono.sh", - "${path.root}/../scripts/build/kotlin.sh", - "${path.root}/../scripts/build/mysql.sh", - "${path.root}/../scripts/build/mssql-cmd-tools.sh", - "${path.root}/../scripts/build/sqlpackage.sh", - "${path.root}/../scripts/build/nginx.sh", - "${path.root}/../scripts/build/nvm.sh", - "${path.root}/../scripts/build/nodejs.sh", - "${path.root}/../scripts/build/bazel.sh", - "${path.root}/../scripts/build/oras-cli.sh", - "${path.root}/../scripts/build/php.sh", - "${path.root}/../scripts/build/postgresql.sh", - "${path.root}/../scripts/build/pulumi.sh", - "${path.root}/../scripts/build/ruby.sh", - "${path.root}/../scripts/build/r.sh", - "${path.root}/../scripts/build/rust.sh", - "${path.root}/../scripts/build/julia.sh", - "${path.root}/../scripts/build/sbt.sh", - "${path.root}/../scripts/build/selenium.sh", - "${path.root}/../scripts/build/terraform.sh", - "${path.root}/../scripts/build/packer.sh", - "${path.root}/../scripts/build/vcpkg.sh", - "${path.root}/../scripts/build/dpkg-config.sh", - "${path.root}/../scripts/build/yq.sh", - "${path.root}/../scripts/build/android.sh", - "${path.root}/../scripts/build/pypy.sh", - "${path.root}/../scripts/build/python.sh", - "${path.root}/../scripts/build/zstd.sh" + "${path.root}/../scripts/build/install-actions-cache.sh", + "${path.root}/../scripts/build/install-runner-package.sh", + "${path.root}/../scripts/build/install-apt-common.sh", + "${path.root}/../scripts/build/install-azcopy.sh", + "${path.root}/../scripts/build/install-azure-cli.sh", + "${path.root}/../scripts/build/install-azure-devops-cli.sh", + "${path.root}/../scripts/build/install-bicep.sh", + "${path.root}/../scripts/build/install-aliyun-cli.sh", + "${path.root}/../scripts/build/install-apache.sh", + "${path.root}/../scripts/build/install-aws-tools.sh", + "${path.root}/../scripts/build/install-clang.sh", + "${path.root}/../scripts/build/install-swift.sh", + "${path.root}/../scripts/build/install-cmake.sh", + "${path.root}/../scripts/build/install-codeql-bundle.sh", + "${path.root}/../scripts/build/install-container-tools.sh", + "${path.root}/../scripts/build/install-dotnetcore-sdk.sh", + "${path.root}/../scripts/build/install-firefox.sh", + "${path.root}/../scripts/build/install-microsoft-edge.sh", + "${path.root}/../scripts/build/install-gcc-compilers.sh", + "${path.root}/../scripts/build/install-gfortran.sh", + "${path.root}/../scripts/build/install-git.sh", + "${path.root}/../scripts/build/install-git-lfs.sh", + "${path.root}/../scripts/build/install-github-cli.sh", + "${path.root}/../scripts/build/install-google-chrome.sh", + "${path.root}/../scripts/build/install-google-cloud-cli.sh", + "${path.root}/../scripts/build/install-haskell.sh", + "${path.root}/../scripts/build/install-heroku.sh", + "${path.root}/../scripts/build/install-java-tools.sh", + "${path.root}/../scripts/build/install-kubernetes-tools.sh", + "${path.root}/../scripts/build/install-oc-cli.sh", + "${path.root}/../scripts/build/install-leiningen.sh", + "${path.root}/../scripts/build/install-miniconda.sh", + "${path.root}/../scripts/build/install-mono.sh", + "${path.root}/../scripts/build/install-kotlin.sh", + "${path.root}/../scripts/build/install-mysql.sh", + "${path.root}/../scripts/build/install-mssql-tools.sh", + "${path.root}/../scripts/build/install-sqlpackage.sh", + "${path.root}/../scripts/build/install-nginx.sh", + "${path.root}/../scripts/build/install-nvm.sh", + "${path.root}/../scripts/build/install-nodejs.sh", + "${path.root}/../scripts/build/install-bazel.sh", + "${path.root}/../scripts/build/install-oras-cli.sh", + "${path.root}/../scripts/build/install-php.sh", + "${path.root}/../scripts/build/install-postgresql.sh", + "${path.root}/../scripts/build/install-pulumi.sh", + "${path.root}/../scripts/build/install-ruby.sh", + "${path.root}/../scripts/build/install-rlang.sh", + "${path.root}/../scripts/build/install-rust.sh", + "${path.root}/../scripts/build/install-julia.sh", + "${path.root}/../scripts/build/install-sbt.sh", + "${path.root}/../scripts/build/install-selenium.sh", + "${path.root}/../scripts/build/install-terraform.sh", + "${path.root}/../scripts/build/install-packer.sh", + "${path.root}/../scripts/build/install-vcpkg.sh", + "${path.root}/../scripts/build/configure-dpkg.sh", + "${path.root}/../scripts/build/install-yq.sh", + "${path.root}/../scripts/build/install-android-sdk.sh", + "${path.root}/../scripts/build/install-pypy.sh", + "${path.root}/../scripts/build/install-python.sh", + "${path.root}/../scripts/build/install-zstd.sh" ] } provisioner "shell" { environment_vars = ["HELPER_SCRIPTS=${var.helper_script_folder}", "INSTALLER_SCRIPT_FOLDER=${var.installer_script_folder}", "DOCKERHUB_LOGIN=${var.dockerhub_login}", "DOCKERHUB_PASSWORD=${var.dockerhub_password}"] execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'" - scripts = ["${path.root}/../scripts/build/docker-compose.sh", "${path.root}/../scripts/build/docker.sh"] + scripts = ["${path.root}/../scripts/build/install-docker-compose.sh", "${path.root}/../scripts/build/install-docker.sh"] } provisioner "shell" { @@ -352,24 +347,25 @@ build { provisioner "shell" { environment_vars = ["HELPER_SCRIPTS=${var.helper_script_folder}", "INSTALLER_SCRIPT_FOLDER=${var.installer_script_folder}"] execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'" - scripts = ["${path.root}/../scripts/build/pipx-packages.sh"] + scripts = ["${path.root}/../scripts/build/install-pipx-packages.sh"] } provisioner "shell" { environment_vars = ["HELPER_SCRIPTS=${var.helper_script_folder}", "DEBIAN_FRONTEND=noninteractive", "INSTALLER_SCRIPT_FOLDER=${var.installer_script_folder}"] execute_command = "/bin/sh -c '{{ .Vars }} {{ .Path }}'" - scripts = ["${path.root}/../scripts/build/homebrew.sh"] + scripts = ["${path.root}/../scripts/build/install-homebrew.sh"] } provisioner "shell" { - execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'" - script = "${path.root}/../scripts/build/snap.sh" + environment_vars = ["HELPER_SCRIPTS=${var.helper_script_folder}"] + execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'" + scripts = ["${path.root}/../scripts/build/configure-snap.sh"] } provisioner "shell" { - execute_command = "/bin/sh -c '{{ .Vars }} {{ .Path }}'" + execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'" expect_disconnect = true - scripts = ["${path.root}/../scripts/build/reboot.sh"] + inline = ["echo 'Reboot VM'", "sudo reboot"] } provisioner "shell" { @@ -379,14 +375,9 @@ build { start_retry_timeout = "10m" } - provisioner "shell" { - execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'" - script = "${path.root}/../scripts/build/apt-mock-remove.sh" - } - provisioner "shell" { environment_vars = ["IMAGE_VERSION=${var.image_version}", "INSTALLER_SCRIPT_FOLDER=${var.installer_script_folder}"] - inline = ["pwsh -File ${var.image_folder}/SoftwareReport/SoftwareReport.Generator.ps1 -OutputDirectory ${var.image_folder}", "pwsh -File ${var.image_folder}/tests/RunAll-Tests.ps1 -OutputDirectory ${var.image_folder}"] + inline = ["pwsh -File ${var.image_folder}/SoftwareReport/Generate-SoftwareReport.ps1 -OutputDirectory ${var.image_folder}", "pwsh -File ${var.image_folder}/tests/RunAll-Tests.ps1 -OutputDirectory ${var.image_folder}"] } provisioner "file" { @@ -404,12 +395,7 @@ build { provisioner "shell" { environment_vars = ["HELPER_SCRIPT_FOLDER=${var.helper_script_folder}", "INSTALLER_SCRIPT_FOLDER=${var.installer_script_folder}", "IMAGE_FOLDER=${var.image_folder}"] execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'" - scripts = ["${path.root}/../scripts/build/post-deployment.sh"] - } - - provisioner "shell" { - environment_vars = ["RUN_VALIDATION=${var.run_validation_diskspace}"] - scripts = ["${path.root}/../scripts/build/validate-disk-space.sh"] + scripts = ["${path.root}/../scripts/build/configure-system.sh"] } provisioner "file" { diff --git a/images/ubuntu/templates/ubuntu-minimal.pkr.hcl b/images/ubuntu/templates/ubuntu-minimal.pkr.hcl index 9ccc6202..8eeaa733 100644 --- a/images/ubuntu/templates/ubuntu-minimal.pkr.hcl +++ b/images/ubuntu/templates/ubuntu-minimal.pkr.hcl @@ -77,11 +77,6 @@ variable "managed_image_resource_group_name" { default = "${env("ARM_RESOURCE_GROUP")}" } -variable "run_validation_diskspace" { - type = bool - default = false -} - variable "subscription_id" { type = string default = "${env("ARM_SUBSCRIPTION_ID")}" @@ -174,7 +169,7 @@ build { // Add apt wrapper to implement retries provisioner "shell" { execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'" - script = "${path.root}/../scripts/build/apt-mock.sh" + script = "${path.root}/../scripts/build/configure-apt-mock.sh" } // Install MS package repos, Configure apt @@ -182,15 +177,15 @@ build { environment_vars = ["DEBIAN_FRONTEND=noninteractive"] execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'" scripts = [ - "${path.root}/../scripts/build/repos.sh", - "${path.root}/../scripts/build/apt.sh" + "${path.root}/../scripts/build/install-ms-repos.sh", + "${path.root}/../scripts/build/configure-apt.sh" ] } // Configure limits provisioner "shell" { execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'" - script = "${path.root}/../scripts/build/limits.sh" + script = "${path.root}/../scripts/build/configure-limits.sh" } provisioner "file" { @@ -225,7 +220,7 @@ build { provisioner "shell" { environment_vars = ["IMAGE_VERSION=${var.image_version}", "IMAGEDATA_FILE=${local.imagedata_file}"] execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'" - scripts = ["${path.root}/../scripts/build/preimagedata.sh"] + scripts = ["${path.root}/../scripts/build/configure-image-data.sh"] } // Create /etc/environment, configure waagent etc. @@ -238,13 +233,13 @@ build { provisioner "shell" { environment_vars = ["DEBIAN_FRONTEND=noninteractive", "HELPER_SCRIPTS=${local.helper_script_folder}", "INSTALLER_SCRIPT_FOLDER=${local.installer_script_folder}"] execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'" - scripts = ["${path.root}/../scripts/build/apt-vital.sh"] + scripts = ["${path.root}/../scripts/build/install-apt-vital.sh"] } provisioner "shell" { environment_vars = ["DEBIAN_FRONTEND=noninteractive", "HELPER_SCRIPTS=${local.helper_script_folder}"] execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'" - scripts = ["${path.root}/../scripts/build/powershellcore.sh"] + scripts = ["${path.root}/../scripts/build/install-powershell.sh"] } provisioner "shell" { @@ -257,17 +252,17 @@ build { environment_vars = ["DEBIAN_FRONTEND=noninteractive", "HELPER_SCRIPTS=${local.helper_script_folder}", "INSTALLER_SCRIPT_FOLDER=${local.installer_script_folder}"] execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'" scripts = [ - "${path.root}/../scripts/build/git.sh", - "${path.root}/../scripts/build/git-lfs.sh", - "${path.root}/../scripts/build/github-cli.sh", - "${path.root}/../scripts/build/zstd.sh" + "${path.root}/../scripts/build/install-git.sh", + "${path.root}/../scripts/build/install-git-lfs.sh", + "${path.root}/../scripts/build/install-github-cli.sh", + "${path.root}/../scripts/build/install-zstd.sh" ] } provisioner "shell" { - execute_command = "/bin/sh -c '{{ .Vars }} {{ .Path }}'" + execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'" expect_disconnect = true - scripts = ["${path.root}/../scripts/build/reboot.sh"] + inline = ["echo 'Reboot VM'", "sudo reboot"] } provisioner "shell" { @@ -277,20 +272,10 @@ build { start_retry_timeout = "10m" } - provisioner "shell" { - execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'" - script = "${path.root}/../scripts/build/apt-mock-remove.sh" - } - provisioner "shell" { environment_vars = ["HELPER_SCRIPT_FOLDER=${local.helper_script_folder}", "INSTALLER_SCRIPT_FOLDER=${local.installer_script_folder}", "IMAGE_FOLDER=${local.image_folder}"] execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'" - scripts = ["${path.root}/../scripts/build/post-deployment.sh"] - } - - provisioner "shell" { - environment_vars = ["RUN_VALIDATION=${var.run_validation_diskspace}"] - scripts = ["${path.root}/../scripts/build/validate-disk-space.sh"] + scripts = ["${path.root}/../scripts/build/configure-system.sh"] } provisioner "shell" {