chore: stop testing with two versions of Go (#9909)

This commit is contained in:
Sebastian Spaink 2021-10-13 13:18:33 -05:00 committed by GitHub
parent 061b4094cd
commit b7988d83d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 68 deletions

View File

@ -4,12 +4,6 @@ orbs:
aws-cli: circleci/aws-cli@1.4.0
executors:
go-1_16:
working_directory: '/go/src/github.com/influxdata/telegraf'
docker:
- image: 'quay.io/influxdb/telegraf-ci:1.16.7'
environment:
GOFLAGS: -p=8
go-1_17:
working_directory: '/go/src/github.com/influxdata/telegraf'
docker:
@ -172,16 +166,6 @@ jobs:
root: '/go'
paths:
- '*'
test-go-1_16:
executor: go-1_16
steps:
- test-go
parallelism: 4
test-go-1_16-386:
executor: go-1_16
steps:
- test-go
parallelism: 4
test-go-1_17:
executor: go-1_17
steps:
@ -224,7 +208,7 @@ jobs:
- package-build:
type: i386
ppc64le-package:
executor: go-1_16
executor: go-1_17
steps:
- package-build:
type: ppc64le
@ -375,8 +359,6 @@ commonjobs:
- &test-awaiter
'test-awaiter':
requires:
- 'test-go-1_16'
- 'test-go-1_16-386'
- 'test-go-1_17'
- 'test-go-1_17-386'
- &windows-package
@ -436,18 +418,6 @@ workflows:
filters:
tags:
only: /.*/
- 'test-go-1_16':
requires:
- 'deps'
filters:
tags:
only: /.*/
- 'test-go-1_16-386':
requires:
- 'deps'
filters:
tags:
only: /.*/
- 'test-go-1_17':
requires:
- 'deps'
@ -525,8 +495,6 @@ workflows:
requires:
- 'test-go-windows'
- 'test-go-mac'
- 'test-go-1_16'
- 'test-go-1_16-386'
- 'test-go-1_17'
- 'test-go-1_17-386'
filters:
@ -550,12 +518,6 @@ workflows:
nightly:
jobs:
- 'deps'
- 'test-go-1_16':
requires:
- 'deps'
- 'test-go-1_16-386':
requires:
- 'deps'
- 'test-go-1_17':
requires:
- 'deps'

View File

@ -199,11 +199,6 @@ plugin-%:
@echo "Starting dev environment for $${$(@)} input plugin..."
@docker-compose -f plugins/inputs/$${$(@)}/dev/docker-compose.yml up
.PHONY: ci-1.16
ci-1.16:
docker build -t quay.io/influxdb/telegraf-ci:1.16.7 - < scripts/ci-1.16.docker
docker push quay.io/influxdb/telegraf-ci:1.16.7
.PHONY: ci-1.17
ci-1.17:
docker build -t quay.io/influxdb/telegraf-ci:1.17.0 - < scripts/ci-1.17.docker

View File

@ -2,7 +2,16 @@
Building the packages for Telegraf is automated using [Make](https://en.wikipedia.org/wiki/Make_(software)). Just running `make` will build a Telegraf binary for the operating system and architecture you are using (if it is supported). If you need to build a different package then you can run `make package` which will build all the supported packages. You will most likely only want a subset, you can define a subset of packages to be built by overriding the `include_packages` variable like so `make package include_packages="amd64.deb"`. You can also build all packages for a specific architecture like so `make package include_packages="$(make amd64)"`.
The packaging steps require certain tools to be setup before hand to work. These dependencies are listed in the ci-1.16.docker file which you can find in the scripts directory. Therefore it is recommended to use Docker to build the artifacts, see more details below.
The packaging steps require certain tools to be setup before hand to work. These dependencies are listed in the ci-1.17.docker file which you can find in the scripts directory. Therefore it is recommended to use Docker to build the artifacts, see more details below.
## Go Version
Telegraf will be built using the latest version of Go whenever possible. Incrementing the version is maintained by the core Telegraf team because it requires access to an internal docker repository that hosts the docker CI images. When a new version is released, the following process is followed:
1. Within the `Makefile` and `.circleci\config.yml` update the Go versions to the new version number
2. Run `make ci-<latest version>` where `<latest version>` refers to the new Go version number (this requires internal permissions)
3. The files `scripts\installgo_mac.sh` and `scripts\installgo_windows.sh` need to be updated as well with the new Go version and SHA
4. Create a pull request with these new changes, and verify the CI passes and uses the new docker image
## Package using Docker

View File

@ -1,23 +0,0 @@
FROM golang:1.16.7
RUN chmod -R 755 "$GOPATH"
RUN DEBIAN_FRONTEND=noninteractive \
apt update && apt install -y --no-install-recommends \
autoconf \
git \
libtool \
locales \
make \
awscli \
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