|
|
@@ -4,6 +4,7 @@ RELEASE_TYPE="${1:-}"
|
|
|
GPG_PASS="${2:-}"
|
|
|
RELEASE_TAG="${3:-}"
|
|
|
DIST_PATH="${4:-}"
|
|
|
+GCP_REPO_BUCKET="${5:-grafana-repo}"
|
|
|
|
|
|
REPO="rpm"
|
|
|
|
|
|
@@ -24,7 +25,7 @@ fi
|
|
|
set -e
|
|
|
|
|
|
# Setup environment
|
|
|
-BUCKET="gs://grafana-repo/$RELEASE_TYPE/$REPO"
|
|
|
+BUCKET="gs://$GCP_REPO_BUCKET/$RELEASE_TYPE/$REPO"
|
|
|
mkdir -p /rpm-repo
|
|
|
|
|
|
# Download the database
|
|
|
@@ -33,9 +34,7 @@ gsutil -m rsync -r "$BUCKET" /rpm-repo
|
|
|
# Add the new release to the repo
|
|
|
cp $DIST_PATH/*.rpm /rpm-repo # adds to many files for enterprise
|
|
|
rm /rpm-repo/grafana-latest-1*.rpm || true
|
|
|
-cd /rpm-repo
|
|
|
-createrepo .
|
|
|
-cd /go/src/github.com/grafana/grafana
|
|
|
+createrepo /rpm-repo
|
|
|
|
|
|
# Setup signing and sign the repo
|
|
|
|
|
|
@@ -47,6 +46,7 @@ pkill gpg-agent || true
|
|
|
./scripts/build/update_repo/sign-rpm-repo.sh "$GPG_PASS"
|
|
|
|
|
|
# Update the repo and db on gcp
|
|
|
+gsutil -m cp /rpm-repo/*.rpm "$BUCKET" # sync binaries first to avoid cache misses
|
|
|
gsutil -m rsync -r -d /rpm-repo "$BUCKET"
|
|
|
|
|
|
# usage:
|