如何从AWS Codebuild buildspec文件中排除文件夹? [英] How do I exclude a folder from AWS Codebuild buildspec file?

查看:72
本文介绍了如何从AWS Codebuild buildspec文件中排除文件夹?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我需要从工件中排除一个文件夹,但在Google周围搜索无法找到任何信息.

So I need to exclude a folder from my artifacts, but googling around could not find any info.

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.yaml does not provide a way to skip some files or folders when constructing artifacts.

因此,根据评论,最简单的解决方案是在 post_build 阶段简单地删除不需要的文件和文件夹.

Thus, based on the comments, the easiest solution to the problem was to simply delete unneeded files and folders in the post_build stage.

这篇关于如何从AWS Codebuild buildspec文件中排除文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