Skip to content

Commit 6e2e677

Browse files
authored
chore(infra): update Dockerfiles for legacy cmds (#3646)
We need to update the Dockerfiles to build legacy librarian code as the sources have moved. To keep diffs smaller we will rename the binaries as thier old names. Updates: #3472
1 parent 290dd0c commit 6e2e677

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

infra/imagebuilders/cli/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ COPY go.sum .
4242
RUN go mod download
4343

4444
COPY . .
45-
RUN CGO_ENABLED=0 GOOS=linux go build ./cmd/librarian
45+
# Renaming the binary to librarian to match the old binary name and avoid
46+
# breaking existing Cloud Build steps that reference the binary by name.
47+
RUN CGO_ENABLED=0 GOOS=linux go build -o librarian ./cmd/legacylibrarian
4648

4749
# Using docker:dind so we can run docker from the CLI,
4850
# while in Docker. Note that for this to work, *this*

infra/imagebuilders/dispatcher/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ COPY go.sum .
4141
RUN go mod download
4242

4343
COPY . .
44-
RUN CGO_ENABLED=0 GOOS=linux go build ./cmd/automation
44+
# Renaming the binary to automation to match the old binary name and avoid
45+
# breaking existing Cloud Build steps that reference the binary by name.
46+
RUN CGO_ENABLED=0 GOOS=linux go build -o automation ./cmd/legacyautomation
4547

4648
FROM marketplace.gcr.io/google/debian12@sha256:326ccf35aa72f7cc8cbd25b69e819a81c5fd9ed675c6c9ffb51f3214a64f23cf
4749
WORKDIR /app

0 commit comments

Comments
 (0)