Skip to content

Commit

Permalink
Go 1.13 (#1089)
Browse files Browse the repository at this point in the history
Updated everything to 1.13

Signed-off-by: Joe Elliott <number101010@gmail.com>
  • Loading branch information
joe-elliott authored and rfratto committed Oct 1, 2019
1 parent 57e7a1c commit 9faa8bc
Show file tree
Hide file tree
Showing 73 changed files with 348 additions and 11,109 deletions.
27 changes: 6 additions & 21 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,24 @@ workflows:
jobs:
# publish jobs depend on this as well,
# thus tags need to be allowed for these
- lint: {filters: {<<: *tags}}
- test: {filters: {<<: *tags}}

- build/promtail-windows:
requires: [ lint, test ]
requires: [ test ]

- build/docker-driver:
requires: [ lint, test ]
requires: [ test ]
filters: {<<: *no-master}
- publish/docker-driver:
requires: [ lint, test ]
requires: [ test ]
filters: { <<: *tag-or-master }

- publish/binaries:
requires: [ lint, test ]
requires: [ test ]
filters: { <<: *only-tags }

- test-helm:
requires: [ lint, test ]
requires: [ test ]
filters: {<<: *tags}
- publish-helm:
requires: [ test-helm ]
Expand All @@ -48,7 +47,7 @@ workflows:
# https://circleci.com/blog/circleci-hacks-reuse-yaml-in-your-circleci-config-with-yaml/
.defaults: &defaults
docker:
- image: grafana/loki-build-image:0.6.0
- image: grafana/loki-build-image:0.7.2
working_directory: /src/loki

jobs:
Expand All @@ -60,20 +59,6 @@ jobs:
name: Unit Tests
command: make BUILD_IN_CONTAINER=false test

lint:
<<: *defaults
steps:
- checkout
- run:
name: Lint
command: make lint
- run:
name: Check Generated Files
command: make BUILD_IN_CONTAINER=false check-generated-files
- run:
name: Check Go Mod
command: make BUILD_IN_CONTAINER=false check-mod

# Promtail
build/promtail-windows:
<<: *defaults
Expand Down
10 changes: 5 additions & 5 deletions .drone/drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,27 @@ steps:
- make BUILD_IN_CONTAINER=false test
depends_on:
- clone
image: grafana/loki-build-image:0.6.0
image: grafana/loki-build-image:0.7.2
name: test
- commands:
- make BUILD_IN_CONTAINER=false lint
depends_on:
- clone
image: grafana/loki-build-image:0.6.0
image: grafana/loki-build-image:0.7.2
name: lint
- commands:
- make BUILD_IN_CONTAINER=false check-generated-files
depends_on:
- clone
image: grafana/loki-build-image:0.6.0
image: grafana/loki-build-image:0.7.2
name: check-generated-files
- commands:
- make BUILD_IN_CONTAINER=false check-mod
depends_on:
- clone
- test
- lint
image: grafana/loki-build-image:0.6.0
image: grafana/loki-build-image:0.7.2
name: check-mod
workspace:
base: /src
Expand Down Expand Up @@ -492,7 +492,7 @@ steps:
environment:
CIRCLE_TOKEN:
from_secret: circle_token
image: grafana/loki-build-image:0.6.0
image: grafana/loki-build-image:0.7.2
name: trigger
trigger:
ref:
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Please follow the [Loki Helm Chart](./production/helm/README.md).
### Dependency management

We uses [Go modules](https://golang.org/cmd/go/#hdr-Modules__module_versions__and_more) to manage dependencies on external packages.
This requires a working Go environment with version 1.12 or greater and git installed.
This requires a working Go environment with version 1.13 or greater and git installed.

To add or update a new dependency, use the `go get` command:

Expand Down
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ IMAGE_NAMES := $(foreach dir,$(DOCKER_IMAGE_DIRS),$(patsubst %,$(IMAGE_PREFIX)%,
# make BUILD_IN_CONTAINER=false target
# or you can override this with an environment variable
BUILD_IN_CONTAINER ?= true
BUILD_IMAGE_VERSION := 0.6.0
BUILD_IMAGE_VERSION := 0.7.2

# Docker image info
IMAGE_PREFIX ?= grafana
Expand Down Expand Up @@ -474,8 +474,15 @@ drone:

# support go modules
check-mod:
ifeq ($(BUILD_IN_CONTAINER),true)
$(SUDO) docker run $(RM) $(TTY) -i \
-v $(shell go env GOPATH)/pkg:/go/pkg \
-v $(shell pwd):/src/loki \
$(IMAGE_PREFIX)/loki-build-image:$(BUILD_IMAGE_VERSION) $@;
else
GO111MODULE=on GOPROXY=https://proxy.golang.org go mod download
GO111MODULE=on GOPROXY=https://proxy.golang.org go mod verify
GO111MODULE=on GOPROXY=https://proxy.golang.org go mod tidy
GO111MODULE=on GOPROXY=https://proxy.golang.org go mod vendor
endif
@git diff --exit-code -- go.sum go.mod vendor/
2 changes: 1 addition & 1 deletion 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.6.0
ARG BUILD_IMAGE=grafana/loki-build-image:0.7.2
# Directories in this file are referenced from the root of the project not this folder
# This file is intented to be called from the root like so:
# docker build -t grafana/loki -f cmd/loki/Dockerfile .
Expand Down
2 changes: 1 addition & 1 deletion cmd/fluent-bit/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.12 as build
FROM golang:1.13 as build
COPY . /src/loki
WORKDIR /src/loki
RUN make clean && make BUILD_IN_CONTAINER=false fluent-bit-plugin
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.12 as build
FROM golang:1.13 as build
COPY . /src/loki
WORKDIR /src/loki
RUN make clean && make BUILD_IN_CONTAINER=false loki-canary
Expand Down
2 changes: 1 addition & 1 deletion cmd/loki-canary/Dockerfile.cross
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BUILD_IMAGE=grafana/loki-build-image:latest
ARG BUILD_IMAGE=grafana/loki-build-image:0.7.2
# Directories in this file are referenced from the root of the project not this folder
# This file is intented to be called from the root like so:
# docker build -t grafana/promtail -f cmd/promtail/Dockerfile .
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.12 as build
FROM golang:1.13 as build
COPY . /src/loki
WORKDIR /src/loki
RUN make clean && make BUILD_IN_CONTAINER=false loki
Expand Down
2 changes: 1 addition & 1 deletion cmd/loki/Dockerfile.cross
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BUILD_IMAGE=grafana/loki-build-image:latest
ARG BUILD_IMAGE=grafana/loki-build-image:0.7.2
# Directories in this file are referenced from the root of the project not this folder
# This file is intented to be called from the root like so:
# docker build -t grafana/loki -f cmd/loki/Dockerfile .
Expand Down
2 changes: 1 addition & 1 deletion cmd/promtail/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.12 as build
FROM golang:1.13 as build
COPY . /src/loki
WORKDIR /src/loki
RUN apt-get update && apt-get install -qy libsystemd-dev
Expand Down
2 changes: 1 addition & 1 deletion cmd/promtail/Dockerfile.cross
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BUILD_IMAGE=grafana/loki-build-image:latest
ARG BUILD_IMAGE=grafana/loki-build-image:0.7.2
# Directories in this file are referenced from the root of the project not this folder
# This file is intented to be called from the root like so:
# docker build -t grafana/promtail -f cmd/promtail/Dockerfile .
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/grafana/loki

go 1.12
go 1.13

require (
cloud.google.com/go/bigtable v1.0.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions loki-build-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ RUN apk add --no-cache curl && \
FROM alpine as golangci
RUN apk add --no-cache curl && \
cd / && \
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s v1.17.1
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s v1.19.1

FROM alpine:edge as docker
RUN apk add --no-cache docker-cli

FROM golang:1.12.9-stretch
FROM golang:1.13.1-stretch
RUN apt-get update && \
apt-get install -qy \
musl \
Expand Down
2 changes: 1 addition & 1 deletion loki-build-image/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -eu

SRC_PATH=$GOPATH/src/github.com/grafana/loki
SRC_PATH=/src/loki

# If we run make directly, any files created on the bind mount
# will have awkward ownership. So we switch to a user with the
Expand Down
76 changes: 0 additions & 76 deletions vendor/github.com/google/btree/btree_mem.go

This file was deleted.

Loading

0 comments on commit 9faa8bc

Please sign in to comment.