Reputation: 2578
Give I have a cloudbuild.yaml
file which builds a multistage Dockerfile, how do I store artifacts generated by Docker?
My Dockerfile
contains this section:
FROM golang:1.23-alpine AS build
WORKDIR /app
RUN go test -timeout 1m -v ./... > test.log
RUN go build -ldflags="-s -w" -o /app/hello-app ./
...
in my cloudbuild.yaml
how do I refer to the /app/test.log
under the artifacts
section?
If I try this
artifacts:
objects:
location: 'gs://mybucket/test-results'
paths: ['/app/test.log']
I get an error in build output
CommandException: No URLs matched: /app/test.log
Upvotes: 3
Views: 23