diff --git a/images/linux/announcements.md b/images/linux/announcements.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/images/linux/scripts/helpers/document.sh b/images/linux/scripts/helpers/document.sh deleted file mode 100644 index 0e1793a44..000000000 --- a/images/linux/scripts/helpers/document.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash -################################################################################ -## File: document.sh -## Desc: Helper functions for writing information to the metadata document -################################################################################ - -function WriteItem { - if [ -z "$METADATA_FILE" ]; then - echo "METADATA_FILE environment variable must be set to output to Metadata Document!" - return 1; - else - echo -e "$1" | sudo tee -a "$METADATA_FILE" - fi -} - -function AddTitle { - WriteItem "# $1" -} - -function AddSubTitle { - WriteItem "## $1" -} - -function DocumentInstalledItem { - WriteItem "- $1" -} - -function DocumentInstalledItemIndent { - WriteItem " - $1" -} - -function AddBlockquote { - WriteItem "> $1" -} - -function StartCode { - WriteItem '```' -} - -function EndCode { - WriteItem '```' -} diff --git a/images/linux/scripts/installers/7-zip.sh b/images/linux/scripts/installers/7-zip.sh index 1baa00261..4b753de53 100644 --- a/images/linux/scripts/installers/7-zip.sh +++ b/images/linux/scripts/installers/7-zip.sh @@ -4,8 +4,6 @@ ## Desc: Installs 7-zip ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Install 7-Zip apt-get update -y @@ -17,7 +15,3 @@ if ! command -v 7z; then echo "7-Zip was not installed" exit 1 fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "7-Zip $(7z i | head --lines=2 | cut -d ' ' -f 3 | tr -d '\n')" diff --git a/images/linux/scripts/installers/Validate-Toolset.ps1 b/images/linux/scripts/installers/Validate-Toolset.ps1 index b5eb9a0a5..2af4fcf42 100644 --- a/images/linux/scripts/installers/Validate-Toolset.ps1 +++ b/images/linux/scripts/installers/Validate-Toolset.ps1 @@ -50,7 +50,6 @@ $toolset = Get-Content -Path "$env:INSTALLER_SCRIPT_FOLDER/toolset.json" -Raw $tools = ConvertFrom-Json -InputObject $toolset | Select-Object -ExpandProperty toolcache foreach($tool in $tools) { - Invoke-Expression "bash -c `"source $env:HELPER_SCRIPTS/document.sh; DocumentInstalledItem '$($tool.name):'`"" $toolPath = Join-Path $env:AGENT_TOOLSDIRECTORY $tool.name # Get executables for current tool @@ -85,8 +84,5 @@ foreach($tool in $tools) { $pypyVersion = & "$foundVersionPath/bin/python" -c "import sys;print(sys.version.split('\n')[1])" $foundVersionName = "{0} {1}" -f $foundVersionName, $pypyVersion } - - # Add tool version to documentation - Invoke-Expression "bash -c `"source $env:HELPER_SCRIPTS/document.sh; DocumentInstalledItemIndent '$($tool.name) $foundVersionName'`"" } } \ No newline at end of file diff --git a/images/linux/scripts/installers/aliyun-cli.sh b/images/linux/scripts/installers/aliyun-cli.sh index ed826c90e..af45bd07c 100644 --- a/images/linux/scripts/installers/aliyun-cli.sh +++ b/images/linux/scripts/installers/aliyun-cli.sh @@ -4,8 +4,6 @@ ## Desc: Installs Alibaba Cloud CLI ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Install Alibaba Cloud CLI URL=$(curl -s https://api.github.com/repos/aliyun/aliyun-cli/releases/latest | jq -r '.assets[].browser_download_url | select(contains("aliyun-cli-linux"))') @@ -19,8 +17,3 @@ if ! command -v aliyun ; then echo "aliyun was not installed" exit 1 fi - -# Document what was added to the image -aliyun_version="$(aliyun version)" -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Alibaba Cloud CLI ($aliyun_version)" \ No newline at end of file diff --git a/images/linux/scripts/installers/android.sh b/images/linux/scripts/installers/android.sh index ed06f51ac..81f28ff7a 100644 --- a/images/linux/scripts/installers/android.sh +++ b/images/linux/scripts/installers/android.sh @@ -7,7 +7,6 @@ set -e # Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh source $HELPER_SCRIPTS/os.sh # Set env variable for SDK Root (https://developer.android.com/studio/command-line/variables) @@ -62,34 +61,3 @@ buildtools_versions_list=$(echo "$buildtools"|awk -F';' '{print $2}') # Add required permissions chmod -R a+rwx ${ANDROID_SDK_ROOT} - -echo "Lastly, document what was added to the metadata file" -DocumentInstalledItem "Google Repository $(cat ${ANDROID_SDK_ROOT}/extras/google/m2repository/source.properties 2>&1 | grep Pkg.Revision | cut -d '=' -f 2)" -DocumentInstalledItem "Google Play services $(cat ${ANDROID_SDK_ROOT}/extras/google/google_play_services/source.properties 2>&1 | grep Pkg.Revision | cut -d '=' -f 2)" - -for version in $google_api_versions_list; do - DocumentInstalledItem "Google APIs $version" -done - -DocumentInstalledItem "CMake $(ls ${ANDROID_SDK_ROOT}/cmake 2>&1)" - -for version in $constraint_layout_versions_list; do - DocumentInstalledItem "Android ConstraintLayout $version" -done - -for version in $constraint_layout_solver_versions_list; do - DocumentInstalledItem "Android ConstraintLayout Solver $version" -done - -DocumentInstalledItem "Android SDK Platform-Tools $(cat ${ANDROID_SDK_ROOT}/platform-tools/source.properties 2>&1 | grep Pkg.Revision | cut -d '=' -f 2)" -for version in $platform_versions_list; do - DocumentInstalledItem "Android SDK Platform $version" -done - -DocumentInstalledItem "Android SDK Patch Applier v4" - -for version in $buildtools_versions_list; do - DocumentInstalledItem "Android SDK Build-Tools $version" -done - -DocumentInstalledItem "Android NDK $(cat ${ANDROID_SDK_ROOT}/ndk-bundle/source.properties 2>&1 | grep Pkg.Revision | cut -d ' ' -f 3)" diff --git a/images/linux/scripts/installers/ansible.sh b/images/linux/scripts/installers/ansible.sh index fcf039308..9f41af7cb 100644 --- a/images/linux/scripts/installers/ansible.sh +++ b/images/linux/scripts/installers/ansible.sh @@ -5,7 +5,6 @@ ################################################################################ # Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh source $HELPER_SCRIPTS/os.sh # ppa:ansible/ansible doesn't contain packages for Ubuntu20.04 @@ -23,7 +22,3 @@ if ! command -v ansible; then echo "Ansible was not installed or found on PATH" exit 1 fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Ansible ($(ansible --version |& head -n 1))" diff --git a/images/linux/scripts/installers/aws-sam-cli.sh b/images/linux/scripts/installers/aws-sam-cli.sh index 97ceb2135..ac56144b3 100644 --- a/images/linux/scripts/installers/aws-sam-cli.sh +++ b/images/linux/scripts/installers/aws-sam-cli.sh @@ -5,8 +5,6 @@ ## Requires Python >=3.6, must be run as non-root user after toolset installation ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Download latest aws sam cli sources TarballUrl=$(curl -s https://api.github.com/repos/aws/aws-sam-cli/releases/latest | jq -r '.tarball_url') @@ -31,7 +29,3 @@ if ! sam --version; then echo "AWS SAM CLI was not installed" exit 1 fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "AWS $(sam --version)" \ No newline at end of file diff --git a/images/linux/scripts/installers/aws.sh b/images/linux/scripts/installers/aws.sh index edf9b1a5c..b2ab32fa1 100644 --- a/images/linux/scripts/installers/aws.sh +++ b/images/linux/scripts/installers/aws.sh @@ -4,8 +4,6 @@ ## Desc: Installs the AWS CLI ################################################################################ -# Source the helpers -source $HELPER_SCRIPTS/document.sh source $HELPER_SCRIPTS/os.sh # Install the AWS CLI v1 on Ubuntu16 and Ubuntu18, and AWS CLI v2 on Ubuntu20 @@ -41,8 +39,3 @@ if ! [[ $sessionPlugin == *"was installed successfully"* ]] then exit 1 fi - -# Document the installed version -echo "Document the installed version" -DocumentInstalledItem "AWS CLI ($(aws --version 2>&1))" -DocumentInstalledItem "AWS CLI Session manager plugin ($(session-manager-plugin --version 2>&1))" diff --git a/images/linux/scripts/installers/azcopy.sh b/images/linux/scripts/installers/azcopy.sh index 9d15d37af..9b57d2680 100644 --- a/images/linux/scripts/installers/azcopy.sh +++ b/images/linux/scripts/installers/azcopy.sh @@ -4,8 +4,6 @@ ## Desc: Installs AzCopy ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Install AzCopy7 wget -O azcopy.tar.gz https://aka.ms/downloadazcopylinux64 @@ -30,10 +28,3 @@ if ! command -v azcopy10; then echo "azcopy10 was not installed" exit 1 fi - -# Document what was added to the image -azcopy7Version=$(azcopy --version | awk '{print $2}' | cut -d '-' -f 1) -azcopy10Version=$(azcopy10 --version | awk '{print $3}') -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "AzCopy7 (available by azcopy alias) $azcopy7Version" -DocumentInstalledItem "AzCopy10 (available by azcopy10 alias) $azcopy10Version" diff --git a/images/linux/scripts/installers/azpowershell.sh b/images/linux/scripts/installers/azpowershell.sh index 2b7d703df..a4a159865 100644 --- a/images/linux/scripts/installers/azpowershell.sh +++ b/images/linux/scripts/installers/azpowershell.sh @@ -5,7 +5,6 @@ ################################################################################ # Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh source $HELPER_SCRIPTS/os.sh # List of versions @@ -36,9 +35,3 @@ for version in ${versions[@]}; do exit 1 fi done - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -for version in ${versions[@]}; do - DocumentInstalledItem "Az Module ($version)" -done diff --git a/images/linux/scripts/installers/azure-cli.sh b/images/linux/scripts/installers/azure-cli.sh index 713d23151..a33ee2f64 100644 --- a/images/linux/scripts/installers/azure-cli.sh +++ b/images/linux/scripts/installers/azure-cli.sh @@ -4,8 +4,6 @@ ## Desc: Installed Azure CLI (az) ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Install Azure CLI (instructions taken from https://docs.microsoft.com/en-us/cli/azure/install-azure-cli) curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash @@ -16,6 +14,3 @@ if ! command -v az; then echo "azure-cli was not installed" exit 1 fi - -# Document what was added to the image -DocumentInstalledItem "Azure CLI ($(az -v | head -n 1))" diff --git a/images/linux/scripts/installers/azure-devops-cli.sh b/images/linux/scripts/installers/azure-devops-cli.sh index e709243d6..d39761be6 100644 --- a/images/linux/scripts/installers/azure-devops-cli.sh +++ b/images/linux/scripts/installers/azure-devops-cli.sh @@ -4,8 +4,6 @@ ## Desc: Installed Azure DevOps CLI (az devops) ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # AZURE_EXTENSION_DIR shell variable defines where modules are installed # https://docs.microsoft.com/en-us/cli/azure/azure-cli-extensions-overview @@ -23,6 +21,3 @@ else echo "azure DevOps Cli extension was not installed" exit 1 fi - -# Document what was added to the image -DocumentInstalledItem "Azure CLI ($(az -v | grep azure-devops))" diff --git a/images/linux/scripts/installers/basic.sh b/images/linux/scripts/installers/basic.sh index 0772cf4ed..b8f3e10f6 100644 --- a/images/linux/scripts/installers/basic.sh +++ b/images/linux/scripts/installers/basic.sh @@ -5,8 +5,6 @@ ################################################################################ set -e -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh toolset="$INSTALLER_SCRIPT_FOLDER/toolset.json" common_packages=$(jq -r ".apt.common_packages[]" $toolset) @@ -24,10 +22,3 @@ for cmd in $cmd_packages; do exit 1 fi done - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Basic packages:" -for package in $common_packages $cmd_packages; do - DocumentInstalledItemIndent $package -done diff --git a/images/linux/scripts/installers/bazel.sh b/images/linux/scripts/installers/bazel.sh index d058d5764..2735df10c 100644 --- a/images/linux/scripts/installers/bazel.sh +++ b/images/linux/scripts/installers/bazel.sh @@ -4,8 +4,6 @@ ## Desc: Installs Bazel and Bazelisk (A user-friendly launcher for Bazel) ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Install bazel curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add - @@ -27,10 +25,3 @@ if ! command -v bazelisk; then echo "Bazelisk was not installed" exit 1 fi - -# Document what was added to the image -bazelisk_version="$(bazelisk version 2>null | grep "Bazelisk version:" | cut -d "v" -f 3)" - -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Bazel ($(bazel --version))" -DocumentInstalledItem "Bazelisk ($bazelisk_version)" diff --git a/images/linux/scripts/installers/build-essential.sh b/images/linux/scripts/installers/build-essential.sh index 34c2ac040..af711a1e9 100644 --- a/images/linux/scripts/installers/build-essential.sh +++ b/images/linux/scripts/installers/build-essential.sh @@ -4,8 +4,7 @@ ## Desc: Installs build-essential package ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh + source $HELPER_SCRIPTS/install.sh PACKAGE=build-essential @@ -18,7 +17,3 @@ if ! IsPackageInstalled $PACKAGE; then else echo "$PACKAGE is already installed" fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "$PACKAGE" diff --git a/images/linux/scripts/installers/clang.sh b/images/linux/scripts/installers/clang.sh index eb508493b..54e6a94f4 100644 --- a/images/linux/scripts/installers/clang.sh +++ b/images/linux/scripts/installers/clang.sh @@ -4,8 +4,6 @@ ## Desc: Installs Clang compiler (versions: 6, 8 and 9) ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh function InstallClang { version=$1 @@ -26,10 +24,6 @@ function InstallClang { exit 1 fi done - - # Document what was added to the image - echo "Documenting clang-$version..." - DocumentInstalledItem "Clang $version ($(clang-$version --version | head -n 1 | cut -d ' ' -f 3 | cut -d '-' -f 1))" } # Download script for automatic installation diff --git a/images/linux/scripts/installers/cmake.sh b/images/linux/scripts/installers/cmake.sh index 0fd839a50..2dbf4cf54 100644 --- a/images/linux/scripts/installers/cmake.sh +++ b/images/linux/scripts/installers/cmake.sh @@ -4,8 +4,6 @@ ## Desc: Installs CMake ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # 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" @@ -24,7 +22,3 @@ if ! command -v cmake; then echo "cmake was not installed" exit 1 fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "CMake ($(cmake --version | head -n 1))" diff --git a/images/linux/scripts/installers/containers.sh b/images/linux/scripts/installers/containers.sh index 77e542286..a44d73fd7 100644 --- a/images/linux/scripts/installers/containers.sh +++ b/images/linux/scripts/installers/containers.sh @@ -4,7 +4,6 @@ ## Desc: Installs container tools: podman, buildah and skopeo onto the image ################################################################################ -source $HELPER_SCRIPTS/document.sh source /etc/os-release sh -c "echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/x${NAME}_${VERSION_ID}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list" @@ -14,12 +13,3 @@ apt-get update -qq apt-get -qq -y install podman buildah skopeo mkdir -p /etc/containers echo -e "[registries.search]\nregistries = ['docker.io', 'quay.io']" | tee /etc/containers/registries.conf - -## Add version information to the metadata file -echo "Documenting container tools version" -PODMAN_VERSION="$(podman --version | cut -d " " -f 3)" -BUILDAH_VERSION="$(buildah --version | cut -d " " -f 3)" -SKOPEO_VERSION="$(skopeo --version | cut -d " " -f 3)" -DocumentInstalledItem "Podman ($PODMAN_VERSION)" -DocumentInstalledItem "Buildah ($BUILDAH_VERSION)" -DocumentInstalledItem "Skopeo ($SKOPEO_VERSION)" diff --git a/images/linux/scripts/installers/docker-compose.sh b/images/linux/scripts/installers/docker-compose.sh index 76a5df7b9..d2698d5c0 100644 --- a/images/linux/scripts/installers/docker-compose.sh +++ b/images/linux/scripts/installers/docker-compose.sh @@ -4,7 +4,6 @@ ## Desc: Installs Docker Compose ################################################################################ -source $HELPER_SCRIPTS/document.sh URL=$(curl -s https://api.github.com/repos/docker/compose/releases/latest | jq -r '.assets[].browser_download_url | select(contains("docker-compose-Linux-x86_64"))' | head -1) @@ -18,8 +17,3 @@ if ! command -v docker-compose; then echo "docker-compose was not installed" exit 1 fi - -## Add version information to the metadata file -echo "Documenting Docker Compose version" -docker_compose_version=$(docker-compose -v) -DocumentInstalledItem "Docker Compose (${docker_compose_version})" diff --git a/images/linux/scripts/installers/docker-moby.sh b/images/linux/scripts/installers/docker-moby.sh index 6ce336718..49ef6a563 100644 --- a/images/linux/scripts/installers/docker-moby.sh +++ b/images/linux/scripts/installers/docker-moby.sh @@ -6,7 +6,6 @@ set -e # Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh source $HELPER_SCRIPTS/install.sh source $HELPER_SCRIPTS/os.sh @@ -54,18 +53,3 @@ images=$(jq -r '.docker.images[]' $toolset) for image in $images; do docker pull "$image" done - -# Add version information to the metadata file -echo "Documenting Docker version" -docker_version=$(docker -v) -DocumentInstalledItem "Docker-Moby ($docker_version)" - -echo "Documenting Docker-buildx version" -DOCKER_BUILDX_VERSION=$(docker buildx version | cut -d ' ' -f2) -DocumentInstalledItem "Docker-Buildx ($DOCKER_BUILDX_VERSION)" - -# Add container information to the metadata file -DocumentInstalledItem "Cached container images" -while read -r line; do - DocumentInstalledItemIndent "$line" -done <<< "$(docker images --digests --format '{{.Repository}}:{{.Tag}} (Digest: {{.Digest}})')" diff --git a/images/linux/scripts/installers/dotnetcore-sdk.sh b/images/linux/scripts/installers/dotnetcore-sdk.sh index e510f34c3..ee0a95b89 100644 --- a/images/linux/scripts/installers/dotnetcore-sdk.sh +++ b/images/linux/scripts/installers/dotnetcore-sdk.sh @@ -5,7 +5,6 @@ ################################################################################ source $HELPER_SCRIPTS/etc-environment.sh -source $HELPER_SCRIPTS/document.sh source $HELPER_SCRIPTS/install.sh source $HELPER_SCRIPTS/os.sh @@ -84,7 +83,6 @@ for tarball in *.tar.gz; do done rm urls -DocumentInstalledItem ".NET Core SDK:" # Smoke test each SDK for sdk in $sortedSdks; do mksamples "$sdk" "console" @@ -93,7 +91,6 @@ for sdk in $sortedSdks; do mksamples "$sdk" "web" mksamples "$sdk" "mvc" mksamples "$sdk" "webapi" - DocumentInstalledItemIndent "$sdk" done # NuGetFallbackFolder at /usr/share/dotnet/sdk/NuGetFallbackFolder is warmed up by smoke test diff --git a/images/linux/scripts/installers/erlang.sh b/images/linux/scripts/installers/erlang.sh index 31a3a3061..aa94e3a2b 100644 --- a/images/linux/scripts/installers/erlang.sh +++ b/images/linux/scripts/installers/erlang.sh @@ -4,8 +4,6 @@ ## Desc: Installs erlang ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh source_list=/etc/apt/sources.list.d/eslerlang.list @@ -29,10 +27,5 @@ for cmd in erl erlc rebar3; do fi done -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -erlang_version="$(erl -version 2>&1 | tr -d '\n' | tr -d '\r')" -DocumentInstalledItem "Erlang ($erlang_version)" - # Clean up source list rm $source_list diff --git a/images/linux/scripts/installers/example.sh b/images/linux/scripts/installers/example.sh index d0f3c5c3d..895de5d35 100644 --- a/images/linux/scripts/installers/example.sh +++ b/images/linux/scripts/installers/example.sh @@ -5,8 +5,6 @@ ## installer to the image ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # 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" @@ -24,7 +22,3 @@ if [ -z $EXAMPLE_VAR ]; then else echo "EXAMPLE_VAR was set properly" fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Example Var ($EXAMPLE_VAR)" diff --git a/images/linux/scripts/installers/firefox.sh b/images/linux/scripts/installers/firefox.sh index e6f44cbf2..3287bf168 100644 --- a/images/linux/scripts/installers/firefox.sh +++ b/images/linux/scripts/installers/firefox.sh @@ -4,8 +4,6 @@ ## Desc: Installs Firefox ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Install Firefox apt-get install -y firefox @@ -20,13 +18,6 @@ fi # Default firefox local is en_GB echo 'pref("intl.locale.requested","en_US");' >> "/usr/lib/firefox/browser/defaults/preferences/syspref.js" -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -# Resolves: Running Firefox as root in a regular user's session is not supported. -# ($HOME is /home/packer which is owned by packer.) -HOME=/root -DocumentInstalledItem "Firefox ($(firefox --version))" - # Download and unpack latest release of geckodriver URL=$(curl -s https://api.github.com/repos/mozilla/geckodriver/releases/latest | jq -r '.assets[].browser_download_url | select(test("linux64.tar.gz$"))') echo "Downloading geckodriver $URL" @@ -50,7 +41,3 @@ if ! command -v geckodriver; then echo "geckodriver was not installed" exit 1 fi - -echo "Lastly, documenting what we added to the metadata file" -ver=`geckodriver --version | head -1 |awk '{print $2}'` -DocumentInstalledItem "Geckodriver (${ver}); Gecko Driver is available via GECKOWEBDRIVER environment variable" diff --git a/images/linux/scripts/installers/gcc.sh b/images/linux/scripts/installers/gcc.sh index 86575568c..7b1bd56ea 100644 --- a/images/linux/scripts/installers/gcc.sh +++ b/images/linux/scripts/installers/gcc.sh @@ -4,8 +4,6 @@ ## Desc: Installs GNU C++ ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh function InstallGcc { version=$1 @@ -19,10 +17,6 @@ function InstallGcc { echo "$version was not installed" exit 1 fi - - # Document what was added to the image - echo "Documenting $version..." - DocumentInstalledItem "GNU C++ $($version --version | head -n 1 | cut -d ' ' -f 4)" } # Install GNU C++ compiler diff --git a/images/linux/scripts/installers/gfortran.sh b/images/linux/scripts/installers/gfortran.sh index 1e392839d..c37fccf27 100644 --- a/images/linux/scripts/installers/gfortran.sh +++ b/images/linux/scripts/installers/gfortran.sh @@ -4,8 +4,6 @@ ## Desc: Installs GNU Fortran ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh function InstallFortran { version=$1 @@ -19,10 +17,6 @@ function InstallFortran { echo "$version was not installed" exit 1 fi - - # Document what was added to the image - echo "Documenting $version..." - DocumentInstalledItem "GNU Fortran $($version --version | head -n 1 | cut -d ' ' -f 5)" } # Install GNU Fortran compiler diff --git a/images/linux/scripts/installers/git.sh b/images/linux/scripts/installers/git.sh index ae497458d..331e5f813 100644 --- a/images/linux/scripts/installers/git.sh +++ b/images/linux/scripts/installers/git.sh @@ -6,7 +6,6 @@ set -e # Source the helpers for use with the script -source "$HELPER_SCRIPTS"/document.sh source "$HELPER_SCRIPTS"/install.sh ## Install git @@ -39,14 +38,6 @@ if ! command -v git-ftp; then exit 1 fi -# Document what was added to the image -echo "Lastly, document the installed versions" -# git version 2.20.1 -DocumentInstalledItem "Git ($(git --version 2>&1 | cut -d ' ' -f 3))" -# git-lfs/2.6.1 (GitHub; linux amd64; go 1.11.1) -DocumentInstalledItem "Git Large File Storage (LFS) ($(git-lfs --version 2>&1 | cut -d ' ' -f 1 | cut -d '/' -f 2))" -DocumentInstalledItem "Git-ftp ($(git-ftp --version | cut -d ' ' -f 3))" - #Install hub tmp_hub="/tmp/hub" mkdir -p "$tmp_hub" @@ -57,7 +48,6 @@ mv "$tmp_hub"/bin/hub /usr/local/bin if command -v hub; then echo "hub CLI was installed successfully" - DocumentInstalledItem "Hub CLI ($(hub --version | grep "hub version" | cut -d ' ' -f 3))" else echo "[!] Hub CLI was not installed" exit 1 diff --git a/images/linux/scripts/installers/github-cli.sh b/images/linux/scripts/installers/github-cli.sh index 5cc430948..c9bec1fc6 100644 --- a/images/linux/scripts/installers/github-cli.sh +++ b/images/linux/scripts/installers/github-cli.sh @@ -5,8 +5,6 @@ ## Must be run as non-root user after homebrew ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Install GitHub CLI url=$(curl -s https://api.github.com/repos/cli/cli/releases/latest | jq -r '.assets[].browser_download_url|select(contains("linux") and contains("amd64") and contains(".deb"))') @@ -20,7 +18,3 @@ if ! gh --version; then echo "GitHub CLI was not installed" exit 1 fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "GitHub CLI $(gh --version|awk 'FNR==1 {print $3}')" diff --git a/images/linux/scripts/installers/google-chrome.sh b/images/linux/scripts/installers/google-chrome.sh index 892380ce7..a6ace2f38 100644 --- a/images/linux/scripts/installers/google-chrome.sh +++ b/images/linux/scripts/installers/google-chrome.sh @@ -4,8 +4,6 @@ ## Desc: Installs google-chrome and chromedriver ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh LSB_RELEASE=$(lsb_release -rs) @@ -22,10 +20,6 @@ if ! command -v google-chrome; then exit 1 fi -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Google Chrome ($(google-chrome --version))" - CHROME_VERSION=$(google-chrome --product-version) CHROME_VERSION=${CHROME_VERSION%.*} @@ -54,6 +48,3 @@ if ! command -v chromedriver; then echo "chromedriver was not installed" exit 1 fi - -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "$(chromedriver --version); Chrome Driver is available via CHROMEWEBDRIVER environment variable" diff --git a/images/linux/scripts/installers/google-cloud-sdk.sh b/images/linux/scripts/installers/google-cloud-sdk.sh index 4293a85a4..147d8d4fb 100644 --- a/images/linux/scripts/installers/google-cloud-sdk.sh +++ b/images/linux/scripts/installers/google-cloud-sdk.sh @@ -4,8 +4,6 @@ ## Desc: Installs the Google Cloud SDK ################################################################################ -# Source the helpers -source $HELPER_SCRIPTS/document.sh # Install the Google Cloud SDK echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list @@ -19,7 +17,3 @@ if ! command -v gcloud; then echo "gcloud was not installed" exit 1 fi - -# Document the installed version -echo "Document the installed version" -DocumentInstalledItem "Google Cloud SDK ($(gcloud --version | head -n 1 | cut -d ' ' -f 4))" diff --git a/images/linux/scripts/installers/haskell.sh b/images/linux/scripts/installers/haskell.sh index 242a0f32c..b8bfa5efe 100644 --- a/images/linux/scripts/installers/haskell.sh +++ b/images/linux/scripts/installers/haskell.sh @@ -6,7 +6,6 @@ # Source the helpers for use with the script source $HELPER_SCRIPTS/etc-environment.sh -source $HELPER_SCRIPTS/document.sh # Install Herbert V. Riedel's PPA for managing multiple version of ghc on ubuntu. # https://launchpad.net/~hvr/+archive/ubuntu/ghc @@ -58,9 +57,3 @@ fi # Create symlink for ghc and cabal in /usr/bin ln -s "/opt/ghc/$defaultGHCVersion/bin/ghc" "/usr/bin/ghc" ln -s "/opt/cabal/$cabalVersion/bin/cabal" "/usr/bin/cabal" - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Haskell Cabal ($(cabal --version))" -DocumentInstalledItem "GHC ($(ghc --version))" -DocumentInstalledItem "Haskell Stack ($(stack --version))" diff --git a/images/linux/scripts/installers/heroku.sh b/images/linux/scripts/installers/heroku.sh index ff39be66c..c4c0e588c 100644 --- a/images/linux/scripts/installers/heroku.sh +++ b/images/linux/scripts/installers/heroku.sh @@ -4,8 +4,6 @@ ## Desc: Installs Heroku CLI ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Install Heroku CLI curl https://cli-assets.heroku.com/install-ubuntu.sh | sh @@ -15,7 +13,3 @@ echo "Testing to make sure that script performed as expected, and basic scenario if ! command -v heroku; then exit 1 fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Heroku ($(heroku version))" diff --git a/images/linux/scripts/installers/hhvm.sh b/images/linux/scripts/installers/hhvm.sh index e5f9079bc..3010db873 100644 --- a/images/linux/scripts/installers/hhvm.sh +++ b/images/linux/scripts/installers/hhvm.sh @@ -5,7 +5,6 @@ ################################################################################ # Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh source $HELPER_SCRIPTS/install.sh hhvm_package=hhvm @@ -31,7 +30,3 @@ fi if ! command -v hhvm; then exit 1 fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "HHVM ($(hhvm --version | head -n 1))" diff --git a/images/linux/scripts/installers/homebrew.sh b/images/linux/scripts/installers/homebrew.sh index 0a739e274..370d9d09d 100644 --- a/images/linux/scripts/installers/homebrew.sh +++ b/images/linux/scripts/installers/homebrew.sh @@ -6,7 +6,6 @@ ################################################################################ # Source the helpers -source $HELPER_SCRIPTS/document.sh source $HELPER_SCRIPTS/etc-environment.sh # Install the Homebrew on Linux @@ -31,7 +30,3 @@ if ! command -v brew; then echo "brew was not installed" exit 1 fi - -# Document the installed version -echo "Document the installed version" -DocumentInstalledItem "Homebrew on Linux ($(brew -v 2>&1))" diff --git a/images/linux/scripts/installers/hosted-tool-cache.sh b/images/linux/scripts/installers/hosted-tool-cache.sh index ef1553f2e..d40a4922a 100644 --- a/images/linux/scripts/installers/hosted-tool-cache.sh +++ b/images/linux/scripts/installers/hosted-tool-cache.sh @@ -4,8 +4,6 @@ ## Desc: Downloads and installs hosted tools cache ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Fail out if any setups fail set -e @@ -43,9 +41,3 @@ for PACKAGE_NAME in ${PACKAGE_LIST[@]}; do done; popd - -DocumentInstalledItem "Ruby:" -rubys=$(ls $AGENT_TOOLSDIRECTORY/Ruby) -for ruby in $rubys; do - DocumentInstalledItemIndent "Ruby $ruby" -done; diff --git a/images/linux/scripts/installers/image-magick.sh b/images/linux/scripts/installers/image-magick.sh index 39925fdfe..e01c933a7 100644 --- a/images/linux/scripts/installers/image-magick.sh +++ b/images/linux/scripts/installers/image-magick.sh @@ -4,8 +4,6 @@ ## Desc: Installs ImageMagick ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Install ImageMagick apt-get install -y --no-install-recommends --fix-missing \ @@ -13,7 +11,3 @@ apt-get install -y --no-install-recommends --fix-missing \ libmagickcore-dev \ libmagickwand-dev \ libmagic-dev - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "ImageMagick" diff --git a/images/linux/scripts/installers/java-tools.sh b/images/linux/scripts/installers/java-tools.sh index 7ec94b732..46aa8b285 100644 --- a/images/linux/scripts/installers/java-tools.sh +++ b/images/linux/scripts/installers/java-tools.sh @@ -4,8 +4,6 @@ ## Desc: Installs Java and related tooling (Ant, Gradle, Maven) ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh source $HELPER_SCRIPTS/os.sh set -e @@ -103,19 +101,3 @@ javaVersion=$(java -version |& head -n 1 | cut -d\" -f 2) javaTool "Java" $javaVersion javacVersion=$(javac -version |& cut -d" " -f2) javaTool "Javac" $javacVersion - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -if isUbuntu16 || isUbuntu18 ; then -DocumentInstalledItem "Azul Zulu OpenJDK:" -DocumentInstalledItemIndent "7 ($(/usr/lib/jvm/zulu-7-azure-amd64/bin/java -showversion |& head -n 1))" -fi -DocumentInstalledItem "Adopt OpenJDK:" -DocumentInstalledItemIndent "8 ($(/usr/lib/jvm/adoptopenjdk-8-hotspot-amd64/bin/java -showversion |& head -n 1)) $defaultLabel8" -DocumentInstalledItemIndent "11 ($(/usr/lib/jvm/adoptopenjdk-11-hotspot-amd64/bin/java -showversion |& head -n 1)) $defaultLabel11" -if isUbuntu16 || isUbuntu18 ; then -DocumentInstalledItemIndent "12 ($(/usr/lib/jvm/adoptopenjdk-12-hotspot-amd64/bin/java -showversion |& head -n 1))" -fi -DocumentInstalledItem "Ant ($(ant -version))" -DocumentInstalledItem "Gradle ${gradleVersion}" -DocumentInstalledItem "Maven ($(mvn -version | head -n 1))" diff --git a/images/linux/scripts/installers/julia.sh b/images/linux/scripts/installers/julia.sh index a576a5405..079890a19 100644 --- a/images/linux/scripts/installers/julia.sh +++ b/images/linux/scripts/installers/julia.sh @@ -4,8 +4,6 @@ ## Desc: Installs Julia, and adds Julia to the path ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # This function fetches the latest Julia release from the GitHub API # Based on https://gist.github.com/lukechilds/a83e1d7127b78fef38c2914c4ececc3c @@ -54,10 +52,6 @@ function InstallJulia () { echo "Julia was not installed correctly" exit 1 fi - - # Document what was added to the image - echo "Lastly, documenting what we added to the metadata file" - DocumentInstalledItem "Julia ($(julia --version))" } InstallJulia "$(GetLatestJuliaRelease)" true diff --git a/images/linux/scripts/installers/kind.sh b/images/linux/scripts/installers/kind.sh index 4fc7c0d42..3a312a2e3 100644 --- a/images/linux/scripts/installers/kind.sh +++ b/images/linux/scripts/installers/kind.sh @@ -4,8 +4,6 @@ ## Desc: Installs kind ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Install KIND URL=$(curl -s https://api.github.com/repos/kubernetes-sigs/kind/releases/latest | jq -r '.assets[].browser_download_url | select(contains("kind-linux-amd64"))') @@ -18,7 +16,3 @@ if ! command -v kind; then echo "Kind was not installed or found on PATH" exit 1 fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Kind ($(kind version))" diff --git a/images/linux/scripts/installers/kubernetes-tools.sh b/images/linux/scripts/installers/kubernetes-tools.sh index f86f8abaa..a25cb0f26 100644 --- a/images/linux/scripts/installers/kubernetes-tools.sh +++ b/images/linux/scripts/installers/kubernetes-tools.sh @@ -4,8 +4,6 @@ ## Desc: Installs kubectl, helm, kustomize ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh ## Install kubectl curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - @@ -52,12 +50,3 @@ if ! command -v kustomize; then echo "kustomize was not installed" exit 1 fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "kubectl ($(kubectl version --client --short |& head -n 1))" -DocumentInstalledItem "helm ($(helm version --short |& head -n 1))" -# minikube version output already has word minikube in it. example minikube version: v1.9.2 -DocumentInstalledItem "$(minikube version --short)" -# kustomize version output has "{} in it". example {kustomize/v3.8.1 2020-07-16T00:58:46Z } -DocumentInstalledItem "kustomize ($(kustomize version --short))" diff --git a/images/linux/scripts/installers/leiningen.sh b/images/linux/scripts/installers/leiningen.sh index 318f65ebc..56079a34d 100644 --- a/images/linux/scripts/installers/leiningen.sh +++ b/images/linux/scripts/installers/leiningen.sh @@ -4,8 +4,6 @@ ## Desc: Installs Leiningen ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh set -e @@ -29,7 +27,3 @@ if ! command -v lein; then else lein new app testapp && rm -rf testapp fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Leiningen ($(lein -v))" diff --git a/images/linux/scripts/installers/mercurial.sh b/images/linux/scripts/installers/mercurial.sh index af40bf817..ad972d74f 100644 --- a/images/linux/scripts/installers/mercurial.sh +++ b/images/linux/scripts/installers/mercurial.sh @@ -5,7 +5,6 @@ ################################################################################ # Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh source $HELPER_SCRIPTS/os.sh if isUbuntu16 ; then @@ -22,7 +21,3 @@ echo "Testing to make sure that script performed as expected, and basic scenario if ! command -v hg; then exit 1 fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Mercurial ($(hg --version | head -n 1))" diff --git a/images/linux/scripts/installers/miniconda.sh b/images/linux/scripts/installers/miniconda.sh index 8ec72635d..29eebd0ca 100644 --- a/images/linux/scripts/installers/miniconda.sh +++ b/images/linux/scripts/installers/miniconda.sh @@ -4,8 +4,6 @@ ## Desc: Installs miniconda ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Install Miniconda curl -sL https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -o miniconda.sh \ @@ -17,7 +15,3 @@ CONDA=/usr/share/miniconda echo "CONDA=$CONDA" | tee -a /etc/environment ln -s $CONDA/bin/conda /usr/bin/conda - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Miniconda ($($CONDA/bin/conda --version))" diff --git a/images/linux/scripts/installers/mongodb.sh b/images/linux/scripts/installers/mongodb.sh index 54aaa4075..2d012c61f 100644 --- a/images/linux/scripts/installers/mongodb.sh +++ b/images/linux/scripts/installers/mongodb.sh @@ -6,7 +6,6 @@ # Source the helpers source $HELPER_SCRIPTS/os.sh -source $HELPER_SCRIPTS/document.sh # Install Mongo DB wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add - @@ -21,7 +20,3 @@ if ! command -v mongod; then echo "mongodb was not installed" exit 1 fi - -# Document the installed version -echo "Document the installed version" -DocumentInstalledItem "MongoDB on Linux $(mongod --version | awk 'NR==1{print $3}')" diff --git a/images/linux/scripts/installers/mono.sh b/images/linux/scripts/installers/mono.sh index e0f84a11a..9e4968f36 100644 --- a/images/linux/scripts/installers/mono.sh +++ b/images/linux/scripts/installers/mono.sh @@ -4,8 +4,6 @@ ## Desc: Installs Mono ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh LSB_CODENAME=$(lsb_release -cs) @@ -27,8 +25,3 @@ if ! command -v nuget; then echo "nuget was not installed" exit 1 fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Mono ($(mono --version | head -n 1))" -DocumentInstalledItem "NuGet ($(nuget | tail -n +1 | head -n 1))" # Pipe to tail before piping to head because NuGet prints an ugly error if you close its stream before it's done writing. diff --git a/images/linux/scripts/installers/mysql.sh b/images/linux/scripts/installers/mysql.sh index a2869adb2..24cb5cf26 100644 --- a/images/linux/scripts/installers/mysql.sh +++ b/images/linux/scripts/installers/mysql.sh @@ -4,8 +4,6 @@ ## Desc: Installs MySQL Client ################################################################################ -## Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh export ACCEPT_EULA=Y @@ -51,13 +49,6 @@ mysql -vvv -e 'CREATE DATABASE smoke_test' -uroot -proot mysql -vvv -e 'DROP DATABASE smoke_test' -uroot -proot set +e -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "MySQL ($(mysql --version))" -DocumentInstalledItem "MySQL Server (user:root password:root)" -DocumentInstalledItem "MS SQL Server Client Tools" -DocumentInstalledItem "MySQL service is disabled by default. Use the following command as a part of your job to start the service: 'sudo systemctl start mysql.service'" - # Disable mysql.service systemctl is-active --quiet mysql.service && systemctl stop mysql.service systemctl disable mysql.service diff --git a/images/linux/scripts/installers/netlify.sh b/images/linux/scripts/installers/netlify.sh index 48afc4826..b737d4759 100644 --- a/images/linux/scripts/installers/netlify.sh +++ b/images/linux/scripts/installers/netlify.sh @@ -4,8 +4,6 @@ ## Desc: Installs the Netlify CLI ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Install the Netlify CLI npm i -g netlify-cli @@ -16,7 +14,3 @@ if ! command -v netlify; then echo "Netlify CLI was not installed" exit 1 fi - -# Document the installed version -echo "Document the installed version" -DocumentInstalledItem "Netlify CLI ($(netlify --version))" diff --git a/images/linux/scripts/installers/nodejs.sh b/images/linux/scripts/installers/nodejs.sh index 073061ed5..378236a8b 100644 --- a/images/linux/scripts/installers/nodejs.sh +++ b/images/linux/scripts/installers/nodejs.sh @@ -4,8 +4,6 @@ ## Desc: Installs Node.js LTS and related tooling (Gulp, Grunt) ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Install LTS Node.js and related build tools curl -sL https://raw.githubusercontent.com/mklement0/n-install/stable/bin/n-install | bash -s -- -ny - @@ -31,16 +29,3 @@ for cmd in node grunt gulp webpack parcel yarn newman; do exit 1 fi done - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Node.js ($(node --version))" -DocumentInstalledItem "Grunt ($(grunt --version))" -DocumentInstalledItem "Gulp ($(gulp --version))" -DocumentInstalledItem "n ($(n --version))" -DocumentInstalledItem "Parcel ($(parcel --version))" -DocumentInstalledItem "TypeScript ($(tsc --version))" -DocumentInstalledItem "Webpack ($(webpack --version))" -DocumentInstalledItem "Webpack CLI ($(webpack-cli --version))" -DocumentInstalledItem "Yarn ($(yarn --version))" -DocumentInstalledItem "Newman ($(newman --version))" diff --git a/images/linux/scripts/installers/nvm.sh b/images/linux/scripts/installers/nvm.sh index 817693076..74fed1f2a 100644 --- a/images/linux/scripts/installers/nvm.sh +++ b/images/linux/scripts/installers/nvm.sh @@ -4,8 +4,6 @@ ## Desc: Installs Nvm ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh export NVM_DIR="/etc/skel/.nvm" mkdir $NVM_DIR @@ -21,5 +19,3 @@ fi # set system node.js as default one nvm alias default system - -DocumentInstalledItem "nvm ($(nvm --version))" \ No newline at end of file diff --git a/images/linux/scripts/installers/oc.sh b/images/linux/scripts/installers/oc.sh index 31892f105..88894e3f5 100644 --- a/images/linux/scripts/installers/oc.sh +++ b/images/linux/scripts/installers/oc.sh @@ -4,8 +4,7 @@ ## Desc: Installs the OC CLI ################################################################################ -# Source the helpers -source $HELPER_SCRIPTS/document.sh + # Install the oc CLI curl "https://mirror.openshift.com/pub/openshift-v4/clients/oc/latest/linux/oc.tar.gz" > oc.tar.gz tar xvzf oc.tar.gz @@ -18,7 +17,3 @@ if ! command -v oc; then echo "oc was not installed" exit 1 fi - -# Document the installed version -echo "Document the installed version" -DocumentInstalledItem "oc CLI $(oc version)" diff --git a/images/linux/scripts/installers/oras-cli.sh b/images/linux/scripts/installers/oras-cli.sh index c4546ccbf..e615d25de 100644 --- a/images/linux/scripts/installers/oras-cli.sh +++ b/images/linux/scripts/installers/oras-cli.sh @@ -4,8 +4,6 @@ ## Desc: Installs ORAS CLI ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh source $HELPER_SCRIPTS/install.sh # Determine latest ORAS CLI version @@ -24,7 +22,3 @@ if ! oras version; then echo "ORAS CLI was not installed" exit 1 fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "ORAS CLI $(oras version | awk 'NR==1{print $2}')" \ No newline at end of file diff --git a/images/linux/scripts/installers/packer.sh b/images/linux/scripts/installers/packer.sh index d44dd9c02..25897a780 100644 --- a/images/linux/scripts/installers/packer.sh +++ b/images/linux/scripts/installers/packer.sh @@ -3,8 +3,7 @@ ## File: packer.sh ## Desc: Installs packer ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh + # Install Packer PACKER_VERSION=$(curl -s https://checkpoint-api.hashicorp.com/v1/check/packer | jq -r .current_version) @@ -18,7 +17,3 @@ if ! command -v packer; then echo "Packer was not installed or found on PATH" exit 1 fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Packer ($(packer --version))" diff --git a/images/linux/scripts/installers/phantomjs.sh b/images/linux/scripts/installers/phantomjs.sh index 9f333350c..093056db2 100644 --- a/images/linux/scripts/installers/phantomjs.sh +++ b/images/linux/scripts/installers/phantomjs.sh @@ -6,9 +6,6 @@ set -e -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh - # Install PhantomJS apt-get install -y chrpath libssl-dev libxft-dev libfreetype6 libfreetype6-dev libfontconfig1 libfontconfig1-dev PHANTOM_JS=phantomjs-2.1.1-linux-x86_64 @@ -23,7 +20,3 @@ if ! command -v phantomjs; then echo "phantomjs was not installed" exit 1 fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "PhantomJS ($(phantomjs --version))" diff --git a/images/linux/scripts/installers/php.sh b/images/linux/scripts/installers/php.sh index 3725f6ac5..35afa4a4f 100644 --- a/images/linux/scripts/installers/php.sh +++ b/images/linux/scripts/installers/php.sh @@ -6,7 +6,6 @@ # Source the helpers for use with the script source $HELPER_SCRIPTS/etc-environment.sh -source $HELPER_SCRIPTS/document.sh source $HELPER_SCRIPTS/os.sh set -e @@ -127,24 +126,9 @@ for cmd in php $php_versions composer phpunit; do fi done -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" - -for version in $php_versions; do - DocumentInstalledItem "PHP $version ($(php$version --version | head -n 1))" -done - # ubuntu 20.04 libzip-dev is libzip5 based and is not compatible libzip-dev of ppa:ondrej/php # see https://github.com/actions/virtual-environments/issues/1084 if isUbuntu20 ; then rm /etc/apt/sources.list.d/ondrej-ubuntu-php-focal.list apt-get update - AddBlockquote "To use ppa:ondrej/php APT repository On Ubuntu 20.04 it is necessary to add it to the APT sources" - StartCode - WriteItem "apt-add-repository ppa:ondrej/php -y" - WriteItem "apt-get update" - EndCode fi - -DocumentInstalledItem "Composer ($(composer --version))" -DocumentInstalledItem "PHPUnit ($(phpunit --version))" diff --git a/images/linux/scripts/installers/pollinate.sh b/images/linux/scripts/installers/pollinate.sh index 97d0d23ab..bdb2ce36c 100644 --- a/images/linux/scripts/installers/pollinate.sh +++ b/images/linux/scripts/installers/pollinate.sh @@ -4,8 +4,6 @@ ## Desc: Installs Pollinate ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Install Pollinate apt-get install -y --no-install-recommends pollinate @@ -16,7 +14,3 @@ if ! command -v pollinate; then echo "pollinate was not installed" exit 1 fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Pollinate" diff --git a/images/linux/scripts/installers/postgresql.sh b/images/linux/scripts/installers/postgresql.sh index 7c1c89cc0..ae5ffbb25 100644 --- a/images/linux/scripts/installers/postgresql.sh +++ b/images/linux/scripts/installers/postgresql.sh @@ -4,8 +4,6 @@ ## Desc: Installs Postgresql ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh #Preparing repo for PostgreSQL 12. wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - @@ -25,8 +23,6 @@ apt-get install libpq-dev # connection timeout - 2 pg_isready -DocumentInstalledItem "$(psql -V 2>&1 | cut -d ' ' -f 1,2,3)" - # Disable postgresql.service systemctl is-active --quiet postgresql.service && systemctl stop postgresql.service systemctl disable postgresql.service \ No newline at end of file diff --git a/images/linux/scripts/installers/powershellcore.sh b/images/linux/scripts/installers/powershellcore.sh index abd5d751d..e0c19ba7c 100644 --- a/images/linux/scripts/installers/powershellcore.sh +++ b/images/linux/scripts/installers/powershellcore.sh @@ -5,7 +5,6 @@ ################################################################################ # Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh source $HELPER_SCRIPTS/os.sh # Install Powershell @@ -27,7 +26,3 @@ if ! pwsh -c 'Write-Host Hello world'; then echo "pwsh failed to run" exit 1 fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Powershell ($(pwsh --version))" diff --git a/images/linux/scripts/installers/preparemetadata.sh b/images/linux/scripts/installers/preparemetadata.sh deleted file mode 100644 index 9e8aef1e1..000000000 --- a/images/linux/scripts/installers/preparemetadata.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -################################################################################ -## File: preparemetadata.sh -## Desc: This script adds a image title information to the metadata -## document -################################################################################ - -source $HELPER_SCRIPTS/document.sh - -WriteItem "" - -if [ -n "$ANNOUNCEMENTS" ]; then - WriteItem "$ANNOUNCEMENTS" - WriteItem "***" -fi - - -AddTitle "$(lsb_release -ds)" -WriteItem "The following software is installed on machines with the $IMAGE_VERSION update." -WriteItem "***" diff --git a/images/linux/scripts/installers/pulumi.sh b/images/linux/scripts/installers/pulumi.sh index e041c2b7c..bfdad2d13 100644 --- a/images/linux/scripts/installers/pulumi.sh +++ b/images/linux/scripts/installers/pulumi.sh @@ -5,7 +5,6 @@ ################################################################################ # Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh source $HELPER_SCRIPTS/install.sh # Install Pulumi @@ -20,7 +19,3 @@ if ! command -v pulumi ; then echo "Pulumi was not installed" exit 1 fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Pulumi $(pulumi version)" diff --git a/images/linux/scripts/installers/pypy.sh b/images/linux/scripts/installers/pypy.sh index b859eb4e1..cc707a3e4 100644 --- a/images/linux/scripts/installers/pypy.sh +++ b/images/linux/scripts/installers/pypy.sh @@ -4,8 +4,6 @@ ## Desc: Installs PyPy ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh source $HELPER_SCRIPTS/install.sh # This function installs PyPy using the specified arguments: diff --git a/images/linux/scripts/installers/python.sh b/images/linux/scripts/installers/python.sh index 7081c5e7d..3f6361e16 100644 --- a/images/linux/scripts/installers/python.sh +++ b/images/linux/scripts/installers/python.sh @@ -5,7 +5,6 @@ ################################################################################ # Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh source $HELPER_SCRIPTS/os.sh # Install Python, Python 3, pip, pip3 @@ -28,10 +27,3 @@ for cmd in python pip python3 pip3; do exit 1 fi done - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Python ($(python --version 2>&1))" -DocumentInstalledItem "pip ($(pip --version))" -DocumentInstalledItem "Python3 ($(python3 --version))" -DocumentInstalledItem "pip3 ($(pip3 --version))" \ No newline at end of file diff --git a/images/linux/scripts/installers/r.sh b/images/linux/scripts/installers/r.sh index 4eaa14160..cca86e1bb 100644 --- a/images/linux/scripts/installers/r.sh +++ b/images/linux/scripts/installers/r.sh @@ -1,7 +1,6 @@ #!/bin/bash # Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh source $HELPER_SCRIPTS/os.sh # install R @@ -13,5 +12,3 @@ sudo add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $osLab sudo apt update sudo apt install r-base version=$(R --version | grep "R version" | cut -d " " -f 3) - -DocumentInstalledItem "R $version" diff --git a/images/linux/scripts/installers/rndgenerator.sh b/images/linux/scripts/installers/rndgenerator.sh index c25759893..cdb78edf1 100644 --- a/images/linux/scripts/installers/rndgenerator.sh +++ b/images/linux/scripts/installers/rndgenerator.sh @@ -4,8 +4,6 @@ ## Desc: Install random number generator ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Install haveged apt-get -y install haveged @@ -18,7 +16,3 @@ for cmd in haveged; do exit 1 fi done - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Haveged $(dpkg-query --showformat='${Version}' --show haveged)" \ No newline at end of file diff --git a/images/linux/scripts/installers/ruby.sh b/images/linux/scripts/installers/ruby.sh index 0cbea36d1..8be6d0fa9 100644 --- a/images/linux/scripts/installers/ruby.sh +++ b/images/linux/scripts/installers/ruby.sh @@ -4,16 +4,9 @@ ## Desc: Installs Ruby requirements ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh sudo apt-get install ruby-full sudo gem update --system # Install Ruby requirements apt-get install -y libz-dev openssl libssl-dev - -DocumentInstalledItem "ruby ($(ruby --version 2>&1 | cut -d ' ' -f 2))" -DocumentInstalledItem "gem ($(gem -v 2>&1 | tail -n 1))" -DocumentInstalledItem "$(openssl version)" -DocumentInstalledItem "Libssl $(dpkg -l libssl-dev | grep '^ii' | awk '{print $3}')" diff --git a/images/linux/scripts/installers/rust.sh b/images/linux/scripts/installers/rust.sh index 088cc9aa1..a211e791b 100644 --- a/images/linux/scripts/installers/rust.sh +++ b/images/linux/scripts/installers/rust.sh @@ -6,7 +6,6 @@ # Source the helpers for use with the script source $HELPER_SCRIPTS/etc-environment.sh -source $HELPER_SCRIPTS/document.sh export RUSTUP_HOME=/usr/share/rust/.rustup export CARGO_HOME=/usr/share/rust/.cargo @@ -45,16 +44,3 @@ pushd /etc/skel ln -sf $RUSTUP_HOME .rustup ln -sf $CARGO_HOME .cargo popd - -# Document what was added to the image -echo "Lastly, document what was added to the metadata file" -DocumentInstalledItem "rustup ($(rustup --version 2>&1 | cut -d ' ' -f 2))" -DocumentInstalledItem "rust ($(rustc --version 2>&1 | cut -d ' ' -f 2))" -DocumentInstalledItem "cargo ($(cargo --version 2>&1 | cut -d ' ' -f 2))" -DocumentInstalledItem "rustfmt ($(rustfmt --version 2>&1 | cut -d ' ' -f 2))" -DocumentInstalledItem "clippy ($(cargo-clippy --version 2>&1 | cut -d ' ' -f 2))" -DocumentInstalledItem "rustdoc ($(rustdoc --version 2>&1 | cut -d ' ' -f 2))" -DocumentInstalledItem "bindgen ($(bindgen --version 2>&1 | cut -d ' ' -f 2))" -DocumentInstalledItem "cbindgen ($(cbindgen --version 2>&1 | cut -d ' ' -f 2))" -DocumentInstalledItem "cargo audit ($(cargo audit --version 2>&1 | cut -d ' ' -f 2))" -DocumentInstalledItem "cargo outdated ($(cargo outdated --version 2>&1 | cut -d ' ' -f 2))" \ No newline at end of file diff --git a/images/linux/scripts/installers/sbt.sh b/images/linux/scripts/installers/sbt.sh index adc74daaf..166dc18b5 100644 --- a/images/linux/scripts/installers/sbt.sh +++ b/images/linux/scripts/installers/sbt.sh @@ -4,8 +4,6 @@ ## Desc: Installs sbt ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Install sbt # https://www.scala-sbt.org/1.x/docs/Installing-sbt-on-Linux.html @@ -13,7 +11,3 @@ echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.li curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | apt-key add apt-get -q update apt-get -y install sbt - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "sbt ($(sbt --script-version))" diff --git a/images/linux/scripts/installers/selenium.sh b/images/linux/scripts/installers/selenium.sh index 3cb7c315c..d9b5e2794 100644 --- a/images/linux/scripts/installers/selenium.sh +++ b/images/linux/scripts/installers/selenium.sh @@ -4,8 +4,6 @@ ## Desc: Installs selenium server ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Determine latest selenium standalone server version SELENIUM_LATEST_VERSION_URL=https://api.github.com/repos/SeleniumHQ/selenium/releases/latest @@ -26,6 +24,3 @@ fi SELENIUM_JAR_PATH="/usr/share/java/selenium-server-standalone.jar" mv $SELENIUM_JAR_NAME $SELENIUM_JAR_PATH echo "SELENIUM_JAR_PATH=$SELENIUM_JAR_PATH" | tee -a /etc/environment - -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Selenium server standalone (available via SELENIUM_JAR_PATH environment variable)" \ No newline at end of file diff --git a/images/linux/scripts/installers/sphinx.sh b/images/linux/scripts/installers/sphinx.sh index 844d145a2..425bb7fd3 100644 --- a/images/linux/scripts/installers/sphinx.sh +++ b/images/linux/scripts/installers/sphinx.sh @@ -4,12 +4,6 @@ ## Desc: Installs Sphinx ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Install Sphinx apt-get install -y sphinxsearch - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Sphinx Open Source Search Server" diff --git a/images/linux/scripts/installers/subversion.sh b/images/linux/scripts/installers/subversion.sh index 66540704c..3f51d46a0 100644 --- a/images/linux/scripts/installers/subversion.sh +++ b/images/linux/scripts/installers/subversion.sh @@ -4,8 +4,6 @@ ## Desc: Installs Subversion client ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Install Subversion apt-get install -y --no-install-recommends subversion @@ -16,7 +14,3 @@ if ! command -v svn; then echo "Subversion (svn) was not installed" exit 1 fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Subversion ($(svn --version | head -n 1))" diff --git a/images/linux/scripts/installers/swift.sh b/images/linux/scripts/installers/swift.sh index ca97606e9..318d3973f 100644 --- a/images/linux/scripts/installers/swift.sh +++ b/images/linux/scripts/installers/swift.sh @@ -4,8 +4,6 @@ ## Desc: Installs Swift ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Install image_label="$(lsb_release -rs)" @@ -26,7 +24,3 @@ if ! command -v swift; then echo "Swift was not installed" exit 1 fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "$(swift --version)" \ No newline at end of file diff --git a/images/linux/scripts/installers/swig.sh b/images/linux/scripts/installers/swig.sh index 2d9164741..7972e8827 100644 --- a/images/linux/scripts/installers/swig.sh +++ b/images/linux/scripts/installers/swig.sh @@ -1,7 +1,5 @@ #!/bin/bash -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Install Swig sudo apt-get install -y swig @@ -12,7 +10,3 @@ if ! command -v swig; then echo "Swig was not installed" exit 1 fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Swig $(swig -version | sed -n 2p | cut -d ' ' -f 3)" diff --git a/images/linux/scripts/installers/terraform.sh b/images/linux/scripts/installers/terraform.sh index 8cbd026a0..4c7e6e762 100644 --- a/images/linux/scripts/installers/terraform.sh +++ b/images/linux/scripts/installers/terraform.sh @@ -4,8 +4,6 @@ ## Desc: Installs terraform ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh # Install Terraform TERRAFORM_VERSION=$(curl -s https://checkpoint-api.hashicorp.com/v1/check/terraform | jq -r .current_version) @@ -19,7 +17,3 @@ if ! command -v terraform; then echo "Terraform was not installed or found on PATH" exit 1 fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Terraform ($(terraform --version))" diff --git a/images/linux/scripts/installers/vcpkg.sh b/images/linux/scripts/installers/vcpkg.sh index 69f50c5e7..ba7cd01cf 100644 --- a/images/linux/scripts/installers/vcpkg.sh +++ b/images/linux/scripts/installers/vcpkg.sh @@ -5,7 +5,6 @@ ################################################################################ # Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh source $HELPER_SCRIPTS/os.sh # Set env variable for vcpkg @@ -36,7 +35,3 @@ if ! command -v vcpkg; then echo "vcpkg was not installed" exit 1 fi - -# Document what was added to the image -echo "Lastly, documenting what we added to the metadata file" -DocumentInstalledItem "Vcpkg $(vcpkg version | head -n 1 | cut -d ' ' -f 6)" diff --git a/images/linux/scripts/installers/vercel.sh b/images/linux/scripts/installers/vercel.sh index 13fb39155..4e0d41ae6 100644 --- a/images/linux/scripts/installers/vercel.sh +++ b/images/linux/scripts/installers/vercel.sh @@ -4,9 +4,6 @@ ## Desc: Installs the Vercel CLI ################################################################################ -# Source the helpers for use with the script -source $HELPER_SCRIPTS/document.sh - # Install the Vercel CLI npm i -g vercel @@ -25,7 +22,3 @@ if ! command -v now; then echo "[Now] symlink to Vercel CLI was not created" exit 1 fi - -# Document the installed version -echo "Document the installed version" -DocumentInstalledItem "Vercel CLI ($(vercel --version))" diff --git a/images/linux/ubuntu1604.json b/images/linux/ubuntu1604.json index 27cc6b0bd..33263345a 100644 --- a/images/linux/ubuntu1604.json +++ b/images/linux/ubuntu1604.json @@ -14,7 +14,6 @@ "private_virtual_network_with_public_ip": "{{env `PRIVATE_VIRTUAL_NETWORK_WITH_PUBLIC_IP`}}", "image_folder": "/imagegeneration", "imagedata_file": "/imagegeneration/imagedata.json", - "metadata_file": "/imagegeneration/metadatafile", "installer_script_folder": "/imagegeneration/installers", "helper_script_folder": "/imagegeneration/helpers", "vm_size": "Standard_DS2_v2", @@ -103,19 +102,6 @@ "source": "{{template_dir}}/toolsets/toolset-1604.json", "destination": "{{user `installer_script_folder`}}/toolset.json" }, - { - "type": "shell", - "execute_command": "chmod +x {{ .Path }}; sudo {{ .Vars }} {{ .Path }}", - "scripts":[ - "{{template_dir}}/scripts/installers/preparemetadata.sh" - ], - "environment_vars": [ - "IMAGE_VERSION={{user `image_version`}}", - "METADATA_FILE={{user `metadata_file`}}", - "HELPER_SCRIPTS={{user `helper_script_folder`}}", - "ANNOUNCEMENTS={{user `announcements`}}" - ] - }, { "type": "shell", "scripts":[ @@ -222,7 +208,6 @@ "{{template_dir}}/scripts/installers/test-toolcache.sh" ], "environment_vars": [ - "METADATA_FILE={{user `metadata_file`}}", "HELPER_SCRIPTS={{user `helper_script_folder`}}", "INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}", "GITHUB_FEED_TOKEN={{user `github_feed_token`}}", @@ -238,7 +223,6 @@ "{{template_dir}}/scripts/installers/Validate-Toolset.ps1" ], "environment_vars": [ - "METADATA_FILE={{user `metadata_file`}}", "HELPER_SCRIPTS={{user `helper_script_folder`}}", "INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}" ], @@ -250,7 +234,6 @@ "{{template_dir}}/scripts/installers/aws-sam-cli.sh" ], "environment_vars": [ - "METADATA_FILE={{user `metadata_file`}}", "HELPER_SCRIPTS={{user `helper_script_folder`}}" ], "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" @@ -261,7 +244,6 @@ "{{template_dir}}/scripts/installers/homebrew.sh" ], "environment_vars": [ - "METADATA_FILE={{user `metadata_file`}}", "HELPER_SCRIPTS={{user `helper_script_folder`}}", "DEBIAN_FRONTEND=noninteractive" ], diff --git a/images/linux/ubuntu1804.json b/images/linux/ubuntu1804.json index 05f4a2691..1dd62bc2d 100644 --- a/images/linux/ubuntu1804.json +++ b/images/linux/ubuntu1804.json @@ -14,7 +14,6 @@ "private_virtual_network_with_public_ip": "{{env `PRIVATE_VIRTUAL_NETWORK_WITH_PUBLIC_IP`}}", "image_folder": "/imagegeneration", "imagedata_file": "/imagegeneration/imagedata.json", - "metadata_file": "/imagegeneration/metadatafile", "installer_script_folder": "/imagegeneration/installers", "helper_script_folder": "/imagegeneration/helpers", "vm_size": "Standard_DS2_v2", @@ -106,19 +105,6 @@ "source": "{{template_dir}}/toolsets/toolset-1804.json", "destination": "{{user `installer_script_folder`}}/toolset.json" }, - { - "type": "shell", - "execute_command": "chmod +x {{ .Path }}; sudo {{ .Vars }} {{ .Path }}", - "scripts":[ - "{{template_dir}}/scripts/installers/preparemetadata.sh" - ], - "environment_vars": [ - "IMAGE_VERSION={{user `image_version`}}", - "METADATA_FILE={{user `metadata_file`}}", - "HELPER_SCRIPTS={{user `helper_script_folder`}}", - "ANNOUNCEMENTS={{user `announcements`}}" - ] - }, { "type": "shell", "scripts":[ @@ -226,7 +212,6 @@ "{{template_dir}}/scripts/installers/test-toolcache.sh" ], "environment_vars": [ - "METADATA_FILE={{user `metadata_file`}}", "HELPER_SCRIPTS={{user `helper_script_folder`}}", "INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}", "GITHUB_FEED_TOKEN={{user `github_feed_token`}}", @@ -242,7 +227,6 @@ "{{template_dir}}/scripts/installers/Validate-Toolset.ps1" ], "environment_vars": [ - "METADATA_FILE={{user `metadata_file`}}", "HELPER_SCRIPTS={{user `helper_script_folder`}}", "INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}" ], @@ -254,7 +238,6 @@ "{{template_dir}}/scripts/installers/aws-sam-cli.sh" ], "environment_vars": [ - "METADATA_FILE={{user `metadata_file`}}", "HELPER_SCRIPTS={{user `helper_script_folder`}}" ], "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" @@ -265,7 +248,6 @@ "{{template_dir}}/scripts/installers/homebrew.sh" ], "environment_vars": [ - "METADATA_FILE={{user `metadata_file`}}", "HELPER_SCRIPTS={{user `helper_script_folder`}}", "DEBIAN_FRONTEND=noninteractive" ], diff --git a/images/linux/ubuntu2004.json b/images/linux/ubuntu2004.json index 4a4ff5c5f..67d6e1d6a 100644 --- a/images/linux/ubuntu2004.json +++ b/images/linux/ubuntu2004.json @@ -14,7 +14,6 @@ "private_virtual_network_with_public_ip": "{{env `PRIVATE_VIRTUAL_NETWORK_WITH_PUBLIC_IP`}}", "image_folder": "/imagegeneration", "imagedata_file": "/imagegeneration/imagedata.json", - "metadata_file": "/imagegeneration/metadatafile", "installer_script_folder": "/imagegeneration/installers", "helper_script_folder": "/imagegeneration/helpers", "vm_size": "Standard_DS2_v2", @@ -108,19 +107,6 @@ "source": "{{template_dir}}/toolsets/toolset-2004.json", "destination": "{{user `installer_script_folder`}}/toolset.json" }, - { - "type": "shell", - "execute_command": "chmod +x {{ .Path }}; sudo {{ .Vars }} {{ .Path }}", - "scripts":[ - "{{template_dir}}/scripts/installers/preparemetadata.sh" - ], - "environment_vars": [ - "IMAGE_VERSION={{user `image_version`}}", - "METADATA_FILE={{user `metadata_file`}}", - "HELPER_SCRIPTS={{user `helper_script_folder`}}", - "ANNOUNCEMENTS={{user `announcements`}}" - ] - }, { "type": "shell", "scripts":[ @@ -228,7 +214,6 @@ "{{template_dir}}/scripts/installers/test-toolcache.sh" ], "environment_vars": [ - "METADATA_FILE={{user `metadata_file`}}", "HELPER_SCRIPTS={{user `helper_script_folder`}}", "INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}", "GITHUB_FEED_TOKEN={{user `github_feed_token`}}", @@ -244,7 +229,6 @@ "{{template_dir}}/scripts/installers/Validate-Toolset.ps1" ], "environment_vars": [ - "METADATA_FILE={{user `metadata_file`}}", "HELPER_SCRIPTS={{user `helper_script_folder`}}", "INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}" ], @@ -256,7 +240,6 @@ "{{template_dir}}/scripts/installers/aws-sam-cli.sh" ], "environment_vars": [ - "METADATA_FILE={{user `metadata_file`}}", "HELPER_SCRIPTS={{user `helper_script_folder`}}" ], "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" @@ -267,7 +250,6 @@ "{{template_dir}}/scripts/installers/homebrew.sh" ], "environment_vars": [ - "METADATA_FILE={{user `metadata_file`}}", "HELPER_SCRIPTS={{user `helper_script_folder`}}", "DEBIAN_FRONTEND=noninteractive" ],