Skip to content

Commit

Permalink
Merge remote-tracking branch 'influxdata/release-1.31' into remp
Browse files Browse the repository at this point in the history
# Conflicts:
#	.circleci/config.yml
#	.github/workflows/govulncheck.yml
#	.github/workflows/linter.yml
#	.github/workflows/readme-linter.yml
#	build_version.txt
#	cmd/telegraf/main.go
#	go.mod
#	logger/logger.go
#	plugins/aggregators/final/sample.conf
#	plugins/common/opcua/opcua_util.go
#	plugins/common/socket/stream.go
#	plugins/inputs/azure_monitor/azure_monitor_test.go
#	plugins/inputs/http/http.go
#	plugins/inputs/httpjson/httpjson.go
#	plugins/inputs/phpfpm/phpfpm.go
#	plugins/inputs/phpfpm/phpfpm_test.go
#	plugins/inputs/phpfpm/sample.conf
#	plugins/inputs/procstat/procstat.go
#	plugins/inputs/procstat/procstat_test.go
#	plugins/inputs/snmp/snmp.go
#	plugins/inputs/systemd_units/systemd_units.go
#	plugins/outputs/http/http.go
#	plugins/outputs/socket_writer/socket_writer.go
#	plugins/processors/reverse_dns/reverse_dns_test.go
#	plugins/processors/starlark/starlark_test.go
  • Loading branch information
rootpd committed Jun 19, 2024
2 parents 302dffd + fbfaba0 commit 7d8a914
Show file tree
Hide file tree
Showing 1,577 changed files with 60,240 additions and 24,246 deletions.
97 changes: 66 additions & 31 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ executors:
working_directory: '/go/src/github.com/influxdata/telegraf'
resource_class: large
docker:
- image: 'quay.io/influxdb/telegraf-ci:1.21.5'
- image: 'quay.io/influxdb/telegraf-ci:1.22.4'
environment:
GOFLAGS: -p=4
mac:
working_directory: '~/go/src/github.com/influxdata/telegraf'
resource_class: macos.m1.medium.gen1
macos:
xcode: 14.2.0
xcode: 15.4.0
environment:
HOMEBREW_NO_AUTO_UPDATE: 1
GOFLAGS: -p=4
Expand All @@ -42,6 +42,16 @@ commands:
equal: [ "386", << parameters.arch >> ]
steps:
- run: echo 'export RACE="-race"' >> $BASH_ENV
- when:
condition:
equal: [ windows, << parameters.os >> ]
steps:
- run: echo 'export CGO_ENABLED=1' >> $BASH_ENV
- when:
condition:
equal: [ darwin, << parameters.os >> ]
steps:
- run: echo 'export RACE="$RACE -ldflags=-extldflags=-Wl,-ld_classic"' >> $BASH_ENV
- run: |
GOARCH=<< parameters.arch >> ./<< parameters.gotestsum >> -- ${RACE} -short ./...
package-build:
Expand Down Expand Up @@ -88,29 +98,29 @@ jobs:
executor: telegraf-ci
steps:
- checkout
- check-changed-files-or-halt
- run: ./scripts/make_docs.sh
- check-changed-files-or-halt
- run: 'make deps'
- run: 'make tidy'
- run: 'make check'
- run: 'make check-deps'
- run:
name: "Install golangci-lint"
command: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.55.0
command: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.59.0
- run:
name: "Linux"
command: GOGC=20 /go/bin/golangci-lint run --verbose
name: "golangci-lint/Linux"
command: GOGC=80 GOMEMLIMIT=6656MiB /go/bin/golangci-lint run --verbose
lint-macos:
executor: telegraf-ci
steps:
- checkout
- check-changed-files-or-halt
- run:
name: "Install golangci-lint"
command: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.55.0
command: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.59.0
- run:
name: "macOS"
command: GOGC=20 GOOS=darwin /go/bin/golangci-lint run --verbose --timeout=30m
name: "golangci-lint/macOS"
command: GOGC=80 GOMEMLIMIT=6656MiB GOOS=darwin /go/bin/golangci-lint run --verbose --timeout=30m
no_output_timeout: 30m
lint-windows:
executor: telegraf-ci
Expand All @@ -119,10 +129,10 @@ jobs:
- check-changed-files-or-halt
- run:
name: "Install golangci-lint"
command: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.55.0
command: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.59.0
- run:
name: "Windows"
command: GOGC=20 GOOS=windows /go/bin/golangci-lint run --verbose --timeout=30m
name: "golangci-lint/Windows"
command: GOGC=80 GOMEMLIMIT=6656MiB GOOS=windows /go/bin/golangci-lint run --verbose --timeout=30m
no_output_timeout: 30m
test-go-linux:
executor: telegraf-ci
Expand Down Expand Up @@ -170,7 +180,8 @@ jobs:
- run: git config --system core.longpaths true
- run: choco feature enable -n allowGlobalConfirmation
- run: 'sh ./scripts/installgo_windows.sh'
- run: choco install mingw --version=12.2.0.03042023
- run: choco install mingw
- run: echo 'export PATH="$PATH:/c/ProgramData/mingw64/mingw64/bin"' >> $BASH_ENV
- test-go:
os: windows
gotestsum: "gotestsum.exe"
Expand Down Expand Up @@ -241,6 +252,16 @@ jobs:
- package-build:
type: riscv64
nightly: << parameters.nightly >>
loong64-package:
parameters:
nightly:
type: boolean
default: false
executor: telegraf-ci
steps:
- package-build:
type: loong64
nightly: << parameters.nightly >>
s390x-package:
parameters:
nightly:
Expand Down Expand Up @@ -345,7 +366,7 @@ jobs:
--acl public-read
docker-nightly:
machine:
image: ubuntu-2004:current
image: ubuntu-2204:current
steps:
- run:
name: login to quay.io
Expand All @@ -371,34 +392,30 @@ jobs:
docker push quay.io/influxdb/telegraf-nightly:alpine
amd64-package-test-nightly:
machine:
image: ubuntu-2004:current
image: ubuntu-2204:current
steps:
- checkout
- attach_workspace:
at: '.'
- run: sudo apt update && sudo apt install -y snapd
- run: sudo snap install lxd
- run: sudo lxd init --auto
- run: sudo usermod -a -G lxd $(whoami)
- run: cd tools/package_lxd_test && go build
- run: ./tools/package_lxd_test/package_lxd_test --package $(find ./dist -name "*_amd64.deb")
- run: ./tools/package_lxd_test/package_lxd_test --package $(find ./dist -name "*.x86_64.rpm")
- run: sh ./scripts/installgo_linux.sh
- run: ./scripts/install_incus.sh
- run: cd tools/package_incus_test && go build
- run: sudo ./tools/package_incus_test/package_incus_test --package $(find ./dist -name "*_amd64.deb")
- run: sudo ./tools/package_incus_test/package_incus_test --package $(find ./dist -name "*.x86_64.rpm")
package-sign-windows:
executor:
name: win/default
shell: powershell.exe
machine:
image: ubuntu-2204:current
resource_class: medium
steps:
- checkout
- check-changed-files-or-halt
- attach_workspace:
at: '/build'
at: '.'
- run:
name: "Sign Windows Executables"
shell: powershell.exe
command: |
./scripts/windows-signing.ps1
command: ./scripts/sign-windows.sh
- persist_to_workspace:
root: './build'
root: '.'
paths:
- 'dist'
package-sign-mac:
Expand Down Expand Up @@ -540,7 +557,7 @@ workflows:
only: /.*/
- 'windows-package':
requires:
- 'test-go-windows'
- 'test-go-linux'
filters:
tags:
only: /.*/
Expand Down Expand Up @@ -586,6 +603,15 @@ workflows:
- master
tags:
only: /.*/
- 'loong64-package':
requires:
- 'test-go-linux'
filters:
branches:
ignore:
- /.*/
tags:
only: /.*/
- 's390x-package':
requires:
- 'test-go-linux'
Expand Down Expand Up @@ -656,6 +682,7 @@ workflows:
- 'amd64-package'
- 'mipsel-package'
- 'mips-package'
- 'loong64-package'
- 'darwin-amd64-package'
- 'darwin-arm64-package'
- 'windows-package'
Expand Down Expand Up @@ -695,6 +722,7 @@ workflows:
- 'amd64-package'
- 'mipsel-package'
- 'mips-package'
- 'loong64-package'
- 'arm64-package'
- 'armhf-package'
- 'package-sign-mac'
Expand All @@ -716,6 +744,7 @@ workflows:
- 'arm64-package'
- 'armhf-package'
- 'riscv64-package'
- 'loong64-package'
- 'package-sign-mac'
- 'package-sign-windows'
- 'package-sign'
Expand Down Expand Up @@ -774,6 +803,11 @@ workflows:
nightly: true
requires:
- 'test-go-linux'
- 'loong64-package':
name: 'loong64-package-nightly'
nightly: true
requires:
- 'test-go-linux'
- 's390x-package':
name: 's390x-package-nightly'
nightly: true
Expand Down Expand Up @@ -827,6 +861,7 @@ workflows:
- 'i386-package-nightly'
- 'mips-package-nightly'
- 'mipsel-package-nightly'
- 'loong64-package-nightly'
- 'ppc64le-package-nightly'
- 'riscv64-package-nightly'
- 's390x-package-nightly'
Expand Down
12 changes: 11 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
labels:
- "dependencies"
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "weekly"
ignore:
# Dependabot isn't able to update this packages that do not match the source, so anything with a version
# Dependabot isn't able to update this packages that do not match the
# source, so anything with a version
- dependency-name: "*.v*"
labels:
- "dependencies"
19 changes: 0 additions & 19 deletions .github/workflows/govulncheck.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
# Run Linter against code base #
################################
- name: Lint Code Base
uses: github/super-linter@v5
uses: super-linter/super-linter@v6.5.1
env:
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: master
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/milestones.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: milestones
name: Milestones
on:
pull_request_target:
types:
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/pr-target-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Target Branch
on:
pull_request:
types:
- opened
- reopened
- synchronize
- edited

jobs:
check-target-master:
name: master
runs-on: ubuntu-latest
steps:
- name: debug
run: echo Target is ${{ github.event.pull_request.base.ref }}
- name: success
if: github.event.pull_request.base.ref == 'master'
run: exit 0
- name: error
if: github.event.pull_request.base.ref != 'master'
run: |
echo "Pull-request is not based on master, please rebase"
exit 1
4 changes: 3 additions & 1 deletion .github/workflows/readme-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v5
with:
go-version: '1.22.4'
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v41
uses: tj-actions/changed-files@v44
with:
base_sha: ${{ github.event.pull_request.base.sha }}
files: ./plugins/**/README.md
Expand Down
Loading

0 comments on commit 7d8a914

Please sign in to comment.