File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -52,9 +52,18 @@ function upgrade_release() {
52
52
# The --install flag ensures that the release will be installed if it does not exist
53
53
# The --debug flag enables verbose output for debugging
54
54
# The --set flag sets the specified values on the command line
55
+ trap ' catch_errors' ERR
56
+ catch_errors () {
57
+ echo " Error occurred during deployment. Rolled back to version: $( helm history app-release --max 1 --output json | jq -r ' .[0].app_version' ) "
58
+ exit 1
59
+ }
55
60
helm upgrade --install --atomic app-release ./my-chart ${set_flag} ${debug_flag}
56
61
kubectl rollout status deployment/app-release-my-chart-v1
57
62
kubectl rollout status deployment/app-release-my-chart-v2
63
+ echo " Current deployment status:"
64
+ kubectl get deployments
65
+ echo " Current releases history:"
66
+ helm history app-release
58
67
}
59
68
60
69
validate_input " ${1} "
You can’t perform that action at this time.
0 commit comments