# For methods, refer to the properties of the CloudFormation CodeBuild::Project amzn.to/2UTeNlr # For convenience methods, refer to the source github.com/tongueroo/codebuild/blob/master/lib/codebuild/dsl/project.rb
# name(“example-project-name”) # recommend leaving unset and codebuild will use a conventional name github_url(“<%= project_github_url %>”) linux_image(“<%= lookup_managed_image(/ruby:/) %>”) environment_variables(
JETS_ENV: "test", # API_KEY: "ssm:/codebuild/demo/api_key" # Example of ssm parameter
)
# Some useful helpers: # puts “project_name #{project_name}” # IE: demo-web # puts “full_project_name #{full_project_name}” # demo-web-development
# Uncomment to enable github webhook, the GitHub oauth token needs admin:repo_hook permissions # Refer to codebuild.cloud/docs/github_oauth/ # triggers(webhook: true) # Another example: # Docs: docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-projecttriggers.html # {type: “EVENT”, pattern: “PUSH”} is required # Also, note the extra brackets: [[]] is actually the proper format. I know weird. # triggers( # webhook: true, # filter_groups: [[{type: “HEAD_REF”, pattern: “my-branch”}, {type: “EVENT”, pattern: “PUSH”}]] # )
# Shorthand to enable all local cache modes # local_cache(true)