简体   繁体   English

AWS CDK Pipelines 创建多个工件桶

[英]AWS CDK Pipelines Creates Multiple Artifact Buckets

I'm having some trouble with CDK Pipeline/ CodePipeline in AWS.我在使用 AWS 中的 CDK Pipeline/CodePipeline 时遇到了一些问题。 When I run the pipeline (git commit) the Assets section always runs even if I don't change the files that it is building and every pipeline execution creates an S3 bucket with pipeline assets so we have loads of s3 buckets.当我运行管道 (git commit) 时,资产部分始终运行,即使我不更改它正在构建的文件,并且每个管道执行都会创建一个包含管道资产的 S3 存储桶,因此我们有大量的 s3 存储桶。 This behaviour while odd does seem to work but it takes a long time to run and doesn't seem right.这种行为虽然奇怪,但似乎确实有效,但需要很长时间才能运行,而且似乎不正确。 Is this to be expected and if not what may be the issue?这是可以预料的吗?如果不是,可能是什么问题?

Update We sometimes see the below error msg in the build logs which may be related but it doesn't cause failure:更新我们有时会在构建日志中看到以下错误消息,这可能是相关的,但不会导致失败:

Failed to store notices in the cache: Error: ENOENT: no such file or directory, open '/root/.cdk/cache/notices.json'

If you create an S3 bucket and then reference that bucket in your Codepipeline, the output will always be in that S3 bucket, and the artifacts will be sub directories of that specific S3 bucket.如果您创建一个 S3 存储桶,然后在您的 Codepipeline 中引用该存储桶,则 output 将始终位于该 S3 存储桶中,并且工件将是该特定 S3 存储桶的子目录。 That way you will get new build assets, but they will be placed inside of the same bucket, and you only have one S3 bucket.这样您将获得新的构建资产,但它们将被放置在同一个存储桶中,而您只有一个 S3 存储桶。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM