Skip to content

Commit b70b7df

Browse files
Merge branch 'master' of github.com:elastic/kibana into es_client_migration/ua
2 parents 5c89fbe + 3121e47 commit b70b7df

845 files changed

Lines changed: 16463 additions & 10211 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.

.browserslistrc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
last 2 Firefox versions
33
last 2 Chrome versions
44
last 2 Safari versions
5-
> 0.25%
6-
not ie 11
7-
not op_mini all
8-
not samsung 4
5+
last 2 Edge versions
6+
last 1 ios_saf versions
7+
last 1 and_chr versions
8+
last 1 samsung versions
99

1010
[dev]
1111
last 1 chrome versions

.ci/teamcity/default/build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ node scripts/build_kibana_platform_plugins \
1414
--scan-dir "$XPACK_DIR/test/plugin_api_integration/plugins" \
1515
--scan-dir "$XPACK_DIR/test/plugin_api_perf/plugins" \
1616
--scan-dir "$XPACK_DIR/test/licensing_plugin/plugins" \
17+
--scan-dir "$XPACK_DIR/test/usage_collection/plugins" \
1718
--verbose
1819
tc_end_block "Build Platform Plugins"
1920

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Delete any items that are not applicable to this PR.
1111
- [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
1212
- [ ] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
1313
- [ ] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
14-
- [ ] If a plugin configuration key changed, check if it needs to be whitelisted in the [cloud](https://github.com/elastic/cloud) and added to the [docker list](https://github.com/elastic/kibana/blob/c29adfef29e921cc447d2a5ed06ac2047ceab552/src/dev/build/tasks/os_packages/docker_generator/resources/bin/kibana-docker)
14+
- [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the [cloud](https://github.com/elastic/cloud) and added to the [docker list](https://github.com/elastic/kibana/blob/c29adfef29e921cc447d2a5ed06ac2047ceab552/src/dev/build/tasks/os_packages/docker_generator/resources/bin/kibana-docker)
1515
- [ ] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
1616
- [ ] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
1717

.teamcity/src/Common.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@ fun isReportingEnabled(): Boolean {
2222
return ENABLE_REPORTING;
2323
}
2424

25+
// master and 7.x get committed to so often, we only want to run full CI for them hourly
26+
// but for other branches, we can run daily and on merge
27+
fun isHourlyOnlyBranch(): Boolean {
28+
val branch = getProjectBranch()
29+
30+
return branch == "master" || branch.matches("""^[0-9]+\.x$""".toRegex())
31+
}
32+
2533
fun makeSafeId(id: String): String {
2634
return id.replace(Regex("[^a-zA-Z0-9_]"), "_")
2735
}

.teamcity/src/builds/DailyCi.kt

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
package builds
2+
3+
import addSlackNotifications
4+
import areTriggersEnabled
5+
import dependsOn
6+
import getProjectBranch
7+
import jetbrains.buildServer.configs.kotlin.v2019_2.BuildType
8+
import jetbrains.buildServer.configs.kotlin.v2019_2.FailureAction
9+
import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.schedule
10+
11+
object DailyCi : BuildType({
12+
id("Daily_CI")
13+
name = "Daily CI"
14+
description = "Runs everything in CI, daily"
15+
type = Type.COMPOSITE
16+
paused = !areTriggersEnabled()
17+
18+
triggers {
19+
schedule {
20+
schedulingPolicy = cron {
21+
hours = "0"
22+
minutes = "0"
23+
}
24+
branchFilter = "refs/heads/${getProjectBranch()}"
25+
triggerBuild = always()
26+
withPendingChangesOnly = false
27+
}
28+
}
29+
30+
dependsOn(
31+
FullCi
32+
) {
33+
onDependencyCancel = FailureAction.ADD_PROBLEM
34+
}
35+
36+
addSlackNotifications()
37+
})

.teamcity/src/builds/OnMergeCi.kt

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
package builds
2+
3+
import addSlackNotifications
4+
import areTriggersEnabled
5+
import dependsOn
6+
import getProjectBranch
7+
import jetbrains.buildServer.configs.kotlin.v2019_2.BuildType
8+
import jetbrains.buildServer.configs.kotlin.v2019_2.FailureAction
9+
import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.vcs
10+
11+
object OnMergeCi : BuildType({
12+
id("OnMerge_CI")
13+
name = "On Merge CI"
14+
description = "Runs everything in CI, on each commit"
15+
type = Type.COMPOSITE
16+
paused = !areTriggersEnabled()
17+
18+
maxRunningBuilds = 1
19+
20+
triggers {
21+
vcs {
22+
perCheckinTriggering = false
23+
branchFilter = "refs/heads/${getProjectBranch()}"
24+
}
25+
}
26+
27+
dependsOn(
28+
FullCi
29+
) {
30+
onDependencyCancel = FailureAction.ADD_PROBLEM
31+
}
32+
33+
addSlackNotifications()
34+
})

.teamcity/src/builds/default/DefaultFunctionalBase.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
package builds.default
22

3+
import StandardAgents
34
import addTestSettings
5+
import co.elastic.teamcity.common.requireAgent
46
import jetbrains.buildServer.configs.kotlin.v2019_2.BuildType
57

68
open class DefaultFunctionalBase(init: BuildType.() -> Unit = {}) : BuildType({
79
params {
810
param("env.KBN_NP_PLUGINS_BUILT", "true")
911
}
1012

13+
requireAgent(StandardAgents["4"]!!)
14+
1115
dependencies {
1216
defaultBuildWithPlugins()
1317
}

.teamcity/src/projects/Kibana.kt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import builds.oss.*
77
import builds.test.*
88
import CloudProfile
99
import co.elastic.teamcity.common.googleCloudProfile
10+
import isHourlyOnlyBranch
1011
import jetbrains.buildServer.configs.kotlin.v2019_2.*
1112
import jetbrains.buildServer.configs.kotlin.v2019_2.projectFeatures.slackConnection
1213
import templates.KibanaTemplate
@@ -136,7 +137,16 @@ fun Kibana(config: KibanaConfiguration = KibanaConfiguration()) : Project {
136137

137138
buildType(FullCi)
138139
buildType(BaselineCi)
139-
buildType(HourlyCi)
140+
141+
// master and 7.x get committed to so often, we only want to run full CI for them hourly
142+
// but for other branches, we can run daily and on merge
143+
if (isHourlyOnlyBranch()) {
144+
buildType(HourlyCi)
145+
} else {
146+
buildType(DailyCi)
147+
buildType(OnMergeCi)
148+
}
149+
140150
buildType(PullRequestCi)
141151
}
142152

347 KB
Loading
198 KB
Loading

0 commit comments

Comments
 (0)