Skip to content

Commit

Permalink
Test and build official packages with Go 1.12 (influxdata#5923)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielnelson authored May 30, 2019
1 parent dd6a3db commit 59d646a
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 17 deletions.
46 changes: 34 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@ defaults:
- image: 'quay.io/influxdb/telegraf-ci:1.10.8'
go-1_11: &go-1_11
docker:
- image: 'quay.io/influxdb/telegraf-ci:1.11.5'
- image: 'quay.io/influxdb/telegraf-ci:1.11.10'
go-1_12: &go-1_12
docker:
- image: 'quay.io/influxdb/telegraf-ci:1.12.5'

version: 2
jobs:
deps:
<<: [ *defaults, *go-1_11 ]
<<: [ *defaults, *go-1_12 ]
steps:
- checkout
- restore_cache:
Expand Down Expand Up @@ -55,16 +58,23 @@ jobs:
at: '/go/src'
- run: 'make check'
- run: 'make test'
test-go-1.11-386:
<<: [ *defaults, *go-1_11 ]
test-go-1.12:
<<: [ *defaults, *go-1_12 ]
steps:
- attach_workspace:
at: '/go/src'
- run: 'GOARCH=386 make check'
- run: 'GOARCH=386 make test'
test-go-1.12-386:
<<: [ *defaults, *go-1_12 ]
steps:
- attach_workspace:
at: '/go/src'
- run: 'GOARCH=386 make check'
- run: 'GOARCH=386 make test'

package:
<<: [ *defaults, *go-1_11 ]
<<: [ *defaults, *go-1_12 ]
steps:
- attach_workspace:
at: '/go/src'
Expand All @@ -73,7 +83,7 @@ jobs:
path: './build'
destination: 'build'
release:
<<: [ *defaults, *go-1_11 ]
<<: [ *defaults, *go-1_12 ]
steps:
- attach_workspace:
at: '/go/src'
Expand All @@ -82,7 +92,7 @@ jobs:
path: './build'
destination: 'build'
nightly:
<<: [ *defaults, *go-1_11 ]
<<: [ *defaults, *go-1_12 ]
steps:
- attach_workspace:
at: '/go/src'
Expand Down Expand Up @@ -117,7 +127,13 @@ workflows:
filters:
tags:
only: /.*/
- 'test-go-1.11-386':
- 'test-go-1.12':
requires:
- 'deps'
filters:
tags:
only: /.*/
- 'test-go-1.12-386':
requires:
- 'deps'
filters:
Expand All @@ -128,13 +144,15 @@ workflows:
- 'test-go-1.9'
- 'test-go-1.10'
- 'test-go-1.11'
- 'test-go-1.11-386'
- 'test-go-1.12'
- 'test-go-1.12-386'
- 'release':
requires:
- 'test-go-1.9'
- 'test-go-1.10'
- 'test-go-1.11'
- 'test-go-1.11-386'
- 'test-go-1.12'
- 'test-go-1.12-386'
filters:
tags:
only: /.*/
Expand All @@ -152,15 +170,19 @@ workflows:
- 'test-go-1.11':
requires:
- 'deps'
- 'test-go-1.11-386':
- 'test-go-1.12':
requires:
- 'deps'
- 'test-go-1.12-386':
requires:
- 'deps'
- 'nightly':
requires:
- 'test-go-1.9'
- 'test-go-1.10'
- 'test-go-1.11'
- 'test-go-1.11-386'
- 'test-go-1.12'
- 'test-go-1.12-386'
triggers:
- schedule:
cron: "0 7 * * *"
Expand Down
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,15 @@ plugin-%:
@echo "Starting dev environment for $${$(@)} input plugin..."
@docker-compose -f plugins/inputs/$${$(@)}/dev/docker-compose.yml up

.PHONY: ci-1.12
ci-1.11:
docker build -t quay.io/influxdb/telegraf-ci:1.12.5 - < scripts/ci-1.12.docker
docker push quay.io/influxdb/telegraf-ci:1.12.5

.PHONY: ci-1.11
ci-1.11:
docker build -t quay.io/influxdb/telegraf-ci:1.11.5 - < scripts/ci-1.11.docker
docker push quay.io/influxdb/telegraf-ci:1.11.5
docker build -t quay.io/influxdb/telegraf-ci:1.11.10 - < scripts/ci-1.11.docker
docker push quay.io/influxdb/telegraf-ci:1.11.10

.PHONY: ci-1.10
ci-1.10:
Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ platform: x64

install:
- IF NOT EXIST "C:\Cache" mkdir C:\Cache
- IF NOT EXIST "C:\Cache\go1.11.5.msi" curl -o "C:\Cache\go1.11.5.msi" https://storage.googleapis.com/golang/go1.11.5.windows-amd64.msi
- IF NOT EXIST "C:\Cache\go1.12.5.msi" curl -o "C:\Cache\go1.12.5.msi" https://storage.googleapis.com/golang/go1.12.5.windows-amd64.msi
- IF NOT EXIST "C:\Cache\gnuwin32-bin.zip" curl -o "C:\Cache\gnuwin32-bin.zip" https://dl.influxdata.com/telegraf/ci/make-3.81-bin.zip
- IF NOT EXIST "C:\Cache\gnuwin32-dep.zip" curl -o "C:\Cache\gnuwin32-dep.zip" https://dl.influxdata.com/telegraf/ci/make-3.81-dep.zip
- IF EXIST "C:\Go" rmdir /S /Q C:\Go
- msiexec.exe /i "C:\Cache\go1.11.5.msi" /quiet
- msiexec.exe /i "C:\Cache\go1.12.5.msi" /quiet
- 7z x "C:\Cache\gnuwin32-bin.zip" -oC:\GnuWin32 -y
- 7z x "C:\Cache\gnuwin32-dep.zip" -oC:\GnuWin32 -y
- go get -d github.com/golang/dep
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci-1.11.docker
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.11.5
FROM golang:1.11.10

RUN chmod -R 755 "$GOPATH"

Expand Down
28 changes: 28 additions & 0 deletions scripts/ci-1.12.docker
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM golang:1.12.5

RUN chmod -R 755 "$GOPATH"

RUN DEBIAN_FRONTEND=noninteractive \
apt update && apt install -y --no-install-recommends \
autoconf \
git \
libtool \
locales \
make \
python-boto \
rpm \
ruby \
ruby-dev \
zip && \
rm -rf /var/lib/apt/lists/*

RUN ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime
RUN locale-gen C.UTF-8 || true
ENV LANG=C.UTF-8

RUN gem install fpm

RUN go get -d github.com/golang/dep && \
cd src/github.com/golang/dep && \
git checkout -q v0.5.0 && \
go install -ldflags="-X main.version=v0.5.0" ./cmd/dep

0 comments on commit 59d646a

Please sign in to comment.