Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

control-service: a clear error message on how to handle the failed pipeline #2127

Merged
merged 6 commits into from
May 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion projects/control-service/cicd/.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ control_service_deploy_testing_data_pipelines:
script:
- apk --no-cache add bash openssl curl git gettext zip py-pip
- pip install --upgrade pip && pip install awscli
- export DESIRED_VERSION=v3.11.3 # helm version 3.11.3
- export DESIRED_VERSION=v3.12.0 # helm version
- curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
- bash -ex ./projects/control-service/cicd/deploy-testing-pipelines-service.sh
retry: !reference [.control_service_retry, retry_options]
Expand Down
12 changes: 12 additions & 0 deletions projects/control-service/cicd/deploy-testing-pipelines-service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,18 @@ envsubst < $VDK_OPTIONS > $VDK_OPTIONS_SUBSTITUTED
cd $TPCS_CHART || exit
helm dependency update --kubeconfig=$KUBECONFIG


helm_latest_deployment=`helm history cicd-control-service | tail -1`
echo $helm_latest_deployment
if [[ $helm_latest_deployment == *"pending-upgrade"* ]]; then
echo "Pipeline failed because of an existing deployment in the pending-state.
If the problem persists use 'helm history cicd-control-service' to see the last successful deployment.
then use 'helm rollback cicd-control-service <revision number>' to rollback to that deployment. then re run this pipeline"
exit 125
fi


#
# TODO :change container images with official ones when they are being deployed (I've currently uploaded them once in ghcr.io/tozka)
#
# image.tag is fixed during release. It is set here to deploy using latest change in source code.
Expand Down