Skip to content

Commit

Permalink
chore: moves files to prep for automation (#7949)
Browse files Browse the repository at this point in the history
Updates: #7240
  • Loading branch information
codyoss authored May 16, 2023
1 parent 7c2f642 commit f2c6d33
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 26 deletions.
15 changes: 0 additions & 15 deletions internal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,6 @@ 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.

## cloudbuild.yaml

The `cloudbuild.yaml` Cloud Build configuration currently supports:

* Building a docker container from the `internal/postprocessor/Dockerfile`.

The build can be run locally in the `google-cloud-go` root directory:

```bash
gcloud builds submit --project=cloud-devrel-kokoro-resources --config=internal/cloudbuild.yaml
```

See the [postprocessor/README](postprocessor/README.md) for instructions
regarding updating the post-processor docker container.

### Updating OwlBot SHA

You may want to manually update the which version of the post-processor will be
Expand Down
12 changes: 3 additions & 9 deletions internal/postprocessor/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,16 @@
FROM golang:1.20 as builder

# Copy local code to the container image.
COPY . /internal/
WORKDIR /internal/postprocessor
COPY . /postprocessor/
WORKDIR /postprocessor

# Build the handle_task command inside the container.
# (You may fetch or manage dependencies here,
# either manually or with a tool like "godep"go .)
# go build with no path looks in current directory (/postprocessor) and finds package main
RUN CGO_ENABLED=0 GOOS=linux go build -v -o post_processor


# Install dependencies

# Install tools used in build
RUN go install honnef.co/go/tools/cmd/staticcheck@latest && \
go install github.com/jstemmer/go-junit-report@latest && \
go install golang.org/x/lint/golint@latest && \
go install golang.org/x/tools/cmd/goimports@latest

CMD [ "/internal/postprocessor/post_processor"]
CMD [ "/postprocessor/post_processor"]
12 changes: 12 additions & 0 deletions internal/postprocessor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,15 @@ The post-processor initializes new modules by generating the required files
To add a new module, add the directory name of the module to `modules` in
`google-cloud-go/internal/postprocessor/config.yaml`. Please maintain
alphabetical ordering of the module names.

## cloudbuild.yaml

The `cloudbuild.yaml` Cloud Build configuration currently supports:

* Building the `Dockerfile`.

The build can be run locally in the `google-cloud-go` root directory:

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

images:
- gcr.io/cloud-devrel-public-resources/owlbot-go:latest

0 comments on commit f2c6d33

Please sign in to comment.