Skip to content

Commit ab1319e

Browse files
Merge branch 'master' into vars-in-sub-expressions-tests
2 parents a44c8a1 + 3709de6 commit ab1319e

3,131 files changed

Lines changed: 77027 additions & 45747 deletions

File tree

Some content is hidden

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

.backportrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"targetBranchChoices": [
44
{ "name": "master", "checked": true },
55
{ "name": "7.x", "checked": true },
6+
"7.9",
67
"7.8",
78
"7.7",
89
"7.6",
@@ -26,7 +27,7 @@
2627
"targetPRLabels": ["backport"],
2728
"branchLabelMapping": {
2829
"^v8.0.0$": "master",
29-
"^v7.9.0$": "7.x",
30+
"^v7.10.0$": "7.x",
3031
"^v(\\d+).(\\d+).\\d+$": "$1.$2"
3132
}
3233
}

.browserslistrc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
[production]
2-
last 2 versions
3-
> 5%
4-
Safari 7 # for PhantomJS support: https://github.com/elastic/kibana/issues/27136
2+
last 2 Firefox versions
3+
last 2 Chrome versions
4+
last 2 Safari versions
5+
> 0.25%
6+
not ie 11
57

68
[dev]
79
last 1 chrome versions

.ci/Jenkinsfile_baseline_capture

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/groovy
2+
3+
library 'kibana-pipeline-library'
4+
kibanaLibrary.load()
5+
6+
kibanaPipeline(timeoutMinutes: 120) {
7+
githubCommitStatus.trackBuild(params.commit, 'kibana-ci-baseline') {
8+
ciStats.trackBuild {
9+
catchError {
10+
parallel([
11+
'oss-visualRegression': {
12+
workers.ci(name: 'oss-visualRegression', size: 's-highmem', ramDisk: true) {
13+
kibanaPipeline.functionalTestProcess('oss-visualRegression', './test/scripts/jenkins_visual_regression.sh')(1)
14+
}
15+
},
16+
'xpack-visualRegression': {
17+
workers.ci(name: 'xpack-visualRegression', size: 's-highmem', ramDisk: true) {
18+
kibanaPipeline.functionalTestProcess('xpack-visualRegression', './test/scripts/jenkins_xpack_visual_regression.sh')(1)
19+
}
20+
},
21+
])
22+
}
23+
24+
kibanaPipeline.sendMail()
25+
slackNotifications.onFailure()
26+
}
27+
}
28+
}

.ci/Jenkinsfile_baseline_trigger

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
#!/bin/groovy
2+
3+
def MAXIMUM_COMMITS_TO_CHECK = 10
4+
def MAXIMUM_COMMITS_TO_BUILD = 5
5+
6+
if (!params.branches_yaml) {
7+
error "'branches_yaml' parameter must be specified"
8+
}
9+
10+
def additionalBranches = []
11+
12+
def branches = readYaml(text: params.branches_yaml) + additionalBranches
13+
14+
library 'kibana-pipeline-library'
15+
kibanaLibrary.load()
16+
17+
withGithubCredentials {
18+
branches.each { branch ->
19+
if (branch == '6.8') {
20+
// skip 6.8, it is tracked but we don't need snapshots for it and haven't backported
21+
// the baseline capture scripts to it.
22+
return;
23+
}
24+
25+
stage(branch) {
26+
def commits = getCommits(branch, MAXIMUM_COMMITS_TO_CHECK, MAXIMUM_COMMITS_TO_BUILD)
27+
28+
commits.take(MAXIMUM_COMMITS_TO_BUILD).each { commit ->
29+
catchErrors {
30+
githubCommitStatus.create(commit, 'pending', 'Baseline started.', 'kibana-ci-baseline')
31+
32+
build(
33+
propagate: false,
34+
wait: false,
35+
job: 'elastic+kibana+baseline-capture',
36+
parameters: [
37+
string(name: 'branch_specifier', value: branch),
38+
string(name: 'commit', value: commit),
39+
]
40+
)
41+
}
42+
}
43+
}
44+
}
45+
}
46+
47+
def getCommits(String branch, maximumCommitsToCheck, maximumCommitsToBuild) {
48+
print "Getting latest commits for ${branch}..."
49+
def commits = githubApi.get("repos/elastic/kibana/commits?sha=${branch}").take(maximumCommitsToCheck).collect { it.sha }
50+
def commitsToBuild = []
51+
52+
for (commit in commits) {
53+
print "Getting statuses for ${commit}"
54+
def status = githubApi.get("repos/elastic/kibana/statuses/${commit}").find { it.context == 'kibana-ci-baseline' }
55+
print "Commit '${commit}' already built? ${status ? 'Yes' : 'No'}"
56+
57+
if (!status) {
58+
commitsToBuild << commit
59+
} else {
60+
// Stop at the first commit we find that's already been triggered
61+
break
62+
}
63+
64+
if (commitsToBuild.size() >= maximumCommitsToBuild) {
65+
break
66+
}
67+
}
68+
69+
return commitsToBuild.reverse() // We want the builds to trigger oldest-to-newest
70+
}

