in helpers/foundation-deployer/stages/apply.go [469:483]
func preparePoliciesRepo(policiesConf utils.GitRepo, policiesBranch, foundationPath, gcpPoliciesPath string) error {
err := policiesConf.CheckoutBranch(policiesBranch)
if err != nil {
return err
}
err = utils.CopyDirectory(filepath.Join(foundationPath, "policy-library"), gcpPoliciesPath)
if err != nil {
return err
}
err = policiesConf.CommitFiles("Initialize policy library repo")
if err != nil {
return err
}
return policiesConf.PushBranch(policiesBranch, "origin")
}