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/ci-pipeli…
…ne-2.0 * upstream/master: (33 commits) Stop running agent container as root by default (elastic#21213) Stop running auditbeat container as root by default (elastic#21202) Fix autodiscover flaky tests (elastic#21242) [Ingest Manager] Enabled dev builds (elastic#21241) Fix librpm installation in auditbeat build (elastic#21239) Fix prometheus default config (elastic#21253) Fix dev guide test command (elastic#21254) Move aws lambda metricset to GA (elastic#21255) [Docs] Typo in table syntax (elastic#20227) [ECS] Adds related.hosts to capture all hostnames and host identifiers on an event. (elastic#21160) Add recursive split to httpjson (elastic#21214) [DOCS] Add beat specific start widgets (elastic#21217) Fix timestamp handling in remote_write (elastic#21166) Fix aws, azure and googlecloud compute dashboards (elastic#21098) Add acceptable event log keys to winlog (elastic#21205) Add elastic-agent to gitignore (elastic#21219) Add cloudfoundry tags to events (elastic#21177) [Ingest Manager] Agent includes pgp file (elastic#19480) Add compatibility note about ingress-controller-v0.34.1 (elastic#21209) [Ingest Manager] Support for UPGRADE_ACTION (elastic#21002) ...
- Loading branch information
Showing
280 changed files
with
13,118 additions
and
3,013 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,106 @@ | ||
#!/usr/bin/env groovy | ||
|
||
@Library('apm@current') _ | ||
|
||
pipeline { | ||
agent none | ||
environment { | ||
BASE_DIR = 'src/github.com/elastic/beats' | ||
PIPELINE_LOG_LEVEL = "INFO" | ||
BEATS_TESTER_JOB = 'Beats/beats-tester-mbp/master' | ||
} | ||
options { | ||
timeout(time: 1, unit: 'HOURS') | ||
buildDiscarder(logRotator(numToKeepStr: '20', artifactNumToKeepStr: '20', daysToKeepStr: '30')) | ||
timestamps() | ||
ansiColor('xterm') | ||
disableResume() | ||
durabilityHint('PERFORMANCE_OPTIMIZED') | ||
disableConcurrentBuilds() | ||
} | ||
triggers { | ||
issueCommentTrigger('(?i)^\\/beats-tester$') | ||
upstream("Beats/packaging/${env.JOB_BASE_NAME}") | ||
} | ||
stages { | ||
stage('Filter build') { | ||
agent { label 'ubuntu && immutable' } | ||
when { | ||
beforeAgent true | ||
anyOf { | ||
triggeredBy cause: "IssueCommentCause" | ||
expression { | ||
def ret = isUserTrigger() || isUpstreamTrigger() | ||
if(!ret){ | ||
currentBuild.result = 'NOT_BUILT' | ||
currentBuild.description = "The build has been skipped" | ||
currentBuild.displayName = "#${BUILD_NUMBER}-(Skipped)" | ||
echo("the build has been skipped due the trigger is a branch scan and the allow ones are manual, GitHub comment, and upstream job") | ||
} | ||
return ret | ||
} | ||
} | ||
} | ||
stages { | ||
stage('Checkout') { | ||
options { skipDefaultCheckout() } | ||
steps { | ||
deleteDir() | ||
gitCheckout(basedir: "${BASE_DIR}") | ||
setEnvVar('VERSION', sh(script: "grep ':stack-version:' ${BASE_DIR}/libbeat/docs/version.asciidoc | cut -d' ' -f2", returnStdout: true).trim()) | ||
} | ||
} | ||
stage('Build master') { | ||
options { skipDefaultCheckout() } | ||
when { branch 'master' } | ||
steps { | ||
runBeatsTesterJob(version: "${env.VERSION}-SNAPSHOT") | ||
} | ||
} | ||
stage('Build *.x branch') { | ||
options { skipDefaultCheckout() } | ||
when { branch '*.x' } | ||
steps { | ||
runBeatsTesterJob(version: "${env.VERSION}-SNAPSHOT") | ||
} | ||
} | ||
stage('Build PullRequest') { | ||
options { skipDefaultCheckout() } | ||
when { changeRequest() } | ||
steps { | ||
runBeatsTesterJob(version: "${env.VERSION}-SNAPSHOT", | ||
apm: "https://storage.googleapis.com/apm-ci-artifacts/jobs/pull-requests/pr-${env.CHANGE_ID}", | ||
beats: "https://storage.googleapis.com/beats-ci-artifacts/pull-requests/pr-${env.CHANGE_ID}") | ||
} | ||
} | ||
stage('Build release branch') { | ||
options { skipDefaultCheckout() } | ||
when { | ||
not { | ||
allOf { | ||
branch comparator: 'REGEXP', pattern: '(master|.*x)' | ||
changeRequest() | ||
} | ||
} | ||
} | ||
steps { | ||
runBeatsTesterJob(version: "${env.VERSION}-SNAPSHOT") | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
def runBeatsTesterJob(Map args = [:]) { | ||
if (args.apm && args.beats) { | ||
build(job: env.BEATS_TESTER_JOB, propagate: false, wait: false, | ||
parameters: [ | ||
string(name: 'APM_URL_BASE', value: args.apm), | ||
string(name: 'BEATS_URL_BASE', value: args.beats), | ||
string(name: 'VERSION', value: args.version) | ||
]) | ||
} else { | ||
build(job: env.BEATS_TESTER_JOB, propagate: false, wait: false, parameters: [ string(name: 'VERSION', value: args.version) ]) | ||
} | ||
} |
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,56 @@ | ||
--- | ||
- job: | ||
name: Beats/beats-tester | ||
display-name: Beats Tester | ||
description: Run the beats-tester | ||
view: Beats | ||
disabled: false | ||
project-type: multibranch | ||
script-path: .ci/beats-tester.groovy | ||
scm: | ||
- github: | ||
branch-discovery: 'no-pr' | ||
discover-pr-forks-strategy: 'merge-current' | ||
discover-pr-forks-trust: 'permission' | ||
discover-pr-origin: 'merge-current' | ||
discover-tags: true | ||
head-filter-regex: '(master|7\.([x9]|1\d+)|8\.\d+|PR-.*|v\d+\.\d+\.\d+)' | ||
disable-pr-notifications: true | ||
notification-context: 'beats-tester' | ||
repo: 'beats' | ||
repo-owner: 'elastic' | ||
credentials-id: github-app-beats-ci | ||
ssh-checkout: | ||
credentials: f6c7695a-671e-4f4f-a331-acdce44ff9ba | ||
build-strategies: | ||
- skip-initial-build: true | ||
- tags: | ||
ignore-tags-older-than: -1 | ||
ignore-tags-newer-than: 30 | ||
- named-branches: | ||
- exact-name: | ||
name: 'master' | ||
case-sensitive: true | ||
- regex-name: | ||
regex: '7\.([x9]|1\d+)' | ||
case-sensitive: true | ||
- regex-name: | ||
regex: '8\.\d+' | ||
case-sensitive: true | ||
- change-request: | ||
ignore-target-only-changes: true | ||
clean: | ||
after: true | ||
before: true | ||
prune: true | ||
shallow-clone: true | ||
depth: 3 | ||
do-not-fetch-tags: true | ||
submodule: | ||
disable: false | ||
recursive: true | ||
parent-credentials: true | ||
timeout: 100 | ||
timeout: '15' | ||
use-author: true | ||
wipe-workspace: 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
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
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
Oops, something went wrong.