grafana/packaging/docker/build-enterprise.sh

21 lines
435 B
Bash
Raw Normal View History

#!/bin/sh
set -e
2018-11-20 10:00:20 -06:00
_raw_grafana_tag=$1
_docker_repo=${2:-grafana/grafana-enterprise}
2018-11-20 10:00:20 -06:00
if echo "$_raw_grafana_tag" | grep -q "^v"; then
_grafana_tag=$(echo "${_raw_grafana_tag}" | cut -d "v" -f 2)
else
_grafana_tag="${_raw_grafana_tag}"
fi
echo "Building and deploying ${_docker_repo}:${_grafana_tag}"
docker build \
--tag "${_docker_repo}:${_grafana_tag}"\
--no-cache=true \
.
docker push "${_docker_repo}:${_grafana_tag}"