ci: add missing replaced mod files to docker build

Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
This commit is contained in:
Paul Meyer 2023-02-20 18:23:09 +01:00
parent b6a0984ea4
commit 0e7f1c9300
2 changed files with 4 additions and 3 deletions

View File

@ -2,9 +2,10 @@ FROM golang:1.20.1@sha256:d19ee8512191c8b8e967246d4a7d0de4f4133a30bd9ce982e9b70a
# Download project root dependencies # Download project root dependencies
WORKDIR /workspace WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod COPY go.mod go.mod
COPY go.sum go.sum COPY go.sum go.sum
COPY operators/constellation-node-operator/api/go.mod ./operators/constellation-node-operator/api/go.mod
COPY operators/constellation-node-operator/api/go.sum ./operators/constellation-node-operator/api/go.sum
# cache deps before building and copying source so that we don't need to re-download as much # cache deps before building and copying source so that we don't need to re-download as much
# and so that source changes don't invalidate our downloaded layer # and so that source changes don't invalidate our downloaded layer
RUN go mod download RUN go mod download
@ -13,7 +14,7 @@ COPY . .
# Build # Build
WORKDIR /workspace/internal/versionsapi/cli WORKDIR /workspace/internal/versionsapi/cli
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o versionsapi . RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o versionsapi .
FROM scratch as release FROM scratch as release

View File

@ -25,7 +25,7 @@ RUN go mod download all
COPY . /qemu-metadata-api COPY . /qemu-metadata-api
WORKDIR /qemu-metadata-api/hack/qemu-metadata-api WORKDIR /qemu-metadata-api/hack/qemu-metadata-api
RUN go build -o api-server ./main.go RUN go build -o api-server .
FROM fedora:37@sha256:23c63666eefb64cd2364e6d8ad327f06abf9eb1f34b621e9fd6c1602e142244b as release FROM fedora:37@sha256:23c63666eefb64cd2364e6d8ad327f06abf9eb1f34b621e9fd6c1602e142244b as release
RUN dnf -y install libvirt-devel && \ RUN dnf -y install libvirt-devel && \