Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Kubernetes GKE上的CI CD管道-推送清单失败(已完成步骤“5-”推送清单“错误)_Kubernetes_Google Cloud Platform_Google Kubernetes Engine_Continuous Deployment_Google Cloud Build - Fatal编程技术网

Kubernetes GKE上的CI CD管道-推送清单失败(已完成步骤“5-”推送清单“错误)

Kubernetes GKE上的CI CD管道-推送清单失败(已完成步骤“5-”推送清单“错误),kubernetes,google-cloud-platform,google-kubernetes-engine,continuous-deployment,google-cloud-build,Kubernetes,Google Cloud Platform,Google Kubernetes Engine,Continuous Deployment,Google Cloud Build,我正在为GKE上的Spring boot应用程序设置CI CD管道。 在GCP上使用云构建执行CI时,将更新的清单推送到候选分支时构建失败。“在步骤5失败” 我可以在云构建中看到下面的日志 Finished Step #4 - "Generate manifest" Starting Step #5 - "Push manifest" Step #5 - "Push manifest": Already have image (with digest): gcr.io/cloud-builder

我正在为GKE上的Spring boot应用程序设置CI CD管道。 在GCP上使用云构建执行CI时,将更新的清单推送到候选分支时构建失败。“在步骤5失败” 我可以在云构建中看到下面的日志

Finished Step #4 - "Generate manifest"
Starting Step #5 - "Push manifest"
Step #5 - "Push manifest": Already have image (with digest): gcr.io/cloud-builders/gcloud
Step #5 - "Push manifest": + cd eureka-cloudbuild-env
Step #5 - "Push manifest": + git add kubernetes.yaml
Step #5 - "Push manifest": + git log --format=%an <%ae> -n 1 HEAD
Step #5 - "Push manifest": On branch candidate
Step #5 - "Push manifest": Your branch is up to date with 'origin/candidate'.
Step #5 - "Push manifest": 
Step #5 - "Push manifest": nothing to commit, working tree clean
Step #5 - "Push manifest": + git commit -m Deploying image gcr.io/amcartecom/eureka-cloudbuild:v2
Step #5 - "Push manifest": Built from commit 34dfdd69af726f80d3b91b29127e0c77cc2a83cf of repository eureka-cloudbuild-app
Step #5 - "Push manifest": Author: root <983160928936@cloudbuild.gserviceaccount.com>
Finished Step #5 - "Push manifest"
ERROR
ERROR: build step 5 "gcr.io/cloud-builders/gcloud" failed: exit status 1
已完成第4步-“生成清单”
开始步骤#5-“推送清单”
步骤5-“推送清单”:已经有映像(带有摘要):gcr.io/cloud-builders/gcloud
第5步-“推送清单”:+cd eureka cloudbuild env
步骤5-“推送清单”:+git添加kubernetes.yaml
步骤5-“推送清单”:+git日志——格式=%an-n 1头
步骤5-“推送清单”:在分支候选上
第5步-“推送清单”:您的分支机构使用“来源/候选人”更新。
第5步-“推送清单”:
步骤5-“推送清单”:无需提交任何内容,工作树清理
步骤5-“推送清单”:+git提交-m部署映像gcr.io/amcartecom/eureka cloudbuild:v2
步骤5-“推送清单”:根据eureka cloudbuild应用程序存储库的提交34dfdd69af726f80d3b91b29127e0c77cc2a83cf构建
步骤5-“推送清单”:作者:root
已完成第5步-“推送清单”
错误
错误:生成步骤5“gcr.io/cloud builders/gcloud”失败:退出状态1

为了设置这个管道,我遵循了本教程代码中提到的所有指导原则,假设在源代码发生实际更改时生成触发器,看起来您正试图从控制台手动触发它。 当没有任何更改时,cloudbuild.yaml的步骤5会因git提交为空而以错误状态退出,默认情况下,当没有要提交的内容时,git提交会以错误状态退出

您可以根据使用
--allow empty
标志,但请记住,它将创建一个实际的提交,即使它与前一个相同。 如果您不希望进行此类提交,但只希望抑制错误,则可以在步骤5结束时显式添加
| |退出0
,以忽略错误