Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into fix/form-lib-memoize
Browse files Browse the repository at this point in the history
  • Loading branch information
sebelga committed Jul 15, 2020
2 parents 923471f + 21156d6 commit fe70433
Show file tree
Hide file tree
Showing 2,852 changed files with 83,999 additions and 40,028 deletions.
File renamed without changes.
64 changes: 64 additions & 0 deletions .ci/Jenkinsfile_baseline_trigger
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
#!/bin/groovy

def MAXIMUM_COMMITS_TO_CHECK = 10
def MAXIMUM_COMMITS_TO_BUILD = 5

if (!params.branches_yaml) {
error "'branches_yaml' parameter must be specified"
}

def additionalBranches = []

def branches = readYaml(text: params.branches_yaml) + additionalBranches

library 'kibana-pipeline-library'
kibanaLibrary.load()

withGithubCredentials {
branches.each { branch ->
stage(branch) {
def commits = getCommits(branch, MAXIMUM_COMMITS_TO_CHECK, MAXIMUM_COMMITS_TO_BUILD)

commits.take(MAXIMUM_COMMITS_TO_BUILD).each { commit ->
catchErrors {
githubCommitStatus.create(commit, 'pending', 'Baseline started.', 'kibana-ci-baseline')

build(
propagate: false,
wait: false,
job: 'elastic+kibana+baseline-capture',
parameters: [
string(name: 'branch_specifier', value: branch),
string(name: 'commit', value: commit),
]
)
}
}
}
}
}

def getCommits(String branch, maximumCommitsToCheck, maximumCommitsToBuild) {
print "Getting latest commits for ${branch}..."
def commits = githubApi.get("repos/elastic/kibana/commits?sha=${branch}").take(maximumCommitsToCheck).collect { it.sha }
def commitsToBuild = []

for (commit in commits) {
print "Getting statuses for ${commit}"
def status = githubApi.get("repos/elastic/kibana/statuses/${commit}").find { it.context == 'kibana-ci-baseline' }
print "Commit '${commit}' already built? ${status ? 'Yes' : 'No'}"

if (!status) {
commitsToBuild << commit
} else {
// Stop at the first commit we find that's already been triggered
break
}

if (commitsToBuild.size() >= maximumCommitsToBuild) {
break
}
}

return commitsToBuild.reverse() // We want the builds to trigger oldest-to-newest
}
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ target
/src/plugins/data/common/es_query/kuery/ast/_generated_/**
/src/plugins/vis_type_timelion/public/_generated_/**
/src/plugins/vis_type_timelion/public/webpackShims/jquery.flot.*
/src/plugins/timelion/public/webpackShims/jquery.flot.*
/x-pack/legacy/plugins/**/__tests__/fixtures/**
/x-pack/plugins/apm/e2e/**/snapshots.js
/x-pack/plugins/apm/e2e/tmp/*
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ disabledPlugins
webpackstats.json
/config/*
!/config/kibana.yml
!/config/node.options
coverage
selenium
.babel_register_cache.json
Expand Down
2 changes: 1 addition & 1 deletion .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"src/plugins/telemetry_management_section"
],
"tileMap": "src/plugins/tile_map",
"timelion": ["src/legacy/core_plugins/timelion", "src/plugins/vis_type_timelion"],
"timelion": ["src/plugins/timelion", "src/plugins/vis_type_timelion"],
"uiActions": "src/plugins/ui_actions",
"visDefaultEditor": "src/plugins/vis_default_editor",
"visTypeMarkdown": "src/plugins/vis_type_markdown",
Expand Down
2 changes: 1 addition & 1 deletion .sass-lint.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
files:
include:
- 'src/legacy/core_plugins/metrics/**/*.s+(a|c)ss'
- 'src/legacy/core_plugins/timelion/**/*.s+(a|c)ss'
- 'src/plugins/timelion/**/*.s+(a|c)ss'
- 'src/plugins/vis_type_vislib/**/*.s+(a|c)ss'
- 'src/plugins/vis_type_xy/**/*.s+(a|c)ss'
- 'x-pack/plugins/canvas/**/*.s+(a|c)ss'
Expand Down
Loading

0 comments on commit fe70433

Please sign in to comment.