Codepipeline не найдено подходящих артефактов - PullRequest
0 голосов
/ 06 апреля 2020

Я пытаюсь развернуть приложение sam с codepipieline, я получаю следующий журнал ошибок

Running command sam package --template-file template.yaml --s3-bucket $BUCKET --output-template-file outputSamTemplate.yaml  
Uploading to d9f08f2a91c5f1bede6a22e7f8ecbcfc  46320 / 46320.0  (100.00%)
Successfully packaged artifacts and wrote output template to file outputSamTemplate.yaml.

[Container] 2020/04/06 09:08:46 Phase complete: BUILD State: SUCCEEDED
[Container] 2020/04/06 09:08:46 Phase context status code:  Message: 
[Container] 2020/04/06 09:08:46 Entering phase POST_BUILD
[Container] 2020/04/06 09:08:46 Running command echo Build completed on `date`
Build completed on Mon Apr 6 09:08:46 UTC 2020

[Container] 2020/04/06 09:08:46 Phase complete: POST_BUILD State: SUCCEEDED
[Container] 2020/04/06 09:08:46 Phase context status code:  Message: 
[Container] 2020/04/06 09:08:46 Expanding base directory path: .
[Container] 2020/04/06 09:08:46 Assembling file list
[Container] 2020/04/06 09:08:46 Expanding .
[Container] 2020/04/06 09:08:46 Expanding file paths for base directory .
[Container] 2020/04/06 09:08:46 Assembling file list
[Container] 2020/04/06 09:08:46 Expanding template.yml
[Container] 2020/04/06 09:08:46 Skipping invalid file path template.yml
[Container] 2020/04/06 09:08:46 Expanding outputSamTemplate.yml
[Container] 2020/04/06 09:08:46 Skipping invalid file path outputSamTemplate.yml
[Container] 2020/04/06 09:08:46 Phase complete: UPLOAD_ARTIFACTS State: FAILED
[Container] 2020/04/06 09:08:46 Phase context status code: CLIENT_ERROR Message: no matching artifact paths found

Я провел онлайн-исследование, в котором говорится, что мои пути могут быть недействительными, но я уверен, что они верны таким образом, это сообщение об ошибке сбивает с толку ...

my buildspe c:

version: 0.2

phases:
  install:
    runtime-versions:
      nodejs: 12
  pre_build:
    commands:
  build:
    commands:
      - echo Build started on `date`
      - export BUCKET=inspeq-sam
      - sam package --template-file template.yaml --s3-bucket $BUCKET --output-template-file outputSamTemplate.yaml
  post_build:
    commands:
      - ls
      - pwd
      - echo Build completed on `date`
artifacts:
  type: zip
  files:
    - template.yml
    - outputSamTemplate.yml

repo structure

Я добавил команды перечислить содержимое папки после сборки. Эти файлы перечислены там.

[Container] 2020/04/06 10:38:55 Phase complete: BUILD State: SUCCEEDED
[Container] 2020/04/06 10:38:55 Phase context status code:  Message: 
[Container] 2020/04/06 10:38:55 Entering phase POST_BUILD
[Container] 2020/04/06 10:38:55 Running command pwd
/codebuild/output/src927271356/src

[Container] 2020/04/06 10:38:55 Running command ls
README.md
buildspec.yml
hello-world
outputSamTemplate.yaml
template.yaml
test.iml

[Container] 2020/04/06 10:38:55 Running command echo Build completed on `date`
Build completed on Mon Apr 6 10:38:55 UTC 2020

[Container] 2020/04/06 10:38:55 Phase complete: POST_BUILD State: SUCCEEDED

1 Ответ

0 голосов
/ 08 апреля 2020

Вместо «yml» вам нужно «yaml»:

artifacts:
  type: zip
  files:
    - template.yaml
    - outputSamTemplate.yaml
...