jenkins api部署时,一直提示pending-Finished waiting

问题:

调用jenkins api部署时,一直提示pending-Finished waiting

解决方案:

这个问题困扰了很久,一直没有思路,后面看到调用jenkinsAPI本身会出现一段提示,pending in the quiet period,通过搜索这个提示,才了解到是静默期的问题,通过把静默期取消,就可以解决了

看下这段日志,问题是什么? Started by user Devops CRD Running in Durability level: MAX_SURVIVABILITY [Pipeline] Start of Pipeline [Pipeline] echo Original Release Version: 280 [Pipeline] node Running on Jenkins in /root/.jenkins/workspace/tapocare-app-blue-green-pipeline-new [Pipeline] { [Pipeline] withEnv [Pipeline] { [Pipeline] timestamps [Pipeline] { [Pipeline] stage [Pipeline] { (Sync Up Release) [Pipeline] echo 15:45:36 Sync up tapocare-app release ... [Pipeline] script [Pipeline] { [Pipeline] echo 15:45:36 Major Deploy Version: 1.39.903 [Pipeline] sh 15:45:37 + AWS_DEFAULT_REGION=ap-southeast-1 AWS_PROFILE=uat helm repo update 15:45:37 Hang tight while we grab the latest from your chart repositories... 15:45:45 ...Successfully got an update from the "prd-tplink-nbu" chart repository 15:45:45 Update Complete. ⎈ Happy Helming!⎈ [Pipeline] sh 15:45:45 + helm search repo prd-tplink-nbu/tapocare-app --version 1.39.903 [Pipeline] sh 15:45:48 + cat ./temp 15:45:48 + grep -w prd-tplink-nbu/tapocare-app 15:45:48 + head -1 15:45:48 + cut -f 2 [Pipeline] echo 15:45:48 RELEASE_VERSION: 1.39.903 [Pipeline] echo 15:45:48 Latest Release Version: 1.39.903 [Pipeline] } [Pipeline] // script [Pipeline] echo 15:45:48 Creating build directories ... [Pipeline] sh 15:45:49 + mkdir ./build-280 [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Authorization) Stage "Authorization" skipped due to when conditional [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Promote Stage) [Pipeline] input 15:45:49 Promote to uat-v2.ap-southeast-1? 15:45:49 Proceed or Abort 15:45:58 Approved by Devops CRD [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Deploy Stage) [Pipeline] echo 15:45:58 Deploying tapocare-app Release v1.39.903 to uat-v2.ap-southeast-1 ... [Pipeline] dir 15:45:58 Running in /root/.jenkins/workspace/tapocare-app-blue-green-pipeline-new/build-280 [Pipeline] { [Pipeline] script [Pipeline] { [Pipeline] sh 15:45:58 + + git ls-remote ssh://cicdtplinknbu@pdgerrit.tp-link.com:29418/tplinknbu/devops_cicd mastercut 15:45:58 -f1 [Pipeline] echo 15:45:58 commit id: a3e6c3d3b3868522155f9fbf2189ad35b8832f23 15:45:58 94f29bae0d31af8a54e32e5bcb5d6e59af3b0978 [Pipeline] sh 15:45:59 + rm -rf devops_cicd 15:45:59 + mkdir devops_cicd [Pipeline] sh 15:45:59 + git clone --depth 1 -b master ssh://cicdtplinknbu@pdgerrit.tp-link.com:29418/tplinknbu/devops_cicd 15:45:59 Cloning into 'devops_cicd'... 15:46:01 Total 26276 (delta 8564), reused 21366 (delta 8564) 15:46:03 Updating files: 99% (18692/18803) Updating files: 100% (18803/18803) Updating files: 100% (18803/18803), done. [Pipeline] sh 15:46:03 + rm -rf k8s-values 15:46:03 + mkdir k8s-values [Pipeline] sh 15:46:03 + cp -rf ./devops_cicd/k8s-values/tapocare-app ./k8s-values/ [Pipeline] sh 15:46:04 + rm -rf ./devops_cicd [Pipeline] echo 15:46:04 ENV: pet-v2 [Pipeline] echo 15:46:04 deploy() begins... [Pipeline] sh 15:46:04 + yq read ./k8s-values/tapocare-app/pet/ap-southeast-1/values.yaml app.namespace [Pipeline] sh 15:46:04 + kubectl get deployment -n pet-app-ipc --context uat-v2.ap-southeast-1 [Pipeline] sh 15:46:06 + cat ./temp 15:46:06 + grep -E tapocare-app-[0-9]+(\.[0-9,a-z,A-Z]+)+(-[a-z,A-Z]+)* 15:46:06 + cut -d -f 1 [Pipeline] echo 15:46:06 PREVIOUS_DEPLOY: tapocare-app-1.37.20 [Pipeline] sh 15:46:07 + kubectl get deployment tapocare-app-1.37.20 -o yaml -n pet-app-ipc --context uat-v2.ap-southeast-1 [Pipeline] sh 15:46:08 + cat ./temp 15:46:08 + yq read - spec.template.metadata.labels."app.kubernetes.io/version" [Pipeline] echo 15:46:08 pet PREVIOUS_VER: 1.37.20 [Pipeline] echo 15:46:08 Deploying to pet: ap-southeast-1 [Pipeline] sh 15:46:09 + kubectl get hpa tapocare-app-1.37.20 -o yaml -n pet-app-ipc --context uat-v2.ap-southeast-1 [Pipeline] sh 15:46:10 + + cat ./temp 15:46:10 yq read - spec.minReplicas [Pipeline] sh 15:46:10 + kubectl get hpa tapocare-app-1.37.20 -o yaml -n pet-app-ipc --context uat-v2.ap-southeast-1 [Pipeline] sh 15:46:12 + yq read - spec.maxReplicas 15:46:12 + cat ./temp [Pipeline] sh 15:46:12 + kubectl get deployment tapocare-app-1.37.20 -o yaml -n pet-app-ipc --context uat-v2.ap-southeast-1 [Pipeline] sh 15:46:14 + cat ./temp 15:46:14 + yq read - spec.replicas [Pipeline] echo 15:46:14 ONLINE_MIN_REPLICAS: 1 [Pipeline] echo 15:46:14 ONLINE_MAX_REPLICAS: 1 [Pipeline] echo 15:46:14 CURRENT_REPLICAS: 1 [Pipeline] sh 15:46:14 + yq read ./k8s-values/tapocare-app/pet/ap-southeast-1/values.yaml autoscaling.maxReplicas [Pipeline] sh 15:46:14 + yq write -i ./k8s-values/tapocare-app/pet/ap-southeast-1/values.yaml replicaCount 1 [Pipeline] sh 15:46:15 + yq write -i ./k8s-values/tapocare-app/pet/ap-southeast-1/values.yaml autoscaling.minReplicas 1 [Pipeline] sh 15:46:15 + yq write -i ./k8s-values/tapocare-app/pet/ap-southeast-1/values.yaml autoscaling.maxReplicas 1 [Pipeline] echo 15:46:15 ONLINE_MAX_REPLICAS: 1 [Pipeline] echo 15:46:15 CURRENT_REPLICAS: 1 [Pipeline] sh 15:46:15 + [ -d ./k8s-values/tapocare-app/pet ] 15:46:15 + echo true [Pipeline] sh 15:46:15 + [ -d ./k8s-values/tapocare-app/global ] 15:46:15 + echo true [Pipeline] sh 15:46:16 + [ -d ./k8s-values/tapocare-app/pet/common ] 15:46:16 + echo true [Pipeline] sh 15:46:16 + [ -d ./k8s-values/tapocare-app/pet/ap-southeast-1/config ] 15:46:16 + echo true [Pipeline] sh 15:46:16 + kubectl create configmap tapocare-app-pet-ap-southeast-1-tmp-config --from-file=./k8s-values/tapocare-app/global --from-file=./k8s-values/tapocare-app/pet/common --from-file=./k8s-values/tapocare-app/pet/ap-southeast-1/config --dry-run -o=yaml [Pipeline] sh 15:46:17 + yq read tapocare-app-pet-ap-southeast-1-tmp.yaml data [Pipeline] sh 15:46:17 + yq prefix -i tapocare-app-pet-ap-southeast-1-config-map-data.yaml configMap.data [Pipeline] sh 15:46:17 + [ -d ./k8s-values/tapocare-app/pet/ap-southeast-1 ] 15:46:17 + echo true [Pipeline] sh 15:46:17 + echo NEW_RELEASE_NAME tapocare-app-1.39.903 15:46:17 NEW_RELEASE_NAME tapocare-app-1.39.903 [Pipeline] sh 15:46:18 + helm list --namespace pet-app-ipc --kube-context uat-v2.ap-southeast-1 [Pipeline] sh 15:46:20 + cat ./temp 15:46:20 + grep tapocare-app 15:46:20 + head -1 15:46:20 + cut -f 1 [Pipeline] sh 15:46:20 + echo networking init 15:46:20 networking init [Pipeline] sh 15:46:20 + kubectl apply -f ./k8s-values/tapocare-app/pet/ap-southeast-1/networking/service.yaml --context pet-v2.ap-southeast-1 15:46:22 service/tapocare-app-aps1 unchanged [Pipeline] sh 15:46:22 + kubectl apply -f ./k8s-values/tapocare-app/pet/ap-southeast-1/networking/istio.yaml --context pet-v2.us-east-1 15:46:24 gateway.networking.istio.io/tapocare-app-aps1-gw unchanged 15:46:24 virtualservice.networking.istio.io/tapocare-app-aps1-vs unchanged 15:46:24 virtualservice.networking.istio.io/tapocare-app-aps1-internal-vs unchanged 15:46:24 gateway.networking.istio.io/tapocare-app-aps1-internal-grpc-gw unchanged 15:46:24 virtualservice.networking.istio.io/tapocare-app-aps1-internal-grpc-vs unchanged [Pipeline] sh 15:46:24 + echo networking init successfully 15:46:24 networking init successfully [Pipeline] sh 15:46:25 + AWS_DEFAULT_REGION=ap-southeast-1 AWS_PROFILE=uat helm upgrade --install tapocare-app-1.39.903 prd-tplink-nbu/tapocare-app --version 1.39.903 --values ./k8s-values/tapocare-app/pet/ap-southeast-1/values.yaml --values tapocare-app-pet-ap-southeast-1-config-map-data.yaml --namespace pet-app-ipc --kube-context uat-v2.ap-southeast-1 --timeout 1200s --wait 15:46:26 Release "tapocare-app-1.39.903" does not exist. Installing it now. 16:06:47 Error: timed out waiting for the condition [Pipeline] } [Pipeline] // script [Pipeline] } [Pipeline] // dir [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Blue-Green Release) Stage "Blue-Green Release" skipped due to earlier failure(s) [Pipeline] stage [Pipeline] { (Promote To BLUE-GREEN-TEST) Stage "Blue-Green Release" skipped due to earlier failure(s) [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Deploy To BLUE-GREEN-TEST) Stage "Blue-Green Release" skipped due to earlier failure(s) [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Promote To BLUE-GREEN-ALL) Stage "Blue-Green Release" skipped due to earlier failure(s) [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Deploy To BLUE-GREEN-ALL) Stage "Blue-Green Release" skipped due to earlier failure(s) [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (SCALE-DOWN-BLUE) Stage "Blue-Green Release" skipped due to earlier failure(s) [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Promote To BLUE-GREEN-END) Stage "Blue-Green Release" skipped due to earlier failure(s) [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Deploy To BLUE-GREEN-END) Stage "Blue-Green Release" skipped due to earlier failure(s) [Pipeline] } [Pipeline] // stage [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Test stage) Stage "Test stage" skipped due to earlier failure(s) [Pipeline] } [Pipeline] // stage [Pipeline] } [Pipeline] // timestamps [Pipeline] } [Pipeline] // withEnv [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline ERROR: script returned exit code 1 Finished: FAILURE
最新发布
11-18
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值