跳过文件 /opt/atlassian/pipelines/agent/build/。文件不存在

Skipping file /opt/atlassian/pipelines/agent/build/. File does not exist

我的根目录中有一个文件catalog.json。我使用 bitbucket 管道执行此步骤:

 - aws s3 cp catalog.json s3://testunzipping/ --recursive

但是,我得到一个错误: Skipping file /opt/atlassian/pipelines/agent/build/catalog.json/. File does not exist.

为什么要检查此路径中的 catalog.json 文件?为什么不从根目录中提取文件?如何相应地修改命令?

问题是您正在尝试对单个文件使用 --recursive。由于 --recursive 参数,该命令正在尝试将其评估为目录。它最终会给出 File does not exist 错误。我通过尝试使用 --recursive 参数复制单个文件来重现它,我得到了同样的错误,但是在删除它之后,它起作用了。

你可以用这个;

aws s3 cp catalog.json s3://testunzipping/

同时回答你的其他问题; Bitbucket 管道运行器正在使用 /opt/atlassian/pipelines/agent/build 目录。这实际上是管道的根目录。 Runners 正在从那里的 repo 中提取代码并根据您的管道结构对其进行处理。这是 built-in 的情况。