Skip to content

Commit

Permalink
[8.x] [ci] Fix cloud deployments (#198086) (#198211)
Browse files Browse the repository at this point in the history
# Backport

This will backport the following commits from `main` to `8.x`:
- [[ci] Fix cloud deployments
(#198086)](#198086)

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

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

<!--BACKPORT
[{"author":{"name":"Jon","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-29T21:57:02Z","message":"[ci]
Fix cloud deployments (#198086)\n\nOur build scripts are relying on a
step that was removed
in\r\nhttps://github.com/elastic/elasticsearch/pull/115357. The image
that was\r\nproduced by this script is eventually consumed by cloud
deployments from\r\npull requests.\r\n\r\nThis updates our scripts to
use the cloud-ess variant instead. There\r\nshould not be any functional
difference.\r\n\r\n\r\nWe'll need the image to go through our promotion
pipeline to be tested\r\nvia
label.\r\n\r\nhttps://buildkite.com/elastic/kibana-elasticsearch-snapshot-build/builds/4673","sha":"17e72dd7ae43028ea481bbff417b85e8efebad39","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Operations","release_note:skip","v9.0.0","backport:prev-minor"],"title":"[ci]
Fix cloud
deployments","number":198086,"url":"https://github.com/elastic/kibana/pull/198086","mergeCommit":{"message":"[ci]
Fix cloud deployments (#198086)\n\nOur build scripts are relying on a
step that was removed
in\r\nhttps://github.com/elastic/elasticsearch/pull/115357. The image
that was\r\nproduced by this script is eventually consumed by cloud
deployments from\r\npull requests.\r\n\r\nThis updates our scripts to
use the cloud-ess variant instead. There\r\nshould not be any functional
difference.\r\n\r\n\r\nWe'll need the image to go through our promotion
pipeline to be tested\r\nvia
label.\r\n\r\nhttps://buildkite.com/elastic/kibana-elasticsearch-snapshot-build/builds/4673","sha":"17e72dd7ae43028ea481bbff417b85e8efebad39"}},"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/198086","number":198086,"mergeCommit":{"message":"[ci]
Fix cloud deployments (#198086)\n\nOur build scripts are relying on a
step that was removed
in\r\nhttps://github.com/elastic/elasticsearch/pull/115357. The image
that was\r\nproduced by this script is eventually consumed by cloud
deployments from\r\npull requests.\r\n\r\nThis updates our scripts to
use the cloud-ess variant instead. There\r\nshould not be any functional
difference.\r\n\r\n\r\nWe'll need the image to go through our promotion
pipeline to be tested\r\nvia
label.\r\n\r\nhttps://buildkite.com/elastic/kibana-elasticsearch-snapshot-build/builds/4673","sha":"17e72dd7ae43028ea481bbff417b85e8efebad39"}}]}]
BACKPORT-->

Co-authored-by: Jon <[email protected]>
  • Loading branch information
kibanamachine and jbudz authored Oct 29, 2024
1 parent 00a73a0 commit 3d8e498
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .buildkite/scripts/steps/cloud/build_and_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 4 additions & 4 deletions .buildkite/scripts/steps/es_snapshots/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit 3d8e498

Please sign in to comment.