From ca015ed5e626df280670a0fbb02dddcdfd23bad8 Mon Sep 17 00:00:00 2001 From: ruflin Date: Tue, 16 Aug 2016 13:23:24 +0200 Subject: [PATCH] Update to Golang 1.7 Closes https://github.com/elastic/beats/issues/2055 --- .appveyor.yml | 6 +++--- .travis.yml | 2 +- CHANGELOG.asciidoc | 1 + CONTRIBUTING.md | 2 +- Dockerfile | 2 +- .../packer/docker/xgo-image-deb6/beats-builder/Dockerfile | 2 +- dev-tools/packer/docker/xgo-image-deb6/build.sh | 2 +- .../docker/xgo-image-deb6/{go-1.6 => go-1.7}/Dockerfile | 4 ++-- dev-tools/packer/docker/xgo-image/beats-builder/Dockerfile | 2 +- dev-tools/packer/docker/xgo-image/build.sh | 2 +- .../packer/docker/xgo-image/{go-1.6 => go-1.7}/Dockerfile | 4 ++-- generate/beat/README.asciidoc | 2 +- generate/beat/{{cookiecutter.beat}}/.travis.yml | 2 +- generate/beat/{{cookiecutter.beat}}/README.md | 2 +- generate/metricbeat/metricset/README.asciidoc | 2 +- libbeat/Dockerfile | 2 +- metricbeat/Dockerfile | 2 +- packetbeat/Dockerfile | 2 +- 18 files changed, 22 insertions(+), 21 deletions(-) rename dev-tools/packer/docker/xgo-image-deb6/{go-1.6 => go-1.7}/Dockerfile (71%) rename dev-tools/packer/docker/xgo-image/{go-1.6 => go-1.7}/Dockerfile (71%) diff --git a/.appveyor.yml b/.appveyor.yml index 7dfeeb992ac2..155ee1101754 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -6,7 +6,7 @@ os: Windows Server 2012 R2 # Environment variables environment: - GOROOT: c:\go1.6.2 + GOROOT: c:\go1.7 GOPATH: c:\gopath PYWIN_DL: https://beats-files.s3.amazonaws.com/deps/pywin32-220.win32-py2.7.exe matrix: @@ -22,13 +22,13 @@ clone_folder: c:\gopath\src\github.com\elastic\beats cache: - C:\ProgramData\chocolatey\bin -> .appveyor.yml - C:\ProgramData\chocolatey\lib -> .appveyor.yml -- C:\go1.6.2 -> .appveyor.yml +- C:\go1.7 -> .appveyor.yml - C:\tools\mingw64 -> .appveyor.yml - C:\pywin_inst.exe -> .appveyor.yml # Scripts that run after cloning repository install: - - ps: c:\gopath\src\github.com\elastic\beats\libbeat\scripts\install-go.ps1 -version 1.6.2 + - ps: c:\gopath\src\github.com\elastic\beats\libbeat\scripts\install-go.ps1 -version 1.7 - set PATH=%GOROOT%\bin;%PATH% # AppVeyor installed mingw is 32-bit only. - ps: >- diff --git a/.travis.yml b/.travis.yml index a01bab4e653e..cb889244008b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ services: language: go go: - - 1.6.2 + - 1.7 # Make sure project can also be built on travis for clones of the repo go_import_path: github.com/elastic/beats diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 7dbfa4687593..fd74627d49bc 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -70,6 +70,7 @@ https://github.com/elastic/beats/compare/v5.0.0-alpha5...master[Check the HEAD d - Add kafka message timestamp if at least version 0.10 is configured. {pull}2190[2190] - Enhance contains condition to work on fields that are arrays of strings. {issue}2237[2237] - Lookup the configuration file relative to the `-path.config` CLI flag. {pull}2245[2245] +- Update build process to Golang 1.7 {pull}2055[2055] *Metricbeat* diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index acd81ae66927..8ef146538087 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -51,7 +51,7 @@ Beats](https://github.com/elastic/beats/blob/master/libbeat/docs/communitybeats. The Beats are Go programs, so install the latest version of [golang](http://golang.org/) if you don't have it already. The current Go version -used for development is Golang 1.6.2. +used for development is Golang 1.7. The location where you clone is important. Please clone under the source directory of your `GOPATH`. If you don't have `GOPATH` already set, you can diff --git a/Dockerfile b/Dockerfile index 81c13b2807f1..803e13b64b73 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.6.2 +FROM golang:1.7 MAINTAINER Nicolas Ruflin RUN set -x && \ diff --git a/dev-tools/packer/docker/xgo-image-deb6/beats-builder/Dockerfile b/dev-tools/packer/docker/xgo-image-deb6/beats-builder/Dockerfile index 4ab6e76dda08..9f387c6c71d8 100644 --- a/dev-tools/packer/docker/xgo-image-deb6/beats-builder/Dockerfile +++ b/dev-tools/packer/docker/xgo-image-deb6/beats-builder/Dockerfile @@ -1,4 +1,4 @@ -FROM tudorg/xgo-deb6-1.6 +FROM tudorg/xgo-deb6-1.7 MAINTAINER Tudor Golubenco diff --git a/dev-tools/packer/docker/xgo-image-deb6/build.sh b/dev-tools/packer/docker/xgo-image-deb6/build.sh index e0b0b86fe7d9..3eedf359586c 100755 --- a/dev-tools/packer/docker/xgo-image-deb6/build.sh +++ b/dev-tools/packer/docker/xgo-image-deb6/build.sh @@ -1,5 +1,5 @@ #!/bin/sh docker build --rm=true -t tudorg/xgo-deb6-base base/ && \ - docker build --rm=true -t tudorg/xgo-deb6-1.6 go-1.6/ && + docker build --rm=true -t tudorg/xgo-deb6-1.7 go-1.7/ && docker build --rm=true -t tudorg/beats-builder-deb6 beats-builder diff --git a/dev-tools/packer/docker/xgo-image-deb6/go-1.6/Dockerfile b/dev-tools/packer/docker/xgo-image-deb6/go-1.7/Dockerfile similarity index 71% rename from dev-tools/packer/docker/xgo-image-deb6/go-1.6/Dockerfile rename to dev-tools/packer/docker/xgo-image-deb6/go-1.7/Dockerfile index df00ff6c38be..d6a5186cea97 100644 --- a/dev-tools/packer/docker/xgo-image-deb6/go-1.6/Dockerfile +++ b/dev-tools/packer/docker/xgo-image-deb6/go-1.7/Dockerfile @@ -1,4 +1,4 @@ -# Go cross compiler (xgo): Go 1.6 layer +# Go cross compiler (xgo): Go 1.7 layer # Copyright (c) 2014 Péter Szilágyi. All rights reserved. # # Released under the MIT license. @@ -9,7 +9,7 @@ MAINTAINER Tudor Golubenco # Configure the root Go distribution and bootstrap based on it RUN \ - export ROOT_DIST="https://storage.googleapis.com/golang/go1.6.2.linux-amd64.tar.gz" && \ + export ROOT_DIST="https://storage.googleapis.com/golang/go1.7.linux-amd64.tar.gz" && \ export ROOT_DIST_SHA1="b8318b09de06076d5397e6ec18ebef3b45cd315d" && \ \ $BOOTSTRAP_PURE diff --git a/dev-tools/packer/docker/xgo-image/beats-builder/Dockerfile b/dev-tools/packer/docker/xgo-image/beats-builder/Dockerfile index 39c74cf180d6..c3543e4196da 100644 --- a/dev-tools/packer/docker/xgo-image/beats-builder/Dockerfile +++ b/dev-tools/packer/docker/xgo-image/beats-builder/Dockerfile @@ -1,4 +1,4 @@ -FROM tudorg/xgo-1.6 +FROM tudorg/xgo-1.7 MAINTAINER Tudor Golubenco diff --git a/dev-tools/packer/docker/xgo-image/build.sh b/dev-tools/packer/docker/xgo-image/build.sh index 2827b659c7f9..d6a6dbad07aa 100755 --- a/dev-tools/packer/docker/xgo-image/build.sh +++ b/dev-tools/packer/docker/xgo-image/build.sh @@ -1,5 +1,5 @@ #!/bin/sh docker build --rm=true -t tudorg/xgo-base base/ && \ - docker build --rm=true -t tudorg/xgo-1.6 go-1.6/ && + docker build --rm=true -t tudorg/xgo-1.7 go-1.7/ && docker build --rm=true -t tudorg/beats-builder beats-builder diff --git a/dev-tools/packer/docker/xgo-image/go-1.6/Dockerfile b/dev-tools/packer/docker/xgo-image/go-1.7/Dockerfile similarity index 71% rename from dev-tools/packer/docker/xgo-image/go-1.6/Dockerfile rename to dev-tools/packer/docker/xgo-image/go-1.7/Dockerfile index 1d6e057ba1a5..a64df9031cc5 100644 --- a/dev-tools/packer/docker/xgo-image/go-1.6/Dockerfile +++ b/dev-tools/packer/docker/xgo-image/go-1.7/Dockerfile @@ -1,4 +1,4 @@ -# Go cross compiler (xgo): Go 1.6 layer +# Go cross compiler (xgo): Go 1.7 layer # Copyright (c) 2014 Péter Szilágyi. All rights reserved. # # Released under the MIT license. @@ -9,7 +9,7 @@ MAINTAINER Tudor Golubenco # Configure the root Go distribution and bootstrap based on it RUN \ - export ROOT_DIST="https://storage.googleapis.com/golang/go1.6.2.linux-amd64.tar.gz" && \ + export ROOT_DIST="https://storage.googleapis.com/golang/go1.7.linux-amd64.tar.gz" && \ export ROOT_DIST_SHA1="b8318b09de06076d5397e6ec18ebef3b45cd315d" && \ \ $BOOTSTRAP_PURE diff --git a/generate/beat/README.asciidoc b/generate/beat/README.asciidoc index 6af210dcfaec..b129a662ade8 100644 --- a/generate/beat/README.asciidoc +++ b/generate/beat/README.asciidoc @@ -6,7 +6,7 @@ The Beat generator enables you to create your own Beat in a few steps. [float] === Requirements -To create your own Beat, you must have Golang 1.6.2 or later installed, and the `$GOPATH` +To create your own Beat, you must have Golang 1.7 or later installed, and the `$GOPATH` must be set up correctly. In addition, the following tools are quired: * https://www.python.org/downloads/[python] diff --git a/generate/beat/{{cookiecutter.beat}}/.travis.yml b/generate/beat/{{cookiecutter.beat}}/.travis.yml index 1bf1abd5ee07..aa7685481528 100644 --- a/generate/beat/{{cookiecutter.beat}}/.travis.yml +++ b/generate/beat/{{cookiecutter.beat}}/.travis.yml @@ -6,7 +6,7 @@ services: language: go go: - - 1.6 + - 1.7 os: - linux diff --git a/generate/beat/{{cookiecutter.beat}}/README.md b/generate/beat/{{cookiecutter.beat}}/README.md index e9082ab98fc7..1dab8b025a49 100644 --- a/generate/beat/{{cookiecutter.beat}}/README.md +++ b/generate/beat/{{cookiecutter.beat}}/README.md @@ -9,7 +9,7 @@ Ensure that this folder is at the following location: ### Requirements -* [Golang](https://golang.org/dl/) 1.6.2 +* [Golang](https://golang.org/dl/) 1.7 ### Init Project To get running with {{cookiecutter.beat|capitalize}} and also install the diff --git a/generate/metricbeat/metricset/README.asciidoc b/generate/metricbeat/metricset/README.asciidoc index 63260a208c3d..223084895eae 100644 --- a/generate/metricbeat/metricset/README.asciidoc +++ b/generate/metricbeat/metricset/README.asciidoc @@ -7,7 +7,7 @@ own metricsets. [float] === Requirements -To create your own Beat, you must have Golang 1.6.2 or later installed, and the `$GOPATH` +To create your own Beat, you must have Golang 1.7 or later installed, and the `$GOPATH` must be set up correctly. In addition, the following tools are quired: * https://www.python.org/downloads/[python] diff --git a/libbeat/Dockerfile b/libbeat/Dockerfile index dff3f2ee56e7..e04b11fe3145 100644 --- a/libbeat/Dockerfile +++ b/libbeat/Dockerfile @@ -1,5 +1,5 @@ # Beats dockerfile used for testing -FROM golang:1.6 +FROM golang:1.7 MAINTAINER Nicolas Ruflin RUN set -x && \ diff --git a/metricbeat/Dockerfile b/metricbeat/Dockerfile index fc3feaa72dbd..3f7c454ad98d 100644 --- a/metricbeat/Dockerfile +++ b/metricbeat/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.6.2 +FROM golang:1.7 MAINTAINER Nicolas Ruflin RUN set -x && \ diff --git a/packetbeat/Dockerfile b/packetbeat/Dockerfile index 8549dc80fe7b..adaf0c211936 100644 --- a/packetbeat/Dockerfile +++ b/packetbeat/Dockerfile @@ -1,5 +1,5 @@ # Beats dockerfile used for testing -FROM golang:1.6.2 +FROM golang:1.7 MAINTAINER Nicolas Ruflin RUN set -x && \