Skip to content

Commit

Permalink
[release-2.7.x] Update build image to go 1 20 1 and alpine 3 16 4 (#8575
Browse files Browse the repository at this point in the history
) (#8619)

Signed-off-by: Michel Hollands <[email protected]>
Signed-off-by: Christian Haudum <[email protected]>
Co-authored-by: Christian Haudum <[email protected]>
(cherry picked from commit 272ebde)

---------

Co-authored-by: Michel Hollands <[email protected]>
  • Loading branch information
DylanGuedes and MichelHollands authored Feb 24, 2023
1 parent aad37d1 commit afedb0a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 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.27.1',
local build_image_tag = '0.28.0',
workspace: {
base: '/src',
path: 'loki',
Expand Down
6 changes: 3 additions & 3 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.27.1
- 0.28.0
when:
event:
- pull_request
Expand All @@ -26,7 +26,7 @@ steps:
from_secret: docker_password
repo: grafana/loki-build-image
tags:
- 0.27.1
- 0.28.0
username:
from_secret: docker_username
when:
Expand Down Expand Up @@ -1648,6 +1648,6 @@ kind: secret
name: gpg_private_key
---
kind: signature
hmac: 9137902edcbe4b5cd0ada685ea9783902627be3762677e0b9d3b9b6d3c592d30
hmac: cce255c21677255be67371598ea23efb2459101124708f825d8228fd23fdcff4

...
26 changes: 13 additions & 13 deletions loki-build-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,40 @@
# 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.19.5 as helm
FROM golang:1.20.1 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 && \
mv /tmp/linux-amd64/helm /usr/bin/helm && \
rm -rf /tmp/linux-amd64 /tmp/helm-$HELM_VER.tgz
RUN GO111MODULE=on go install github.com/norwoodj/helm-docs/cmd/[email protected]

FROM alpine:3.16.2 as lychee
FROM alpine:3.16.4 as lychee
ARG LYCHEE_VER="0.7.0"
RUN apk add --no-cache curl && \
curl -L -o /tmp/lychee-$LYCHEE_VER.tgz https://github.com/lycheeverse/lychee/releases/download/${LYCHEE_VER}/lychee-${LYCHEE_VER}-x86_64-unknown-linux-gnu.tar.gz && \
tar -xz -C /tmp -f /tmp/lychee-$LYCHEE_VER.tgz && \
mv /tmp/lychee /usr/bin/lychee && \
rm -rf /tmp/linux-amd64 /tmp/lychee-$LYCHEE_VER.tgz

FROM alpine:3.16.2 as golangci
FROM alpine:3.16.4 as golangci
RUN apk add --no-cache curl && \
cd / && \
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.50.0

FROM alpine:3.16.2 as buf
FROM alpine:3.16.4 as buf

RUN apk add --no-cache curl && \
curl -sSL "https://github.com/bufbuild/buf/releases/download/v1.4.0/buf-$(uname -s)-$(uname -m)" -o "/usr/bin/buf" && \
chmod +x "/usr/bin/buf"

FROM alpine:3.16.2 as docker
FROM alpine:3.16.4 as docker
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.19.5 as drone
FROM golang:1.20.1 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.19.5 as faillint
FROM golang:1.20.1 as faillint
RUN GO111MODULE=on go install github.com/fatih/[email protected]

FROM golang:1.19.5 as delve
FROM golang:1.20.1 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.19.5 as ghr
FROM golang:1.20.1 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.19.5 as nfpm
FROM golang:1.20.1 as nfpm
RUN GO111MODULE=on go install github.com/goreleaser/nfpm/v2/cmd/[email protected]

# Install gotestsum
FROM golang:1.19.5 as gotestsum
FROM golang:1.20.1 as gotestsum
RUN GO111MODULE=on go install gotest.tools/[email protected]

# Install tools used to compile jsonnet.
FROM golang:1.19.5 as jsonnet
FROM golang:1.20.1 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.19.5-buster
FROM golang:1.20.1-buster
RUN apt-get update && \
apt-get install -qy \
musl gnupg ragel \
Expand Down

0 comments on commit afedb0a

Please sign in to comment.