Skip to content

Commit

Permalink
chore(internal): fixups for postprocessor (#7239)
Browse files Browse the repository at this point in the history
- Fixed cloudbuild job. More work is still needed to get this automated. Filed #7240 for tracking that request. For now I manually kicked off a build and published the image.
- Updated workspace for owlbot.
- Add some more files to preserve.
  • Loading branch information
codyoss authored Jan 13, 2023
1 parent 4f82b6c commit 6f72b3c
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
docker:
digest: sha256:a36c83b620de88ba0c6248617e928f53ebd781d9f3fe219543bc1c6b00a37899
digest: sha256:289c9fb3f2f6deae65d25cf97e1cc94c3fb09df93e82c6780f3ef53c13cf76b4
image: gcr.io/cloud-devrel-public-resources/owlbot-go:latest
2 changes: 2 additions & 0 deletions .github/.OwlBot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ deep-remove-regex:

deep-preserve-regex:
- /.*/version.go
- /secretmanager/apiv1/iam.go
- /secretmanager/apiv1/iam_example_test.go

deep-copy-regex:
- source: /google/cloud/dialogflow/cx/v3beta1/cloud.google.com/go/dialogflow/cx/apiv3beta1
Expand Down
10 changes: 9 additions & 1 deletion internal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,12 @@ One day, we may want to create individual `.repo-metadata.json` files next to
each package, which is the pattern followed by some other languages. External
tools would then talk to pkg.go.dev or some other service to get the overall
list of packages and use the `.repo-metadata.json` files to get the additional
metadata required. For now, `.repo-metadata-full.json` includes everything.
metadata required. For now, `.repo-metadata-full.json` includes everything.

## cloudbuild.yaml

To kick off a build locally run from the repo root:

```bash
gcloud builds submit --project=cloud-devrel-kokoro-resources --config=internal/cloudbuild.yaml
```
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@
timeout: 7200s # 2 hours
steps:
- name: gcr.io/cloud-builders/docker
args: ['build', '-t', 'gcr.io/cloud-devrel-public-resources/owlbot-go', '.']
dir: internal/postprocessor
args: ['build', '-t', 'gcr.io/cloud-devrel-public-resources/owlbot-go', '-f', 'postprocessor/Dockerfile', '.']
dir: internal

images:
- gcr.io/cloud-devrel-public-resources/owlbot-go:$SHORT_SHA
- gcr.io/cloud-devrel-public-resources/owlbot-go:latest
2 changes: 1 addition & 1 deletion internal/postprocessor/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ var firstPartTitlePattern = regexp.MustCompile(`(?P<titleFirstPart>)(\: *\` + ap
var secondPartTitlePattern = regexp.MustCompile(`.*\: *\` + apiNameOwlBotScope + ` *(?P<titleSecondPart>.*)`)

func main() {
clientRoot := flag.String("client-root", "/repo", "Path to clients.")
clientRoot := flag.String("client-root", "/workspace/google-cloud-go", "Path to clients.")
googleapisDir := flag.String("googleapis-dir", "", "Path to googleapis/googleapis repo.")
directories := flag.String("dirs", "", "Comma-separated list of module names to run (not paths).")
branchPrefix := flag.String("branch", "owl-bot-copy-", "The prefix of the branch that OwlBot opens when working on a PR.")
Expand Down

0 comments on commit 6f72b3c

Please sign in to comment.