Skip to content

Commit

Permalink
Add cloudbuild invert regex option (#3628) (#467)
Browse files Browse the repository at this point in the history
* Add cloudbuild invert regex option

* Fix invert_regex name in tf tests

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Jun 15, 2020
1 parent 8758353 commit fd32f3f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions google/cloudbuild_trigger.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,13 @@ func expandCloudBuildTriggerTriggerTemplate(v interface{}, d TerraformResourceDa
transformed["dir"] = transformedDir
}

transformedInvertRegex, err := expandCloudBuildTriggerTriggerTemplateInvertRegex(original["invert_regex"], d, config)
if err != nil {
return nil, err
} else if val := reflect.ValueOf(transformedInvertRegex); val.IsValid() && !isEmptyValue(val) {
transformed["invertRegex"] = transformedInvertRegex
}

transformedBranchName, err := expandCloudBuildTriggerTriggerTemplateBranchName(original["branch_name"], d, config)
if err != nil {
return nil, err
Expand Down Expand Up @@ -241,6 +248,10 @@ func expandCloudBuildTriggerTriggerTemplateDir(v interface{}, d TerraformResourc
return v, nil
}

func expandCloudBuildTriggerTriggerTemplateInvertRegex(v interface{}, d TerraformResourceData, config *Config) (interface{}, error) {
return v, nil
}

func expandCloudBuildTriggerTriggerTemplateBranchName(v interface{}, d TerraformResourceData, config *Config) (interface{}, error) {
return v, nil
}
Expand Down

0 comments on commit fd32f3f

Please sign in to comment.