Skip to content

Owls92223 - download kubectl from object storage #2537

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 20, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 17 additions & 9 deletions jenkinsScript.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,23 @@ helm version

echo 'Info: Set up kubectl...'
set +e
for i in 1 2 3 ; do
curl --ipv4 -LO --retry 3 https://storage.googleapis.com/kubernetes-release/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl
mv kubectl bin/kubectl
chmod +x bin/kubectl
out=$(kubectl version --client=true)
res=$?
[ $res -eq 0 ] && break
sleep 10
done
echo 'Info: download from object storage'
curl --ipv4 -LO --retry 3 https://objectstorage.eu-frankfurt-1.oraclecloud.com/n/weblogicondocker/b/bucket-wko-jenkins/o/v${KUBECTL_VERSION}_kubectl
mv v${KUBECTL_VERSION}_kubectl bin/kubectl
chmod +x bin/kubectl
out=$(kubectl version --client=true)
res=$?
if [ $res -ne 0 ]; then
for i in 1 2 3 ; do
curl --ipv4 -LO --retry 3 https://storage.googleapis.com/kubernetes-release/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl
mv kubectl bin/kubectl
chmod +x bin/kubectl
out=$(kubectl version --client=true)
res=$?
[ $res -eq 0 ] && break
sleep 10
done
fi
set -e
kubectl version --client=true

Expand Down