forked from elastic/kibana
-
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 branch 'master' into task-manager/batch-update-delete
* master: (214 commits) replacing hard coded links for ela.st (elastic#72240) skip flaky suite (elastic#60865) chore(NA): teardown dynamic dll plugin (elastic#72096) Register navLink actions for declared applications (elastic#72109) Fix value for process.hash.sha256 draggable (elastic#72142) Call setupIngest before fleet_install tests (elastic#72214) [Security Solution][Detections] Better toast errors (elastic#72205) skip flaky suite (elastic#64696) [Security Solution][Detections] Disable exceptions for Threshold and ML rules (elastic#72137) [Security Solution][Detections,Lists] Miscellaneous post-FF fixes (elastic#71990) [baseline/capture] use high-memory nodes with ramDisks (elastic#71894) skip flaky suite (elastic#77207) [Maps] Fix issue preventing TMS from rendering correctly (elastic#71946) using test_user with minimum privs (elastic#71988) Fixed Webhook connector doesn't retain added HTTP header settings (elastic#71924) [Ingest Manager] Do not show enrolling and unenrolling agents as online in agent counters (elastic#71921) [Maps] fix 'New Map' from getting added to recently accessed (elastic#72125) [Visualizations] Pass 'aggs' parameter to custom request handlers (elastic#71423) [Monitoring] Out of the box alert tweaks (elastic#71942) [ML] Fix datafeed start time is incorrect when the job has trailing empty buckets (elastic#71976) ...
- Loading branch information
Showing
2,475 changed files
with
60,974 additions
and
38,608 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
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
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 | ||
} |
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.