33 lines
825 B
Bash
Executable File
33 lines
825 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -eu
|
|
|
|
if [ "$#" != 1 ]; then
|
|
printf 'Usage: grafana.sh <version>\n' >&2
|
|
exit 2
|
|
fi
|
|
VERSION="$1"
|
|
|
|
if [ -d grafana ]; then
|
|
cd grafana
|
|
git fetch -p
|
|
git checkout "v${VERSION}"
|
|
cd packaging/docker/custom/
|
|
else
|
|
git clone https://github.com/grafana/grafana.git --branch "v${VERSION}"
|
|
cd grafana
|
|
cd packaging/docker/custom/
|
|
fi
|
|
|
|
docker buildx build --pull \
|
|
. \
|
|
--build-arg GRAFANA_VERSION="${VERSION}" \
|
|
--build-arg GF_INSTALL_PLUGINS=frser-sqlite-datasource \
|
|
--push --tag "quay.io/remram44/grafana:${VERSION}-sqlite"
|
|
|
|
docker buildx build --pull \
|
|
. \
|
|
--build-arg GRAFANA_VERSION="${VERSION}" \
|
|
--build-arg GF_INSTALL_PLUGINS=frser-sqlite-datasource,grafana-clickhouse-datasource \
|
|
--push --tag "quay.io/remram44/grafana:${VERSION}-sqlite-clickhouse"
|