File tree Expand file tree Collapse file tree 1 file changed +17
-5
lines changed
clouddriver-web/pkg_scripts Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -29,12 +29,24 @@ install_kubectl() {
29
29
}
30
30
31
31
install_awscli2 () {
32
- curl " https://awscli.amazonaws.com/awscli-exe-linux-x86_64-${AWS_CLI_VERSION} .zip" -o " awscliv2.zip"
33
- unzip awscliv2.zip
34
- ./aws/install
35
- rm -rf ./awscliv2.zip ./aws
32
+ if [ -d " /usr/local/aws-cli/v2/${AWS_CLI_VERSION} " ]; then
33
+ echo " awscli2 ${AWS_CLI_VERSION} is already installed"
34
+ else
35
+ echo " Installing awscli2 ${AWS_CLI_VERSION} "
36
+ curl -s " https://awscli.amazonaws.com/awscli-exe-linux-x86_64-${AWS_CLI_VERSION} .zip" -o " awscliv2.zip"
37
+
38
+ # This shouldn't usually exist unless the installation failed previously
39
+ if [ -d " ./aws" ]; then
40
+ rm -rf ./aws
41
+ fi
42
+
43
+ unzip awscliv2.zip
44
+ ./aws/install --update
45
+ rm -rf ./awscliv2.zip ./aws
46
+ fi
36
47
37
- curl " https://github.com/kubernetes-sigs/aws-iam-authenticator/releases/download/v${AWS_AIM_AUTHENTICATOR_VERSION} /aws-iam-authenticator_${AWS_AIM_AUTHENTICATOR_VERSION} _linux_amd64" -o aws-iam-authenticator
48
+ echo " Installing aws-iam-authenticator ${AWS_AIM_AUTHENTICATOR_VERSION} "
49
+ curl -s " https://github.com/kubernetes-sigs/aws-iam-authenticator/releases/download/v${AWS_AIM_AUTHENTICATOR_VERSION} /aws-iam-authenticator_${AWS_AIM_AUTHENTICATOR_VERSION} _linux_amd64" -o aws-iam-authenticator
38
50
chmod +x ./aws-iam-authenticator
39
51
mv ./aws-iam-authenticator /usr/local/bin/aws-iam-authenticator
40
52
}
You can’t perform that action at this time.
0 commit comments