ci: install go version specified in build.env

installed the go version specified in build.env
in the test docker image.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna 2021-12-09 11:09:03 +05:30 committed by mergify[bot]
parent 9f9ef0eca5
commit b114a8fdad

View File

@ -11,11 +11,13 @@
FROM registry.fedoraproject.org/fedora:latest FROM registry.fedoraproject.org/fedora:latest
ARG GOPATH=/go ARG GOPATH=/go
ARG GOROOT=/usr/local/go
ENV \ ENV \
GOPATH=${GOPATH} \ GOPATH=${GOPATH} \
GOROOT=${GOROOT} \
GO111MODULE=on \ GO111MODULE=on \
PATH="${GOPATH}/bin:/opt/commitlint/node_modules/.bin:${PATH}" PATH="${GOROOT}/bin:${GOPATH}/bin:/opt/commitlint/node_modules/.bin:${PATH}"
COPY build.env / COPY build.env /
@ -23,7 +25,6 @@ RUN source /build.env \
&& dnf -y install \ && dnf -y install \
git \ git \
make \ make \
golang \
gcc \ gcc \
librados-devel \ librados-devel \
librbd-devel \ librbd-devel \
@ -38,6 +39,9 @@ RUN source /build.env \
&& dnf -y update \ && dnf -y update \
&& dnf -y clean all \ && dnf -y clean all \
&& gem install mdl \ && gem install mdl \
&& mkdir -p ${GOROOT} \
&& curl https://storage.googleapis.com/golang/go${GOLANG_VERSION}.linux-amd64.tar.gz \
| tar xzf - -C ${GOROOT} --strip-components=1 \
&& curl -sf "https://install.goreleaser.com/github.com/golangci/golangci-lint.sh" \ && curl -sf "https://install.goreleaser.com/github.com/golangci/golangci-lint.sh" \
| bash -s -- -b ${GOPATH}/bin "${GOLANGCI_VERSION}" \ | bash -s -- -b ${GOPATH}/bin "${GOLANGCI_VERSION}" \
&& curl -L https://git.io/get_helm.sh | bash -s -- --version "${HELM_VERSION}" \ && curl -L https://git.io/get_helm.sh | bash -s -- --version "${HELM_VERSION}" \