mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-24 11:01:54 +00:00
Fix errors in deploy script
Also, allow deploying to staging with uncommitted changes. Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
39ac723f5e
commit
09f38bbd16
1 changed files with 5 additions and 5 deletions
|
@ -22,16 +22,16 @@ if [[ ! -f $ENV_FILE ]]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -n $(git status --short) ]]; then
|
||||
echo "Cannot deploy with uncommited changes"
|
||||
if [[ $ZED_KUBE_NAMESPACE == "production" && -n $(git status --short) ]]; then
|
||||
echo "Cannot deploy uncommited changes to production"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
git_sha=$(git rev-parse HEAD)
|
||||
export ZED_IMAGE_ID=registry.digitalocean.com/zed/zed-server:${ZED_KUBE_NAMESPACE}-${git_sha}
|
||||
export ZED_IMAGE_ID="registry.digitalocean.com/zed/zed-server:${ZED_KUBE_NAMESPACE}-${git_sha}"
|
||||
export $(cat $ENV_FILE)
|
||||
|
||||
docker build . --tag $ZED_IMAGE_ID
|
||||
docker push $ZED_IMAGE_ID
|
||||
docker build . --tag "$ZED_IMAGE_ID"
|
||||
docker push "$ZED_IMAGE_ID"
|
||||
|
||||
envsubst < server/k8s/manifest.template.yml | kubectl apply -f -
|
||||
|
|
Loading…
Reference in a new issue