diff --git a/scripts/publish-manager.sh b/scripts/publish-manager.sh index 1e7fcff..31501f0 100755 --- a/scripts/publish-manager.sh +++ b/scripts/publish-manager.sh @@ -13,13 +13,19 @@ # See the License for the specific language governing permissions and # limitations under the License. +readonly GCP_PROJECT=$(gcloud config get-value project) + set -o errexit set -o xtrace -REGISTRY=$(gcloud config get-value project) -TAG=${TAG:-latest} +readonly IMAGE_NAME="capd-manager" + +readonly GCR_REGISTRY="gcr.io/${GCP_PROJECT}" +readonly TAG=${TAG:-dev} + +readonly REGISTRY=${REGISTRY:-$GCR_REGISTRY} -IMAGE="gcr.io/${REGISTRY}/capd-manager:${TAG}" +readonly IMAGE=${REGISTRY}/${IMAGE_NAME}:${TAG} docker build --file Dockerfile -t "${IMAGE}" . -gcloud docker -- push "${IMAGE}" +docker push "${IMAGE}"