Skip to content

Commit

Permalink
[8.14] [CI] Prevent duplicate serverless image build (#186164) (#186805)
Browse files Browse the repository at this point in the history
# Backport

This will backport the following commits from `main` to `8.14`:
- [[CI] Prevent duplicate serverless image build
(#186164)](#186164)

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

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

<!--BACKPORT [{"author":{"name":"Alex
Szabo","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-06-17T08:42:47Z","message":"[CI]
Prevent duplicate serverless image build (#186164)\n\n## Summary\r\nOnly
adds build_project.yml if there's not already a
deploy_project.yml\r\nadded through labels\r\n\r\n## Context\r\nBased on
the labeling logic, if we had `ci:build-serverless-image`
and\r\n`ci:project-deploy-*`, the steps for building the docker image
would be\r\nadded twice.\r\n\r\nSee:
https://elastic.slack.com/archives/C0D8P2XK5/p1718268306523329","sha":"f6968f3091a0ccc2b5730b8daf0c5b749d55659f","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Operations","release_note:skip","skip-ci","backport:all-open","v8.15.0"],"title":"[CI]
Prevent duplicate serverless image
build","number":186164,"url":"https://github.com/elastic/kibana/pull/186164","mergeCommit":{"message":"[CI]
Prevent duplicate serverless image build (#186164)\n\n## Summary\r\nOnly
adds build_project.yml if there's not already a
deploy_project.yml\r\nadded through labels\r\n\r\n## Context\r\nBased on
the labeling logic, if we had `ci:build-serverless-image`
and\r\n`ci:project-deploy-*`, the steps for building the docker image
would be\r\nadded twice.\r\n\r\nSee:
https://elastic.slack.com/archives/C0D8P2XK5/p1718268306523329","sha":"f6968f3091a0ccc2b5730b8daf0c5b749d55659f"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.15.0","branchLabelMappingKey":"^v8.15.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/186164","number":186164,"mergeCommit":{"message":"[CI]
Prevent duplicate serverless image build (#186164)\n\n## Summary\r\nOnly
adds build_project.yml if there's not already a
deploy_project.yml\r\nadded through labels\r\n\r\n## Context\r\nBased on
the labeling logic, if we had `ci:build-serverless-image`
and\r\n`ci:project-deploy-*`, the steps for building the docker image
would be\r\nadded twice.\r\n\r\nSee:
https://elastic.slack.com/archives/C0D8P2XK5/p1718268306523329","sha":"f6968f3091a0ccc2b5730b8daf0c5b749d55659f"}}]}]
BACKPORT-->

Co-authored-by: Alex Szabo <[email protected]>
  • Loading branch information
kibanamachine and delanni authored Jun 24, 2024
1 parent 324bf1c commit 39bf855
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .buildkite/scripts/pipelines/pull_request/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ const getPipeline = (filename: string, removeSteps = true) => {
GITHUB_PR_LABELS.includes('ci:project-deploy-security')
) {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/deploy_project.yml'));
} else if (GITHUB_PR_LABELS.includes('ci:build-serverless-image')) {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/build_project.yml'));
}

if (GITHUB_PR_LABELS.includes('ci:build-serverless-image')) {
Expand Down

0 comments on commit 39bf855

Please sign in to comment.