Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: kpango <[email protected]>
  • Loading branch information
kpango committed Feb 14, 2024
1 parent c919b52 commit c771290
Show file tree
Hide file tree
Showing 19 changed files with 38 additions and 37 deletions.
7 changes: 4 additions & 3 deletions Makefile.d/tools.mk
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,10 @@ $(GOPATH)/bin/staticcheck:
go/install: $(GOROOT)/bin/go

$(GOROOT)/bin/go:
curl -fsSLO "https://go.dev/dl/go${GO_VERSION}.${OS}-${ARCH}.tar.gz" \
&& tar zxf "go${GO_VERSION}.${OS}-${ARCH}.tar.gz" \
&& rm -rf "go${GO_VERSION}.${OS}-${ARCH}.tar.gz" \
TAR_NAME=go${GO_VERSION}.${OS}-$(subst aarch_64,arm64,$(subst x86_64,amd64,$(shell echo ${ARCH} | tr '[:upper:]' '[:lower:]'))).tar.gz \
&& curl -fsSLO "https://go.dev/dl/$${TAR_NAME}" \
&& tar zxf "$${TAR_NAME}" \
&& rm -rf "$${TAR_NAME}" \
&& mv go "${GOROOT}" \
&& ${GOROOT}/bin/go version \
&& mkdir -p "${GOPATH}/src"
Expand Down
4 changes: 2 additions & 2 deletions dockers/agent/core/faiss/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ COPY go.sum .

RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \
--mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \
make GO_VERSION=${GO_VERSION} ARCH=${TARGETARCH} OS=${TARGETOS} go/install \
&& make GOARCH=${TARGETARCH} GOOS=${TARGETOS} go/download
make GO_VERSION=${GO_VERSION} go/install \
&& make go/download

WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal
COPY internal .
Expand Down
4 changes: 2 additions & 2 deletions dockers/agent/core/ngt/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ COPY go.sum .

RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \
--mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \
make GO_VERSION=${GO_VERSION} ARCH=${TARGETARCH} OS=${TARGETOS} go/install \
&& make GOARCH=${TARGETARCH} GOOS=${TARGETOS} go/download
make GO_VERSION=${GO_VERSION} go/install \
&& make go/download

WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal
COPY internal .
Expand Down
4 changes: 2 additions & 2 deletions dockers/agent/sidecar/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ COPY go.sum .

RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \
--mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \
make GO_VERSION=${GO_VERSION} ARCH=${TARGETARCH} OS=${TARGETOS} go/install \
&& make GOARCH=${TARGETARCH} GOOS=${TARGETOS} go/download
make GO_VERSION=${GO_VERSION} go/install \
&& make go/download

WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal
COPY internal .
Expand Down
2 changes: 1 addition & 1 deletion dockers/ci/base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ COPY versions versions

RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \
--mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \
make GO_VERSION=${GO_VERSION} ARCH=${TARGETARCH} OS=${TARGETOS} go/install \
make GO_VERSION=${GO_VERSION} go/install \
&& make GOARCH=${TARGETARCH} GOOS=${TARGETOS} deps ROOTDIR=${ROOTDIR} GO_CLEAN_DEPS=false \
&& make ngt/install \
&& make faiss/install \
Expand Down
2 changes: 1 addition & 1 deletion dockers/dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ COPY example/client/go.mod.default example/client/go.mod.default

RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \
--mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \
make GO_VERSION=${GO_VERSION} ARCH=${TARGETARCH} OS=${TARGETOS} go/install \
make GO_VERSION=${GO_VERSION} go/install \
&& make GOARCH=${TARGETARCH} GOOS=${TARGETOS} deps GO_CLEAN_DEPS=false \
&& make ngt/install \
&& make faiss/install \
Expand Down
4 changes: 2 additions & 2 deletions dockers/discoverer/k8s/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ COPY go.sum .

RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \
--mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \
make GO_VERSION=${GO_VERSION} ARCH=${TARGETARCH} OS=${TARGETOS} go/install \
&& make GOARCH=${TARGETARCH} GOOS=${TARGETOS} go/download
make GO_VERSION=${GO_VERSION} go/install \
&& make go/download

WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal
COPY internal .
Expand Down
4 changes: 2 additions & 2 deletions dockers/gateway/filter/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ COPY go.sum .

RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \
--mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \
make GO_VERSION=${GO_VERSION} ARCH=${TARGETARCH} OS=${TARGETOS} go/install \
&& make GOARCH=${TARGETARCH} GOOS=${TARGETOS} go/download
make GO_VERSION=${GO_VERSION} go/install \
&& make go/download

WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal
COPY internal .
Expand Down
4 changes: 2 additions & 2 deletions dockers/gateway/lb/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ COPY go.sum .

RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \
--mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \
make GO_VERSION=${GO_VERSION} ARCH=${TARGETARCH} OS=${TARGETOS} go/install \
&& make GOARCH=${TARGETARCH} GOOS=${TARGETOS} go/download
make GO_VERSION=${GO_VERSION} go/install \
&& make go/download

WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal
COPY internal .
Expand Down
4 changes: 2 additions & 2 deletions dockers/gateway/mirror/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ COPY go.sum .

RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \
--mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \
make GO_VERSION=${GO_VERSION} ARCH=${TARGETARCH} OS=${TARGETOS} go/install \
&& make GOARCH=${TARGETARCH} GOOS=${TARGETOS} go/download
make GO_VERSION=${GO_VERSION} go/install \
&& make go/download

WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal
COPY internal .
Expand Down
4 changes: 2 additions & 2 deletions dockers/index/job/correction/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ COPY go.sum .

RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \
--mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \
make GO_VERSION=${GO_VERSION} ARCH=${TARGETARCH} OS=${TARGETOS} go/install \
&& make GOARCH=${TARGETARCH} GOOS=${TARGETOS} go/download
make GO_VERSION=${GO_VERSION} go/install \
&& make go/download

WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal
COPY internal .
Expand Down
4 changes: 2 additions & 2 deletions dockers/index/job/creation/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ COPY go.sum .

RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \
--mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \
make GO_VERSION=${GO_VERSION} ARCH=${TARGETARCH} OS=${TARGETOS} go/install \
&& make GOARCH=${TARGETARCH} GOOS=${TARGETOS} go/download
make GO_VERSION=${GO_VERSION} go/install \
&& make go/download

WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal
COPY internal .
Expand Down
4 changes: 2 additions & 2 deletions dockers/index/job/readreplica/rotate/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ COPY go.sum .

RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \
--mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \
make GO_VERSION=${GO_VERSION} ARCH=${TARGETARCH} OS=${TARGETOS} go/install \
&& make GOARCH=${TARGETARCH} GOOS=${TARGETOS} go/download
make GO_VERSION=${GO_VERSION} go/install \
&& make go/download

WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal
COPY internal .
Expand Down
4 changes: 2 additions & 2 deletions dockers/index/job/save/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ COPY go.sum .

RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \
--mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \
make GO_VERSION=${GO_VERSION} ARCH=${TARGETARCH} OS=${TARGETOS} go/install \
&& make GOARCH=${TARGETARCH} GOOS=${TARGETOS} go/download
make GO_VERSION=${GO_VERSION} go/install \
&& make go/download

WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal
COPY internal .
Expand Down
4 changes: 2 additions & 2 deletions dockers/manager/index/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ COPY go.sum .

RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \
--mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \
make GO_VERSION=${GO_VERSION} ARCH=${TARGETARCH} OS=${TARGETOS} go/install \
&& make GOARCH=${TARGETARCH} GOOS=${TARGETOS} go/download
make GO_VERSION=${GO_VERSION} go/install \
&& make go/download

WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal
COPY internal .
Expand Down
4 changes: 2 additions & 2 deletions dockers/operator/helm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ COPY .git .
COPY go.mod .
COPY go.sum .

RUN make GO_VERSION=${GO_VERSION} ARCH=${TARGETARCH} OS=${TARGETOS} go/install \
&& make GOARCH=${TARGETARCH} GOOS=${TARGETOS} go/download
RUN make GO_VERSION=${GO_VERSION} go/install \
&& make go/download

WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal/errors
COPY internal/errors .
Expand Down
4 changes: 2 additions & 2 deletions dockers/tools/benchmark/job/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ COPY go.sum .

RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \
--mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \
make GO_VERSION=${GO_VERSION} ARCH=${TARGETARCH} OS=${TARGETOS} go/install \
&& make GOARCH=${TARGETARCH} GOOS=${TARGETOS} go/download
make GO_VERSION=${GO_VERSION} go/install \
&& make go/download

WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal
COPY internal .
Expand Down
4 changes: 2 additions & 2 deletions dockers/tools/benchmark/operator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ COPY go.sum .

RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \
--mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \
make GO_VERSION=${GO_VERSION} ARCH=${TARGETARCH} OS=${TARGETOS} go/install \
&& make GOARCH=${TARGETARCH} GOOS=${TARGETOS} go/download
make GO_VERSION=${GO_VERSION} go/install \
&& make go/download

WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal
COPY internal .
Expand Down
4 changes: 2 additions & 2 deletions dockers/tools/cli/loadtest/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ COPY go.sum .

RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \
--mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \
make GO_VERSION=${GO_VERSION} ARCH=${TARGETARCH} OS=${TARGETOS} go/install \
&& make GOARCH=${TARGETARCH} GOOS=${TARGETOS} go/download
make GO_VERSION=${GO_VERSION} go/install \
&& make go/download

WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal
COPY internal .
Expand Down

0 comments on commit c771290

Please sign in to comment.