处理本地安装命令问题

This commit is contained in:
zk
2026-05-27 14:07:38 +08:00
parent f02b7778c4
commit c77651ddf5
+5 -1
View File
@@ -33,7 +33,11 @@ pipeline {
stages { stages {
stage('环境检查') { stage('环境检查') {
steps { steps {
sh 'which sshpass || (apt-get update && apt-get install -y sshpass)' sh '''
if ! which sshpass > /dev/null 2>&1; then
apt-get update && apt-get install -y sshpass
fi
'''
} }
} }