【发布时间】:2021-11-16 20:12:00
【问题描述】:
我正在构建一个使用框架 Angular 9 编写的网站,并且为了部署该网站,需要使用 Bitbucket Pipelines 进行 CI/CD。目前,我正在制作一个 dist 文件夹,然后将此文件夹上传到 AWS S3 存储桶并将其发布为网站。每次我对任何文件进行微小更改时,我都会从存储桶中删除 dist 文件夹并上传新文件夹。所有这些都应该在 Bitbucket Pipelines yml 文件中工作。 这是我的 bitbucket-pipelines yml 文件。
image: cgswong/aws:aws
pipelines:
branches:
master:
- step:
script:
- aws s3 --region "ap-southeast-1" sync --delete dist/xyz s3://xyz.abc.com
staging:
- step:
script:
- aws s3 --region "ap-southeast-1" sync --delete dist/xyz s3://stage.xyz.abc.com
每次尝试部署站点时,都会出现以下错误
failed to create containerd task: failed to create shim: OCI runtime create failed: invalid mount {Destination:~/.aws Type:bind Source:/var/lib/containerd/io.containerd.grpc.v1.cri/containers/4161c400375792a5ad88ec1cf1a89da50ae93ad532e4e490fe94d6c978f2de0f/volumes/0608fb757b1b423a3d52e795531d103a5d8ca6ebcd74c35158f6cbb29890571a Options:[rbind rprivate rw]}: mount destination ~/.aws not absolute: unknown
我是 CI/CD 的新手。有什么办法可以解决这个问题?
【问题讨论】:
标签: amazon-web-services amazon-s3 bitbucket-pipelines