Class: AWSCDK::CodeBuild::GitHubEnterpriseSourceProps

Inherits:
SourceProps
  • Object
show all
Defined in:
code_build/git_hub_enterprise_source_props.rb

Overview

Construction properties for GitHubEnterpriseSource.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(identifier: nil, https_clone_url:, branch_or_ref: nil, build_status_context: nil, build_status_url: nil, clone_depth: nil, fetch_submodules: nil, ignore_ssl_errors: nil, report_build_status: nil, webhook: nil, webhook_filters: nil, webhook_triggers_batch_build: nil) ⇒ GitHubEnterpriseSourceProps

Returns a new instance of GitHubEnterpriseSourceProps.

Parameters:

  • identifier (String, nil) (defaults to: nil)

    The source identifier.

  • https_clone_url (String)

    The HTTPS URL of the repository in your GitHub Enterprise installation.

  • branch_or_ref (String, nil) (defaults to: nil)

    The commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build.

  • build_status_context (String, nil) (defaults to: nil)

    This parameter is used for the context parameter in the GitHub commit status.

  • build_status_url (String, nil) (defaults to: nil)

    The URL that the build will report back to the source provider.

  • clone_depth (Numeric, nil) (defaults to: nil)

    The depth of history to download.

  • fetch_submodules (Boolean, nil) (defaults to: nil)

    Whether to fetch submodules while cloning git repo.

  • ignore_ssl_errors (Boolean, nil) (defaults to: nil)

    Whether to ignore SSL errors when connecting to the repository.

  • report_build_status (Boolean, nil) (defaults to: nil)

    Whether to send notifications on your build's start and end.

  • webhook (Boolean, nil) (defaults to: nil)

    Whether to create a webhook that will trigger a build every time an event happens in the repository.

  • webhook_filters (Array<AWSCDK::CodeBuild::FilterGroup>, nil) (defaults to: nil)

    A list of webhook filters that can constraint what events in the repository will trigger a build.

  • webhook_triggers_batch_build (Boolean, nil) (defaults to: nil)

    Trigger a batch build from a webhook instead of a standard one.



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'code_build/git_hub_enterprise_source_props.rb', line 19

