diff --git a/client-api/Jenkinsfile b/client-api/Jenkinsfile index ece4d83..1b27ae7 100644 --- a/client-api/Jenkinsfile +++ b/client-api/Jenkinsfile @@ -33,11 +33,7 @@ pipeline { stages { stage('环境检查') { steps { - sh ''' - if ! which sshpass > /dev/null 2>&1; then - apt-get update && apt-get install -y sshpass - fi - ''' + sh 'which sshpass || (sudo apt-get update && sudo apt-get install -y sshpass)' } }