我在clients/目录中有2个服务。 Node js 构建工件的结构如下
clients/service1/dist/images/
clients/service1/dist/assets/
clients/service1/dist/index.html
clients/service2/dist/images/
clients/service2/dist/assets/
clients/service2/dist/index.html
我有 2 个工件存储桶 - 存储桶 1、存储桶 2,我需要在这些存储桶中具有相同的结构,因此在根目录中:
桶1:
/images/
/assets/
/index.html
桶2:
/images/
/assets/
/index.html
我的
buildspec.yml
如下:
post_build:
commands:
- cd ./clients/
artifacts:
files:
- 'dist/*'
base-directory: 'service1*'
discard-paths: yes
secondary-artifacts:
service2_artifact:
files:
- 'dist/**/*'
base-directory: 'service2*'
discard-paths: yes
在代码构建项目中我有
path = "/"
,name = "/"
我收到以下错误:
CLIENT_ERROR 消息:找不到 service1 的匹配基本目录路径*
artifacts:
files:
- './**/*'
base-directory: 'clients/service1/dist'
discard-paths: no
此配置有效