diff --git a/internal/README.md b/internal/README.md index b38a4c1a2da2..972857e9d51a 100644 --- a/internal/README.md +++ b/internal/README.md @@ -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 diff --git a/internal/postprocessor/Dockerfile b/internal/postprocessor/Dockerfile index 75e642067b5e..2025efb6cdde 100644 --- a/internal/postprocessor/Dockerfile +++ b/internal/postprocessor/Dockerfile @@ -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"] diff --git a/internal/postprocessor/README.md b/internal/postprocessor/README.md index 848e5bd36a7f..62420757be85 100644 --- a/internal/postprocessor/README.md +++ b/internal/postprocessor/README.md @@ -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 +`` \ No newline at end of file diff --git a/internal/cloudbuild.yaml b/internal/postprocessor/cloudbuild.yaml similarity index 93% rename from internal/cloudbuild.yaml rename to internal/postprocessor/cloudbuild.yaml index 71281cec24a2..74e689e88e4b 100644 --- a/internal/cloudbuild.yaml +++ b/internal/postprocessor/cloudbuild.yaml @@ -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