PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, January 17, 2022

[FIXED] AWS CodeBuild, No artifact files specified

 January 17, 2022     amazon-s3, amazon-web-services, aws-codebuild, composer-php     No comments   

Issue

AWS CodeBuild run successfully but does not move the build to S3. It should pull down my code from Github, run some commands, then push a ZIP of all files to S3.

My buildspec.yml in github:

version: 0.1

phases:
  pre_build:
    commands:      
      - echo Pre-build started on `date`
      - cp envs/.env.test .env
      - composer self-update      
      - composer install --no-interaction   
  artifacts:
    files:
      - '**/*'

Here are the logs showing No artifact files specified:

[Container] 2017/04/18 16:33:59 Phase is DOWNLOAD_SOURCE
[Container] 2017/04/18 16:33:59 Source is located at /tmp/src930293331/src
[Container] 2017/04/18 16:33:59 YAML location is /tmp/src930293331/src/buildspec.yml
[Container] 2017/04/18 16:33:59 Registering with agent
[Container] 2017/04/18 16:33:59 Phases found in YAML: 2
[Container] 2017/04/18 16:33:59 ARTIFACTS: 0 commands
[Container] 2017/04/18 16:33:59 PRE_BUILD: 4 commands
[Container] 2017/04/18 16:33:59 Phase complete: DOWNLOAD_SOURCE Success: true
[Container] 2017/04/18 16:33:59 Phase context status code: Message: 
[Container] 2017/04/18 16:33:59 Processing plaintext environment variables
[Container] 2017/04/18 16:33:59 Processing build-level environment variables
[Container] 2017/04/18 16:33:59 {}
[Container] 2017/04/18 16:33:59 Processing builtin environment variables
[Container] 2017/04/18 16:33:59 Moving to directory /tmp/src930293331/src
[Container] 2017/04/18 16:33:59 Preparing to copy artifacts
[Container] 2017/04/18 16:33:59 No artifact files specified

CodeDeploy settings in the console:

enter image description here

What have I missed?


Solution

I fixed the indentation of my artifacts block and it works! It was supposed to have no indentation.

version: 0.1

phases:
  pre_build:
    commands:      
      - echo *** Pre-Build ***
      - cp envs/.env.test .env      
      - composer install --no-interaction     
artifacts:    
  files:
    - '**/*'


Answered By - Justin
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing