mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-27 10:59:53 +00:00
20 lines
628 B
Bash
Executable file
20 lines
628 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
|
|
export ZED_KUBE_NAMESPACE=$1
|
|
COLLAB_VERSION=$2
|
|
|
|
export_vars_for_environment $ZED_KUBE_NAMESPACE
|
|
export ZED_IMAGE_ID=$(image_id_for_version ${COLLAB_VERSION})
|
|
export ZED_MIGRATE_JOB_NAME=zed-migrate-${COLLAB_VERSION}
|
|
target_zed_kube_cluster
|
|
|
|
envsubst < crates/collab/k8s/migrate.template.yml | kubectl apply -f -
|
|
pod=$(kubectl --namespace=${ZED_KUBE_NAMESPACE} get pods --selector=job-name=${ZED_MIGRATE_JOB_NAME} --output=jsonpath='{.items[*].metadata.name}')
|
|
echo "pod:" $pod
|