Merge branch 'developer' of ssh://code.cyweb.top:30033/scj/zhxy/v3/cloud-ui into developer
This commit is contained in:
13
deploy-tools/Jenkinsfile
vendored
13
deploy-tools/Jenkinsfile
vendored
@@ -28,17 +28,17 @@ node("height_A") {
|
|||||||
switch(branch){
|
switch(branch){
|
||||||
case 'developer' :
|
case 'developer' :
|
||||||
hostPort = 22
|
hostPort = 22
|
||||||
credentialsId = "scj-v3"
|
credentialsId = "root-with-key-ubu-70"
|
||||||
remoteHost = "192.168.42.127"
|
remoteHost = "192.168.42.127"
|
||||||
namespace = "scj-v3"
|
namespace = "scj-v3"
|
||||||
profile = "developer"
|
profile = "developer"
|
||||||
break;
|
break;
|
||||||
case 'master':
|
case 'master':
|
||||||
hostPort = 22
|
hostPort = 22
|
||||||
credentialsId = "city-zhxy-deploy"
|
credentialsId = "root-with-key-ubu-70"
|
||||||
remoteHost = "192.168.41.228"
|
remoteHost = "192.168.43.18"
|
||||||
namespace = "scj-v3"
|
namespace = "city-zhxy-school-deploy-v3"
|
||||||
profile = "deploy"
|
profile = "deploy"
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
error('未配置分支!放弃执行')
|
error('未配置分支!放弃执行')
|
||||||
@@ -107,7 +107,7 @@ node("height_A") {
|
|||||||
remote.host = "${remoteHost}"
|
remote.host = "${remoteHost}"
|
||||||
remote.allowAnyHosts = true
|
remote.allowAnyHosts = true
|
||||||
|
|
||||||
withCredentials([sshUserPrivateKey(credentialsId: 'root-with-key-ubu-70', keyFileVariable: 'identity', passphraseVariable: '', usernameVariable: 'username')]) {
|
withCredentials([sshUserPrivateKey(credentialsId: "${credentialsId}", keyFileVariable: 'identity', passphraseVariable: '', usernameVariable: 'username')]) {
|
||||||
remote.user = "${username}"
|
remote.user = "${username}"
|
||||||
remote.port = hostPort
|
remote.port = hostPort
|
||||||
remote.identityFile = identity
|
remote.identityFile = identity
|
||||||
@@ -122,6 +122,7 @@ node("height_A") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
isSuccess = false
|
isSuccess = false
|
||||||
currentBuild.result = 'FAILURE'
|
currentBuild.result = 'FAILURE'
|
||||||
|
|||||||
Reference in New Issue
Block a user