mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Upgrade Go to 1.19.1 (#54902)
* WIP * Set public_suffix to a pre Ruby 2.6 version * we don't need to install python * Stretch->Buster * Bump versions in lib.star * Manually update linter Sort of messy, but the .mod-file need to contain all dependencies that use 1.16+ features, otherwise they're assumed to be compiled with -lang=go1.16 and cannot access generics et al. Bingo doesn't seem to understand that, but it's possible to manually update things to get Bingo happy. * undo reformatting * Various lint improvements * More from the linter * goimports -w ./pkg/ * Disable gocritic * Add/modify linter exceptions * lint + flatten nested list Go 1.19 doesn't support nested lists, and there wasn't an obvious workaround. https://go.dev/doc/comment#lists
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# Use old Debian (this has support into 2022) in order to ensure binary compatibility with older glibc's.
|
||||
FROM debian:stretch-20210208 AS toolchain
|
||||
# Use old Debian (LTS into 2024) in order to ensure binary compatibility with older glibc's.
|
||||
FROM debian:buster-20220822 AS toolchain
|
||||
|
||||
ENV OSX_MIN=10.10 \
|
||||
CTNG=1.24.0 \
|
||||
@@ -99,13 +99,13 @@ RUN tar -xzvf dockerize-linux-amd64-v${DOCKERIZE_VERSION}.tar.gz -C /tmp/
|
||||
RUN rm dockerize-linux-amd64-v${DOCKERIZE_VERSION}.tar.gz
|
||||
|
||||
# Base image to crossbuild grafana.
|
||||
# Use old Debian (this has support into 2022) in order to ensure binary compatibility with older glibc's.
|
||||
FROM debian:stretch-20210208
|
||||
# Use old Debian (LTS into 2024) in order to ensure binary compatibility with older glibc's.
|
||||
FROM debian:buster-20220822
|
||||
|
||||
ENV GOVERSION=1.17.12 \
|
||||
ENV GOVERSION=1.19.1 \
|
||||
PATH=/usr/local/go/bin:$PATH \
|
||||
GOPATH=/go \
|
||||
NODEVERSION=16.14.0-1nodesource1 \
|
||||
NODEVERSION=16.17.0-1nodesource1 \
|
||||
YARNVERSION=1.22.19-1
|
||||
|
||||
# Use ARG so as not to persist environment variable in image
|
||||
@@ -126,7 +126,7 @@ RUN apt-get update && \
|
||||
gcc \
|
||||
g++ \
|
||||
git \
|
||||
jq \
|
||||
jq \
|
||||
make \
|
||||
rpm \
|
||||
xz-utils \
|
||||
@@ -136,8 +136,9 @@ RUN apt-get update && \
|
||||
ruby \
|
||||
ruby-dev \
|
||||
rubygems \
|
||||
unzip && \
|
||||
gem install -N fpm && \
|
||||
unzip && \
|
||||
gem install -N public_suffix -v 4.0.7 && \
|
||||
gem install --conservative -N fpm && \
|
||||
ln -s /usr/bin/llvm-dsymutil-6.0 /usr/bin/dsymutil && \
|
||||
curl -fsS https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
|
||||
curl -O https://deb.nodesource.com/node_16.x/pool/main/n/nodejs/nodejs_${NODEVERSION}_amd64.deb &&\
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
These are the sources for the Docker image that we use for the Grafana build containers. The image source itself
|
||||
is in Dockerfile, but there are supporting scripts such as the Makefile, for building images.
|
||||
|
||||
The image is based on Debian Stretch, since we want an older Linux distribution (Stretch has long-term support into 2022) to build binaries that are as portable as possible.
|
||||
The image is based on Debian Buster, since we want an older Linux distribution (Buster has long-term support into 2024) to build binaries that are as portable as possible.
|
||||
|
||||
## Build/Publish Docker Image
|
||||
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
load('scripts/drone/vault.star', 'from_secret', 'github_token', 'pull_secret', 'drone_token', 'prerelease_bucket')
|
||||
|
||||
grabpl_version = 'v3.0.6'
|
||||
build_image = 'grafana/build-container:1.5.9'
|
||||
build_image = 'grafana/build-container:1.6.1'
|
||||
publish_image = 'grafana/grafana-ci-deploy:1.3.3'
|
||||
deploy_docker_image = 'us.gcr.io/kubernetes-dev/drone/plugins/deploy-image'
|
||||
alpine_image = 'alpine:3.15.6'
|
||||
curl_image = 'byrnedo/alpine-curl:0.1.8'
|
||||
windows_image = 'mcr.microsoft.com/windows:1809'
|
||||
wix_image = 'grafana/ci-wix:0.1.1'
|
||||
go_image = 'golang:1.19.1'
|
||||
|
||||
disable_tests = False
|
||||
trigger_oss = {
|
||||
@@ -1251,7 +1252,7 @@ def compile_build_cmd(edition='oss'):
|
||||
dependencies = ['init-enterprise',]
|
||||
return {
|
||||
'name': 'compile-build-cmd',
|
||||
'image': 'golang:1.17',
|
||||
'image': go_image,
|
||||
'commands': [
|
||||
"go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd",
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user