Upgrade to latest security release: go1.20.4 (#9370)

**What this PR does / why we need it**:
https://groups.google.com/g/golang-announce/c/MEb0UyuSMsU

Also updated the build image.

---------

Signed-off-by: Danny Kopping <danny.kopping@grafana.com>
pull/9372/head
Danny Kopping 3 years ago committed by GitHub
parent 6a4ba250a6
commit f5c0fdf028
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      .drone/drone.jsonnet
  2. 6
      .drone/drone.yml
  3. 2
      clients/cmd/promtail/Dockerfile
  4. 2
      clients/cmd/promtail/Dockerfile.arm32
  5. 2
      clients/cmd/promtail/Dockerfile.cross
  6. 2
      cmd/logcli/Dockerfile
  7. 2
      cmd/logql-analyzer/Dockerfile
  8. 2
      cmd/loki-canary/Dockerfile
  9. 2
      cmd/loki-canary/Dockerfile.cross
  10. 2
      cmd/loki/Dockerfile
  11. 2
      cmd/loki/Dockerfile.cross
  12. 2
      cmd/loki/Dockerfile.debug
  13. 2
      cmd/migrate/Dockerfile
  14. 2
      cmd/querytee/Dockerfile
  15. 2
      cmd/querytee/Dockerfile.cross
  16. 1
      docs/sources/maintaining/release-loki-build-image.md
  17. 18
      loki-build-image/Dockerfile
  18. 2
      operator/Dockerfile
  19. 2
      operator/Dockerfile.cross
  20. 2
      production/helm/loki/src/helm-test/Dockerfile
  21. 2
      tools/dev/loki-boltdb-storage-s3/dev.dockerfile
  22. 2
      tools/lambda-promtail/Dockerfile

@ -472,7 +472,7 @@ local manifest_ecr(apps, archs) = pipeline('manifest-ecr') {
[
pipeline('loki-build-image') {
local build_image_tag = '0.28.2',
local build_image_tag = '0.28.3',
workspace: {
base: '/src',
path: 'loki',

@ -10,7 +10,7 @@ steps:
dry_run: true
repo: grafana/loki-build-image
tags:
- 0.28.2
- 0.28.3
when:
event:
- pull_request
@ -26,7 +26,7 @@ steps:
from_secret: docker_password
repo: grafana/loki-build-image
tags:
- 0.28.2
- 0.28.3
username:
from_secret: docker_username
when:
@ -1772,6 +1772,6 @@ kind: secret
name: gpg_private_key
---
kind: signature
hmac: 85d0124d6c656eee24306b44913b60fd57f4f65d53ee2190dbce506641e28f45
hmac: 81941d0775a351bf94e90c6d4845e78c72de1d63f0b46f767b7deb147e2c7905
...

@ -1,4 +1,4 @@
FROM golang:1.20.3-bullseye as build
FROM golang:1.20.4-bullseye as build
COPY . /src/loki
WORKDIR /src/loki

@ -1,4 +1,4 @@
FROM golang:1.20.3-bullseye as build
FROM golang:1.20.4-bullseye as build
COPY . /src/loki
WORKDIR /src/loki

@ -2,7 +2,7 @@ ARG BUILD_IMAGE=grafana/loki-build-image:0.28.1
# Directories in this file are referenced from the root of the project not this folder
# This file is intended to be called from the root like so:
# docker build -t grafana/promtail -f clients/cmd/promtail/Dockerfile .
FROM golang:1.20.3-alpine as goenv
FROM golang:1.20.4-alpine as goenv
RUN go env GOARCH > /goarch && \
go env GOARM > /goarm

@ -1,4 +1,4 @@
FROM golang:1.20.3 as build
FROM golang:1.20.4 as build
COPY . /src/loki
WORKDIR /src/loki

@ -1,4 +1,4 @@
FROM golang:1.20.3 as build
FROM golang:1.20.4 as build
COPY . /src/loki
WORKDIR /src/loki

@ -1,4 +1,4 @@
FROM golang:1.20.3 as build
FROM golang:1.20.4 as build
COPY . /src/loki
WORKDIR /src/loki

@ -2,7 +2,7 @@ ARG BUILD_IMAGE=grafana/loki-build-image:0.28.1
# Directories in this file are referenced from the root of the project not this folder
# This file is intended to be called from the root like so:
# docker build -t grafana/promtail -f cmd/promtail/Dockerfile .
FROM golang:1.20.3-alpine as goenv
FROM golang:1.20.4-alpine as goenv
RUN go env GOARCH > /goarch && \
go env GOARM > /goarm

@ -1,4 +1,4 @@
FROM golang:1.20.3 as build
FROM golang:1.20.4 as build
COPY . /src/loki
WORKDIR /src/loki

@ -2,7 +2,7 @@ ARG BUILD_IMAGE=grafana/loki-build-image:0.28.1
# Directories in this file are referenced from the root of the project not this folder
# This file is intended to be called from the root like so:
# docker build -t grafana/loki -f cmd/loki/Dockerfile .
FROM golang:1.20.3-alpine as goenv
FROM golang:1.20.4-alpine as goenv
RUN go env GOARCH > /goarch && \
go env GOARM > /goarm

@ -3,7 +3,7 @@ ARG BUILD_IMAGE=grafana/loki-build-image:0.28.1
# This file is intended to be called from the root like so:
# docker build -t grafana/loki -f cmd/loki/Dockerfile.debug .
FROM golang:1.20.3-alpine as goenv
FROM golang:1.20.4-alpine as goenv
RUN go env GOARCH > /goarch && \
go env GOARM > /goarm && \
go install github.com/go-delve/delve/cmd/dlv@latest

@ -1,4 +1,4 @@
FROM golang:1.20.3 as build
FROM golang:1.20.4 as build
COPY . /src/loki
WORKDIR /src/loki
RUN make clean && make BUILD_IN_CONTAINER=false migrate

@ -1,4 +1,4 @@
FROM golang:1.20.3 as build
FROM golang:1.20.4 as build
COPY . /src/loki
WORKDIR /src/loki

@ -2,7 +2,7 @@ ARG BUILD_IMAGE=grafana/loki-build-image:0.28.1
# Directories in this file are referenced from the root of the project not this folder
# This file is intended to be called from the root like so:
# docker build -t grafana/promtail -f cmd/promtail/Dockerfile .
FROM golang:1.20.3-alpine as goenv
FROM golang:1.20.4-alpine as goenv
RUN go env GOARCH > /goarch && \
go env GOARM > /goarm

@ -17,6 +17,7 @@ if any changes were made in the folder `./loki-build-image/`.
1. create a branch with the desired changes to the Dockerfile
2. update the version tag of the `loki-build-image` pipeline defined in `.drone/drone.jsonnet` (search for `pipeline('loki-build-image')`) to a new version number (try to follow semver)
3. run `DRONE_SERVER=https://drone.grafana.net/ DRONE_TOKEN=<token> make drone` and commit the changes to the same branch
1. the `<token>` is your personal drone token, which can be found by navigating to https://drone.grafana.net/account.
4. create a PR
5. once approved and merged to `main`, the image with the new version is built and published
- **Note:** keep an eye on https://drone.grafana.net/grafana/loki for the build after merging ([example](https://drone.grafana.net/grafana/loki/17760/1/2))

@ -5,7 +5,7 @@
# See ../docs/sources/maintaining/release-loki-build-image.md
# Install helm (https://helm.sh/) and helm-docs (https://github.com/norwoodj/helm-docs) for generating Helm Chart reference.
FROM golang:1.20.3 as helm
FROM golang:1.20.4 as helm
ARG HELM_VER="v3.2.3"
RUN curl -L -o /tmp/helm-$HELM_VER.tgz https://get.helm.sh/helm-${HELM_VER}-linux-amd64.tar.gz && \
tar -xz -C /tmp -f /tmp/helm-$HELM_VER.tgz && \
@ -38,7 +38,7 @@ RUN apk add --no-cache docker-cli
# TODO this should be fixed to download and extract the specific release binary from github as we do for golangci and helm above
# however we need a commit which hasn't been released yet: https://github.com/drone/drone-cli/commit/1fad337d74ca0ecf420993d9d2d7229a1c99f054
# Read the comment below regarding GO111MODULE=on and why it is necessary
FROM golang:1.20.3 as drone
FROM golang:1.20.4 as drone
RUN curl -L https://github.com/drone/drone-cli/releases/download/v1.4.0/drone_linux_amd64.tar.gz | tar zx && \
install -t /usr/local/bin drone
@ -47,33 +47,33 @@ RUN curl -L https://github.com/drone/drone-cli/releases/download/v1.4.0/drone_li
# Error:
# github.com/fatih/faillint@v1.5.0 requires golang.org/x/tools@v0.0.0-20200207224406-61798d64f025
# (not golang.org/x/tools@v0.0.0-20190918214920-58d531046acd from golang.org/x/tools/cmd/goyacc@58d531046acdc757f177387bc1725bfa79895d69)
FROM golang:1.20.3 as faillint
FROM golang:1.20.4 as faillint
RUN GO111MODULE=on go install github.com/fatih/faillint@v1.11.0
RUN GO111MODULE=on go install golang.org/x/tools/cmd/goimports@v0.7.0
FROM golang:1.20.3 as delve
FROM golang:1.20.4 as delve
RUN GO111MODULE=on go install github.com/go-delve/delve/cmd/dlv@latest
# Install ghr used to push binaries and template the release
# This collides with the version of go tools used in the base image, thus we install it in its own image and copy it over.
FROM golang:1.20.3 as ghr
FROM golang:1.20.4 as ghr
RUN GO111MODULE=on go install github.com/tcnksm/ghr@9349474
# Install nfpm (https://nfpm.goreleaser.com) for creating .deb and .rpm packages.
FROM golang:1.20.3 as nfpm
FROM golang:1.20.4 as nfpm
RUN GO111MODULE=on go install github.com/goreleaser/nfpm/v2/cmd/nfpm@v2.11.3
# Install gotestsum
FROM golang:1.20.3 as gotestsum
FROM golang:1.20.4 as gotestsum
RUN GO111MODULE=on go install gotest.tools/gotestsum@v1.8.2
# Install tools used to compile jsonnet.
FROM golang:1.20.3 as jsonnet
FROM golang:1.20.4 as jsonnet
RUN GO111MODULE=on go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@v0.4.0
RUN GO111MODULE=on go install github.com/monitoring-mixins/mixtool/cmd/mixtool@bca3066
RUN GO111MODULE=on go install github.com/google/go-jsonnet/cmd/jsonnet@v0.18.0
FROM golang:1.20.3-buster
FROM golang:1.20.4-buster
RUN apt-get update && \
apt-get install -qy \
musl gnupg ragel \

@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.20.3 as builder
FROM golang:1.20.4 as builder
WORKDIR /workspace
# Copy the Go Modules manifests

@ -1,6 +1,6 @@
ARG BUILD_IMAGE=grafana/loki-build-image:0.28.1
FROM golang:1.20.3-alpine as goenv
FROM golang:1.20.4-alpine as goenv
RUN go env GOARCH > /goarch && \
go env GOARM > /goarm

@ -1,4 +1,4 @@
FROM golang:1.20.3 as build
FROM golang:1.20.4 as build
# build via Makefile target helm-test-image in root
# Makefile. Building from this directory will not be

@ -1,4 +1,4 @@
FROM golang:1.20.3
FROM golang:1.20.4
ENV CGO_ENABLED=0
RUN go install github.com/go-delve/delve/cmd/dlv@v1.9.0

@ -1,4 +1,4 @@
FROM golang:1.20.3-alpine AS build-image
FROM golang:1.20.4-alpine AS build-image
COPY tools/lambda-promtail /src/lambda-promtail
WORKDIR /src/lambda-promtail

Loading…
Cancel
Save