.ci/Jenkinsfile_coverage

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ kibanaPipeline(timeoutMinutes: 240) {
1313
workers.base(name: 'coverage-worker', size: 'l', ramDisk: false, bootstrapped: false) {
1414
catchError {
1515
kibanaCoverage.runTests()
16+
kibanaTeamAssign.load('team_assignment', "### Upload Team Assignment JSON")
1617
handleIngestion(TIME_STAMP)
1718
}
1819
handleFail()

.ci/Jenkinsfile_visual_baseline

Lines changed: 0 additions & 26 deletions
This file was deleted.

.ci/end2end.groovy

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,9 @@ pipeline {
110110
archiveArtifacts(allowEmptyArchive: true, artifacts: "${E2E_DIR}/kibana.log")
111111
}
112112
}
113+
cleanup {
114+
notifyBuildResult(prComment: false, analyzeFlakey: false, shouldNotify: false)
115+
}
113116
}
114117
}
115118

.ci/packer_cache_for_branch.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ node scripts/es snapshot --download-only;
1818
node scripts/es snapshot --license=oss --download-only;
1919

2020
# download reporting browsers
21-
(cd "x-pack" && yarn gulp prepare);
21+
(cd "x-pack" && yarn gulp downloadChromium);
2222

2323
# cache the chromedriver archive
2424
chromedriverDistVersion="$(node -e "console.log(require('chromedriver').version)")"

.ci/pipeline-library/src/test/githubCommitStatus.groovy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ class GithubCommitStatusTest extends KibanaBasePipelineTest {
1212

1313
interface BuildState {
1414
Object get(String key)
15+
Object has(String key)
1516
}
1617

1718
interface GithubApi {
@@ -25,6 +26,7 @@ class GithubCommitStatusTest extends KibanaBasePipelineTest {
2526
buildStateMock = mock(BuildState)
2627
githubApiMock = mock(GithubApi)
2728

29+
when(buildStateMock.has('checkoutInfo')).thenReturn(true)
2830
when(buildStateMock.get('checkoutInfo')).thenReturn([ commit: 'COMMIT_HASH', ])
2931
when(githubApiMock.post(any(), any())).thenReturn(null)
3032

.ci/pipeline-library/src/test/prChanges.groovy

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,17 @@ class PrChangesTest extends KibanaBasePipelineTest {
8484

8585
assertFalse(prChanges.areChangesSkippable())
8686
}
87+
88+
@Test
89+
void 'areChangesSkippable() with skippable changes that are in notSkippablePaths'() {
90+
props([
91+
githubPrs: [
92+
getChanges: { [
93+
[filename: 'docs/developer/architecture/code-exploration.asciidoc'],
94+
] },
95+
],
96+
])
97+
98+
assertFalse(prChanges.areChangesSkippable())
99+
}
87100
}

0 commit comments

Comments
 (0)