Skip to content

Commit 38131ff

Browse files
committed
improve Jenkinsfile
1 parent 400d641 commit 38131ff

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Jenkinsfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,10 +248,11 @@ void runTest(Integer TEST_ID) {
248248

249249
void prepareNode() {
250250
sh """
251-
if [ ! -f /usr/local/bin/kubectl ]; then
252-
sudo curl -s -L -o /usr/local/bin/kubectl https://dl.k8s.io/release/\$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl && sudo chmod +x /usr/local/bin/kubectl
251+
if [ -f /usr/local/bin/kubectl ]; then
252+
sudo rm -f /usr/local/bin/kubectl
253253
fi
254254
255+
sudo curl -s -L -o /usr/local/bin/kubectl https://dl.k8s.io/release/\$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl && sudo chmod +x /usr/local/bin/kubectl
255256
kubectl version --client --output=yaml
256257
257258
curl -fsSL https://get.helm.sh/helm-v3.18.0-linux-amd64.tar.gz | sudo tar -C /usr/local/bin --strip-components 1 -xzf - linux-amd64/helm

0 commit comments

Comments
 (0)