2020-10-07 13:49:40 +05:00
|
|
|
#!/bin/bash -e
|
2020-04-13 17:38:35 +03:00
|
|
|
################################################################################
|
|
|
|
|
## File: aliyun-cli.sh
|
|
|
|
|
## Desc: Installs Alibaba Cloud CLI
|
|
|
|
|
################################################################################
|
|
|
|
|
|
2021-04-02 18:47:50 +03:00
|
|
|
# Source the helpers for use with the script
|
2023-08-17 19:06:48 +02:00
|
|
|
source $HELPER_SCRIPTS/os.sh
|
2021-04-02 18:47:50 +03:00
|
|
|
source $HELPER_SCRIPTS/install.sh
|
|
|
|
|
|
2020-04-13 17:38:35 +03:00
|
|
|
# Install Alibaba Cloud CLI
|
2023-08-17 19:06:48 +02:00
|
|
|
# Pin tool version on ubuntu20 due to issues with GLIBC_2.32 not available
|
|
|
|
|
if isUbuntu20; then
|
|
|
|
|
toolsetVersion=$(get_toolset_value '.aliyunCli.version')
|
|
|
|
|
downloadUrl="https://github.com/aliyun/aliyun-cli/releases/download/v$toolsetVersion/aliyun-cli-linux-$toolsetVersion-amd64.tgz"
|
|
|
|
|
else
|
|
|
|
|
downloadUrl="https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-amd64.tgz"
|
|
|
|
|
fi
|
|
|
|
|
|
2022-02-08 19:41:23 +03:00
|
|
|
download_with_retries $downloadUrl "/tmp"
|
2021-04-01 15:15:59 +03:00
|
|
|
tar xzf /tmp/aliyun-cli-linux-*-amd64.tgz
|
2020-04-13 17:38:35 +03:00
|
|
|
mv aliyun /usr/local/bin
|
|
|
|
|
|
2020-12-21 23:35:22 +03:00
|
|
|
invoke_tests "CLI.Tools" "Aliyun CLI"
|