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 1/4] [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 From 92f15a948ae912cdb7b4ce563b949cf0154e854b Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Thu, 19 Dec 2024 08:32:57 +1100 Subject: [PATCH 2/4] [8.16] Fix/renovate pipeline (#204672) (#204829) # Backport This will backport the following commits from `main` to `8.16`: - [Fix/renovate pipeline (#204672)](https://github.com/elastic/kibana/pull/204672) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) \n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sqren/backport)\n\n\n\nCo-authored-by: Brad White "}},{"branch":"8.17","label":"v8.17.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/204742","number":204742,"state":"MERGED","mergeCommit":{"sha":"8db1b876ec072ca381ae96905a961f1a53af47ba","message":"[8.17] Fix/renovate pipeline (#204672) (#204742)\n\n# Backport\n\nThis will backport the following commits from `main` to `8.17`:\n- [Fix/renovate pipeline\n(#204672)](https://github.com/elastic/kibana/pull/204672)\n\n\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sqren/backport)\n\n\n\nCo-authored-by: Brad White "}}]}] BACKPORT--> Co-authored-by: Brad White --- .buildkite/pipelines/pull_request/renovate.yml | 8 -------- .buildkite/scripts/pipelines/pull_request/pipeline.ts | 7 ++++--- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/.buildkite/pipelines/pull_request/renovate.yml b/.buildkite/pipelines/pull_request/renovate.yml index 3b441cfe5375a..98302a8d7912f 100644 --- a/.buildkite/pipelines/pull_request/renovate.yml +++ b/.buildkite/pipelines/pull_request/renovate.yml @@ -1,12 +1,4 @@ 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: diff --git a/.buildkite/scripts/pipelines/pull_request/pipeline.ts b/.buildkite/scripts/pipelines/pull_request/pipeline.ts index e103b8c407d82..5f4ac3bc8d3bb 100644 --- a/.buildkite/scripts/pipelines/pull_request/pipeline.ts +++ b/.buildkite/scripts/pipelines/pull_request/pipeline.ts @@ -39,15 +39,16 @@ const getPipeline = (filename: string, removeSteps = true) => { return; } + pipeline.push(getAgentImageConfig({ returnYaml: true })); + 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.'); + + console.log([...new Set(pipeline)].join('\n')); return; } - pipeline.push(getAgentImageConfig({ returnYaml: true })); pipeline.push(getPipeline('.buildkite/pipelines/pull_request/base.yml', false)); if (await doAnyChangesMatch([/^packages\/kbn-handlebars/])) { From 8b37460dbbc7d8bf1f595a50afd61124ab5d475a Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Thu, 19 Dec 2024 08:49:11 +1100 Subject: [PATCH 3/4] [8.16] [ci] Fix cloud deployments (#198086) (#204838) # Backport This will backport the following commits from `main` to `8.16`: - [[ci] Fix cloud deployments (#198086)](https://github.com/elastic/kibana/pull/198086) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) \n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sqren/backport)\n\n\n\nCo-authored-by: Jon "}}]}] BACKPORT--> Co-authored-by: Jon --- .buildkite/scripts/steps/cloud/build_and_deploy.sh | 2 +- .buildkite/scripts/steps/es_snapshots/build.sh | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.buildkite/scripts/steps/cloud/build_and_deploy.sh b/.buildkite/scripts/steps/cloud/build_and_deploy.sh index 4b0073ebe87b8..c8ebcf4619458 100755 --- a/.buildkite/scripts/steps/cloud/build_and_deploy.sh +++ b/.buildkite/scripts/steps/cloud/build_and_deploy.sh @@ -19,7 +19,7 @@ download_artifact "kibana-$VERSION-linux-x86_64.tar.gz" ./target --build "${KIBA echo "--- Build Cloud Distribution" ELASTICSEARCH_MANIFEST_URL="https://storage.googleapis.com/kibana-ci-es-snapshots-daily/$(jq -r '.version' package.json)/manifest-latest-verified.json" ELASTICSEARCH_SHA=$(curl -s $ELASTICSEARCH_MANIFEST_URL | jq -r '.sha') -ELASTICSEARCH_CLOUD_IMAGE="docker.elastic.co/kibana-ci/elasticsearch-cloud:$VERSION-$ELASTICSEARCH_SHA" +ELASTICSEARCH_CLOUD_IMAGE="docker.elastic.co/kibana-ci/elasticsearch-cloud-ess:$VERSION-$ELASTICSEARCH_SHA" KIBANA_CLOUD_IMAGE="docker.elastic.co/kibana-ci/kibana-cloud:$VERSION-$GIT_COMMIT" CLOUD_DEPLOYMENT_NAME="kibana-pr-$BUILDKITE_PULL_REQUEST" diff --git a/.buildkite/scripts/steps/es_snapshots/build.sh b/.buildkite/scripts/steps/es_snapshots/build.sh index d9d685338250f..0485763b0e918 100755 --- a/.buildkite/scripts/steps/es_snapshots/build.sh +++ b/.buildkite/scripts/steps/es_snapshots/build.sh @@ -85,11 +85,11 @@ echo "--- Create kibana-ci docker cloud image archives" # When we bump versions, these dependencies may not exist yet, but we don't want to # block the rest of the snapshot promotion process set +e -./gradlew :distribution:docker:cloud-docker-export:assemble && { - ES_CLOUD_ID=$(docker images "docker.elastic.co/elasticsearch-ci/elasticsearch-cloud" --format "{{.ID}}") - ES_CLOUD_VERSION=$(docker images "docker.elastic.co/elasticsearch-ci/elasticsearch-cloud" --format "{{.Tag}}") +./gradlew :distribution:docker:cloud-ess-docker-export:assemble && { + ES_CLOUD_ID=$(docker images "docker.elastic.co/elasticsearch/elasticsearch-cloud-ess" --format "{{.ID}}") + ES_CLOUD_VERSION=$(docker images "docker.elastic.co/elasticsearch/elasticsearch-cloud-ess" --format "{{.Tag}}") KIBANA_ES_CLOUD_VERSION="$ES_CLOUD_VERSION-$ELASTICSEARCH_GIT_COMMIT" - KIBANA_ES_CLOUD_IMAGE="docker.elastic.co/kibana-ci/elasticsearch-cloud:$KIBANA_ES_CLOUD_VERSION" + KIBANA_ES_CLOUD_IMAGE="docker.elastic.co/kibana-ci/elasticsearch-cloud-ess:$KIBANA_ES_CLOUD_VERSION" echo $ES_CLOUD_ID $ES_CLOUD_VERSION $KIBANA_ES_CLOUD_VERSION $KIBANA_ES_CLOUD_IMAGE docker tag "$ES_CLOUD_ID" "$KIBANA_ES_CLOUD_IMAGE" From 4125ba9e5ef99b901df8629cf187b2805def1d32 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Wed, 18 Dec 2024 22:10:18 +0000 Subject: [PATCH 4/4] Revert "[8.16] [ci] Fix cloud deployments (#198086) (#204838)" This reverts commit 8b37460dbbc7d8bf1f595a50afd61124ab5d475a. --- .buildkite/scripts/steps/cloud/build_and_deploy.sh | 2 +- .buildkite/scripts/steps/es_snapshots/build.sh | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.buildkite/scripts/steps/cloud/build_and_deploy.sh b/.buildkite/scripts/steps/cloud/build_and_deploy.sh index c8ebcf4619458..4b0073ebe87b8 100755 --- a/.buildkite/scripts/steps/cloud/build_and_deploy.sh +++ b/.buildkite/scripts/steps/cloud/build_and_deploy.sh @@ -19,7 +19,7 @@ download_artifact "kibana-$VERSION-linux-x86_64.tar.gz" ./target --build "${KIBA echo "--- Build Cloud Distribution" ELASTICSEARCH_MANIFEST_URL="https://storage.googleapis.com/kibana-ci-es-snapshots-daily/$(jq -r '.version' package.json)/manifest-latest-verified.json" ELASTICSEARCH_SHA=$(curl -s $ELASTICSEARCH_MANIFEST_URL | jq -r '.sha') -ELASTICSEARCH_CLOUD_IMAGE="docker.elastic.co/kibana-ci/elasticsearch-cloud-ess:$VERSION-$ELASTICSEARCH_SHA" +ELASTICSEARCH_CLOUD_IMAGE="docker.elastic.co/kibana-ci/elasticsearch-cloud:$VERSION-$ELASTICSEARCH_SHA" KIBANA_CLOUD_IMAGE="docker.elastic.co/kibana-ci/kibana-cloud:$VERSION-$GIT_COMMIT" CLOUD_DEPLOYMENT_NAME="kibana-pr-$BUILDKITE_PULL_REQUEST" diff --git a/.buildkite/scripts/steps/es_snapshots/build.sh b/.buildkite/scripts/steps/es_snapshots/build.sh index 0485763b0e918..d9d685338250f 100755 --- a/.buildkite/scripts/steps/es_snapshots/build.sh +++ b/.buildkite/scripts/steps/es_snapshots/build.sh @@ -85,11 +85,11 @@ echo "--- Create kibana-ci docker cloud image archives" # When we bump versions, these dependencies may not exist yet, but we don't want to # block the rest of the snapshot promotion process set +e -./gradlew :distribution:docker:cloud-ess-docker-export:assemble && { - ES_CLOUD_ID=$(docker images "docker.elastic.co/elasticsearch/elasticsearch-cloud-ess" --format "{{.ID}}") - ES_CLOUD_VERSION=$(docker images "docker.elastic.co/elasticsearch/elasticsearch-cloud-ess" --format "{{.Tag}}") +./gradlew :distribution:docker:cloud-docker-export:assemble && { + ES_CLOUD_ID=$(docker images "docker.elastic.co/elasticsearch-ci/elasticsearch-cloud" --format "{{.ID}}") + ES_CLOUD_VERSION=$(docker images "docker.elastic.co/elasticsearch-ci/elasticsearch-cloud" --format "{{.Tag}}") KIBANA_ES_CLOUD_VERSION="$ES_CLOUD_VERSION-$ELASTICSEARCH_GIT_COMMIT" - KIBANA_ES_CLOUD_IMAGE="docker.elastic.co/kibana-ci/elasticsearch-cloud-ess:$KIBANA_ES_CLOUD_VERSION" + KIBANA_ES_CLOUD_IMAGE="docker.elastic.co/kibana-ci/elasticsearch-cloud:$KIBANA_ES_CLOUD_VERSION" echo $ES_CLOUD_ID $ES_CLOUD_VERSION $KIBANA_ES_CLOUD_VERSION $KIBANA_ES_CLOUD_IMAGE docker tag "$ES_CLOUD_ID" "$KIBANA_ES_CLOUD_IMAGE"