September 22, 2018

LAB 3 - AWS CI CD - Setup a Build Project in AWS CodeBuild

This Lab has the step by step instructions to create & configure a Build using AWS  CodeBuild, which will compile latest commit of the pre-developed sample Java Application stored in AWS CodeCommit, generate the artifact and uploaded to the named S3 bucket.

Ensure to complete LAB 1 through LAB 3 including pre-requisite as stated in AWS Developer Tools CI CD Lab blog.
Please note that for the purpose of the example, the Sample Java Web Application is using demo-4-codedeploy as the bucket name. Make sure to edit that with your S3 bucket name before you proceed further.

Login to AWS Console as `codedeploy_user` & go to AWS CodeBuild from AWS Console, click Create Project and proceed with the configuration as follows

Build Source


Build Environment


Storying Build Artifacts


Enabling Build Logs




Save the Build & Run. Verify that the artifact is uploaded to S3 Bucket.

buildspecl.yml

Here is the closer look of buildspec.yml used in this example. In addition to this, you can environment variables as stated below



Debugging CodeBuild

  • AWS CodeBuild is a managed service, which uses pre-defined container images for handling builds. Hence you will not have access to the container images running your build.
  • Local Build Support is enabled for AWS CodeBuild since May 2018, which you can use for debugging issues locally.
  • Enabling Logging to CloudWatch or S3 is key to monitor the build progress from AWS Management Console and for debugging in case of failures

No comments:

Post a Comment