所以我需要从我的工件中排除一个文件夹,但谷歌搜索找不到任何信息。
version: 0.2
phases:
install:
runtime-versions:
nodejs: 10
build:
commands:
- echo Build started on `date`
- echo Compiling the Node.js code
- mocha test.js
post_build:
commands:
- echo Build completed on `date`
artifacts:
files:
- '**/*'
buildspec.yml 目前支持在工件部分排除路径。
artifacts:
exclude-paths:
- ./**/someFilePatternHere
- ./**/otherFilePatternHere
它遵循与 files: 部分相同的逻辑,但不排除特定文件。 看: https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec.artifacts.exclude-paths
ps: exclude-paths 是相对于 base-directory 属性的。
1 解决方案 = 在 .gitingnore 文件中排除。 2 解决方案 = 将其添加到您的代码下方。 让我知道它是否有效
工件: 文件: - '**/' 排除路径: -文件夹名/