Skip to content

Commit

Permalink
[8.15] ci(deploy): dead deploy fix script (#195753) (#195799)
Browse files Browse the repository at this point in the history
# Backport

This will backport the following commits from `main` to `8.15`:
- [ci(deploy): dead deploy fix script
(#195753)](#195753)

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

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

<!--BACKPORT [{"author":{"name":"Karen
Grigoryan","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-10T15:29:49Z","message":"ci(deploy):
dead deploy fix script (#195753)\n\nThis fixes edge case with dead
deploys failing current server deploy\r\njobs in
https://github.com/elastic/kibana/pull/191898","sha":"bc75d03f5ca01889a4a7813f8abbeeee239921c3","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Operations","release_note:skip","v9.0.0","backport:prev-major"],"title":"ci(deploy):
dead deploy fix
script","number":195753,"url":"https://github.com/elastic/kibana/pull/195753","mergeCommit":{"message":"ci(deploy):
dead deploy fix script (#195753)\n\nThis fixes edge case with dead
deploys failing current server deploy\r\njobs in
https://github.com/elastic/kibana/pull/191898","sha":"bc75d03f5ca01889a4a7813f8abbeeee239921c3"}},"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/195753","number":195753,"mergeCommit":{"message":"ci(deploy):
dead deploy fix script (#195753)\n\nThis fixes edge case with dead
deploys failing current server deploy\r\njobs in
https://github.com/elastic/kibana/pull/191898","sha":"bc75d03f5ca01889a4a7813f8abbeeee239921c3"}}]}]
BACKPORT-->

Co-authored-by: Karen Grigoryan <[email protected]>
  • Loading branch information
kibanamachine and kapral18 authored Oct 10, 2024
1 parent 4f86694 commit d3bf6ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 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 @@ -51,7 +51,7 @@ fi
if is_pr_with_label "ci:cloud-redeploy"; then
echo "--- Shutdown Previous 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
echo "No deployment to remove"
else
echo "Shutting down previous deployment..."
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/scripts/steps/serverless/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ deploy() {

PROJECT_ID=$(jq -r '[.items[] | select(.name == "'$PROJECT_NAME'")] | .[0].id' $PROJECT_EXISTS_LOGS)
if is_pr_with_label "ci:project-redeploy"; then
if [ -z "${PROJECT_ID}" ]; then
if [ -z "${PROJECT_ID}" ] || [ "${PROJECT_ID}" == "null" ]; then
echo "No project to remove"
else
echo "Shutting down previous project..."
Expand Down

0 comments on commit d3bf6ba

Please sign in to comment.