...
|
...
|
@@ -115,16 +115,19 @@ pipeline { |
|
|
script {
|
|
|
sleep(30)
|
|
|
def KUBECONFIG = "${env.WORKSPACE}/k8s-deploy-yaml/${params.clusterId}/kube-config"
|
|
|
def CHECKKUBE= "/usr/local/bin/kubectl get deployment --all-namespaces --kubeconfig=$KUBECONFIG |grep ${params.deployName} | awk '{print \$3,\$4,\$5,\$6}'"
|
|
|
def CHECKKUBE= "/usr/local/bin/kubectl get deployment --all-namespaces --kubeconfig=$KUBECONFIG |grep ${params.deployName}- | awk '{print \$3,\$4,\$5,\$6}'"
|
|
|
def SHOWPODINFO= "/usr/local/bin/kubectl get pods --all-namespaces --kubeconfig=$KUBECONFIG |grep ${params.deployName}"
|
|
|
for(int i = 0;i<=60;i++) {
|
|
|
def result = sh returnStdout: true ,script: "$CHECKKUBE"
|
|
|
result = result.trim()
|
|
|
print "----show the deployment info ---"
|
|
|
print result
|
|
|
print "----end the deployment info ---"
|
|
|
if(result==''){
|
|
|
error 'the is no date,please check the result'
|
|
|
}
|
|
|
print "request time is : "+i+"and the result is : "+result
|
|
|
def compare = result.split(",")
|
|
|
def compare = result.split(" ")
|
|
|
if(compare[3]==compare[0]&&compare[3]==compare[1]&&compare[3]==compare[2]){
|
|
|
print "----show the pods info ----"
|
|
|
sh "$SHOWPODINFO"
|
...
|
...
|
|