From 26508038f40a470d7f63c548dbbab8c6292384d4 Mon Sep 17 00:00:00 2001 From: Alex Szabo Date: Tue, 9 Jan 2024 11:04:02 +0100 Subject: [PATCH] Deployment investigations (#174345) ## Summary Both cloud and serverless deployments of https://github.com/elastic/kibana/pull/172257 are failing. These are small additions to help investigation, or fix potential errors. --- .buildkite/scripts/steps/cloud/build_and_deploy.sh | 2 +- .buildkite/scripts/steps/serverless/build_and_deploy.sh | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.buildkite/scripts/steps/cloud/build_and_deploy.sh b/.buildkite/scripts/steps/cloud/build_and_deploy.sh index b6c2dcd0968e3..62f92b716b651 100755 --- a/.buildkite/scripts/steps/cloud/build_and_deploy.sh +++ b/.buildkite/scripts/steps/cloud/build_and_deploy.sh @@ -62,7 +62,7 @@ fi echo "--- Create Deployment" CLOUD_DEPLOYMENT_ID=$(ecctl deployment list --output json | jq -r '.deployments[] | select(.name == "'$CLOUD_DEPLOYMENT_NAME'") | .id') -if [ -z "${CLOUD_DEPLOYMENT_ID}" ]; then +if [ -z "${CLOUD_DEPLOYMENT_ID}" ] || [ "${CLOUD_DEPLOYMENT_ID}" = 'null' ]; then jq ' .resources.kibana[0].plan.kibana.docker_image = "'$KIBANA_CLOUD_IMAGE'" | .resources.elasticsearch[0].plan.elasticsearch.docker_image = "'$ELASTICSEARCH_CLOUD_IMAGE'" | diff --git a/.buildkite/scripts/steps/serverless/build_and_deploy.sh b/.buildkite/scripts/steps/serverless/build_and_deploy.sh index a78252e3baec0..3e69f4b4878b7 100644 --- a/.buildkite/scripts/steps/serverless/build_and_deploy.sh +++ b/.buildkite/scripts/steps/serverless/build_and_deploy.sh @@ -59,6 +59,11 @@ deploy() { -XPOST -d "$PROJECT_CREATE_CONFIGURATION" &>> $DEPLOY_LOGS PROJECT_ID=$(jq -r --slurp '.[1].id' $DEPLOY_LOGS) + if [ -z "${PROJECT_ID}" ] || [ "$PROJECT_ID" = 'null' ]; then + echo "Failed to create project. Deploy logs:" + cat $DEPLOY_LOGS + exit 1 + fi echo "Get credentials..." curl -s -XPOST -H "Authorization: ApiKey $PROJECT_API_KEY" \