Skip to content

Commit

Permalink
Rollback pipeline changes
Browse files Browse the repository at this point in the history
  • Loading branch information
bolyachevets committed Nov 29, 2024
1 parent 58b3b2c commit 736e14e
Show file tree
Hide file tree
Showing 86 changed files with 303 additions and 4,302 deletions.
349 changes: 208 additions & 141 deletions .github/actions/backend-deploy-job/files/cloudbuild.yaml

Large diffs are not rendered by default.

10 changes: 9 additions & 1 deletion .github/actions/backend-deploy/files/cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -198,31 +198,39 @@ steps:
apt-get update
apt-get install jq -y
# Remove the project ID from the release name if it exists
# This is done to ensure the release name is consistent across projects
RELEASE_NAME=$(echo "$RELEASE_NAME" | awk -F'/' '{print $NF}')
echo "Release name: $RELEASE_NAME"
# Loop until the maximum retries is reached or the release is complete
while [ $RETRY_COUNT -lt $MAX_RETRIES ]; do
# Get the status of the release
RELEASE_STATUS=$(gcloud run revisions list --service="${_APP_NAME}-${_DEPLOYMENT_ENV}" \
--region="${_REGION}" \
--project="$PROJECT_ID" \
--filter="metadata.labels.release-id:${RELEASE_NAME}" \
--format="json" | jq -r '.[].status.conditions[] | select (.type == "Ready") | .status')
# Check the status of the release
if [ "${RELEASE_STATUS}" = "True" ]; then
# If the release is successful, exit the loop
echo "Release ${RELEASE_NAME} completed successfully."
break
elif [ "${RELEASE_STATUS}" = "False" ]; then
# If the release fails, exit the script
echo "Release ${RELEASE_NAME} failed with status: ${RELEASE_STATUS}"
exit 1
else
# If the release is still in progress, increment the retry count and sleep
echo "Release ${RELEASE_NAME} is still in progress."
RETRY_COUNT=$((RETRY_COUNT + 1))
sleep $RETRY_INTERVAL
fi
done
# Check if the maximum retries has been reached
if [ $RETRY_COUNT -eq $MAX_RETRIES ]; then
# If the maximum retries is reached, exit the script
echo "Timeout waiting for release ${RELEASE_NAME} to complete."
exit 1
fi
Expand Down
16 changes: 0 additions & 16 deletions .github/actions/cloud-deploy-job/action.yml

This file was deleted.

176 changes: 0 additions & 176 deletions .github/actions/cloud-deploy-job/files/cloudbuild.yaml

This file was deleted.

41 changes: 0 additions & 41 deletions .github/actions/cloud-deploy-job/files/clouddeploy.yaml

This file was deleted.

50 changes: 0 additions & 50 deletions .github/actions/cloud-deploy-job/files/k8s/job.template.yaml

This file was deleted.

37 changes: 0 additions & 37 deletions .github/actions/cloud-deploy-job/files/skaffold.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions .github/actions/cloud-deploy/action.yml

This file was deleted.

Loading

0 comments on commit 736e14e

Please sign in to comment.