Skip to content

Commit

Permalink
Switch to go 1.7
Browse files Browse the repository at this point in the history
This also updates the OS X cross compiler used in pacakging to use the 10.11
SDK. Credit for figuring out what's needed goes to the upstream project
github.com/karalabe/xgo.
  • Loading branch information
Tudor Golubenco committed Aug 18, 2016
1 parent 2070dfe commit 968e4a1
Show file tree
Hide file tree
Showing 19 changed files with 37 additions and 32 deletions.
6 changes: 3 additions & 3 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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: >-
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ https://github.com/elastic/beats/compare/v5.0.0-alpha5...master[Check the HEAD d
- 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]
- Re-write import_dashboards.sh in Golang. {pull}2155[2155]
- Update to Go 1.7 {pull}2306[2306]

*Metricbeat*

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.6.2
FROM golang:1.7
MAINTAINER Nicolas Ruflin <ruflin@elastic.co>

RUN set -x && \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM tudorg/xgo-deb6-1.6
FROM tudorg/xgo-deb6-1.7

MAINTAINER Tudor Golubenco <tudor@elastic.co>

Expand Down
2 changes: 1 addition & 1 deletion dev-tools/packer/docker/xgo-image-deb6/build.sh
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -9,7 +9,7 @@ MAINTAINER Tudor Golubenco <tudor@elastic.co>

# 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_SHA1="b8318b09de06076d5397e6ec18ebef3b45cd315d" && \
export ROOT_DIST="https://storage.googleapis.com/golang/go1.7.linux-amd64.tar.gz" && \
export ROOT_DIST_SHA1="a744e29da97fc3aadad1ee0d7d89b0d899645e50" && \
\
$BOOTSTRAP_PURE
24 changes: 14 additions & 10 deletions dev-tools/packer/docker/xgo-image/base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,25 @@ RUN \
--no-install-recommends

# Configure the container for OSX cross compilation
ENV OSX_SDK_PATH https://github.com/trevd/android_platform_build2/raw/master/osxsdks10.6.tar.gz
ENV OSX_SDK MacOSX10.6.sdk
# Configure the container for OSX cross compilation
ENV OSX_SDK MacOSX10.11.sdk
ENV OSX_NDK_X86 /usr/local/osx-ndk-x86

RUN \
OSX_SDK_PATH=https://s3.dockerproject.org/darwin/v2/$OSX_SDK.tar.xz && \
$FETCH $OSX_SDK_PATH dd228a335194e3392f1904ce49aff1b1da26ca62 && \
\
git clone https://github.com/tpoechtrager/osxcross.git && \
mv `basename $OSX_SDK_PATH` /osxcross/tarballs/ && \
\
$FETCH $OSX_SDK_PATH f526b4ae9806e8d31e3b094e3f004f8f160a3fad

RUN \
tar -xzf `basename $OSX_SDK_PATH` --strip-components 1 SDKs/$OSX_SDK && \
tar -cjf /osxcross/tarballs/$OSX_SDK.tar.bz2 $OSX_SDK && \
rm -rf `basename $OSX_SDK_PATH` $OSX_SDK && \
sed -i -e 's|-march=native||g' /osxcross/build_clang.sh /osxcross/wrapper/build.sh && \
UNATTENDED=yes OSX_VERSION_MIN=10.6 /osxcross/build.sh && \
mv /osxcross/target $OSX_NDK_X86 && \
\
UNATTENDED=yes /osxcross/build.sh
ENV PATH /osxcross/target/bin:$PATH
rm -rf /osxcross

ADD patch.tar.xz $OSX_NDK_X86/SDK/$OSX_SDK/usr/include/c++
ENV PATH $OSX_NDK_X86/bin:$PATH


# Inject the Go package downloader and tool-chain bootstrapper
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion dev-tools/packer/docker/xgo-image/beats-builder/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM tudorg/xgo-1.6
FROM tudorg/xgo-1.7

MAINTAINER Tudor Golubenco <tudor@elastic.co>

Expand Down
2 changes: 1 addition & 1 deletion dev-tools/packer/docker/xgo-image/build.sh
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -9,7 +9,7 @@ MAINTAINER Tudor Golubenco <tudor@elastic.co>

# 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_SHA1="b8318b09de06076d5397e6ec18ebef3b45cd315d" && \
export ROOT_DIST="https://storage.googleapis.com/golang/go1.7.linux-amd64.tar.gz" && \
export ROOT_DIST_SHA1="a744e29da97fc3aadad1ee0d7d89b0d899645e50" && \
\
$BOOTSTRAP_PURE
2 changes: 1 addition & 1 deletion generate/beat/README.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion generate/beat/{{cookiecutter.beat}}/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion generate/metricbeat/metricset/README.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion libbeat/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Beats dockerfile used for testing
FROM golang:1.6
FROM golang:1.7
MAINTAINER Nicolas Ruflin <ruflin@elastic.co>

RUN set -x && \
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.6.2
FROM golang:1.7
MAINTAINER Nicolas Ruflin <ruflin@elastic.co>

RUN set -x && \
Expand Down
2 changes: 1 addition & 1 deletion packetbeat/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Beats dockerfile used for testing
FROM golang:1.6.2
FROM golang:1.7
MAINTAINER Nicolas Ruflin <ruflin@elastic.co>

RUN set -x && \
Expand Down

0 comments on commit 968e4a1

Please sign in to comment.