处理本地安装命令问题
This commit is contained in:
Vendored
+5
-1
@@ -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
|
||||||
|
'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user