diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 index 831279e71..60c1a6995 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 @@ -272,5 +272,5 @@ function Get-SphinxVersion { } function Get-YamllintVersion { - return (yamllint --version | Out-String) + return "$(yamllint --version)" } \ No newline at end of file diff --git a/images/linux/scripts/installers/aws-sam-cli.sh b/images/linux/scripts/installers/aws-sam-cli.sh deleted file mode 100644 index ac56144b3..000000000 --- a/images/linux/scripts/installers/aws-sam-cli.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash -################################################################################ -## File: aws-sam-cli.sh -## Desc: Installs AWS SAM CLI -## Requires Python >=3.6, must be run as non-root user after toolset installation -################################################################################ - - -# Download latest aws sam cli sources -TarballUrl=$(curl -s https://api.github.com/repos/aws/aws-sam-cli/releases/latest | jq -r '.tarball_url') -TarballPath="/tmp/aws-sam-cli.tar.gz" -wget $TarballUrl -O $TarballPath -tar -xzvf $TarballPath -C /tmp -cd /tmp/aws-aws-sam-cli* - -mkdir /opt/python-aws-sam-cli -cp -r /opt/hostedtoolcache/Python/3.7* /opt/python-aws-sam-cli - -# Use copy of python 3.7 from toolcache to install aws sam, setuptools package required for the installation -Python3Dir=$(echo /opt/python-aws-sam-cli/3.7*/x64) -Python3BinDir="${Python3Dir}/bin" -$Python3BinDir/python3 -m pip install setuptools -$Python3BinDir/python3 setup.py install -ln -sf ${Python3BinDir}/sam /usr/local/bin/sam - -# 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 ! sam --version; then - echo "AWS SAM CLI was not installed" - exit 1 -fi diff --git a/images/linux/ubuntu1604.json b/images/linux/ubuntu1604.json index c4133976f..2fc97542d 100644 --- a/images/linux/ubuntu1604.json +++ b/images/linux/ubuntu1604.json @@ -208,8 +208,7 @@ "{{template_dir}}/scripts/installers/hosted-tool-cache.sh", "{{template_dir}}/scripts/installers/pypy.sh", "{{template_dir}}/scripts/installers/python.sh", - "{{template_dir}}/scripts/installers/test-toolcache.sh", - "{{template_dir}}/scripts/installers/pipx-packages.sh" + "{{template_dir}}/scripts/installers/test-toolcache.sh" ], "environment_vars": [ "HELPER_SCRIPTS={{user `helper_script_folder`}}", @@ -232,6 +231,13 @@ ], "execute_command": "sudo sh -c '{{ .Vars }} pwsh -f {{ .Path }}'" }, + { + "type": "shell", + "scripts": [ + "{{template_dir}}/scripts/installers/pipx-packages.sh" + ], + "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" + }, { "type": "shell", "scripts": [ diff --git a/images/linux/ubuntu2004.json b/images/linux/ubuntu2004.json index 3deb5a1bd..0b1fdc8d9 100644 --- a/images/linux/ubuntu2004.json +++ b/images/linux/ubuntu2004.json @@ -214,8 +214,7 @@ "{{template_dir}}/scripts/installers/hosted-tool-cache.sh", "{{template_dir}}/scripts/installers/pypy.sh", "{{template_dir}}/scripts/installers/python.sh", - "{{template_dir}}/scripts/installers/test-toolcache.sh", - "{{template_dir}}/scripts/installers/pipx-packages.sh" + "{{template_dir}}/scripts/installers/test-toolcache.sh" ], "environment_vars": [ "HELPER_SCRIPTS={{user `helper_script_folder`}}", @@ -238,6 +237,13 @@ ], "execute_command": "sudo sh -c '{{ .Vars }} pwsh -f {{ .Path }}'" }, + { + "type": "shell", + "scripts": [ + "{{template_dir}}/scripts/installers/pipx-packages.sh" + ], + "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" + }, { "type": "shell", "scripts": [