diff --git a/client-api/Jenkinsfile b/client-api/Jenkinsfile index 3fa9d4f..ece4d83 100644 --- a/client-api/Jenkinsfile +++ b/client-api/Jenkinsfile @@ -33,7 +33,11 @@ pipeline { stages { stage('环境检查') { 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 + ''' } }