From 7cf56eaaf7cc195108d5b20ca5d1d870a801d8c5 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Thu, 19 Dec 2024 06:42:47 +1100 Subject: [PATCH] [8.16] Only run quick checks for changes to renovate.json (#203153) (#204673) # Backport This will backport the following commits from `main` to `8.16`: - [Only run quick checks for changes to renovate.json (#203153)](https://github.com/elastic/kibana/pull/203153) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) Co-authored-by: Larry Gregory --- .../pipelines/pull_request/renovate.yml | 20 +++++++++++++++++++ .../pipelines/pull_request/pipeline.ts | 8 ++++++++ .buildkite/scripts/steps/renovate.sh | 6 ++++++ 3 files changed, 34 insertions(+) create mode 100644 .buildkite/pipelines/pull_request/renovate.yml create mode 100755 .buildkite/scripts/steps/renovate.sh diff --git a/.buildkite/pipelines/pull_request/renovate.yml b/.buildkite/pipelines/pull_request/renovate.yml new file mode 100644 index 0000000000000..3b441cfe5375a --- /dev/null +++ b/.buildkite/pipelines/pull_request/renovate.yml @@ -0,0 +1,20 @@ +steps: + - command: .buildkite/scripts/lifecycle/pre_build.sh + label: Pre-Build + timeout_in_minutes: 10 + agents: + machineType: n2-standard-2 + + - wait + + - command: .buildkite/scripts/steps/renovate.sh + label: 'Renovate validation' + agents: + machineType: n2-highcpu-8 + preemptible: true + key: renovate_validation + timeout_in_minutes: 60 + retry: + automatic: + - exit_status: '-1' + limit: 3 diff --git a/.buildkite/scripts/pipelines/pull_request/pipeline.ts b/.buildkite/scripts/pipelines/pull_request/pipeline.ts index 9cf971125925c..e103b8c407d82 100644 --- a/.buildkite/scripts/pipelines/pull_request/pipeline.ts +++ b/.buildkite/scripts/pipelines/pull_request/pipeline.ts @@ -39,6 +39,14 @@ const getPipeline = (filename: string, removeSteps = true) => { return; } + const onlyRunQuickChecks = await areChangesSkippable([/^renovate\.json$/], REQUIRED_PATHS); + if (onlyRunQuickChecks) { + pipeline.push(getPipeline('.buildkite/pipelines/pull_request/renovate.yml', false)); + pipeline.push(getPipeline('.buildkite/pipelines/pull_request/post_build.yml')); + console.log('Isolated changes to renovate.json. Skipping main PR pipeline.'); + return; + } + pipeline.push(getAgentImageConfig({ returnYaml: true })); pipeline.push(getPipeline('.buildkite/pipelines/pull_request/base.yml', false)); diff --git a/.buildkite/scripts/steps/renovate.sh b/.buildkite/scripts/steps/renovate.sh new file mode 100755 index 0000000000000..cc4583e3da216 --- /dev/null +++ b/.buildkite/scripts/steps/renovate.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +set -euo pipefail + +echo '--- Renovate: validation' +.buildkite/scripts/steps/checks/renovate.sh