mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
(cherry picked from commit 92fb5dbafc
)
Co-authored-by: Spencer <spencer@elastic.co>
This commit is contained in:
parent
673dca797c
commit
ee1b1aab80
3 changed files with 32 additions and 22 deletions
|
@ -84,6 +84,9 @@ export class CiStatsClient {
|
|||
jenkinsJobId: process.env.BUILDKITE_BUILD_NUMBER,
|
||||
jenkinsUrl: process.env.BUILDKITE_BUILD_URL,
|
||||
prId: process.env.GITHUB_PR_NUMBER || null,
|
||||
backfillJobIds: process.env.KIBANA_REUSABLE_BUILD_JOB_ID
|
||||
? [process.env.KIBANA_REUSABLE_BUILD_JOB_ID]
|
||||
: [],
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -132,13 +135,12 @@ export class CiStatsClient {
|
|||
});
|
||||
};
|
||||
|
||||
getPrReport = async (buildId: string, backfillJobIds: string[] = []) => {
|
||||
getPrReport = async (buildId: string) => {
|
||||
const resp = await this.request<CiStatsPrReport>({
|
||||
path: `v3/pr_report`,
|
||||
method: 'post',
|
||||
body: {
|
||||
method: 'GET',
|
||||
path: `v2/pr_report`,
|
||||
params: {
|
||||
buildId,
|
||||
backfillJobIds,
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
@ -26,12 +26,7 @@ export async function onComplete() {
|
|||
return;
|
||||
}
|
||||
|
||||
const backfillJobIds: string[] = [];
|
||||
if (process.env.KIBANA_REUSABLE_BUILD_JOB_ID) {
|
||||
backfillJobIds.push(process.env.KIBANA_REUSABLE_BUILD_JOB_ID);
|
||||
}
|
||||
|
||||
const report = await ciStats.getPrReport(process.env.CI_STATS_BUILD_ID, backfillJobIds);
|
||||
const report = await ciStats.getPrReport(process.env.CI_STATS_BUILD_ID);
|
||||
if (report?.md) {
|
||||
buildkite.setMetadata('pr_comment:ci_stats_report:body', report.md);
|
||||
|
||||
|
|
|
@ -15,6 +15,30 @@ steps:
|
|||
if: "build.env('KIBANA_BUILD_ID') == null || build.env('KIBANA_BUILD_ID') == ''"
|
||||
timeout_in_minutes: 60
|
||||
|
||||
- command: .buildkite/scripts/steps/build_api_docs.sh
|
||||
label: 'Build API Docs'
|
||||
agents:
|
||||
queue: n2-4-spot
|
||||
key: build_api_docs
|
||||
timeout_in_minutes: 60
|
||||
retry:
|
||||
automatic:
|
||||
- exit_status: '-1'
|
||||
limit: 3
|
||||
|
||||
- command: .buildkite/scripts/steps/ci_stats_ready.sh
|
||||
label: Mark CI Stats as ready
|
||||
agents:
|
||||
queue: kibana-default
|
||||
timeout_in_minutes: 10
|
||||
depends_on:
|
||||
- build
|
||||
- build_api_docs
|
||||
retry:
|
||||
automatic:
|
||||
- exit_status: '*'
|
||||
limit: 1
|
||||
|
||||
- command: .buildkite/scripts/steps/test/pick_test_group_run_order.sh
|
||||
label: 'Pick Test Group Run Order'
|
||||
agents:
|
||||
|
@ -61,14 +85,3 @@ steps:
|
|||
agents:
|
||||
queue: c2-8
|
||||
timeout_in_minutes: 60
|
||||
|
||||
- command: .buildkite/scripts/steps/build_api_docs.sh
|
||||
label: 'Build API Docs'
|
||||
agents:
|
||||
queue: n2-4-spot
|
||||
key: build_api_docs
|
||||
timeout_in_minutes: 60
|
||||
retry:
|
||||
automatic:
|
||||
- exit_status: '-1'
|
||||
limit: 3
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue