mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-11 03:57:29 +00:00
[ubuntu] Rename build scripts (#8866)
* [ubuntu] Rename build scripts * [ubuntu] Change reboot to inline shell * [ubuntu] Move disk space validation to pester tests * [ubuntu] Rename helper and tests files * [ubuntu] Changes to cleanup, post-deployment and r scripts
This commit is contained in:
committed by
GitHub
parent
410fd620be
commit
1bd9214f41
37
images/ubuntu/scripts/build/install-aliyun-cli.sh
Normal file
37
images/ubuntu/scripts/build/install-aliyun-cli.sh
Normal file
@@ -0,0 +1,37 @@
|
||||
#!/bin/bash -e
|
||||
################################################################################
|
||||
## File: install-aliyun-cli.sh
|
||||
## Desc: Install Alibaba Cloud CLI
|
||||
## Supply chain security: Alibaba Cloud CLI - checksum validation
|
||||
################################################################################
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/os.sh
|
||||
source $HELPER_SCRIPTS/install.sh
|
||||
|
||||
# Install Alibaba Cloud CLI
|
||||
# Pin tool version on ubuntu20 due to issues with GLIBC_2.32 not available
|
||||
if isUbuntu20; then
|
||||
toolset_version=$(get_toolset_value '.aliyunCli.version')
|
||||
download_url="https://github.com/aliyun/aliyun-cli/releases/download/v$toolset_version/aliyun-cli-linux-$toolset_version-amd64.tgz"
|
||||
else
|
||||
download_url=$(get_github_package_download_url "aliyun/aliyun-cli" "contains(\"aliyun-cli-linux\") and endswith(\"amd64.tgz\")")
|
||||
hash_url="https://github.com/aliyun/aliyun-cli/releases/latest/download/SHASUMS256.txt"
|
||||
fi
|
||||
|
||||
package_name="aliyun-cli-linux-amd64.tgz"
|
||||
download_with_retries "$download_url" "/tmp" "$package_name"
|
||||
|
||||
# Supply chain security - Alibaba Cloud CLI
|
||||
if isUbuntu20; then
|
||||
external_hash=$(get_toolset_value '.aliyunCli.sha256')
|
||||
else
|
||||
external_hash=$(get_hash_from_remote_file "$hash_url" "aliyun-cli-linux" "amd64.tgz")
|
||||
fi
|
||||
|
||||
use_checksum_comparison "/tmp/$package_name" "$external_hash"
|
||||
|
||||
tar xzf "/tmp/$package_name"
|
||||
mv aliyun /usr/local/bin
|
||||
|
||||
invoke_tests "CLI.Tools" "Aliyun CLI"
|
||||
Reference in New Issue
Block a user