[8.x] Only run quick checks for changes to renovate.json (#203153) (#204675)

# Backport

This will backport the following commits from `main` to `8.x`:
- [Only run quick checks for changes to renovate.json
(#203153)](https://github.com/elastic/kibana/pull/203153)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Larry
Gregory","email":"larry.gregory@elastic.co"},"sourceCommit":{"committedDate":"2024-12-17T13:59:43Z","message":"Only
run quick checks for changes to renovate.json (#203153)\n\n##
Summary\n\nIntroduces a new `renovate` CI pipeline to only run quick
checks for PRs\nwhich only adjust the `renovate.json` configuration
file.","sha":"591d640b1fe21dc847338a535c142153f2b50e80","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Operations","Team:Security","release_note:skip","v9.0.0","backport:prev-major"],"title":"Only
run quick checks for changes to
renovate.json","number":203153,"url":"https://github.com/elastic/kibana/pull/203153","mergeCommit":{"message":"Only
run quick checks for changes to renovate.json (#203153)\n\n##
Summary\n\nIntroduces a new `renovate` CI pipeline to only run quick
checks for PRs\nwhich only adjust the `renovate.json` configuration
file.","sha":"591d640b1fe21dc847338a535c142153f2b50e80"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/203153","number":203153,"mergeCommit":{"message":"Only
run quick checks for changes to renovate.json (#203153)\n\n##
Summary\n\nIntroduces a new `renovate` CI pipeline to only run quick
checks for PRs\nwhich only adjust the `renovate.json` configuration
file.","sha":"591d640b1fe21dc847338a535c142153f2b50e80"}}]}] BACKPORT-->

Co-authored-by: Larry Gregory <larry.gregory@elastic.co>
This commit is contained in:
Kibana Machine 2024-12-18 12:32:36 +11:00 committed by GitHub
parent af953f4f61
commit b86b55a6c0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 34 additions and 0 deletions

View file

@ -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

View file

@ -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));

View file

@ -0,0 +1,6 @@
#!/usr/bin/env bash
set -euo pipefail
echo '--- Renovate: validation'
.buildkite/scripts/steps/checks/renovate.sh