A google_cloudbuild_triggers is used to test a Google Trigger resource
describe google_cloudbuild_triggers(project: 'chef-gcp-inspec') do
its('count') { should eq 1 }
end
google_cloudbuild_triggers(project: 'chef-gcp-inspec').ids.each do |id|
describe google_cloudbuild_trigger(project: 'chef-gcp-inspec', id: id) do
its('filename') { should eq 'cloudbuild.yaml' }
its('trigger_template.branch_name') { should eq 'trigger-branch' }
its('trigger_template.repo_name') { should eq 'trigger-repo' }
its('trigger_template.project_id') { should eq 'trigger-project' }
end
end
Properties that can be accessed from the google_cloudbuild_triggers resource:
See the google_cloudbuild_trigger resource for more information.
idsgoogle_cloudbuild_trigger idnamesgoogle_cloudbuild_trigger namedescriptionsgoogle_cloudbuild_trigger descriptiondisabledsgoogle_cloudbuild_trigger disabledcreate_timesgoogle_cloudbuild_trigger create_timesubstitutionsgoogle_cloudbuild_trigger substitutionsfilenamesgoogle_cloudbuild_trigger filenameignored_filesgoogle_cloudbuild_trigger ignored_filesincluded_filesgoogle_cloudbuild_trigger included_filestrigger_templatesgoogle_cloudbuild_trigger trigger_templategithubsgoogle_cloudbuild_trigger githubbuildsgoogle_cloudbuild_trigger buildThis resource supports all of the above properties as filter criteria, which can be used with where as a block or a method.
Ensure the Cloud Build API is enabled for the current project.
© Chef Software, Inc.
Licensed under the Creative Commons Attribution 3.0 Unported License.
The Chef™ Mark and Chef Logo are either registered trademarks/service marks or trademarks/servicemarks of Chef, in the United States and other countries and are used with Chef Inc's permission.
We are not affiliated with, endorsed or sponsored by Chef Inc.
https://docs.chef.io/inspec/resources/google_cloudbuild_triggers/