Skip to content

Commit

Permalink
Fix setup-helm version (#2349)
Browse files Browse the repository at this point in the history
* fix: version of setup-helm

Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>

* fix: add comment

Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>

---------

Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: kpango <kpango@vdaas.org>
  • Loading branch information
hlts2 authored and kpango committed Feb 14, 2024
1 parent 96ba15c commit b239793
Show file tree
Hide file tree
Showing 25 changed files with 58 additions and 205 deletions.
4 changes: 3 additions & 1 deletion .github/actions/setup-helm/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ runs:
echo "version=${HELM_VERSION}" >> $GITHUB_OUTPUT
env:
HELM_VERSION: ${{ inputs.helm_version }}
- uses: azure/setup-helm@v4
# This will change when the v4 version is released.
# Ref: https://github.com/Azure/setup-helm/issues/126
- uses: azure/setup-helm@v4.0.0
with:
version: ${{ steps.helm_version.outputs.version }}
- name: Check Helm version
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ SWAP_TAG ?= latest
BINDIR ?= /usr/local/bin

UNAME := $(eval UNAME := $(shell uname -s))$(UNAME)
OS := $(eval OS := $(shell echo $(UNAME) | tr '[:upper:]' '[:lower:]'))$(OS)
ARCH := $(eval ARCH := $(shell uname -m))$(ARCH)
PWD := $(eval PWD := $(shell pwd))$(PWD)

Expand Down
2 changes: 1 addition & 1 deletion Makefile.d/helm.mk
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ yq/install: $(BINDIR)/yq
$(BINDIR)/yq:
mkdir -p $(BINDIR)
cd $(TEMP_DIR) \
&& curl -L https://github.com/mikefarah/yq/releases/download/$(YQ_VERSION)/yq_$(shell echo $(UNAME) | tr '[:upper:]' '[:lower:]')_$(subst x86_64,amd64,$(shell echo $(ARCH) | tr '[:upper:]' '[:lower:]')) -o $(BINDIR)/yq \
&& curl -L https://github.com/mikefarah/yq/releases/download/$(YQ_VERSION)/yq_$(OS)_$(subst x86_64,amd64,$(shell echo $(ARCH) | tr '[:upper:]' '[:lower:]')) -o $(BINDIR)/yq \
&& chmod a+x $(BINDIR)/yq

.PHONY: helm/schema/crd/all
Expand Down
4 changes: 2 additions & 2 deletions Makefile.d/k8s.mk
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ telepresence/install: $(BINDIR)/telepresence
$(BINDIR)/telepresence:
mkdir -p $(BINDIR)
cd $(TEMP_DIR) \
&& curl -fsSL "https://app.getambassador.io/download/tel2oss/releases/download/v$(TELEPRESENCE_VERSION)/telepresence-$(shell echo $(UNAME) | tr '[:upper:]' '[:lower:]')-$(subst x86_64,amd64,$(shell echo $(ARCH) | tr '[:upper:]' '[:lower:]'))" -o $(BINDIR)/telepresence \
&& curl -fsSL "https://app.getambassador.io/download/tel2oss/releases/download/v$(TELEPRESENCE_VERSION)/telepresence-$(OS)-$(subst x86_64,amd64,$(shell echo $(ARCH) | tr '[:upper:]' '[:lower:]'))" -o $(BINDIR)/telepresence \
&& chmod a+x $(BINDIR)/telepresence

.PHONY: telepresence/swap/agent-ngt
Expand Down Expand Up @@ -545,5 +545,5 @@ kubelinter/install: $(BINDIR)/kube-linter
$(BINDIR)/kube-linter:
mkdir -p $(BINDIR)
cd $(TEMP_DIR) \
&& curl -L https://github.com/stackrox/kube-linter/releases/download/$(KUBELINTER_VERSION)/kube-linter-$(shell echo $(UNAME) | tr '[:upper:]' '[:lower:]') -o $(BINDIR)/kube-linter \
&& curl -L https://github.com/stackrox/kube-linter/releases/download/$(KUBELINTER_VERSION)/kube-linter-$(OS) -o $(BINDIR)/kube-linter \
&& chmod a+x $(BINDIR)/kube-linter
2 changes: 1 addition & 1 deletion Makefile.d/kind.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ kind/install: $(BINDIR)/kind

$(BINDIR)/kind:
mkdir -p $(BINDIR)
curl -L https://github.com/kubernetes-sigs/kind/releases/download/$(KIND_VERSION)/kind-$(shell echo $(UNAME) | tr '[:upper:]' '[:lower:]')-$(subst x86_64,amd64,$(shell echo $(ARCH) | tr '[:upper:]' '[:lower:]')) -o $(BINDIR)/kind
curl -L https://github.com/kubernetes-sigs/kind/releases/download/$(KIND_VERSION)/kind-$(OS)-$(subst x86_64,amd64,$(shell echo $(ARCH) | tr '[:upper:]' '[:lower:]')) -o $(BINDIR)/kind
chmod a+x $(BINDIR)/kind

.PHONY: kind/start
Expand Down
2 changes: 1 addition & 1 deletion Makefile.d/minikube.mk
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ minikube/install: $(BINDIR)/minikube

$(BINDIR)/minikube:
mkdir -p $(BINDIR)
curl -L https://storage.googleapis.com/minikube/releases/latest/minikube-$(shell echo $(UNAME) | tr '[:upper:]' '[:lower:]')-$(subst x86_64,amd64,$(shell echo $(ARCH) | tr '[:upper:]' '[:lower:]')) -o $(BINDIR)/minikube
curl -L https://storage.googleapis.com/minikube/releases/latest/minikube-$(OS)-$(subst x86_64,amd64,$(shell echo $(ARCH) | tr '[:upper:]' '[:lower:]')) -o $(BINDIR)/minikube
chmod a+x $(BINDIR)/minikube

# Start minikube with CSI Driver and Volume Snapshots support
Expand Down
14 changes: 13 additions & 1 deletion Makefile.d/tools.mk
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ $(BINDIR)/reviewdog:
kubectl/install: $(BINDIR)/kubectl

$(BINDIR)/kubectl:
curl -L "https://dl.k8s.io/release/$(KUBECTL_VERSION)/bin/$(shell echo $(UNAME) | tr '[:upper:]' '[:lower:]')/$(subst x86_64,amd64,$(shell echo $(ARCH) | tr '[:upper:]' '[:lower:]'))/kubectl" -o $(BINDIR)/kubectl
curl -L "https://dl.k8s.io/release/$(KUBECTL_VERSION)/bin/$(OS)/$(subst x86_64,amd64,$(shell echo $(ARCH) | tr '[:upper:]' '[:lower:]'))/kubectl" -o $(BINDIR)/kubectl
chmod a+x $(BINDIR)/kubectl

.PHONY: textlint/install
Expand Down Expand Up @@ -138,6 +138,18 @@ staticcheck/install: $(GOPATH)/bin/staticcheck
$(GOPATH)/bin/staticcheck:
$(call go-install, honnef.co/go/tools/cmd/staticcheck)

.PHONY: go/install
go/install: $(GOROOT)/bin/go

$(GOROOT)/bin/go:
TAR_NAME="go$(GO_VERSION).${OS}-${ARCH}.tar.gz" \
&& 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" \
&& mv go ${GOROOT} \
&& go version \
&& mkdir -p "${GOPATH}/src"

.PHONY: rust/install
rust/install: $(CARGO_HOME)/bin/cargo

Expand Down
13 changes: 2 additions & 11 deletions dockers/agent/core/faiss/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /tmp
RUN BIN_NAME="go" \
&& TAR_NAME="${BIN_NAME}${GO_VERSION}.${TARGETOS}-${TARGETARCH}.tar.gz" \
&& curl -fsSLO "https://go.dev/dl/${TAR_NAME}" \
&& tar zxf "${TAR_NAME}" \
&& rm "${TAR_NAME}" \
&& mv ${BIN_NAME} ${GOROOT} \
&& ${BIN_NAME} version \
&& mkdir -p "${GOPATH}/src"

WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/Makefile.d
COPY Makefile.d .
WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}
Expand All @@ -74,7 +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 GOARCH=${TARGETARCH} GOOS=${TARGETOS} go/download
make ARCH=${TARGETARCH} OS=${TARGETOS} go/install \
&& make GOARCH=${TARGETARCH} GOOS=${TARGETOS} go/download

WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal
COPY internal .
Expand Down
13 changes: 2 additions & 11 deletions dockers/agent/core/ngt/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /tmp
RUN BIN_NAME="go" \
&& TAR_NAME="${BIN_NAME}${GO_VERSION}.${TARGETOS}-${TARGETARCH}.tar.gz" \
&& curl -fsSLO "https://go.dev/dl/${TAR_NAME}" \
&& tar zxf "${TAR_NAME}" \
&& rm "${TAR_NAME}" \
&& mv ${BIN_NAME} ${GOROOT} \
&& ${BIN_NAME} version \
&& mkdir -p "${GOPATH}/src"

WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/Makefile.d
COPY Makefile.d .
WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}
Expand All @@ -76,7 +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 GOARCH=${TARGETARCH} GOOS=${TARGETOS} go/download
make ARCH=${TARGETARCH} OS=${TARGETOS} go/install \
&& make GOARCH=${TARGETARCH} GOOS=${TARGETOS} go/download

WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal
COPY internal .
Expand Down
13 changes: 2 additions & 11 deletions dockers/agent/sidecar/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /tmp
RUN BIN_NAME="go" \
&& TAR_NAME="${BIN_NAME}${GO_VERSION}.${TARGETOS}-${TARGETARCH}.tar.gz" \
&& curl -fsSLO "https://go.dev/dl/${TAR_NAME}" \
&& tar zxf "${TAR_NAME}" \
&& rm "${TAR_NAME}" \
&& mv ${BIN_NAME} ${GOROOT} \
&& ${BIN_NAME} version \
&& mkdir -p "${GOPATH}/src"

WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/Makefile.d
COPY Makefile.d .
WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}
Expand All @@ -68,7 +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 GOARCH=${TARGETARCH} GOOS=${TARGETOS} go/download
make ARCH=${TARGETARCH} OS=${TARGETOS} go/install \
&& make GOARCH=${TARGETARCH} GOOS=${TARGETOS} go/download

WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal
COPY internal .
Expand Down
13 changes: 2 additions & 11 deletions dockers/ci/base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /tmp
RUN BIN_NAME="go" \
&& TAR_NAME="${BIN_NAME}${GO_VERSION}.${TARGETOS}-${TARGETARCH}.tar.gz" \
&& curl -fsSLO "https://go.dev/dl/${TAR_NAME}" \
&& tar zxf "${TAR_NAME}" \
&& rm "${TAR_NAME}" \
&& mv ${BIN_NAME} ${GOROOT} \
&& ${BIN_NAME} version \
&& mkdir -p "${GOPATH}/src"

WORKDIR ${GOPATH}/src/github.com/vdaas/vald

ENV ROOTDIR .
Expand All @@ -88,7 +78,8 @@ 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 GOARCH=${TARGETARCH} GOOS=${TARGETOS} deps ROOTDIR=${ROOTDIR} GO_CLEAN_DEPS=false \
make ARCH=${TARGETARCH} OS=${TARGETOS} go/install \
&& make GOARCH=${TARGETARCH} GOOS=${TARGETOS} deps ROOTDIR=${ROOTDIR} GO_CLEAN_DEPS=false \
&& make ngt/install \
&& make faiss/install \
&& make helm/install \
Expand Down
13 changes: 2 additions & 11 deletions dockers/dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /tmp
RUN BIN_NAME="go" \
&& TAR_NAME="${BIN_NAME}${GO_VERSION}.${TARGETOS}-${TARGETARCH}.tar.gz" \
&& curl -fsSLO "https://go.dev/dl/${TAR_NAME}" \
&& tar zxf "${TAR_NAME}" \
&& rm "${TAR_NAME}" \
&& mv ${BIN_NAME} ${GOROOT} \
&& ${BIN_NAME} version \
&& mkdir -p "${GOPATH}/src"

WORKDIR ${GOPATH}/src/github.com/vdaas/vald
COPY Makefile .
COPY Makefile.d Makefile.d
Expand All @@ -74,7 +64,8 @@ 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 GOARCH=${TARGETARCH} GOOS=${TARGETOS} deps GO_CLEAN_DEPS=false \
make ARCH=${TARGETARCH} OS=${TARGETOS} go/install \
&& make GOARCH=${TARGETARCH} GOOS=${TARGETOS} deps GO_CLEAN_DEPS=false \
&& make ngt/install \
&& make faiss/install \
&& make helm/install \
Expand Down
13 changes: 2 additions & 11 deletions dockers/discoverer/k8s/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /tmp
RUN BIN_NAME="go" \
&& TAR_NAME="${BIN_NAME}${GO_VERSION}.${TARGETOS}-${TARGETARCH}.tar.gz" \
&& curl -fsSLO "https://go.dev/dl/${TAR_NAME}" \
&& tar zxf "${TAR_NAME}" \
&& rm "${TAR_NAME}" \
&& mv ${BIN_NAME} ${GOROOT} \
&& ${BIN_NAME} version \
&& mkdir -p "${GOPATH}/src"

WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/Makefile.d
COPY Makefile.d .
WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}
Expand All @@ -68,7 +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 GOARCH=${TARGETARCH} GOOS=${TARGETOS} go/download
make ARCH=${TARGETARCH} OS=${TARGETOS} go/install \
&& make GOARCH=${TARGETARCH} GOOS=${TARGETOS} go/download

WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal
COPY internal .
Expand Down
13 changes: 2 additions & 11 deletions dockers/gateway/filter/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /tmp
RUN BIN_NAME="go" \
&& TAR_NAME="${BIN_NAME}${GO_VERSION}.${TARGETOS}-${TARGETARCH}.tar.gz" \
&& curl -fsSLO "https://go.dev/dl/${TAR_NAME}" \
&& tar zxf "${TAR_NAME}" \
&& rm "${TAR_NAME}" \
&& mv ${BIN_NAME} ${GOROOT} \
&& ${BIN_NAME} version \
&& mkdir -p "${GOPATH}/src"

WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/Makefile.d
COPY Makefile.d .
WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}
Expand All @@ -67,7 +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 GOARCH=${TARGETARCH} GOOS=${TARGETOS} go/download
make ARCH=${TARGETARCH} OS=${TARGETOS} go/install \
&& make GOARCH=${TARGETARCH} GOOS=${TARGETOS} go/download

WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal
COPY internal .
Expand Down
13 changes: 2 additions & 11 deletions dockers/gateway/lb/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /tmp
RUN BIN_NAME="go" \
&& TAR_NAME="${BIN_NAME}${GO_VERSION}.${TARGETOS}-${TARGETARCH}.tar.gz" \
&& curl -fsSLO "https://go.dev/dl/${TAR_NAME}" \
&& tar zxf "${TAR_NAME}" \
&& rm "${TAR_NAME}" \
&& mv ${BIN_NAME} ${GOROOT} \
&& ${BIN_NAME} version \
&& mkdir -p "${GOPATH}/src"

WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/Makefile.d
COPY Makefile.d .
WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}
Expand All @@ -67,7 +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 GOARCH=${TARGETARCH} GOOS=${TARGETOS} go/download
make ARCH=${TARGETARCH} OS=${TARGETOS} go/install \
&& make GOARCH=${TARGETARCH} GOOS=${TARGETOS} go/download

WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal
COPY internal .
Expand Down
13 changes: 2 additions & 11 deletions dockers/gateway/mirror/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,24 +46,15 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /tmp
RUN BIN_NAME="go" \
&& TAR_NAME="${BIN_NAME}${GO_VERSION}.${TARGETOS}-${TARGETARCH}.tar.gz" \
&& curl -fsSLO "https://go.dev/dl/${TAR_NAME}" \
&& tar zxf "${TAR_NAME}" \
&& rm "${TAR_NAME}" \
&& mv ${BIN_NAME} ${GOROOT} \
&& ${BIN_NAME} version \
&& mkdir -p "${GOPATH}/src"

WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}

COPY go.mod .
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}" \
go mod download
make ARCH=${TARGETARCH} OS=${TARGETOS} go/install \
&& make GOARCH=${TARGETARCH} GOOS=${TARGETOS} go/download

WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal
COPY internal .
Expand Down
13 changes: 2 additions & 11 deletions dockers/index/job/correction/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /tmp
RUN BIN_NAME="go" \
&& TAR_NAME="${BIN_NAME}${GO_VERSION}.${TARGETOS}-${TARGETARCH}.tar.gz" \
&& curl -fsSLO "https://go.dev/dl/${TAR_NAME}" \
&& tar zxf "${TAR_NAME}" \
&& rm "${TAR_NAME}" \
&& mv ${BIN_NAME} ${GOROOT} \
&& ${BIN_NAME} version \
&& mkdir -p "${GOPATH}/src"

WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/Makefile.d
COPY Makefile.d .
WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}
Expand All @@ -67,7 +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 GOARCH=${TARGETARCH} GOOS=${TARGETOS} go/download
make ARCH=${TARGETARCH} OS=${TARGETOS} go/install \
&& make GOARCH=${TARGETARCH} GOOS=${TARGETOS} go/download

WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal
COPY internal .
Expand Down
13 changes: 2 additions & 11 deletions dockers/index/job/creation/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /tmp
RUN BIN_NAME="go" \
&& TAR_NAME="${BIN_NAME}${GO_VERSION}.${TARGETOS}-${TARGETARCH}.tar.gz" \
&& curl -fsSLO "https://go.dev/dl/${TAR_NAME}" \
&& tar zxf "${TAR_NAME}" \
&& rm "${TAR_NAME}" \
&& mv ${BIN_NAME} ${GOROOT} \
&& ${BIN_NAME} version \
&& mkdir -p "${GOPATH}/src"

WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/Makefile.d
COPY Makefile.d .
WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}
Expand All @@ -67,7 +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 GOARCH=${TARGETARCH} GOOS=${TARGETOS} go/download
make ARCH=${TARGETARCH} OS=${TARGETOS} go/install \
&& make GOARCH=${TARGETARCH} GOOS=${TARGETOS} go/download

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

0 comments on commit b239793

Please sign in to comment.