Skip to content

Commit

Permalink
Use go 1.20.6 in 2.7 branch (#10028)
Browse files Browse the repository at this point in the history
Signed-off-by: Michel Hollands <[email protected]>
  • Loading branch information
MichelHollands authored Jul 24, 2023
1 parent 22dc65b commit d819332
Show file tree
Hide file tree
Showing 24 changed files with 58 additions and 58 deletions.
2 changes: 1 addition & 1 deletion .drone/drone.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ local manifest_ecr(apps, archs) = pipeline('manifest-ecr') {

[
pipeline('loki-build-image') {
local build_image_tag = '0.28.1',
local build_image_tag = '0.29.3-golangci.1.51.2',
workspace: {
base: '/src',
path: 'loki',
Expand Down
40 changes: 20 additions & 20 deletions .drone/drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ steps:
dry_run: true
repo: grafana/loki-build-image
tags:
- 0.28.1
- 0.29.3-golangci.1.51.2
when:
event:
- pull_request
Expand All @@ -26,7 +26,7 @@ steps:
from_secret: docker_password
repo: grafana/loki-build-image
tags:
- 0.28.1
- 0.29.3-golangci.1.51.2
username:
from_secret: docker_username
when:
Expand Down Expand Up @@ -93,14 +93,14 @@ steps:
depends_on:
- clone
environment: {}
image: grafana/loki-build-image:0.28.1
image: grafana/loki-build-image:0.29.3-golangci.1.51.2
name: check-drone-drift
- commands:
- make BUILD_IN_CONTAINER=false check-generated-files
depends_on:
- clone
environment: {}
image: grafana/loki-build-image:0.28.1
image: grafana/loki-build-image:0.29.3-golangci.1.51.2
name: check-generated-files
- commands:
- cd ..
Expand All @@ -109,23 +109,23 @@ steps:
depends_on:
- clone
environment: {}
image: grafana/loki-build-image:0.28.1
image: grafana/loki-build-image:0.29.3-golangci.1.51.2
name: clone-main
- commands:
- make BUILD_IN_CONTAINER=false test
depends_on:
- clone
- clone-main
environment: {}
image: grafana/loki-build-image:0.28.1
image: grafana/loki-build-image:0.29.3-golangci.1.51.2
name: test
- commands:
- cd ../loki-main
- BUILD_IN_CONTAINER=false make test
depends_on:
- clone-main
environment: {}
image: grafana/loki-build-image:0.28.1
image: grafana/loki-build-image:0.29.3-golangci.1.51.2
name: test-main
- commands:
- make BUILD_IN_CONTAINER=false compare-coverage old=../loki-main/test_results.txt
Expand All @@ -135,7 +135,7 @@ steps:
- test
- test-main
environment: {}
image: grafana/loki-build-image:0.28.1
image: grafana/loki-build-image:0.29.3-golangci.1.51.2
name: compare-coverage
- commands:
- pull=$(echo $CI_COMMIT_REF | awk -F '/' '{print $3}')
Expand All @@ -148,15 +148,15 @@ steps:
TOKEN:
from_secret: github_token
USER: grafanabot
image: grafana/loki-build-image:0.28.1
image: grafana/loki-build-image:0.29.3-golangci.1.51.2
name: report-coverage
- commands:
- make BUILD_IN_CONTAINER=false lint
depends_on:
- clone
- check-generated-files
environment: {}
image: grafana/loki-build-image:0.28.1
image: grafana/loki-build-image:0.29.3-golangci.1.51.2
name: lint
- commands:
- make BUILD_IN_CONTAINER=false check-mod
Expand All @@ -165,7 +165,7 @@ steps:
- test
- lint
environment: {}
image: grafana/loki-build-image:0.28.1
image: grafana/loki-build-image:0.29.3-golangci.1.51.2
name: check-mod
- commands:
- apk add make bash && make lint-scripts
Expand All @@ -177,21 +177,21 @@ steps:
- clone
- check-generated-files
environment: {}
image: grafana/loki-build-image:0.28.1
image: grafana/loki-build-image:0.29.3-golangci.1.51.2
name: loki
- commands:
- make BUILD_IN_CONTAINER=false validate-example-configs
depends_on:
- loki
environment: {}
image: grafana/loki-build-image:0.28.1
image: grafana/loki-build-image:0.29.3-golangci.1.51.2
name: validate-example-configs
- commands:
- make BUILD_IN_CONTAINER=false check-example-config-doc
depends_on:
- clone
environment: {}
image: grafana/loki-build-image:0.28.1
image: grafana/loki-build-image:0.29.3-golangci.1.51.2
name: check-example-config-doc
trigger:
ref:
Expand All @@ -218,7 +218,7 @@ steps:
depends_on:
- clone
environment: {}
image: grafana/loki-build-image:0.28.1
image: grafana/loki-build-image:0.29.3-golangci.1.51.2
name: loki-mixin-check
trigger:
ref:
Expand All @@ -238,7 +238,7 @@ steps:
depends_on:
- clone
environment: {}
image: grafana/loki-build-image:0.28.1
image: grafana/loki-build-image:0.29.3-golangci.1.51.2
name: documentation-helm-reference-check
trigger:
ref:
Expand Down Expand Up @@ -1371,15 +1371,15 @@ steps:
NFPM_SIGNING_KEY:
from_secret: gpg_private_key
NFPM_SIGNING_KEY_FILE: /drone/src/private-key.key
image: grafana/loki-build-image:0.28.1
image: grafana/loki-build-image:0.29.3-golangci.1.51.2
name: write-key
- commands:
- make BUILD_IN_CONTAINER=false packages
environment:
NFPM_PASSPHRASE:
from_secret: gpg_passphrase
NFPM_SIGNING_KEY_FILE: /drone/src/private-key.key
image: grafana/loki-build-image:0.28.1
image: grafana/loki-build-image:0.29.3-golangci.1.51.2
name: test packaging
- commands:
- ./tools/packaging/verify-deb-install.sh
Expand All @@ -1405,7 +1405,7 @@ steps:
NFPM_PASSPHRASE:
from_secret: gpg_passphrase
NFPM_SIGNING_KEY_FILE: /drone/src/private-key.key
image: grafana/loki-build-image:0.28.1
image: grafana/loki-build-image:0.29.3-golangci.1.51.2
name: publish
when:
event:
Expand Down Expand Up @@ -1650,6 +1650,6 @@ kind: secret
name: gpg_private_key
---
kind: signature
hmac: 06ac36350b73d572bde514274c89c07dfe1a5033aa1df817072fbd4f24948f0e
hmac: 8e19cc1c8614108f3176d159a4a31d5db0af0a7cd06e8cfb04efbebdb86e5e4f

...
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,11 @@ DOCKER_IMAGE_DIRS := $(patsubst %/Dockerfile,%,$(DOCKERFILES))
BUILD_IN_CONTAINER ?= true

# ensure you run `make drone` after changing this
BUILD_IMAGE_VERSION := 0.28.1
BUILD_IMAGE_VERSION := 0.29.3-golangci.1.51.2

# Docker image info
IMAGE_PREFIX ?= grafana

FETCH_TAGS :=$(shell ./tools/fetch-tags)
IMAGE_TAG := $(shell ./tools/image-tag)

# Version info for binaries
Expand Down
2 changes: 1 addition & 1 deletion clients/cmd/docker-driver/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BUILD_IMAGE=grafana/loki-build-image:0.28.1
ARG BUILD_IMAGE=grafana/loki-build-image:0.29.3-golangci.1.51.2
# 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 .
Expand Down
4 changes: 2 additions & 2 deletions clients/cmd/fluent-bit/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM golang:1.19.5 as build
FROM golang:1.20.6@sha256:832f2f74baa3e2b00ace688cb2fa934dffeade39f5b4c0cc8b1cff8d3fb084a0 AS builder
COPY . /src/loki
WORKDIR /src/loki
RUN make clean && make BUILD_IN_CONTAINER=false fluent-bit-plugin

FROM fluent/fluent-bit:1.8
COPY --from=build /src/loki/clients/cmd/fluent-bit/out_grafana_loki.so /fluent-bit/bin
COPY --from=builder /src/loki/clients/cmd/fluent-bit/out_grafana_loki.so /fluent-bit/bin
COPY clients/cmd/fluent-bit/fluent-bit.conf /fluent-bit/etc/fluent-bit.conf
EXPOSE 2020
CMD ["/fluent-bit/bin/fluent-bit", "-e","/fluent-bit/bin/out_grafana_loki.so", "-c", "/fluent-bit/etc/fluent-bit.conf"]
2 changes: 1 addition & 1 deletion clients/cmd/promtail/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.20.3-bullseye as build
FROM golang:1.20.6-bullseye as build

COPY . /src/loki
WORKDIR /src/loki
Expand Down
2 changes: 1 addition & 1 deletion clients/cmd/promtail/Dockerfile.arm32
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.20.3-bullseye as build
FROM golang:1.20.6-bullseye as build

COPY . /src/loki
WORKDIR /src/loki
Expand Down
4 changes: 2 additions & 2 deletions clients/cmd/promtail/Dockerfile.cross
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ARG BUILD_IMAGE=grafana/loki-build-image:0.28.1
ARG BUILD_IMAGE=grafana/loki-build-image:0.29.3-golangci.1.51.2
# 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.6-alpine as goenv
RUN go env GOARCH > /goarch && \
go env GOARM > /goarm

Expand Down
2 changes: 1 addition & 1 deletion clients/cmd/promtail/Dockerfile.debug
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file is intended to be called from the root like so:
# docker build -t grafana/promtail -f clients/cmd/promtail/Dockerfile.debug .

FROM grafana/loki-build-image:0.28.1 as build
FROM grafana/loki-build-image:0.29.3-golangci.1.51.2 as build
ARG GOARCH="amd64"
COPY . /src/loki
WORKDIR /src/loki
Expand Down
2 changes: 1 addition & 1 deletion cmd/logcli/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.20.3 as build
FROM golang:1.20.6 as build

COPY . /src/loki
WORKDIR /src/loki
Expand Down
2 changes: 1 addition & 1 deletion cmd/logql-analyzer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.20.3 as build
FROM golang:1.20.6 as build

COPY . /src/loki
WORKDIR /src/loki
Expand Down
2 changes: 1 addition & 1 deletion cmd/loki-canary/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.20.3 as build
FROM golang:1.20.6 as build

COPY . /src/loki
WORKDIR /src/loki
Expand Down
4 changes: 2 additions & 2 deletions cmd/loki-canary/Dockerfile.cross
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ARG BUILD_IMAGE=grafana/loki-build-image:0.28.1
ARG BUILD_IMAGE=grafana/loki-build-image:0.29.3-golangci.1.51.2
# 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.6-alpine as goenv
RUN go env GOARCH > /goarch && \
go env GOARM > /goarm

Expand Down
2 changes: 1 addition & 1 deletion cmd/loki/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.20.3 as build
FROM golang:1.20.6 as build

COPY . /src/loki
WORKDIR /src/loki
Expand Down
4 changes: 2 additions & 2 deletions cmd/loki/Dockerfile.cross
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ARG BUILD_IMAGE=grafana/loki-build-image:0.28.1
ARG BUILD_IMAGE=grafana/loki-build-image:0.29.3-golangci.1.51.2
# 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.6-alpine as goenv
RUN go env GOARCH > /goarch && \
go env GOARM > /goarm

Expand Down
3 changes: 2 additions & 1 deletion cmd/loki/Dockerfile.debug
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
ARG BUILD_IMAGE=grafana/loki-build-image:0.29.3-golangci.1.51.2
# 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.debug .

FROM golang:1.20.3-alpine as goenv
FROM golang:1.20.6-alpine as goenv
RUN go env GOARCH > /goarch && \
go env GOARM > /goarm && \
go install github.com/go-delve/delve/cmd/dlv@latest
Expand Down
2 changes: 1 addition & 1 deletion cmd/migrate/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.20.3 as build
FROM golang:1.20.6 as build
COPY . /src/loki
WORKDIR /src/loki
RUN make clean && make BUILD_IN_CONTAINER=false migrate
Expand Down
2 changes: 1 addition & 1 deletion cmd/querytee/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.20.3 as build
FROM golang:1.20.6 as build

COPY . /src/loki
WORKDIR /src/loki
Expand Down
4 changes: 2 additions & 2 deletions cmd/querytee/Dockerfile.cross
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ARG BUILD_IMAGE=grafana/loki-build-image:0.28.1
ARG BUILD_IMAGE=grafana/loki-build-image:0.29.3-golangci.1.51.2
# 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.6-alpine as goenv
RUN go env GOARCH > /goarch && \
go env GOARM > /goarm

Expand Down
18 changes: 9 additions & 9 deletions loki-build-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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.6-bullseye 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 && \
Expand Down Expand Up @@ -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.6-bullseye 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

Expand All @@ -47,32 +47,32 @@ RUN curl -L https://github.com/drone/drone-cli/releases/download/v1.4.0/drone_li
# Error:
# github.com/fatih/[email protected] requires golang.org/x/[email protected]
# (not golang.org/x/[email protected] from golang.org/x/tools/cmd/goyacc@58d531046acdc757f177387bc1725bfa79895d69)
FROM golang:1.20.3 as faillint
FROM golang:1.20.6-bullseye as faillint
RUN GO111MODULE=on go install github.com/fatih/[email protected]

FROM golang:1.20.3 as delve
FROM golang:1.20.6-bullseye 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.6-bullseye 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.6-bullseye as nfpm
RUN GO111MODULE=on go install github.com/goreleaser/nfpm/v2/cmd/[email protected]

# Install gotestsum
FROM golang:1.20.3 as gotestsum
FROM golang:1.20.6-bullseye as gotestsum
RUN GO111MODULE=on go install gotest.tools/[email protected]

# Install tools used to compile jsonnet.
FROM golang:1.20.3 as jsonnet
FROM golang:1.20.6-bullseye as jsonnet
RUN GO111MODULE=on go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/[email protected]
RUN GO111MODULE=on go install github.com/monitoring-mixins/mixtool/cmd/mixtool@bca3066
RUN GO111MODULE=on go install github.com/google/go-jsonnet/cmd/[email protected]

FROM golang:1.20.3-buster
FROM golang:1.20.6-bullseye
RUN apt-get update && \
apt-get install -qy \
musl gnupg ragel \
Expand Down
2 changes: 1 addition & 1 deletion operator/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.20.3 as builder
FROM golang:1.20.6 as builder

WORKDIR /workspace
# Copy the Go Modules manifests
Expand Down
Loading

0 comments on commit d819332

Please sign in to comment.