Listing AWS CodeBuild Project Builds - AWS SDK for Ruby

Listing AWS CodeBuild Project Builds

The following example displays information about your AWS CodeBuild project builds. This information includes the name of the project, when the build started, and how long each phase of the build took, in seconds.

require 'aws-sdk-codebuild' # v2: require 'aws-sdk' client = 'us-west-2') build_list = client.list_builds({sort_order: 'ASCENDING', }) builds = client.batch_get_builds({ids: build_list.ids}) builds.builds.each do |build| puts 'Project: ' + build.project_name puts 'Phase: ' + build.current_phase puts 'Status: ' + build.build_status end

Choose Copy to save the code locally. See the complete example on GitHub.