Skip to content

Commit

Permalink
[8.17] Only run quick checks for changes to renovate.json (#203153) (#…
Browse files Browse the repository at this point in the history
…204674)

# Backport

This will backport the following commits from `main` to `8.17`:
- [Only run quick checks for changes to renovate.json
(#203153)](#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":"[email protected]"},"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 <[email protected]>
  • Loading branch information
kibanamachine and legrego authored Dec 18, 2024
1 parent c7c9666 commit a06b6a2
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .buildkite/pipelines/pull_request/renovate.yml
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions .buildkite/scripts/pipelines/pull_request/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down
6 changes: 6 additions & 0 deletions .buildkite/scripts/steps/renovate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

set -euo pipefail

echo '--- Renovate: validation'
.buildkite/scripts/steps/checks/renovate.sh

0 comments on commit a06b6a2

Please sign in to comment.