AWS CodeBuild 跳过无效的工件路径 - 不是有效的标识符

AWS CodeBuild Skipping invalid artifact path - not a valid identifier

我有一个处理两个项目的 AWS CodeBuild,在构建过程中,源代码将被构建并捆绑在 zip 文件中并放置在 bundles/* 中。

目录树如下所示,其中 bundle 包含要部署的生成的 zip 文件:

它使用以下 buildspec.yml:

version: 0.2

phases:
  install:
    commands:
      - ./manager.sh install
  build:
    commands:
      - ./manager.sh build
      - ./manager.sh package
      - ./manager.sh test
      - ./manager.sh test:functional
      - ./manager.sh test:deploy
  post_build:
    commands:
      - ls -l bundles # I see the artifacts on the console using this

artifacts:
  files: 
    - 'bundles/*'

经过测试,构建通过后部署失败。

这个returnsSkipping invalid artifact path [edited] not a valid identifier .(应该是捆绑包)

我已经尝试了以下的多种组合:

这个returnsSkipping invalid artifact path [edited] not a valid identifier bundles

artifacts:
  base-directory: bundles
  files: 
    - '**/*'

或者这个Skipping invalid artifact path [edited] not a valid identifier .

artifacts:
  files: 
    - bundles

这里是完整的错误:

[Container] 2018/02/12 19:13:05 Expanding /codebuild/output/tmp/env.sh: line 69: export: `npm_config_unsafe-perm': not a valid identifier
.
[Container] 2018/02/12 19:13:05 Skipping invalid artifact path /codebuild/output/tmp/env.sh: line 69: export: `npm_config_unsafe-perm': not a valid identifier
.
[Container] 2018/02/12 19:13:05 Phase complete: UPLOAD_ARTIFACTS Success: false
[Container] 2018/02/12 19:13:05 Phase context status code: CLIENT_ERROR Message: No matching base directory path found for /codebuild/output/tmp/env.sh: line 69: export: `npm_config_unsafe-perm': not a valid identifier
.
[Container] 2018/02/12 19:13:07 Runtime error (*errors.errorString: No matching base directory path found for /codebuild/output/tmp/env.sh: line 69: export: `npm_config_unsafe-perm': not a valid identifier
.)

难道是我的docker container

我尝试了很多东西,他们都失败了,所以我唯一的线索是:

line 69: export: `npm_config_unsafe-perm'

出现了多次。该行来自我的 docker 图片。所以我认为 可能 aws codebuild 出于某种原因对该错误进行了误报。

我将图像从 lambci/lambda:build-nodejs6.10 更改为 roelofr/node-zip:latest 以进行快速测试,并且看吧,它没有任何问题。

所以是的,一张 DOCKER 图片可能会破坏您的构建,即使其余部分都很好,请注意

所以我会将图像更改为个人图像,使用 node 6.10.3 仅用于验证目的。