Skip to content

Commit fd04fee

Browse files
committed
Merge remote-tracking branch 'upstream/master' into feature/fix-warnings-archive
* upstream/master: (119 commits) Update filebeat input docs (elastic#19110) Add ECS fields from log pipeline of PostgreSQL (elastic#19127) Init package libbeat/statestore (elastic#19117) [Ingest Manager] Retryable downloads of beats (elastic#19102) [DOCS] Add output.console to Functionbeat doc and Functionbeat reference file (elastic#18965) Add compatibility info (elastic#18929) Set ecszap version to v0.2.0 (elastic#19106) [filebeat][httpjson] Fix unit test function call (elastic#19124) [Filebeat][httpjson] Adds oauth2 support for httpjson input (elastic#18892) Allow host.* fields to be disabled in Suricata module (elastic#19107) Make selector string casing configurable (elastic#18854) Switch the GRPC communication where Agent is running the server and the beats are connecting back to Agent (elastic#18973) Disable host.* fields by default for netflow module (elastic#19087) Automatically fill zube teams on backports if available (elastic#18924) Fix crash on vsphere module (elastic#19078) [Ingest Manager] Download snapshot artifacts from snapshots repo (elastic#18685) [Ingest Manager] Basic Elastic Agent documentation (elastic#19030) Make user.id a string in system/users, in line with ECS (elastic#19019) [docs] Add 7.8 release highlights placeholder file (elastic#18493) Fix translate_sid's empty target field handling (elastic#18991) ...
2 parents ee7f570 + 925b36e commit fd04fee

File tree

1,722 files changed

+224181
-76700
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,722 files changed

+224181
-76700
lines changed

.ci/build-docker-images.groovy

+110
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
#!/usr/bin/env groovy
2+
3+
@Library('apm@current') _
4+
5+
pipeline {
6+
agent { label 'linux && immutable' }
7+
environment {
8+
REPO = 'beats'
9+
BASE_DIR = "src/github.com/elastic/${env.REPO}"
10+
DOCKER_REGISTRY = 'docker.elastic.co'
11+
DOCKER_REGISTRY_SECRET = 'secret/observability-team/ci/docker-registry/prod'
12+
GOPATH = "${env.WORKSPACE}"
13+
HOME = "${env.WORKSPACE}"
14+
JOB_GCS_BUCKET = credentials('gcs-bucket')
15+
NOTIFY_TO = credentials('notify-to')
16+
PATH = "${env.GOPATH}/bin:${env.PATH}"
17+
PIPELINE_LOG_LEVEL='INFO'
18+
}
19+
options {
20+
timeout(time: 1, unit: 'HOURS')
21+
buildDiscarder(logRotator(numToKeepStr: '20', artifactNumToKeepStr: '20'))
22+
timestamps()
23+
ansiColor('xterm')
24+
disableResume()
25+
durabilityHint('PERFORMANCE_OPTIMIZED')
26+
rateLimitBuilds(throttle: [count: 60, durationName: 'hour', userBoost: true])
27+
quietPeriod(10)
28+
}
29+
triggers {
30+
cron 'H H(0-5) * * 1-5'
31+
}
32+
parameters {
33+
booleanParam(name: "RELEASE_TEST_IMAGES", defaultValue: "true", description: "If it's needed to build & push Beats' test images")
34+
}
35+
stages {
36+
stage('Checkout') {
37+
steps {
38+
dir("${BASE_DIR}"){
39+
git("https://github.com/elastic/${REPO}.git")
40+
}
41+
script {
42+
dir("${BASE_DIR}"){
43+
env.GO_VERSION = readFile(".go-version").trim()
44+
}
45+
}
46+
}
47+
}
48+
stage('Install dependencies') {
49+
when {
50+
expression { return params.RELEASE_TEST_IMAGES }
51+
}
52+
steps {
53+
sh(label: 'Install virtualenv', script: 'pip install --user virtualenv')
54+
}
55+
}
56+
stage('Metricbeat Test Docker images'){
57+
options {
58+
warnError('Metricbeat Test Docker images failed')
59+
}
60+
when {
61+
expression { return params.RELEASE_TEST_IMAGES }
62+
}
63+
steps {
64+
dockerLogin(secret: "${env.DOCKER_REGISTRY_SECRET}", registry: "${env.DOCKER_REGISTRY}")
65+
dir("${HOME}/${BASE_DIR}"){
66+
retry(3){
67+
sh(label: 'Build ', script: ".ci/scripts/build-beats-integrations-test-images.sh '${GO_VERSION}' '${HOME}/${BASE_DIR}/metricbeat'")
68+
}
69+
}
70+
}
71+
}
72+
stage('Metricbeat x-pack Test Docker images'){
73+
options {
74+
warnError('Metricbeat x-pack Docker images failed')
75+
}
76+
when {
77+
expression { return params.RELEASE_TEST_IMAGES }
78+
}
79+
steps {
80+
dockerLogin(secret: "${env.DOCKER_REGISTRY_SECRET}", registry: "${env.DOCKER_REGISTRY}")
81+
dir("${HOME}/${BASE_DIR}"){
82+
retry(3){
83+
sh(label: 'Build ', script: ".ci/scripts/build-beats-integrations-test-images.sh '${GO_VERSION}' '${HOME}/${BASE_DIR}/x-pack/metricbeat'")
84+
}
85+
}
86+
}
87+
}
88+
stage('Filebeat x-pack Test Docker images'){
89+
options {
90+
warnError('Filebeat x-pack Test Docker images failed')
91+
}
92+
when {
93+
expression { return params.RELEASE_TEST_IMAGES }
94+
}
95+
steps {
96+
dockerLogin(secret: "${env.DOCKER_REGISTRY_SECRET}", registry: "${env.DOCKER_REGISTRY}")
97+
dir("${HOME}/${BASE_DIR}"){
98+
retry(3){
99+
sh(label: 'Build ', script: ".ci/scripts/build-beats-integrations-test-images.sh '${GO_VERSION}' '${HOME}/${BASE_DIR}/x-pack/filebeat'")
100+
}
101+
}
102+
}
103+
}
104+
}
105+
post {
106+
cleanup {
107+
notifyBuildResult()
108+
}
109+
}
110+
}

.ci/jobs/beats-windows-mbp.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
- job:
3+
name: Beats/beats-windows-mbp
4+
display-name: Beats Pipeline for Windows
5+
description: Jenkins pipeline for the Beats project running on windows agents.
6+
view: Beats
7+
project-type: multibranch
8+
script-path: .ci/windows.groovy
9+
scm:
10+
- github:
11+
branch-discovery: no-pr
12+
discover-pr-forks-strategy: merge-current
13+
discover-pr-forks-trust: permission
14+
discover-pr-origin: merge-current
15+
discover-tags: false
16+
head-filter-regex: 'master'
17+
notification-context: 'beats-ci'
18+
repo: beats
19+
repo-owner: elastic
20+
credentials-id: 2a9602aa-ab9f-4e52-baf3-b71ca88469c7-UserAndToken
21+
ssh-checkout:
22+
credentials: f6c7695a-671e-4f4f-a331-acdce44ff9ba
23+
build-strategies:
24+
- tags:
25+
ignore-tags-older-than: -1
26+
ignore-tags-newer-than: -1
27+
- regular-branches: true
28+
- change-request:
29+
ignore-target-only-changes: false
30+
clean:
31+
after: true
32+
before: true
33+
prune: true
34+
shallow-clone: true
35+
depth: 4
36+
do-not-fetch-tags: true
37+
submodule:
38+
disable: false
39+
recursive: true
40+
parent-credentials: true
41+
timeout: 100
42+
timeout: '15'
43+
use-author: true
44+
wipe-workspace: 'True'

.ci/jobs/build-it-docker-images.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
- job:
3+
name: Beats/build-it-docker-images
4+
display-name: ITs Docker images
5+
description: Job to pre-build docker images used in integration tests.
6+
view: Beats
7+
project-type: pipeline
8+
pipeline-scm:
9+
script-path: .ci/build-docker-images.groovy
10+
scm:
11+
- git:
12+
url: [email protected]:elastic/beats.git
13+
refspec: +refs/heads/*:refs/remotes/origin/* +refs/pull/*/head:refs/remotes/origin/pr/*
14+
wipe-workspace: 'True'
15+
name: origin
16+
shallow-clone: true
17+
credentials-id: f6c7695a-671e-4f4f-a331-acdce44ff9ba
18+
reference-repo: /var/lib/jenkins/.git-references/beats.git
19+
branches:
20+
- 'master'
21+
triggers:
22+
- timed: 'H H(0-5) * * 1-5'

.ci/jobs/defaults.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
---
3+
4+
##### GLOBAL METADATA
5+
6+
- meta:
7+
cluster: beats-ci
8+
9+
##### JOB DEFAULTS
10+
11+
- job:
12+
logrotate:
13+
numToKeep: 20
14+
node: linux
15+
concurrent: true
16+
publishers:
17+
- email:
18+
recipients: [email protected]
19+
periodic-folder-trigger: 1w
20+
prune-dead-branches: true
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#!/usr/bin/env bash
2+
set -exo pipefail
3+
4+
#
5+
# Install the given go version using the gimme script.
6+
#
7+
# Parameters:
8+
# - GO_VERSION - that's the version which will be installed and enabled.
9+
# - BEAT_BASE_DIR - that's the base directory of the Beat.
10+
#
11+
12+
readonly GO_VERSION="${1?Please define the Go version to be used}"
13+
readonly BEAT_BASE_DIR="${2?Please define the location of the Beat directory}"
14+
15+
function build_test_images() {
16+
local baseDir="${1}"
17+
18+
cd "${baseDir}"
19+
mage compose:buildSupportedVersions
20+
}
21+
22+
function install_go() {
23+
local goVersion="${1}"
24+
25+
# Install Go using the same travis approach
26+
echo "Installing ${goVersion} with gimme."
27+
eval "$(curl -sL https://raw.githubusercontent.com/travis-ci/gimme/master/gimme | GIMME_GO_VERSION=${goVersion} bash)"
28+
}
29+
30+
function install_mage() {
31+
local baseDir="${1}"
32+
33+
cd "${baseDir}"
34+
make mage
35+
}
36+
37+
function push_test_images() {
38+
local baseDir="${1}"
39+
40+
cd "${baseDir}"
41+
mage compose:pushSupportedVersions
42+
}
43+
44+
function main() {
45+
install_go "${GO_VERSION}"
46+
install_mage "${BEAT_BASE_DIR}"
47+
48+
build_test_images "${BEAT_BASE_DIR}"
49+
push_test_images "${BEAT_BASE_DIR}"
50+
}
51+
52+
main "$@"

0 commit comments

Comments
 (0)