From the course: Complete Guide to AWS Software Deployment

Unlock the full course today

Join today to access over 24,400 courses taught by industry experts.

Add AWS CodeBuild support to an app

Add AWS CodeBuild support to an app

- [Instructor] All right, let's look at adding CodeBuild to this project. Over here in the app root, I've got a buildspec.yml file. And you can see what's going on here. We've got an environment section where we define a few key value pairs for environment variables. And here under phases, we define some things that happen at various lifecycle hooks. So for install, we've got an echo command to show users what's going on. And we do a few rails commands, bundle install and rake db:migrate to get the database in place, preliminary steps. And then under build, we do what we actually are here to do, which is to run our automated test. So we've got two echo commands here that give some context to anybody reading the logs, then we run rspec. Rspec is a common way of running automated tests in rails. And so this would kick off our test and fail if anything went wrong. Course, before it fails out, we've got this finally section. So this part will run even if there are errors in the rspec. And…

Contents