Skip to content

Commit 0ba6f3b

Browse files
committed
Merge remote-tracking branch 'upstream/master' into feature/windows-one-beats
* upstream/master: (35 commits) [ci] fix env variable name for xpack filebeats (elastic#19617) Cache error responses for cloudfoundry apps metadata (elastic#19181) ci: user fixed type of agent (elastic#19625) Input v2 cursor testing (elastic#19573) Update Jenkinsfile to not inspect removed vendor (elastic#19610) Fix ordering and duplicate configs on autodiscover (elastic#19317) Prepare input/file for changes in the registrar (elastic#19516) Cursor input and manager implementation (elastic#19571) [Filebeat] Fix tls mapping in suricata module (elastic#19494) [Ingest Manager] Make Agent beta and Constraints experimental (elastic#19586) Accept prefix as metric_types for stackdriver metricset in GCP (elastic#19345) Implement memlog store operations (elastic#19533) introduce journalbeat/pkg in order to provide reusable shared code (elastic#19581) Add descriptions to HAProxy fields in Metricbeat (elastic#19561) ci: apm-server-update trigered only on upstream, comments, and manual triggered (elastic#19590) ci: enable upstream triggering on the packaging job (elastic#19589) ci: some jjbb improvements (elastic#19588) [MetricBeat] set tags correctly if the dimension value is ARN (elastic#19433) [Filebeat] Add default_fields: false to fields.yml in aws module (elastic#19568) Add publisher implementation for stateful inputs (elastic#19530) ...
2 parents 1ee8f70 + 7e53933 commit 0ba6f3b

File tree

188 files changed

+8834
-4109
lines changed

Some content is hidden

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

188 files changed

+8834
-4109
lines changed

.ci/apm-beats-update.groovy

+51-47
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
@Library('apm@current') _
33

44
pipeline {
5-
agent { label 'linux && immutable' }
5+
agent none
66
environment {
77
REPO = 'apm-server'
88
BASE_DIR = "src/github.com/elastic/${env.REPO}"
@@ -27,63 +27,67 @@ pipeline {
2727
}
2828
triggers {
2929
issueCommentTrigger('(?i).*/run\\s+(?:apm-beats-update\\W+)?.*')
30+
upstream("Beats/beats-beats-mbp/${ env.JOB_BASE_NAME.startsWith('PR-') ? 'none' : env.JOB_BASE_NAME }")
3031
}
3132
stages {
32-
/**
33-
Checkout the code and stash it, to use it on other stages.
34-
*/
35-
stage('Checkout') {
36-
options { skipDefaultCheckout() }
37-
steps {
38-
deleteDir()
39-
gitCheckout(basedir: "${BEATS_DIR}", githubNotifyFirstTimeContributor: false)
40-
script {
41-
dir("${BEATS_DIR}"){
42-
env.GO_VERSION = readFile(".go-version").trim()
43-
def regexps =[
44-
"^devtools/mage.*",
45-
"^libbeat/scripts/Makefile",
46-
]
47-
env.BEATS_UPDATED = isGitRegionMatch(patterns: regexps)
48-
// Skip all the stages except docs for PR's with asciidoc changes only
49-
env.ONLY_DOCS = isGitRegionMatch(patterns: [ '.*\\.asciidoc' ], comparator: 'regexp', shouldMatchAll: true)
50-
}
51-
}
52-
}
53-
}
54-
/**
55-
updates beats updates the framework part and go parts of beats.
56-
Then build and test.
57-
Finally archive the results.
58-
*/
59-
stage('Update Beats') {
60-
options { skipDefaultCheckout() }
33+
stage('Filter build') {
34+
agent { label 'ubuntu && immutable' }
6135
when {
6236
beforeAgent true
63-
anyOf {
64-
branch 'master'
65-
branch "\\d+\\.\\d+"
66-
branch "v\\d?"
67-
tag "v\\d+\\.\\d+\\.\\d+*"
68-
allOf {
69-
expression { return env.BEATS_UPDATED != "false" || isCommentTrigger() }
70-
changeRequest()
37+
expression {
38+
return isCommentTrigger() || isUserTrigger()
39+
}
40+
}
41+
/**
42+
Checkout the code and stash it, to use it on other stages.
43+
*/
44+
stage('Checkout') {
45+
steps {
46+
deleteDir()
47+
gitCheckout(basedir: "${BEATS_DIR}", githubNotifyFirstTimeContributor: false)
48+
script {
49+
dir("${BEATS_DIR}"){
50+
env.GO_VERSION = readFile(".go-version").trim()
51+
def regexps =[
52+
"^devtools/mage.*",
53+
"^libbeat/scripts/Makefile",
54+
]
55+
env.BEATS_UPDATED = isGitRegionMatch(patterns: regexps)
56+
// Skip all the stages except docs for PR's with asciidoc changes only
57+
env.ONLY_DOCS = isGitRegionMatch(patterns: [ '.*\\.asciidoc' ], comparator: 'regexp', shouldMatchAll: true)
58+
}
7159
}
72-
7360
}
7461
}
75-
steps {
76-
withGithubNotify(context: 'Check Apm Server Beats Update') {
77-
beatsUpdate()
62+
/**
63+
updates beats updates the framework part and go parts of beats.
64+
Then build and test.
65+
Finally archive the results.
66+
*/
67+
stage('Update Beats') {
68+
options { skipDefaultCheckout() }
69+
when {
70+
beforeAgent true
71+
anyOf {
72+
branch 'master'
73+
branch "\\d+\\.\\d+"
74+
branch "v\\d?"
75+
tag "v\\d+\\.\\d+\\.\\d+*"
76+
allOf {
77+
expression { return env.BEATS_UPDATED != "false" || isCommentTrigger() }
78+
changeRequest()
79+
}
80+
81+
}
82+
}
83+
steps {
84+
withGithubNotify(context: 'Check Apm Server Beats Update') {
85+
beatsUpdate()
86+
}
7887
}
7988
}
8089
}
8190
}
82-
// post {
83-
// cleanup {
84-
// notifyBuildResult()
85-
// }
86-
// }
8791
}
8892

8993
def beatsUpdate() {

.ci/build-docker-images.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@Library('apm@current') _
44

55
pipeline {
6-
agent { label 'linux && immutable' }
6+
agent { label 'ubuntu-16 && immutable' }
77
environment {
88
REPO = 'beats'
99
BASE_DIR = "src/github.com/elastic/${env.REPO}"

.ci/jobs/apm-beats-update.yml

+3-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
view: Beats
66
concurrent: true
77
project-type: multibranch
8-
periodic-folder-trigger: 1w
98
prune-dead-branches: true
109
number-to-keep: 10
1110
days-to-keep: 30
@@ -19,20 +18,19 @@
1918
discover-pr-forks-trust: 'permission'
2019
discover-pr-origin: 'merge-current'
2120
discover-tags: true
21+
head-filter-regex: '(master|7\.[x789]|8\.\d+|PR-.*)'
2222
disable-pr-notifications: true
2323
notification-context: 'apm-beats-update'
24-
property-strategies:
25-
all-branches:
26-
- suppress-scm-triggering: true
2724
repo: 'beats'
2825
repo-owner: 'elastic'
2926
credentials-id: 2a9602aa-ab9f-4e52-baf3-b71ca88469c7-UserAndToken
3027
ssh-checkout:
3128
credentials: f6c7695a-671e-4f4f-a331-acdce44ff9ba
3229
build-strategies:
30+
- skip-initial-build: true
3331
- tags:
3432
ignore-tags-older-than: -1
35-
ignore-tags-newer-than: -1
33+
ignore-tags-newer-than: 30
3634
- named-branches:
3735
- exact-name:
3836
name: 'master'

.ci/jobs/beats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
view: Beats
77
concurrent: true
88
project-type: multibranch
9-
periodic-folder-trigger: 1w
109
prune-dead-branches: true
1110
number-to-keep: 10
1211
days-to-keep: 30
@@ -19,6 +18,7 @@
1918
discover-pr-forks-strategy: 'merge-current'
2019
discover-pr-forks-trust: 'permission'
2120
discover-pr-origin: 'merge-current'
21+
head-filter-regex: '(master|7\.[x789]|8\.\d+|PR-.*)'
2222
discover-tags: true
2323
notification-context: "beats-ci"
2424
property-strategies:

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
- git:
1717
url: [email protected]:elastic/beats.git
1818
refspec: +refs/heads/*:refs/remotes/origin/* +refs/pull/*/head:refs/remotes/origin/pr/*
19-
wipe-workspace: 'True'
19+
wipe-workspace: true
2020
name: origin
2121
shallow-clone: true
2222
credentials-id: f6c7695a-671e-4f4f-a331-acdce44ff9ba

.ci/jobs/defaults.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1+
22
---
33

44
##### GLOBAL METADATA
@@ -16,5 +16,4 @@
1616
publishers:
1717
- email:
1818
recipients: [email protected]
19-
periodic-folder-trigger: 1w
2019
prune-dead-branches: true

.ci/jobs/packaging.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,19 @@
1414
discover-pr-forks-trust: 'permission'
1515
discover-pr-origin: 'merge-current'
1616
discover-tags: true
17-
disable-pr-notifications: false
17+
head-filter-regex: '(master|7\.[x789]|8\.\d+|PR-.*)'
18+
disable-pr-notifications: true
1819
notification-context: 'beats-packaging'
1920
repo: 'beats'
2021
repo-owner: 'elastic'
2122
credentials-id: 2a9602aa-ab9f-4e52-baf3-b71ca88469c7-UserAndToken
2223
ssh-checkout:
2324
credentials: f6c7695a-671e-4f4f-a331-acdce44ff9ba
2425
build-strategies:
26+
- skip-initial-build: true
2527
- tags:
26-
ignore-tags-older-than: 30
27-
ignore-tags-newer-than: -1
28+
ignore-tags-older-than: -1
29+
ignore-tags-newer-than: 30
2830
- named-branches:
2931
- exact-name:
3032
name: 'master'

0 commit comments

Comments
 (0)