Move list of pipx packages into toolset

This commit is contained in:
Vladimir Safonkin
2020-10-05 12:04:29 +03:00
parent 4b0de6f6f4
commit 08f157956f
5 changed files with 30 additions and 19 deletions

View File

@@ -7,22 +7,19 @@
export PATH="$PATH:/opt/pipx_bin"
# Install yamlint
pipx install yamllint
toolset="$INSTALLER_SCRIPT_FOLDER/toolset.json"
pipx_packages=$(jq -r ".pipx[]" $toolset)
if ! command -v yamllint; then
echo "yamllint was not installed"
for package in $pipx_packages; do
echo "Install $package"
pipx install $package
done
# Run tests to determine that the software installed as expected
echo "Testing to make sure that script performed as expected, and basic scenarios work"
for cmd in $pipx_packages; do
if ! command -v $cmd; then
echo "$cmd was not installed"
exit 1
fi
echo "yamllint is successfully installed"
# Install aws sam cli
pipx install aws-sam-cli --python /opt/hostedtoolcache/Python/3.7*/x64/bin/python3.7
if ! command -v sam; then
echo "aws sam cli was not installed"
exit 1
fi
echo "aws sam cli is successfully installed"
fi
done

View File

@@ -188,5 +188,9 @@
"node:12-alpine",
"ubuntu:14.04"
]
}
},
"pipx": [
"yamllint",
"aws-sam-cli"
]
}

View File

@@ -151,5 +151,9 @@
"node:12-alpine",
"ubuntu:14.04"
]
}
},
"pipx": [
"yamllint",
"aws-sam-cli"
]
}

View File

@@ -240,6 +240,9 @@
"scripts": [
"{{template_dir}}/scripts/installers/pipx-packages.sh"
],
"environment_vars": [
"INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}"
],
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
},
{

View File

@@ -242,6 +242,9 @@
"scripts": [
"{{template_dir}}/scripts/installers/pipx-packages.sh"
],
"environment_vars": [
"INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}"
],
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
},
{