Ich versuche, ein Code-Build-Projekt in AWS zu erstellen. Ich habe das Code-Build-Projekt erfolgreich konfiguriert und der Code wird ebenfalls erstellt, aber der Testbericht wird nicht in dem angegebenen S3-Bucket erstellt. Ich habe die Artefakte in buildspec.yml angegeben, aber der Report wird nicht generiert. Unten ist meine buildspec.yml
Datei.AWS Code Build - Bericht wird nicht in S3 erzeugt. Bucket
version: 0.1
phases:
install:
commands:
- echo Logging in to Amazon ECR...
- npm install
pre_build:
commands:
- echo nothing to do in pre-build
build:
commands:
- echo Build started on `date`
- echo Building the Server ...
- npm test
post_build:
commands:
- echo Build completed on `date`
artifacts:
files:
- buildreport.txt
discard-paths: yes
Ich habe auch entsprechende Berechtigung auf S3 Bucket zum Hochladen/Erstellen von Datei angegeben. Unten ist das Buildprotokoll ich nach dem erfolgreichen Build bin immer -
[Container] 2017/03/09 17:02:01 Phase context status code: Message:
[Container] 2017/03/09 17:02:01 Entering phase POST_BUILD
[Container] 2017/03/09 17:02:01 Running command echo Build completed on `date`
[Container] 2017/03/09 17:02:01 Build completed on Thu Mar 9 17:02:01 UTC 2017
[Container] 2017/03/09 17:02:01 Running command echo $CODEBUILD_SRC_DIR
[Container] 2017/03/09 17:02:01 /tmp/src021393076/src
[Container] 2017/03/09 17:02:01 Phase complete: POST_BUILD Success: true
[Container] 2017/03/09 17:02:01 Phase context status code: Message:
[Container] 2017/03/09 17:02:01 Preparing to copy artifacts
[Container] 2017/03/09 17:02:01 Expanding base directory path
[Container] 2017/03/09 17:02:01 Assembling file list
[Container] 2017/03/09 17:02:01 Expanding .
[Container] 2017/03/09 17:02:01 Found .
[Container] 2017/03/09 17:02:01 Expanding artifact file paths for base directory .
[Container] 2017/03/09 17:02:01 Assembling file list
[Container] 2017/03/09 17:02:01 Expanding my-build
[Container] 2017/03/09 17:02:01 Skipping invalid artifact path my-build
[Container] 2017/03/09 17:02:01 Phase complete: UPLOAD_ARTIFACTS Success: false
[Container] 2017/03/09 17:02:01 Phase context status code: ARTIFACT_ERROR Message: No matching artifact paths found
[Container] 2017/03/09 17:02:01 Runtime error (No matching artifact paths found)
Ich versuchte es noch einmal nach dem Ausrichten und die buildspec.yml
leicht wie unten verändert sich -
version: 0.1
phases:
install:
commands:
- echo Logging in to Amazon ECR...
- npm install
pre_build:
commands:
- echo nothing to do in pre-build
build:
commands:
- echo Build started on `date`
- echo Building the Server ...
- npm test
post_build:
commands:
- echo Build completed on `date`
- echo $CODEBUILD_SRC_DIR
artifacts:
files:
- my-build
Aber es immer noch nicht Artefakte im s3 zu erzeugen Mappe.
Haben Sie jemals eine Lösung gefunden? – Justin
Nein, ich konnte nicht egal, was ich als Artefakte in Dateien Parameter festgelegt, es funktioniert nicht. Was mich gezwungen hat, zu Jenkins zu wechseln. – Jeet