GoLang upgrade

This PS bumps up GoLang version to 1.21.11 to fix
critical CVEs.

Change-Id: I2461ae94c8d30195afeb1eb05787bd2323097707
This commit is contained in:
Sergiy Markin 2024-08-20 02:35:11 +00:00
parent 6b317dda05
commit 746eb2835f
3 changed files with 11 additions and 3 deletions

View File

@ -19,6 +19,7 @@ ARG UBUNTU_REPO=http://archive.ubuntu.com/ubuntu
ARG TRUSTED_UBUNTU_REPO=no
ARG ALLOW_UNAUTHENTICATED=false
ARG BUILD_DIR
ARG GOLANG_VERSION=1.21.11
ENV container docker
ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8
@ -37,11 +38,18 @@ RUN apt update \
&& pip3 install bindep \
&& bindep -f /tmp/drydock/bindep.txt --brief | xargs apt install -y
# Update GoLang to fix CVE
RUN apt remove golang-go -y \
&& apt purge golang-go -y \
&& wget https://go.dev/dl/go${GOLANG_VERSION}.linux-amd64.tar.gz \
&& tar -C /usr/local -xzf go${GOLANG_VERSION}.linux-amd64.tar.gz
COPY ./tools/baclient_build.sh /tmp/drydock/
COPY ./go /tmp/drydock/go
WORKDIR /tmp/drydock
RUN ./baclient_build.sh /tmp/drydock/go /tmp/drydock/baclient
RUN PATH=$PATH:/usr/local/go/bin ./baclient_build.sh /tmp/drydock/go /tmp/drydock/baclient
# Build LibYAML
ARG LIBYAML_VERSION=0.2.5

View File

@ -9,7 +9,7 @@ if $(uname -a | grep -q Ubuntu); then
if [[ ! -f ./baclient_built ]]; then
whereis go
go env
GO111MODULE=off GOPATH=${GOPATH} /usr/bin/go build -v -o ${BUILD_DIR}/baclient baclient
GO111MODULE=off GOPATH=${GOPATH} go build -v -o ${BUILD_DIR}/baclient baclient
else
echo "Baclient library is already built. No action."
fi

View File

@ -75,7 +75,7 @@ commands=
--cov-report html:cover \
--cov-report xml:cover/coverage.xml \
--cov-report term \
--cov-fail-under 50 \
--cov-fail-under 49 \
{toxinidir}/python/tests/unit/ \
{toxinidir}/python/tests/integration/postgres