def initialize(identifier: nil, https_clone_url:, branch_or_ref: nil, build_status_context: nil, build_status_url: nil, clone_depth: nil, fetch_submodules: nil, ignore_ssl_errors: nil, report_build_status: nil, webhook: nil, webhook_filters: nil, webhook_triggers_batch_build: nil)
  @identifier = identifier
  Jsii::Type.check_type(@identifier, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "identifier") unless @identifier.nil?
  @https_clone_url = https_clone_url
  Jsii::Type.check_type(@https_clone_url, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "httpsCloneUrl")
  @branch_or_ref = branch_or_ref
  Jsii::Type.check_type(@branch_or_ref, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "branchOrRef") unless @branch_or_ref.nil?
  @build_status_context = build_status_context
  Jsii::Type.check_type(@build_status_context, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "buildStatusContext") unless @build_status_context.nil?
  @build_status_url = build_status_url
  Jsii::Type.check_type(@build_status_url, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "buildStatusUrl") unless @build_status_url.nil?
  @clone_depth = clone_depth
  Jsii::Type.check_type(@clone_depth, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "cloneDepth") unless @clone_depth.nil?
  @fetch_submodules = fetch_submodules
  Jsii::Type.check_type(@fetch_submodules, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "fetchSubmodules") unless @fetch_submodules.nil?
  @ignore_ssl_errors = ignore_ssl_errors
  Jsii::Type.check_type(@ignore_ssl_errors, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "ignoreSslErrors") unless @ignore_ssl_errors.nil?
  @report_build_status = report_build_status
  Jsii::Type.check_type(@report_build_status, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "reportBuildStatus") unless @report_build_status.nil?
  @webhook = webhook
  Jsii::Type.check_type(@webhook, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "webhook") unless @webhook.nil?
  @webhook_filters = webhook_filters
  Jsii::Type.check_type(@webhook_filters, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2RlYnVpbGQuRmlsdGVyR3JvdXAifSwia2luZCI6ImFycmF5In19")), "webhookFilters") unless @webhook_filters.nil?
  @webhook_triggers_batch_build = webhook_triggers_batch_build
  Jsii::Type.check_type(@webhook_triggers_batch_build, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "webhookTriggersBatchBuild") unless @webhook_triggers_batch_build.nil?
end

Instance Attribute Details

#branch_or_refString? (readonly)

Note:

Default: the default branch's HEAD commit ID is used

The commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build.

Examples:

"mybranch"

Returns:

  • (String, nil)


62
63
64
# File 'code_build/git_hub_enterprise_source_props.rb', line 62

def branch_or_ref
  @branch_or_ref
end

#build_status_contextString? (readonly)

Note:

Default: "AWS CodeBuild $AWS_REGION ($PROJECT_NAME)"

This parameter is used for the context parameter in the GitHub commit status.

Can use built-in CodeBuild variables, like $AWS_REGION.

Examples:

"My build \#$CODEBUILD_BUILD_NUMBER"

Returns:

  • (String, nil)

See Also:



72
73
74
# File 'code_build/git_hub_enterprise_source_props.rb', line 72

def build_status_context
  @build_status_context
end

#build_status_urlString? (readonly)

Note:

Default: - link to the AWS Console for CodeBuild to a particular build execution

The URL that the build will report back to the source provider.

Can use built-in CodeBuild variables, like $AWS_REGION.

Examples:

"$CODEBUILD_PUBLIC_BUILD_URL"

Returns:

  • (String, nil)

See Also:



82
83
84
# File 'code_build/git_hub_enterprise_source_props.rb', line 82

def build_status_url
  @build_status_url
end

#clone_depthNumeric? (readonly)

The depth of history to download.

Minimum value is 0. If this value is 0, greater than 25, or not provided, then the full history is downloaded with each build of the project.

Returns:

  • (Numeric, nil)


90
91
92
# File 'code_build/git_hub_enterprise_source_props.rb', line 90

def clone_depth
  @clone_depth
end

#fetch_submodulesBoolean? (readonly)

Note:

Default: false

Whether to fetch submodules while cloning git repo.

Returns:

  • (Boolean, nil)


95
96
97
# File 'code_build/git_hub_enterprise_source_props.rb', line 95

def fetch_submodules
  @fetch_submodules
end

#https_clone_urlString (readonly)

The HTTPS URL of the repository in your GitHub Enterprise installation.

Returns:

  • (String)


55
56
57
# File 'code_build/git_hub_enterprise_source_props.rb', line 55

def https_clone_url
  @https_clone_url
end

#identifierString? (readonly)

The source identifier.

This property is required on secondary sources.

Returns:

  • (String, nil)


51
52
53
# File 'code_build/git_hub_enterprise_source_props.rb', line 51

def identifier
  @identifier
end

#ignore_ssl_errorsBoolean? (readonly)

Note:

Default: false

Whether to ignore SSL errors when connecting to the repository.

Returns:

  • (Boolean, nil)


100
101
102
# File 'code_build/git_hub_enterprise_source_props.rb', line 100

def ignore_ssl_errors
  @ignore_ssl_errors
end

#report_build_statusBoolean? (readonly)

Note:

Default: true

Whether to send notifications on your build's start and end.

Returns:

  • (Boolean, nil)


105
106
107
# File 'code_build/git_hub_enterprise_source_props.rb', line 105

def report_build_status
  @report_build_status
end

#webhookBoolean? (readonly)

Note:

Default: true if any webhookFilters were provided, false otherwise

Whether to create a webhook that will trigger a build every time an event happens in the repository.

Returns:

  • (Boolean, nil)


110
111
112
# File 'code_build/git_hub_enterprise_source_props.rb', line 110

def webhook
  @webhook
end

#webhook_filtersArray<AWSCDK::CodeBuild::FilterGroup>? (readonly)

Note:

Default: every push and every Pull Request (create or update) triggers a build

A list of webhook filters that can constraint what events in the repository will trigger a build.

A build is triggered if any of the provided filter groups match. Only valid if webhook was not provided as false.

Returns:



118
119
120
# File 'code_build/git_hub_enterprise_source_props.rb', line 118

def webhook_filters
  @webhook_filters
end

#webhook_triggers_batch_buildBoolean? (readonly)

Note:

Default: false

Trigger a batch build from a webhook instead of a standard one.

Enabling this will enable batch builds on the CodeBuild project.

Returns:

  • (Boolean, nil)


125
126
127
# File 'code_build/git_hub_enterprise_source_props.rb', line 125

def webhook_triggers_batch_build
  @webhook_triggers_batch_build
end

Class Method Details

.jsii_propertiesObject



127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# File 'code_build/git_hub_enterprise_source_props.rb', line 127

def self.jsii_properties
  {
    :identifier => "identifier",
    :https_clone_url => "httpsCloneUrl",
    :branch_or_ref => "branchOrRef",
    :build_status_context => "buildStatusContext",
    :build_status_url => "buildStatusUrl",
    :clone_depth => "cloneDepth",
    :fetch_submodules => "fetchSubmodules",
    :ignore_ssl_errors => "ignoreSslErrors",
    :report_build_status => "reportBuildStatus",
    :webhook => "webhook",
    :webhook_filters => "webhookFilters",
    :webhook_triggers_batch_build => "webhookTriggersBatchBuild",
  }
end

Instance Method Details

#to_jsiiObject



144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
# File 'code_build/git_hub_enterprise_source_props.rb', line 144

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "identifier" => @identifier,
    "httpsCloneUrl" => @https_clone_url,
    "branchOrRef" => @branch_or_ref,
    "buildStatusContext" => @build_status_context,
    "buildStatusUrl" => @build_status_url,
    "cloneDepth" => @clone_depth,
    "fetchSubmodules" => @fetch_submodules,
    "ignoreSslErrors" => @ignore_ssl_errors,
    "reportBuildStatus" => @report_build_status,
    "webhook" => @webhook,
    "webhookFilters" => @webhook_filters,
    "webhookTriggersBatchBuild" => @webhook_triggers_batch_build,
  })
  result.compact
end