This repository has been archived by the owner on Nov 14, 2024. It is now read-only.
forked from inspec/inspec-gcp
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding Missing Cloud Build Attributes (#3627) (#426)
Signed-off-by: Modular Magician <[email protected]>
- Loading branch information
1 parent
64ec4dc
commit 660eaf7
Showing
9 changed files
with
249 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
libraries/google/cloudbuild/property/trigger_build_secrets.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# frozen_string_literal: false | ||
|
||
# ---------------------------------------------------------------------------- | ||
# | ||
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** | ||
# | ||
# ---------------------------------------------------------------------------- | ||
# | ||
# This file is automatically generated by Magic Modules and manual | ||
# changes will be clobbered when the file is regenerated. | ||
# | ||
# Please read more about how to change this file in README.md and | ||
# CONTRIBUTING.md located at the root of this package. | ||
# | ||
# ---------------------------------------------------------------------------- | ||
module GoogleInSpec | ||
module CloudBuild | ||
module Property | ||
class TriggerBuildSecrets | ||
attr_reader :kms_key_name | ||
|
||
attr_reader :secret_env | ||
|
||
def initialize(args = nil, parent_identifier = nil) | ||
return if args.nil? | ||
@parent_identifier = parent_identifier | ||
@kms_key_name = args['kmsKeyName'] | ||
@secret_env = args['secretEnv'] | ||
end | ||
|
||
def to_s | ||
"#{@parent_identifier} TriggerBuildSecrets" | ||
end | ||
end | ||
|
||
class TriggerBuildSecretsArray | ||
def self.parse(value, parent_identifier) | ||
return if value.nil? | ||
return TriggerBuildSecrets.new(value, parent_identifier) unless value.is_a?(::Array) | ||
value.map { |v| TriggerBuildSecrets.new(v, parent_identifier) } | ||
end | ||
end | ||
end | ||
end | ||
end |
39 changes: 39 additions & 0 deletions
39
libraries/google/cloudbuild/property/trigger_build_source.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# frozen_string_literal: false | ||
|
||
# ---------------------------------------------------------------------------- | ||
# | ||
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** | ||
# | ||
# ---------------------------------------------------------------------------- | ||
# | ||
# This file is automatically generated by Magic Modules and manual | ||
# changes will be clobbered when the file is regenerated. | ||
# | ||
# Please read more about how to change this file in README.md and | ||
# CONTRIBUTING.md located at the root of this package. | ||
# | ||
# ---------------------------------------------------------------------------- | ||
require 'google/cloudbuild/property/trigger_build_source_repo_source' | ||
require 'google/cloudbuild/property/trigger_build_source_storage_source' | ||
module GoogleInSpec | ||
module CloudBuild | ||
module Property | ||
class TriggerBuildSource | ||
attr_reader :storage_source | ||
|
||
attr_reader :repo_source | ||
|
||
def initialize(args = nil, parent_identifier = nil) | ||
return if args.nil? | ||
@parent_identifier = parent_identifier | ||
@storage_source = GoogleInSpec::CloudBuild::Property::TriggerBuildSourceStorageSource.new(args['storageSource'], to_s) | ||
@repo_source = GoogleInSpec::CloudBuild::Property::TriggerBuildSourceRepoSource.new(args['repoSource'], to_s) | ||
end | ||
|
||
def to_s | ||
"#{@parent_identifier} TriggerBuildSource" | ||
end | ||
end | ||
end | ||
end | ||
end |
55 changes: 55 additions & 0 deletions
55
libraries/google/cloudbuild/property/trigger_build_source_repo_source.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# frozen_string_literal: false | ||
|
||
# ---------------------------------------------------------------------------- | ||
# | ||
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** | ||
# | ||
# ---------------------------------------------------------------------------- | ||
# | ||
# This file is automatically generated by Magic Modules and manual | ||
# changes will be clobbered when the file is regenerated. | ||
# | ||
# Please read more about how to change this file in README.md and | ||
# CONTRIBUTING.md located at the root of this package. | ||
# | ||
# ---------------------------------------------------------------------------- | ||
module GoogleInSpec | ||
module CloudBuild | ||
module Property | ||
class TriggerBuildSourceRepoSource | ||
attr_reader :project_id | ||
|
||
attr_reader :repo_name | ||
|
||
attr_reader :dir | ||
|
||
attr_reader :invert_regex | ||
|
||
attr_reader :substitutions | ||
|
||
attr_reader :branch_name | ||
|
||
attr_reader :tag_name | ||
|
||
attr_reader :commit_sha | ||
|
||
def initialize(args = nil, parent_identifier = nil) | ||
return if args.nil? | ||
@parent_identifier = parent_identifier | ||
@project_id = args['projectId'] | ||
@repo_name = args['repoName'] | ||
@dir = args['dir'] | ||
@invert_regex = args['invertRegex'] | ||
@substitutions = args['substitutions'] | ||
@branch_name = args['branchName'] | ||
@tag_name = args['tagName'] | ||
@commit_sha = args['commitSha'] | ||
end | ||
|
||
def to_s | ||
"#{@parent_identifier} TriggerBuildSourceRepoSource" | ||
end | ||
end | ||
end | ||
end | ||
end |
40 changes: 40 additions & 0 deletions
40
libraries/google/cloudbuild/property/trigger_build_source_storage_source.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# frozen_string_literal: false | ||
|
||
# ---------------------------------------------------------------------------- | ||
# | ||
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** | ||
# | ||
# ---------------------------------------------------------------------------- | ||
# | ||
# This file is automatically generated by Magic Modules and manual | ||
# changes will be clobbered when the file is regenerated. | ||
# | ||
# Please read more about how to change this file in README.md and | ||
# CONTRIBUTING.md located at the root of this package. | ||
# | ||
# ---------------------------------------------------------------------------- | ||
module GoogleInSpec | ||
module CloudBuild | ||
module Property | ||
class TriggerBuildSourceStorageSource | ||
attr_reader :bucket | ||
|
||
attr_reader :object | ||
|
||
attr_reader :generation | ||
|
||
def initialize(args = nil, parent_identifier = nil) | ||
return if args.nil? | ||
@parent_identifier = parent_identifier | ||
@bucket = args['bucket'] | ||
@object = args['object'] | ||
@generation = args['generation'] | ||
end | ||
|
||
def to_s | ||
"#{@parent_identifier} TriggerBuildSourceStorageSource" | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters