Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: enable windows for testing heartbeat #32937

Merged
merged 9 commits into from
Sep 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/check-libbeat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: check-libbeat

on:
pull_request:
paths:
- '.github/workflows/check-packetbeat.yml'
- 'libbeat/**'
- 'x-pack/libbeat/**'

env:
BEAT_MODULE: 'libbeat'

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Fetch Go version from .go-version
run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
- uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- name: Install libpcap-dev
run: sudo apt-get install -y libpcap-dev
- name: Run check/update
run: |
go install github.com/magefile/mage
make -C ${{ env.BEAT_MODULE }} check update
make check-no-changes
27 changes: 27 additions & 0 deletions .github/workflows/check-xpack-libbeat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: check-x-pack-libbeat

on:
pull_request:
paths:
- '.github/workflows/check-xpack-libbeat.yml'
- 'x-pack/libbeat/**'
- 'libbeat/**'

env:
BEAT_MODULE: 'x-pack/libbeat'

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Fetch Go version from .go-version
run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
- uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- name: Run check/update
run: |
go install github.com/magefile/mage
make -C ${{ env.BEAT_MODULE }} check update
make check-no-changes
2 changes: 2 additions & 0 deletions .github/workflows/opentelemetry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ on:
- check-dev-tools
- check-filebeat
- check-heartbeat
- check-libbeat
- check-metricbeat
- check-packetbeat
- check-winlogbeat
- check-x-pack-auditbeat
- check-x-pack-filebeat
- check-x-pack-functionbeat
- check-x-pack-heartbeat
- check-x-pack-libbeat
- check-x-pack-metricbeat
- check-x-pack-osquerybeat
- check-x-pack-packetbeat
Expand Down
434 changes: 0 additions & 434 deletions NOTICE.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/elastic/beats/v7

go 1.17
go 1.18

require (
cloud.google.com/go/bigquery v1.8.0
Expand Down
8 changes: 0 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,6 @@ github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee
github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
github.com/coreos/go-systemd v0.0.0-20161114122254-48702e0da86b/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8=
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk=
github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk=
Expand Down Expand Up @@ -598,9 +597,7 @@ github.com/elastic/elastic-agent-autodiscover v0.2.1 h1:Nbeayh3vq2FNm6xaFo34mhUd
github.com/elastic/elastic-agent-autodiscover v0.2.1/go.mod h1:gPnzzfdYNdgznAb+iG9eyyXaQXBbAMHa+Y6Z8hXfcGY=
github.com/elastic/elastic-agent-client/v7 v7.0.0-20210727140539-f0905d9377f6 h1:nFvXHBjYK3e9+xF0WKDeAKK4aOO51uC28s+L9rBmilo=
github.com/elastic/elastic-agent-client/v7 v7.0.0-20210727140539-f0905d9377f6/go.mod h1:uh/Gj9a0XEbYoM4NYz4LvaBVARz3QXLmlNjsrKY9fTc=
github.com/elastic/elastic-agent-libs v0.2.2/go.mod h1:1xDLBhIqBIjhJ7lr2s+xRFFkQHpitSp8q2zzv1Dqg+s=
github.com/elastic/elastic-agent-libs v0.2.5/go.mod h1:chO3rtcLyGlKi9S0iGVZhYCzDfdDsAQYBc+ui588AFE=
github.com/elastic/elastic-agent-libs v0.2.7/go.mod h1:chO3rtcLyGlKi9S0iGVZhYCzDfdDsAQYBc+ui588AFE=
github.com/elastic/elastic-agent-libs v0.2.11 h1:ZeYn35Kxt+IdtMPmE01TaDeaahCg/z7MkGPVWUo6Lp4=
github.com/elastic/elastic-agent-libs v0.2.11/go.mod h1:chO3rtcLyGlKi9S0iGVZhYCzDfdDsAQYBc+ui588AFE=
github.com/elastic/elastic-agent-shipper-client v0.4.0 h1:nsTJF9oo4RHLl+zxFUZqNHaE86C6Ba5aImfegcEf6Sk=
Expand Down Expand Up @@ -637,7 +634,6 @@ github.com/elastic/go-sysinfo v1.7.1/go.mod h1:i1ZYdU10oLNfRzq4vq62BEwD2fH8KaWh6
github.com/elastic/go-sysinfo v1.8.1 h1:4Yhj+HdV6WjbCRgGdZpPJ8lZQlXZLKDAeIkmQ/VRvi4=
github.com/elastic/go-sysinfo v1.8.1/go.mod h1:JfllUnzoQV/JRYymbH3dO1yggI3mV2oTKSXsDHM+uIM=
github.com/elastic/go-ucfg v0.7.0/go.mod h1:iaiY0NBIYeasNgycLyTvhJftQlQEUO2hpF+FX0JKxzo=
github.com/elastic/go-ucfg v0.8.4/go.mod h1:4E8mPOLSUV9hQ7sgLEJ4bvt0KhMuDJa8joDT2QGAEKA=
github.com/elastic/go-ucfg v0.8.5/go.mod h1:4E8mPOLSUV9hQ7sgLEJ4bvt0KhMuDJa8joDT2QGAEKA=
github.com/elastic/go-ucfg v0.8.6 h1:stUeyh2goTgGX+/wb9gzKvTv0YB0231LTpKUgCKj4U0=
github.com/elastic/go-ucfg v0.8.6/go.mod h1:4E8mPOLSUV9hQ7sgLEJ4bvt0KhMuDJa8joDT2QGAEKA=
Expand Down Expand Up @@ -1702,7 +1698,6 @@ github.com/uber/jaeger-client-go v2.29.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMW
github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U=
github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U=
github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc=
github.com/ugorji/go v1.1.8 h1:/D9x7IRpfMHDlizVOgxrag5Fh+/NY+LtI8bsr+AswRA=
github.com/ugorji/go v1.1.8/go.mod h1:0lNM99SwWUIRhCXnigEMClngXBk/EmpTXa7mgiewYWA=
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
github.com/ugorji/go/codec v1.1.8 h1:4dryPvxMP9OtkjIbuNeK2nb27M38XMHLGlfNSNph/5s=
Expand Down Expand Up @@ -2168,9 +2163,7 @@ golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220405052023-b1e9470b6e64/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 h1:WIoqL4EROvwiPdUtaip4VcDdpZ4kha7wBWZrbVKCIZg=
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
Expand Down Expand Up @@ -2585,7 +2578,6 @@ k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8
k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E=
k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8=
k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I=
k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y=
Expand Down
8 changes: 0 additions & 8 deletions libbeat/Jenkinsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,6 @@ when:
tags: true ## for all the tags
platform: "immutable && ubuntu-18" ## default label for all the stages
stages:
checks:
make: |
make -C libbeat check;
make -C libbeat update;
make -C x-pack/libbeat check;
make -C x-pack/libbeat update;
make check-no-changes;
stage: checks
arm:
mage: "mage build unitTest"
platforms: ## override default label in this specific stage.
Expand Down
58 changes: 30 additions & 28 deletions x-pack/heartbeat/Jenkinsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,34 +34,36 @@ stages:
- "macosTest"
tags: true ## for all the tags
stage: extended
# TODO: there are windows test failures already reported
# https://github.com/elastic/beats/issues/23957 and https://github.com/elastic/beats/issues/23958
# waiting for being fixed.
# windows-2019:
# mage: "mage build test"
# platforms: ## override default labels in this specific stage.
# - "windows-2019"
# stage: extended_win
# windows-2016:
# mage: "mage build test"
# platforms: ## override default labels in this specific stage.
# - "windows-2016"
# stage: mandatory
# windows-2012:
# mage: "mage build test"
# platforms: ## override default labels in this specific stage.
# - "windows-2012-r2"
# stage: extended_win
# windows-10:
# mage: "mage build test"
# platforms: ## override default labels in this specific stage.
# - "windows-10"
# stage: extended_win
# windows-8:
# mage: "mage build test"
# platforms: ## override default labels in this specific stage.
# - "windows-8"
# stage: extended_win
windows-2022:
mage: "mage build test"
platforms: ## override default labels in this specific stage.
- "windows-2022"
stage: mandatory
windows-2019:
mage: "mage build test"
platforms: ## override default labels in this specific stage.
- "windows-2019"
stage: extended_win
windows-2016:
mage: "mage build test"
platforms: ## override default labels in this specific stage.
- "windows-2016"
stage: mandatory
windows-2012:
mage: "mage build test"
platforms: ## override default labels in this specific stage.
- "windows-2012-r2"
stage: extended_win
windows-10:
mage: "mage build test"
platforms: ## override default labels in this specific stage.
- "windows-10"
stage: extended_win
windows-8:
mage: "mage build test"
platforms: ## override default labels in this specific stage.
- "windows-8"
stage: extended_win
packaging-linux:
packaging-linux: "mage package"
e2e:
Expand Down
12 changes: 12 additions & 0 deletions x-pack/heartbeat/import.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.

//go:build linux || darwin
// +build linux darwin

package main

import (
_ "github.com/elastic/beats/v7/x-pack/heartbeat/monitors/browser"
)
1 change: 0 additions & 1 deletion x-pack/heartbeat/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (

_ "github.com/elastic/beats/v7/heartbeat/include"
"github.com/elastic/beats/v7/x-pack/heartbeat/cmd"
_ "github.com/elastic/beats/v7/x-pack/heartbeat/monitors/browser"
)

func main() {
Expand Down
2 changes: 2 additions & 0 deletions x-pack/heartbeat/monitors/browser/browser.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.
//go:build linux || darwin
// +build linux darwin

package browser

Expand Down
3 changes: 3 additions & 0 deletions x-pack/heartbeat/monitors/browser/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.

//go:build linux || darwin
// +build linux darwin

package browser

import (
Expand Down
2 changes: 2 additions & 0 deletions x-pack/heartbeat/monitors/browser/config_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.
//go:build linux || darwin
// +build linux darwin

package browser

Expand Down
2 changes: 2 additions & 0 deletions x-pack/heartbeat/monitors/browser/project.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.
//go:build linux || darwin
// +build linux darwin

package browser

Expand Down
2 changes: 2 additions & 0 deletions x-pack/heartbeat/monitors/browser/project_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.
//go:build linux || darwin
// +build linux darwin

package browser

Expand Down
2 changes: 2 additions & 0 deletions x-pack/heartbeat/monitors/browser/source/inline.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.
//go:build linux || darwin
// +build linux darwin

package source

Expand Down
2 changes: 2 additions & 0 deletions x-pack/heartbeat/monitors/browser/source/inline_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.
//go:build linux || darwin
// +build linux darwin

package source

Expand Down
3 changes: 3 additions & 0 deletions x-pack/heartbeat/monitors/browser/source/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.

//go:build linux || darwin
// +build linux darwin

package source

import (
Expand Down
3 changes: 3 additions & 0 deletions x-pack/heartbeat/monitors/browser/source/local_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.

//go:build linux || darwin
// +build linux darwin

package source

import (
Expand Down
2 changes: 2 additions & 0 deletions x-pack/heartbeat/monitors/browser/source/offline.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.
//go:build linux || darwin
// +build linux darwin

package source

Expand Down
2 changes: 2 additions & 0 deletions x-pack/heartbeat/monitors/browser/source/project.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.
//go:build linux || darwin
// +build linux darwin

package source

Expand Down
2 changes: 2 additions & 0 deletions x-pack/heartbeat/monitors/browser/source/project_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.
//go:build linux || darwin
// +build linux darwin

package source

Expand Down
3 changes: 3 additions & 0 deletions x-pack/heartbeat/monitors/browser/source/source.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.

//go:build linux || darwin
// +build linux darwin

package source

import (
Expand Down
3 changes: 3 additions & 0 deletions x-pack/heartbeat/monitors/browser/source/source_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.

//go:build linux || darwin
// +build linux darwin

package source

import (
Expand Down
3 changes: 3 additions & 0 deletions x-pack/heartbeat/monitors/browser/source/validatepackage.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.

//go:build linux || darwin
// +build linux darwin

package source

import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.

//go:build linux || darwin
// +build linux darwin

package source

import (
Expand Down
3 changes: 3 additions & 0 deletions x-pack/heartbeat/monitors/browser/source/zipurl.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.

//go:build linux || darwin
// +build linux darwin

package source

import (
Expand Down
Loading