From 2d52e1dfef65294a0ddf7c6377e3da2b8ed5a6b0 Mon Sep 17 00:00:00 2001 From: Bogdan Matican Date: Fri, 24 Jan 2020 17:25:47 +0000 Subject: [PATCH] Fix YW yb_release using the wrong DEVOPS_HOME Summary: If DEVOPS_HOME was set, managed/yb_release would use that. This could cause it to point to an invalid devops repo and break the release. Making sure we reset it to the local in-repo devops. We are importing ybops pieces inside the managed/yb_release.py. Test Plan: call top-level `yb_release --destination /tmp/tmpjaui3M --force --yw` Reviewers: wesley, ram, mikhail Reviewed By: mikhail Subscribers: jenkins-bot, yugaware Differential Revision: https://phabricator.dev.yugabyte.com/D7837 --- managed/yb_release | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/managed/yb_release b/managed/yb_release index 06e793d9e4fe..1db22676ef88 100755 --- a/managed/yb_release +++ b/managed/yb_release @@ -2,16 +2,7 @@ # Copyright (c) YugaByte, Inc. set -euo pipefail -# TODO: move this to common file. -if [[ -z ${DEVOPS_HOME:-} ]]; then - devops_home_candidate_dir="${BASH_SOURCE%/*}"/devops - if [[ -d $devops_home_candidate_dir ]]; then - export DEVOPS_HOME=$( cd "$devops_home_candidate_dir" && pwd ) - else - echo "DEVOPS_HOME not set and the devops repo not found at $devops_home_candidate_dir" >&2 - exit 1 - fi -fi +export DEVOPS_HOME="${BASH_SOURCE%/*}"/devops . "$DEVOPS_HOME/bin/"/common.sh