我正在使用CodeBuild来构建Scala sbt项目。在构建过程中,我正在执行以下步骤。
deployment/deployment.yaml
中的K8s部署文件。 很遗憾,最后一步失败了,我无法将此部署文件移动到AWS S3存储桶。
artifacts:
files:
- deployment/deployment.yaml
discard-paths: yes
base-directory: 'deployment'
我在做什么错?
base-directory: 'deployment'
...意味着CodeBuild将在'deployment'目录中查找“ deployment / deployment.yaml”,这可能是错误的。
尝试一下:
artifacts:
files:
- deployment/deployment.yaml
discard-paths: yes
我发现有用的一个技巧是在我的buildspec中安装'tree'并检查目录的树结构以确保我指定了正确的路径。
在安装阶段:
- apt-get install tree
Buildspec后:
- tree .