forked from elastic/beats
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into feature/module-at…
…-stage-level * upstream/master: (30 commits) Add a GRPC listener service for Agent (elastic#18827) Disable host.* fields by default for iptables module (elastic#18756) [WIP] Clarify capabilities of the Filebeat auditd module (elastic#17068) fix: rename file and remove extra separator (elastic#18881) ci: enable JJBB (elastic#18812) Disable host.* fields by default for Checkpoint module (elastic#18754) Disable host.* fields by default for Cisco module (elastic#18753) Update latest.yml testing env to 7.7.0 (elastic#18535) Upgrade k8s.io/client-go and k8s keystore tests (elastic#18817) Add missing Jenkins stages for Auditbeat (elastic#18835) [Elastic Log Driver] Create a config shim between libbeat and the user (elastic#18605) Use indexers and matchers in config when defaults are enabled (elastic#18818) Fix panic on `metricbeat test modules` (elastic#18797) [CI] Fix permissions in MacOSX agents (elastic#18847) [Ingest Manager] When not port are specified and the https is used fallback to 443 (elastic#18844) [Ingest Manager] Fix install service script for windows (elastic#18814) [Metricbeat] Fix getting compute instance metadata with partial zone/region config (elastic#18757) Improve error messages in s3 input (elastic#18824) Add memory metrics into compute googlecloud (elastic#18802) include bucket name when logging error (elastic#18679) ...
- Loading branch information
Showing
1,176 changed files
with
186,217 additions
and
63,455 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
#!/usr/bin/env groovy | ||
|
||
@Library('apm@current') _ | ||
|
||
pipeline { | ||
agent { label 'linux && immutable' } | ||
environment { | ||
REPO = 'beats' | ||
BASE_DIR = "src/github.com/elastic/${env.REPO}" | ||
DOCKER_REGISTRY = 'docker.elastic.co' | ||
DOCKER_REGISTRY_SECRET = 'secret/observability-team/ci/docker-registry/prod' | ||
GOPATH = "${env.WORKSPACE}" | ||
HOME = "${env.WORKSPACE}" | ||
JOB_GCS_BUCKET = credentials('gcs-bucket') | ||
NOTIFY_TO = credentials('notify-to') | ||
PATH = "${env.GOPATH}/bin:${env.PATH}" | ||
PIPELINE_LOG_LEVEL='INFO' | ||
} | ||
options { | ||
timeout(time: 1, unit: 'HOURS') | ||
buildDiscarder(logRotator(numToKeepStr: '20', artifactNumToKeepStr: '20')) | ||
timestamps() | ||
ansiColor('xterm') | ||
disableResume() | ||
durabilityHint('PERFORMANCE_OPTIMIZED') | ||
rateLimitBuilds(throttle: [count: 60, durationName: 'hour', userBoost: true]) | ||
quietPeriod(10) | ||
} | ||
triggers { | ||
cron 'H H(0-5) * * 1-5' | ||
} | ||
parameters { | ||
booleanParam(name: "RELEASE_TEST_IMAGES", defaultValue: "true", description: "If it's needed to build & push Beats' test images") | ||
} | ||
stages { | ||
stage('Checkout') { | ||
steps { | ||
dir("${BASE_DIR}"){ | ||
git("https://github.com/elastic/${REPO}.git") | ||
} | ||
script { | ||
dir("${BASE_DIR}"){ | ||
env.GO_VERSION = readFile(".go-version").trim() | ||
} | ||
} | ||
} | ||
} | ||
stage('Install dependencies') { | ||
when { | ||
expression { return params.RELEASE_TEST_IMAGES } | ||
} | ||
steps { | ||
sh(label: 'Install virtualenv', script: 'pip install --user virtualenv') | ||
} | ||
} | ||
stage('Release Beats Test Docker images'){ | ||
options { | ||
warnError('Release Beats Docker images failed') | ||
} | ||
when { | ||
expression { return params.RELEASE_TEST_IMAGES } | ||
} | ||
steps { | ||
dockerLogin(secret: "${env.DOCKER_REGISTRY_SECRET}", registry: "${env.DOCKER_REGISTRY}") | ||
retry(3){ | ||
sh(label: 'Build ', script: ".ci/scripts/build-beats-integrations-test-images.sh '${GO_VERSION}' '${HOME}/${BASE_DIR}/metricbeat'") | ||
} | ||
} | ||
} | ||
stage('Release X-Pack Beats Test Docker images'){ | ||
options { | ||
warnError('Release X-Pack Beats Docker images failed') | ||
} | ||
when { | ||
expression { return params.RELEASE_TEST_IMAGES } | ||
} | ||
steps { | ||
dockerLogin(secret: "${env.DOCKER_REGISTRY_SECRET}", registry: "${env.DOCKER_REGISTRY}") | ||
retry(3){ | ||
sh(label: 'Build ', script: ".ci/scripts/build-beats-integrations-test-images.sh '${GO_VERSION}' '${HOME}/${BASE_DIR}/x-pack/metricbeat'") | ||
} | ||
} | ||
} | ||
} | ||
post { | ||
cleanup { | ||
notifyBuildResult() | ||
} | ||
} | ||
} |
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,22 @@ | ||
--- | ||
- job: | ||
name: Beats/build-it-docker-images | ||
display-name: ITs Docker images | ||
description: Job to pre-build docker images used in integration tests. | ||
view: Beats | ||
project-type: pipeline | ||
pipeline-scm: | ||
script-path: .ci/build-docker-images.groovy | ||
scm: | ||
- git: | ||
url: [email protected]:elastic/beats.git | ||
refspec: +refs/heads/*:refs/remotes/origin/* +refs/pull/*/head:refs/remotes/origin/pr/* | ||
wipe-workspace: 'True' | ||
name: origin | ||
shallow-clone: true | ||
credentials-id: f6c7695a-671e-4f4f-a331-acdce44ff9ba | ||
reference-repo: /var/lib/jenkins/.git-references/beats.git | ||
branches: | ||
- 'master' | ||
triggers: | ||
- timed: 'H H(0-5) * * 1-5' |
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,20 @@ | ||
|
||
--- | ||
|
||
##### GLOBAL METADATA | ||
|
||
- meta: | ||
cluster: beats-ci | ||
|
||
##### JOB DEFAULTS | ||
|
||
- job: | ||
logrotate: | ||
numToKeep: 20 | ||
node: linux | ||
concurrent: true | ||
publishers: | ||
- email: | ||
recipients: [email protected] | ||
periodic-folder-trigger: 1w | ||
prune-dead-branches: true |
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,52 @@ | ||
#!/usr/bin/env bash | ||
set -exo pipefail | ||
|
||
# | ||
# Install the given go version using the gimme script. | ||
# | ||
# Parameters: | ||
# - GO_VERSION - that's the version which will be installed and enabled. | ||
# - METRICBEAT_DIR - that's the location of the metricbeat directory. | ||
# | ||
|
||
readonly GO_VERSION="${1?Please define the Go version to be used}" | ||
readonly METRICBEAT_DIR="${2?Please define the location of the Metricbeat directory}" | ||
|
||
function build_test_images() { | ||
local metricbeatDir="${1}" | ||
|
||
cd "${metricbeatDir}" | ||
mage compose:buildSupportedVersions | ||
} | ||
|
||
function install_go() { | ||
local goVersion="${1}" | ||
|
||
# Install Go using the same travis approach | ||
echo "Installing ${goVersion} with gimme." | ||
eval "$(curl -sL https://raw.githubusercontent.com/travis-ci/gimme/master/gimme | GIMME_GO_VERSION=${goVersion} bash)" | ||
} | ||
|
||
function install_mage() { | ||
local metricbeatDir="${1}" | ||
|
||
cd "${metricbeatDir}" | ||
make mage | ||
} | ||
|
||
function push_test_images() { | ||
local metricbeatDir="${1}" | ||
|
||
cd "${metricbeatDir}" | ||
mage compose:pushSupportedVersions | ||
} | ||
|
||
function main() { | ||
install_go "${GO_VERSION}" | ||
install_mage "${METRICBEAT_DIR}" | ||
|
||
build_test_images "${METRICBEAT_DIR}" | ||
push_test_images "${METRICBEAT_DIR}" | ||
} | ||
|
||
main "$@" |
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
Oops, something went wrong.