-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add functionbeat to the build process (#8639)
* This add beatless/functionbeat to the build processes and do the following changes: Use a custom packages.yml to only build some of the artifact. Each distribution also include a linux binary to be run on AWS lambda Some refactoring is done in the mage.go file to allow to specify a specs file more easily. Make sure that beatless is added to build/distributions/beatless * fix the issue with license on the fields.go * Adding minimal docs to satisfy DTD requirements and not fail the build
- Loading branch information
Showing
9 changed files
with
148 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
--- | ||
|
||
# This file contains the package specifications for Beatless. | ||
|
||
shared: | ||
- &common | ||
name: '{{.BeatName}}' | ||
service_name: '{{.BeatServiceName}}' | ||
os: '{{.GOOS}}' | ||
arch: '{{.PackageArch}}' | ||
vendor: '{{.BeatVendor}}' | ||
version: '{{ beat_version }}' | ||
license: '{{.BeatLicense}}' | ||
url: '{{.BeatURL}}' | ||
description: '{{.BeatDescription}}' | ||
|
||
- &binary_files | ||
'{{.BeatName}}{{.BinaryExt}}': | ||
source: build/golang-crossbuild/{{.BeatName}}-{{.GOOS}}-{{.Platform.Arch}}{{.BinaryExt}} | ||
mode: 0755 | ||
fields.yml: | ||
source: fields.yml | ||
mode: 0644 | ||
LICENSE.txt: | ||
source: '{{ repo.RootDir }}/LICENSE.txt' | ||
mode: 0644 | ||
NOTICE.txt: | ||
source: '{{ repo.RootDir }}/NOTICE.txt' | ||
mode: 0644 | ||
README.md: | ||
template: '{{ elastic_beats_dir }}/dev-tools/packaging/templates/common/README.md.tmpl' | ||
mode: 0644 | ||
.build_hash.txt: | ||
content: > | ||
{{ commit }} | ||
mode: 0644 | ||
'{{.BeatName}}.reference.yml': | ||
source: '{{.BeatName}}.reference.yml' | ||
mode: 0644 | ||
'{{.BeatName}}.yml': | ||
source: '{{.BeatName}}.yml' | ||
mode: 0600 | ||
config: true | ||
kibana: | ||
source: _meta/kibana.generated | ||
mode: 0644 | ||
|
||
# Binary package spec (tar.gz for linux/darwin) | ||
- &binary_spec | ||
<<: *common | ||
files: | ||
<<: *binary_files | ||
|
||
# | ||
# License modifiers for the Elastic License | ||
# | ||
- &elastic_license_for_binaries | ||
license: "Elastic License" | ||
files: | ||
LICENSE.txt: | ||
source: '{{ repo.RootDir }}/licenses/ELASTIC-LICENSE.txt' | ||
mode: 0644 | ||
# | ||
# Binaries used to run the function. | ||
# | ||
- &beatless_binaries | ||
files: | ||
pkg/beatless: | ||
source: 'build/golang-crossbuild/{{.BeatName}}-linux-amd64' | ||
mode: 0755 | ||
# specs is a list of named packaging "flavors". | ||
specs: | ||
beatless: | ||
### | ||
# Elastic Licensed Packages | ||
### | ||
- os: windows | ||
types: [zip] | ||
spec: | ||
<<: *binary_spec | ||
<<: *beatless_binaries | ||
<<: *elastic_license_for_binaries | ||
'{{.BeatName}}{{.BinaryExt}}': | ||
source: build/golang-crossbuild/{{.BeatName}}-{{.GOOS}}-{{.Platform.Arch}}{{.BinaryExt}} | ||
|
||
- os: darwin | ||
types: [tgz] | ||
spec: | ||
<<: *binary_spec | ||
<<: *beatless_binaries | ||
<<: *elastic_license_for_binaries | ||
|
||
- os: linux | ||
types: [tgz] | ||
spec: | ||
<<: *binary_spec | ||
<<: *beatless_binaries | ||
<<: *elastic_license_for_binaries | ||
files: | ||
'{{.BeatName}}{{.BinaryExt}}': | ||
source: build/golang-crossbuild/{{.BeatName}}-{{.GOOS}}-{{.Platform.Arch}}{{.BinaryExt}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,20 @@ | ||
= Beatless Docs | ||
= Beatless Reference | ||
|
||
Welcome to the Beatless documentation. | ||
include::../../../libbeat/docs/version.asciidoc[] | ||
|
||
include::{asciidoc-dir}/../../shared/attributes.asciidoc[] | ||
|
||
:version: {stack-version} | ||
:beatname_lc: beatless | ||
:beatname_uc: Beatless | ||
:beatname_pkg: {beatname_lc} | ||
:github_repo_name: beats | ||
:discuss_forum: beats/{beatname_lc} | ||
:beat_default_index_prefix: {beatname_lc} | ||
:has_ml_jobs: no | ||
|
||
|
||
include::../../../libbeat/docs/shared-beats-attributes.asciidoc[] | ||
|
||
include::./overview.asciidoc[] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[id="{beatname_lc}-overview"] | ||
== {beatname_uc} overview | ||
|
||
++++ | ||
<titleabbrev>Overview</titleabbrev> | ||
++++ | ||
|
||
{beatname_uc} is a lightweight shipper that you can install as a function on | ||
a serverless provider.For example, you can use {beatname_uc} to collect and | ||
centralize log events from the Cloudwatchlogs to your Elasticsearch cluster. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters