Skip to content

Commit 9c8a01f

Browse files
authored
[runtime builds] run go mod tidy before builds (#511)
Signed-off-by: Amine Hilaly <[email protected]>
1 parent ab21f45 commit 9c8a01f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Dockerfile.local

+5-2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ COPY $service_alias-controller/pkg $work_dir/pkg
4040
# Copy local runtime code to the container
4141
COPY runtime/pkg $work_dir/../runtime/pkg
4242
COPY runtime/apis $work_dir/../runtime/apis
43+
COPY runtime/mocks $work_dir/../runtime/mocks
4344
COPY runtime/go.mod $work_dir/../runtime/go.mod
4445
COPY runtime/go.sum $work_dir/../runtime/go.sum
4546

@@ -52,9 +53,11 @@ RUN echo "replace github.com/aws-controllers-k8s/runtime => ../runtime" >> $work
5253
# cache deps before building and copying source so that we don't need to re-download as much
5354
# and so that source changes don't invalidate our downloaded layer
5455
WORKDIR $work_dir/../runtime
55-
RUN go mod download
56+
RUN go mod tidy
57+
RUN go mod download
5658
WORKDIR $work_dir
57-
RUN go mod download
59+
RUN go mod tidy
60+
RUN go mod download
5861

5962
# Build
6063
RUN GIT_VERSION=$service_controller_git_version && \

0 commit comments

Comments
 (0)