mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-07 20:39:04 +03:00
26 lines
699 B
Bash
Executable File
26 lines
699 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -eu
|
|
source script/lib/deploy-helpers.sh
|
|
|
|
if [[ $# < 2 ]]; then
|
|
echo "Usage: $0 <production|staging|preview> <tag-name>"
|
|
exit 1
|
|
fi
|
|
environment=$1
|
|
version=$2
|
|
|
|
export_vars_for_environment ${environment}
|
|
image_id=$(image_id_for_version ${version})
|
|
|
|
export ZED_KUBE_NAMESPACE=${environment}
|
|
export ZED_IMAGE_ID=${image_id}
|
|
export ZED_MIGRATE_JOB_NAME=zed-migrate-${version}
|
|
|
|
target_zed_kube_cluster
|
|
envsubst < crates/collab/k8s/migrate.template.yml | kubectl apply -f -
|
|
|
|
pod=$(kubectl --namespace=${environment} get pods --selector=job-name=${ZED_MIGRATE_JOB_NAME} --output=jsonpath='{.items[0].metadata.name}')
|
|
|
|
echo "Job pod:" $pod
|
|
kubectl --namespace=${environment} logs -f ${pod} |