Skip to content

Commit

Permalink
Merge pull request #19 from radoondas/upgrade-7.5
Browse files Browse the repository at this point in the history
Upgrade to 7.5.1
  • Loading branch information
radoondas authored Dec 19, 2019
2 parents d824e7c + 55238a1 commit a60db88
Show file tree
Hide file tree
Showing 2,708 changed files with 398,959 additions and 28,095 deletions.
2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.12.9
1.12.12
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.12.9
- 1.12.12

os:
- linux
Expand Down
2 changes: 1 addition & 1 deletion glide.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package: github.com/radoondas/safecastbeat
import:
- package: github.com/elastic/beats
version: v7.4.2
version: v7.5.1
- package: github.com/magefile/mage
version: v1.8.0
108 changes: 44 additions & 64 deletions magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,54 +3,27 @@
package main

import (
"context"
"fmt"
"time"

"github.com/magefile/mage/mg"
"github.com/magefile/mage/sh"

devtools "github.com/elastic/beats/dev-tools/mage"

"github.com/elastic/beats/dev-tools/mage/target/build"
"github.com/elastic/beats/dev-tools/mage/target/common"
"github.com/elastic/beats/dev-tools/mage/target/pkg"
"github.com/elastic/beats/dev-tools/mage/target/unittest"
"github.com/elastic/beats/dev-tools/mage/target/update"

"github.com/magefile/mage/mg"
)

func init() {
devtools.SetBuildVariableSources(devtools.DefaultBeatBuildVariableSources)

devtools.BeatDescription = "One sentence description of the Beat."
devtools.BeatVendor = "Rado Ondas"
devtools.BeatProjectType = devtools.CommunityProject
}

// Build builds the Beat binary.
func Build() error {
return devtools.Build(devtools.DefaultBuildArgs())
}

// GolangCrossBuild build the Beat binary inside of the golang-builder.
// Do not use directly, use crossBuild instead.
func GolangCrossBuild() error {
return devtools.GolangCrossBuild(devtools.DefaultGolangCrossBuildArgs())
}

// BuildGoDaemon builds the go-daemon binary (use crossBuildGoDaemon).
func BuildGoDaemon() error {
return devtools.BuildGoDaemon()
}

// CrossBuild cross-builds the beat for all target platforms.
func CrossBuild() error {
return devtools.CrossBuild()
}

// CrossBuildGoDaemon cross-builds the go-daemon binary using Docker.
func CrossBuildGoDaemon() error {
return devtools.CrossBuildGoDaemon()
}

// Clean cleans all generated files and build artifacts.
func Clean() error {
return devtools.Clean()
devtools.BeatProjectType = devtools.CommunityProject
}

// Package packages the Beat for distribution.
Expand All @@ -62,43 +35,24 @@ func Package() {

devtools.UseCommunityBeatPackaging()

mg.Deps(Update)
mg.Deps(CrossBuild, CrossBuildGoDaemon)
mg.SerialDeps(devtools.Package, TestPackages)
}

// TestPackages tests the generated packages (i.e. file modes, owners, groups).
func TestPackages() error {
return devtools.TestPackages()
mg.Deps(update.Update)
mg.Deps(build.CrossBuild, build.CrossBuildGoDaemon)
mg.SerialDeps(devtools.Package, pkg.PackageTest)
}

// Update updates the generated files (aka make update).
func Update() error {
return sh.Run("make", "update")
// Config generates both the short/reference/docker configs.
func Config() error {
return devtools.Config(devtools.AllConfigTypes, devtools.ConfigFileParams{}, ".")
}

// Fields generates a fields.yml for the Beat.
//Fields generates a fields.yml for the Beat.
func Fields() error {
return devtools.GenerateFieldsYAML()
}

// GoTestUnit executes the Go unit tests.
// Use TEST_COVERAGE=true to enable code coverage profiling.
// Use RACE_DETECTOR=true to enable the race detector.
func GoTestUnit(ctx context.Context) error {
return devtools.GoTest(ctx, devtools.DefaultGoTestUnitArgs())
}

// GoTestIntegration executes the Go integration tests.
// Use TEST_COVERAGE=true to enable code coverage profiling.
// Use RACE_DETECTOR=true to enable the race detector.
func GoTestIntegration(ctx context.Context) error {
return devtools.GoTest(ctx, devtools.DefaultGoTestIntegrationArgs())
}

// Config generates both the short/reference/docker configs.
func Config() error {
return devtools.Config(devtools.AllConfigTypes, devtools.ConfigFileParams{}, ".")
// Clean cleans all generated files and build artifacts.
func Clean() error {
return devtools.Clean()
}

// Check formats code, updates generated content, check for common errors, and
Expand All @@ -111,3 +65,29 @@ func Check() {
func Fmt() {
common.Fmt()
}

// Test runs all available tests
func Test() {
mg.Deps(unittest.GoUnitTest)
}

// Build builds the Beat binary.
func Build() error {
return build.Build()
}

// CrossBuild cross-builds the beat for all target platforms.
func CrossBuild() error {
return build.CrossBuild()
}

// BuildGoDaemon builds the go-daemon binary (use crossBuildGoDaemon).
func BuildGoDaemon() error {
return build.BuildGoDaemon()
}

// GolangCrossBuild build the Beat binary inside of the golang-builder.
// Do not use directly, use crossBuild instead.
func GolangCrossBuild() error {
return build.GolangCrossBuild()
}
1 change: 1 addition & 0 deletions safecastbeat.docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ safecastbeat:
cafile: "/Users/rado/workspace/go/src/github.com/radoondas/safecastbeat/CALetsencrypt.pem"
processors:
- add_cloud_metadata: ~
- add_docker_metadata: ~

output.elasticsearch:
hosts: '${ELASTICSEARCH_HOSTS:elasticsearch:9200}'
Expand Down
13 changes: 11 additions & 2 deletions safecastbeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,7 @@ setup.template.settings:
#setup.ilm.enabled: auto

# Set the prefix used in the index lifecycle write alias name. The default alias
# name is 'safecastbeat-%{[agent.version]}'.
# name is 'safecastbeat-%{[agent.version]}'.
#setup.ilm.rollover_alias: "safecastbeat"

# Set the rollover index pattern. The default is "%{now/d}-000001".
Expand Down Expand Up @@ -1221,12 +1221,21 @@ logging.files:
# Defines if the HTTP endpoint is enabled.
#http.enabled: false

# The HTTP endpoint will bind to this hostname or IP address. It is recommended to use only localhost.
# The HTTP endpoint will bind to this hostname, IP address, unix socket or named pipe.
# When using IP addresses, it is recommended to only use localhost.
#http.host: localhost

# Port on which the HTTP endpoint will bind. Default is 5066.
#http.port: 5066

# Define which user should be owning the named pipe.
#http.named_pipe.user:

# Define which the permissions that should be applied to the named pipe, use the Security
# Descriptor Definition Language (SDDL) to define the permission. This option cannot be used with
# `http.user`.
#http.named_pipe.security_descriptor:

#============================= Process Security ================================

# Enable or disable seccomp system call filtering on Linux. Default is enabled.
Expand Down
1 change: 1 addition & 0 deletions safecastbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ output.elasticsearch:
processors:
- add_host_metadata: ~
- add_cloud_metadata: ~
- add_docker_metadata: ~

#================================ Logging =====================================

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 16 additions & 4 deletions vendor/github.com/elastic/beats/.travis.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a60db88

Please sign in to comment.