gpt4 book ai didi

github - Google Cloud Builder 触发器给出 "No such blob"错误

转载 作者:行者123 更新时间:2023-12-04 16:03:57 38 4
gpt4 key购买 nike

我正在设置 Google Cloud Build 触发器。我选择 GitHub,对 GitHub 进行身份验证,选择我想用作触发器的存储库,然后选择“Cloud Build 配置文件(yaml 或 json)”并将“Cloud Build 配置文件位置”设置为 cloudbuild.yaml 的默认值。

但是,当我通过选择“运行触发器”触发运行时,Google Cloud Builder 给了我错误

Failed to trigger build: cloud.mygcpproject/github_example_myproject:cloudbuild.yaml: No such blob refs/heads/master:cloudbuild.yaml

但是文件 cloudbuild.yaml 确实存在于该存储库中。我多次尝试删除和重新创建触发器,结果总是相同。

以下是顶级内容:
total 72
drwxr-xr-x 8 rlandster rlandster 4096 Apr 9 20:11 .
drwxr-xr-x 7 rlandster rlandster 4096 Apr 3 19:29 ..
drwxr-xr-x 2 rlandster rlandster 4096 Mar 10 11:54 aws
-rw-r--r-- 1 rlandster rlandster 74 Dec 11 18:43 aws.mdwn
-rw-r--r-- 1 rlandster rlandster 364 Apr 9 20:11 cloudbuild.yaml
drwxr-xr-x 3 rlandster rlandster 4096 Mar 11 04:56 debian
-rw-r--r-- 1 rlandster rlandster 42 Mar 9 19:56 debian.mdwn
drwxr-xr-x 3 rlandster rlandster 4096 Feb 2 13:26 gcp
-rw-r--r-- 1 rlandster rlandster 54 Feb 2 13:22 gcp.mdwn
drwxr-xr-x 2 rlandster rlandster 4096 Mar 3 10:15 git
drwxr-xr-x 8 rlandster rlandster 4096 Apr 17 05:08 .git
-rw-r--r-- 1 rlandster rlandster 48 Mar 3 10:15 git.mdwn
-rw-r--r-- 1 rlandster rlandster 2699 Mar 11 19:42 gpg.mdwn
-rw-r--r-- 1 rlandster rlandster 89 Mar 11 19:41 index.mdwn
drwxr-xr-x 2 rlandster rlandster 4096 Mar 3 10:15 ldap
-rw-r--r-- 1 rlandster rlandster 46 Mar 3 10:15 ldap.mdwn
-rw-r--r-- 1 rlandster rlandster 1242 Mar 10 20:51 local.css
-rw-r--r-- 1 rlandster rlandster 23 Dec 11 18:41 README.md

为了确保 cloudbuild.yaml 在远程,我做了一个远程存储库的 git clone 然后列出对象:
$ git ls-tree refs/heads/master
100644 blob ba1d886a431eeefae6e86ea82e4b32f58e555482 README.md
100644 blob 255991c16bfa8ceda1f910ca8c2c9a76176074cc aws.mdwn
040000 tree 1b65cfb9fab80cb19ca874f24eec18f4a33441ba aws
100644 blob f9c0fa22a6b36daae4a258825fa14ee970c55db9 cloudbuild.yaml
100644 blob 1a1720e89e8f7e5782404d1dcde409f93fa2b3a3 debian.mdwn
040000 tree be830bc70f66503f3723b68293d1c2be171ba491 debian
100644 blob e24269417aa5afaa14b8d77a2af6d484bb132e91 gcp.mdwn
040000 tree c9470904cac2c9b4ecfc2d129a295414d3f91b35 gcp
100644 blob 96a0c8fc32b7ccb9d16a68beb20f471e4b3e2c8f git.mdwn
040000 tree 84249e1a63519cfc1865f241caa03ff2c8276f70 git
100644 blob fe6ec42d23f3a35945f16ebe2f088c937b6a4fe0 gpg.mdwn
100644 blob 22c4923e6233039f7a5280eeeeeeb358765989dc index.mdwn
100644 blob baa1399e4948a8f1456fa80100f08a369ce84439 ldap.mdwn
040000 tree d777c11680977d00b244877e6ee43a548c6d956a ldap
100644 blob b30f876c9c054b304d30d584e3407da0f940419c local.css

$ git cat-file -s refs/heads/master:cloudbuild.yaml
364

更新:虽然手动触发仍会导致相同的“No such blob”错误,但 git push 确实会触发成功构建。因此,它只是手动触发不起作用。

最佳答案

该错误是在 in this article 之前报告的

Next, create this cloudbuild.yaml file in the root of your repo.
The contents will be instructions for the Cloud Build executor where we will write our gsutil command. The rest of this tutorial assumes your git repository has at least the following structure (in bold):


.

├── cloudbuild.yaml
├── dags
│ └── my_dag.py ... etc
└── plugins

通过 git status 确保:
  • 你在主分支
  • 文件 cloudbuild.yml实际被跟踪(意味着添加+提交已完成)

  • 在文章评论中,用户反射(reflect):

    Figured, because the source repository did not pick up cloudbuild.yaml when I made my commits.
    I think this happened because I’ve set up a trigger based on a certain path and it just ignored that commit.

    关于github - Google Cloud Builder 触发器给出 "No such blob"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55604516/

    38 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com