Skip to content

Commit 3a0b26c

Browse files
committed
improve Jenkinsfile
1 parent 400d641 commit 3a0b26c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ void runTest(Integer TEST_ID) {
249249
void prepareNode() {
250250
sh """
251251
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
252+
sudo curl -s -L -o /usr/local/bin/kubectl https://dl.k8s.io/release/\$(curl -L -s https://api.github.com/repos/kubernetes/kubernetes/releases/latest | jq -r .tag_name)/bin/linux/amd64/kubectl && sudo chmod +x /usr/local/bin/kubectl
253253
fi
254254
255255
kubectl version --client --output=yaml

0 commit comments

Comments
 (0)