Improve deploy scripts
This commit is contained in:
parent
0c9ceb51e6
commit
2f1ddc0d0f
5 changed files with 57 additions and 30 deletions
|
@ -7,11 +7,29 @@ if [[ $# < 1 ]]; then
|
|||
echo "Usage: $0 <production|staging|preview>"
|
||||
exit 1
|
||||
fi
|
||||
ZED_KUBE_NAMESPACE=$1
|
||||
environment=$1
|
||||
|
||||
export_vars_for_environment $ZED_KUBE_NAMESPACE
|
||||
export_vars_for_environment ${environment}
|
||||
target_zed_kube_cluster
|
||||
|
||||
IMAGE_ID=$(kubectl --namespace=${ZED_KUBE_NAMESPACE} get deployment collab -o 'jsonpath={.spec.template.spec.containers[0].image}')
|
||||
deployed_image_id=$(
|
||||
kubectl \
|
||||
--namespace=${environment} \
|
||||
get deployment collab \
|
||||
-o 'jsonpath={.spec.template.spec.containers[0].image}' \
|
||||
| cut -d: -f2
|
||||
)
|
||||
|
||||
echo "Deployed image on ${ZED_KUBE_NAMESPACE}:" $(version_for_image_id $IMAGE_ID)
|
||||
job_image_ids=$(
|
||||
kubectl \
|
||||
--namespace=${environment} \
|
||||
get jobs \
|
||||
-o 'jsonpath={range .items[0:5]}{.spec.template.spec.containers[0].image}{"\n"}{end}'
|
||||
)
|
||||
|
||||
echo "Deployed image version:"
|
||||
echo "$deployed_image_id"
|
||||
echo
|
||||
echo "Migration job image versions:"
|
||||
echo "$job_image_ids"
|
||||
echo
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue