AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Class: Aws::RailsProvisioner::Build

Inherits:
CodeBuild
  • Object
show all
Defined in:
lib/aws-rails-provisioner/build.rb

Instance Attribute Summary

Attributes inherited from CodeBuild

#buildspec, #description, #image, #project_name, #timeout

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Build

An AWS CodeBuild Project that build, tag and push image to AWS ECR Repo

configuration for :build

Parameters:

  • options (Hash) (defaults to: {})

Options Hash (options):

  • :project_name (String)

    name for the CodeBuild project, default to 'RailsProvisionerImageBuild'

  • :description (String)

    description for this CodeBuild project, default to 'build, tag and push image to ECR'

  • :buildspec (String)

    buildspec.yml file path, default to `buildspec-ecr.yml` under root directory, using template under `buildspecs/`

  • :build_image (String)

    default to codebuild `ubuntu_14_04_docker_18_09_0` full list of supported images see: docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-codebuild.LinuxBuildImage.html

  • :timeout (Integer)

    number of minutes after which CodeBuild stops the build if it’s not complete



28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/aws-rails-provisioner/build.rb', line 28

def initialize(options = {})
  unless options[:description]
    options[:description] = 'build, tag and push image to ECR'
  end
  unless options[:buildspec]
    options[:buildspec] = 'buildspec-ecr.yml'
  end
  unless options[:build_image]
    options[:build_image] = 'ubuntu_14_04_docker_18_09_0'
  end
  super(options)
end