From b3512f43a37953ba5dd4c7d1c4db47b611528d4e Mon Sep 17 00:00:00 2001 From: Leonard Gram Date: Wed, 16 Jan 2019 11:11:00 +0100 Subject: [PATCH 1/9] build: repo update testable and more robus. - adds script for integration testing - package path parameterized - more robust updates --- .circleci/config.yml | 8 +++--- scripts/build/update_repo/init-deb-repo.sh | 12 ++++++++ .../build/update_repo/test-update-deb-repo.sh | 5 ++++ scripts/build/update_repo/update-deb.sh | 28 +++++++++++-------- scripts/build/update_repo/update-rpm.sh | 12 ++++---- 5 files changed, 45 insertions(+), 20 deletions(-) create mode 100755 scripts/build/update_repo/init-deb-repo.sh create mode 100755 scripts/build/update_repo/test-update-deb-repo.sh diff --git a/.circleci/config.yml b/.circleci/config.yml index ec1fcfb411f..509dce3d761 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -370,10 +370,10 @@ jobs: command: './scripts/build/load-signing-key.sh' - run: name: Update Debian repository - command: './scripts/build/update_repo/update-deb.sh "enterprise" "$GPG_KEY_PASSWORD" "$CIRCLE_TAG"' + command: './scripts/build/update_repo/update-deb.sh "enterprise" "$GPG_KEY_PASSWORD" "$CIRCLE_TAG" "enterprise-dist"' - run: name: Update RPM repository - command: './scripts/build/update_repo/update-rpm.sh "enterprise" "$GPG_KEY_PASSWORD" "$CIRCLE_TAG"' + command: './scripts/build/update_repo/update-rpm.sh "enterprise" "$GPG_KEY_PASSWORD" "$CIRCLE_TAG" "enterprise-dist"' deploy-master: @@ -433,10 +433,10 @@ jobs: command: './scripts/build/load-signing-key.sh' - run: name: Update Debian repository - command: './scripts/build/update_repo/update-deb.sh "oss" "$GPG_KEY_PASSWORD" "$CIRCLE_TAG"' + command: './scripts/build/update_repo/update-deb.sh "oss" "$GPG_KEY_PASSWORD" "$CIRCLE_TAG" "dist"' - run: name: Update RPM repository - command: './scripts/build/update_repo/update-rpm.sh "oss" "$GPG_KEY_PASSWORD" "$CIRCLE_TAG"' + command: './scripts/build/update_repo/update-rpm.sh "oss" "$GPG_KEY_PASSWORD" "$CIRCLE_TAG" "dist"' workflows: version: 2 diff --git a/scripts/build/update_repo/init-deb-repo.sh b/scripts/build/update_repo/init-deb-repo.sh new file mode 100755 index 00000000000..2b245dc2d42 --- /dev/null +++ b/scripts/build/update_repo/init-deb-repo.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +# Run this if you need to recreate the debian repository for some reason + +# Setup environment +cp scripts/build/update_repo/aptly.conf /etc/aptly.conf +mkdir -p /deb-repo/db \ + /deb-repo/repo \ + /deb-repo/tmp + +aptly repo create -distribution=stable -component=main grafana +aptly repo create -distribution=beta -component=main beta diff --git a/scripts/build/update_repo/test-update-deb-repo.sh b/scripts/build/update_repo/test-update-deb-repo.sh new file mode 100755 index 00000000000..f27e9bec265 --- /dev/null +++ b/scripts/build/update_repo/test-update-deb-repo.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +GPG_PASS=${1:-} + +./scripts/build/update_repo/update-deb.sh "oss" "$GPG_PASS" "v5.4.3" "dist" "grafana-testing-aptly-db" "grafana-testing-repo" diff --git a/scripts/build/update_repo/update-deb.sh b/scripts/build/update_repo/update-deb.sh index 89c5937b064..0f80de9674c 100755 --- a/scripts/build/update_repo/update-deb.sh +++ b/scripts/build/update_repo/update-deb.sh @@ -3,10 +3,14 @@ RELEASE_TYPE="${1:-}" GPG_PASS="${2:-}" RELEASE_TAG="${3:-}" +DIST_PATH="${4:-}" +GCP_DB_BUCKET="${5:-grafana-aptly-db}" +GCP_REPO_BUCKET="${6:-grafana-repo}" + REPO="grafana" -if [ -z "$RELEASE_TYPE" -o -z "$GPG_PASS" ]; then - echo "Both RELEASE_TYPE (arg 1) and GPG_PASS (arg 2) has to be set" +if [ -z "$RELEASE_TYPE" -o -z "$GPG_PASS" -o -z "$DIST_PATH" ]; then + echo "Both RELEASE_TYPE (arg 1), GPG_PASS (arg 2) and DIST_PATH (arg 4) has to be set" exit 1 fi @@ -28,30 +32,32 @@ mkdir -p /deb-repo/db \ /deb-repo/tmp # Download the database -gsutil -m rsync -r "gs://grafana-aptly-db/$RELEASE_TYPE" /deb-repo/db +gsutil -m rsync -r -d "gs://$GCP_DB_BUCKET/$RELEASE_TYPE" /deb-repo/db # Add the new release to the repo -aptly publish drop grafana filesystem:repo:grafana || true -aptly publish drop beta filesystem:repo:grafana || true -cp ./dist/*.deb /deb-repo/tmp +cp $DIST_PATH/*.deb /deb-repo/tmp rm /deb-repo/tmp/grafana_latest*.deb || true -aptly repo add "$REPO" ./dist +aptly repo add "$REPO" /deb-repo/tmp #adds too many packages in enterprise # Setup signing and sign the repo echo "allow-loopback-pinentry" > ~/.gnupg/gpg-agent.conf echo "pinentry-mode loopback" > ~/.gnupg/gpg.conf +pkill gpg-agent || true touch /tmp/sign-this +rm /tmp/sign-this.asc || true ./scripts/build/update_repo/unlock-gpg-key.sh "$GPG_PASS" rm /tmp/sign-this /tmp/sign-this.asc -aptly publish repo grafana filesystem:repo:grafana -aptly publish repo beta filesystem:repo:grafana +aptly publish update stable filesystem:repo:grafana +aptly publish update beta filesystem:repo:grafana # Update the repo and db on gcp -gsutil -m rsync -r -d /deb-repo/db "gs://grafana-aptly-db/$RELEASE_TYPE" -gsutil -m rsync -r -d /deb-repo/repo/grafana "gs://grafana-repo/$RELEASE_TYPE/deb" +## TODO: need to update this to push the binaries first and then the metadata so that we dont cache the binaries missing. + +gsutil -m rsync -r -d /deb-repo/db "gs://$GCP_DB_BUCKET/$RELEASE_TYPE" +gsutil -m rsync -r -d /deb-repo/repo/grafana "gs://$GCP_REPO_BUCKET/$RELEASE_TYPE/deb" # usage: # diff --git a/scripts/build/update_repo/update-rpm.sh b/scripts/build/update_repo/update-rpm.sh index caed3918216..7b28412df37 100755 --- a/scripts/build/update_repo/update-rpm.sh +++ b/scripts/build/update_repo/update-rpm.sh @@ -2,12 +2,13 @@ RELEASE_TYPE="${1:-}" GPG_PASS="${2:-}" - RELEASE_TAG="${3:-}" +DIST_PATH="${4:-}" + REPO="rpm" -if [ -z "$RELEASE_TYPE" -o -z "$GPG_PASS" ]; then - echo "Both RELEASE_TYPE (arg 1) and GPG_PASS (arg 2) has to be set" +if [ -z "$RELEASE_TYPE" -o -z "$GPG_PASS" -o -z "$DIST_PATH" ]; then + echo "Both RELEASE_TYPE (arg 1), GPG_PASS (arg 2) and DIST_PATH (arg 4) has to be set" exit 1 fi @@ -30,10 +31,11 @@ mkdir -p /rpm-repo gsutil -m rsync -r "$BUCKET" /rpm-repo # Add the new release to the repo -cp ./dist/*.rpm /rpm-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 # Setup signing and sign the repo @@ -56,4 +58,4 @@ gsutil -m rsync -r -d /rpm-repo "$BUCKET" # gpgcheck=1 # gpgkey=https://packages.grafana.com/gpg.key # sslverify=1 -# sslcacert=/etc/pki/tls/certs/ca-bundle.crt \ No newline at end of file +# sslcacert=/etc/pki/tls/certs/ca-bundle.crt From 38bcb88d8aa2c71add4373fc2d9c1c975e3e3df6 Mon Sep 17 00:00:00 2001 From: Leonard Gram Date: Wed, 16 Jan 2019 16:05:45 +0100 Subject: [PATCH 2/9] build: uploads binaries before metadata in deb repo. --- scripts/build/update_repo/update-deb.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/build/update_repo/update-deb.sh b/scripts/build/update_repo/update-deb.sh index 0f80de9674c..8aef5a71892 100755 --- a/scripts/build/update_repo/update-deb.sh +++ b/scripts/build/update_repo/update-deb.sh @@ -54,9 +54,12 @@ aptly publish update stable filesystem:repo:grafana aptly publish update beta filesystem:repo:grafana # Update the repo and db on gcp -## TODO: need to update this to push the binaries first and then the metadata so that we dont cache the binaries missing. gsutil -m rsync -r -d /deb-repo/db "gs://$GCP_DB_BUCKET/$RELEASE_TYPE" + +# Uploads the binaries before the metadata (to prevent 404's for debs) +gsutil -m rsync -r /deb-repo/repo/grafana/pool "gs://$GCP_REPO_BUCKET/$RELEASE_TYPE/deb/pool" + gsutil -m rsync -r -d /deb-repo/repo/grafana "gs://$GCP_REPO_BUCKET/$RELEASE_TYPE/deb" # usage: From cae2bdf994ab906661d62feb8bad292a01f4de8f Mon Sep 17 00:00:00 2001 From: Leonard Gram Date: Wed, 16 Jan 2019 16:18:10 +0100 Subject: [PATCH 3/9] build: deb repo update test usage instructions. --- .../build/update_repo/test-update-deb-repo.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/scripts/build/update_repo/test-update-deb-repo.sh b/scripts/build/update_repo/test-update-deb-repo.sh index f27e9bec265..192de6591df 100755 --- a/scripts/build/update_repo/test-update-deb-repo.sh +++ b/scripts/build/update_repo/test-update-deb-repo.sh @@ -1,5 +1,22 @@ #!/usr/bin/env bash +# Usage +# docker run -ti --rm -u 0:0 grafana/grafana-ci-deploy:1.1.0 bash +# in the container: +# mkdir -p /go/src/github.com/grafana/dist +# cd /go/src/github.com/grafana +# +# outside of container: +# cd /.. +# docker cp grafana :/go/src/github.com/grafana/. +# docker cp :/private.key +# +# in container: +# gpg --batch --allow-secret-key-import --import /private.key +# cd dist && wget https://dl.grafana.com/oss/release/grafana_5.4.3_amd64.deb && cd .. +# run this script: +# ./script/build/update_repo/test-update-deb-repo.sh + GPG_PASS=${1:-} ./scripts/build/update_repo/update-deb.sh "oss" "$GPG_PASS" "v5.4.3" "dist" "grafana-testing-aptly-db" "grafana-testing-repo" From 7ac859715d23eba2b836f64cbdd25c7d9f65b5ea Mon Sep 17 00:00:00 2001 From: Leonard Gram Date: Thu, 17 Jan 2019 10:17:59 +0100 Subject: [PATCH 4/9] build: test script for rpm repo. --- .../build/update_repo/test-update-rpm-repo.sh | 22 +++++++++++++++++++ scripts/build/update_repo/update-rpm.sh | 8 +++---- 2 files changed, 26 insertions(+), 4 deletions(-) create mode 100755 scripts/build/update_repo/test-update-rpm-repo.sh diff --git a/scripts/build/update_repo/test-update-rpm-repo.sh b/scripts/build/update_repo/test-update-rpm-repo.sh new file mode 100755 index 00000000000..f7c36c6b177 --- /dev/null +++ b/scripts/build/update_repo/test-update-rpm-repo.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +# Usage +# docker run -ti --rm -u 0:0 grafana/grafana-ci-deploy:1.1.0 bash +# in the container: +# mkdir -p /go/src/github.com/grafana/dist +# cd /go/src/github.com/grafana +# +# outside of container: +# cd /.. +# docker cp grafana :/go/src/github.com/grafana/. +# docker cp :/private.key +# +# in container: +# gpg --batch --allow-secret-key-import --import /private.key +# cd dist && wget https://dl.grafana.com/oss/release/grafana-5.4.3-1.x86_64.rpm && cd .. +# run this script: +# ./script/build/update_repo/test-update-rpm-repo.sh + +GPG_PASS=${1:-} + +./scripts/build/update_repo/update-rpm.sh "oss" "$GPG_PASS" "v5.4.3" "dist" "grafana-testing-repo" diff --git a/scripts/build/update_repo/update-rpm.sh b/scripts/build/update_repo/update-rpm.sh index 7b28412df37..20c7871265b 100755 --- a/scripts/build/update_repo/update-rpm.sh +++ b/scripts/build/update_repo/update-rpm.sh @@ -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: From d71f1bf4bc4d5868f993d36f508c631ca1f44714 Mon Sep 17 00:00:00 2001 From: Leonard Gram Date: Thu, 17 Jan 2019 11:00:34 +0100 Subject: [PATCH 5/9] build: only build amd64 for enterprise. --- scripts/build/build-all.sh | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/scripts/build/build-all.sh b/scripts/build/build-all.sh index 980ef5cc4c2..654abaf1174 100755 --- a/scripts/build/build-all.sh +++ b/scripts/build/build-all.sh @@ -30,10 +30,13 @@ fi echo "Build arguments: $OPT" -go run build.go -goarch armv7 -cc ${CCARMV7} ${OPT} build -go run build.go -goarch arm64 -cc ${CCARM64} ${OPT} build -go run build.go -goos darwin -cc ${CCOSX64} ${OPT} build +# might want to check for enterprise here and only build what we need +if echo "$EXTRA_OPTS" | grep -vq enterprise ; then + go run build.go -goarch armv7 -cc ${CCARMV7} ${OPT} build + go run build.go -goarch arm64 -cc ${CCARM64} ${OPT} build + go run build.go -goos darwin -cc ${CCOSX64} ${OPT} build +fi go run build.go -goos windows -cc ${CCWIN64} ${OPT} build # Do not remove CC from the linux build, its there for compatibility with Centos6 @@ -62,22 +65,25 @@ echo "Packaging" go run build.go -goos linux -pkg-arch amd64 ${OPT} package-only #removing amd64 phantomjs bin for armv7/arm64 packages rm tools/phantomjs/phantomjs -go run build.go -goos linux -pkg-arch armv7 ${OPT} package-only -go run build.go -goos linux -pkg-arch arm64 ${OPT} package-only -if [ -d '/tmp/phantomjs/darwin' ]; then - cp /tmp/phantomjs/darwin/phantomjs tools/phantomjs/phantomjs -else - echo 'PhantomJS binaries for darwin missing!' +if echo "$EXTRA_OPTS" | grep -vq enterprise ; then + go run build.go -goos linux -pkg-arch armv7 ${OPT} package-only + go run build.go -goos linux -pkg-arch arm64 ${OPT} package-only + + if [ -d '/tmp/phantomjs/darwin' ]; then + cp /tmp/phantomjs/darwin/phantomjs tools/phantomjs/phantomjs + else + echo 'PhantomJS binaries for darwin missing!' + fi + go run build.go -goos darwin -pkg-arch amd64 ${OPT} package-only fi -go run build.go -goos darwin -pkg-arch amd64 ${OPT} package-only if [ -d '/tmp/phantomjs/windows' ]; then cp /tmp/phantomjs/windows/phantomjs.exe tools/phantomjs/phantomjs.exe - rm tools/phantomjs/phantomjs + rm tools/phantomjs/phantomjs || true else echo 'PhantomJS binaries for Windows missing!' fi go run build.go -goos windows -pkg-arch amd64 ${OPT} package-only -go run build.go latest \ No newline at end of file +go run build.go latest From 18004562a6be048be5622eccb48e26cf488ca38a Mon Sep 17 00:00:00 2001 From: Leonard Gram Date: Thu, 17 Jan 2019 13:40:40 +0100 Subject: [PATCH 6/9] build: fixes permissions issue. --- scripts/build/update_repo/update-deb.sh | 3 ++- scripts/build/update_repo/update-rpm.sh | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/build/update_repo/update-deb.sh b/scripts/build/update_repo/update-deb.sh index 8aef5a71892..a70af5b8b5c 100755 --- a/scripts/build/update_repo/update-deb.sh +++ b/scripts/build/update_repo/update-deb.sh @@ -26,7 +26,8 @@ fi set -e # Setup environment -cp scripts/build/update_repo/aptly.conf /etc/aptly.conf +cp scripts/build/update_repo/aptly.conf ~/.aptly.conf + mkdir -p /deb-repo/db \ /deb-repo/repo \ /deb-repo/tmp diff --git a/scripts/build/update_repo/update-rpm.sh b/scripts/build/update_repo/update-rpm.sh index 20c7871265b..f02647f55a0 100755 --- a/scripts/build/update_repo/update-rpm.sh +++ b/scripts/build/update_repo/update-rpm.sh @@ -26,6 +26,7 @@ set -e # Setup environment BUCKET="gs://$GCP_REPO_BUCKET/$RELEASE_TYPE/$REPO" + mkdir -p /rpm-repo # Download the database From a585a919b3bffab1742e184036ffd90fca1b8564 Mon Sep 17 00:00:00 2001 From: Leonard Gram Date: Thu, 17 Jan 2019 14:42:20 +0100 Subject: [PATCH 7/9] build: updates ci deploy. --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 509dce3d761..876db1d4823 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -323,7 +323,7 @@ jobs: deploy-enterprise-master: docker: - - image: grafana/grafana-ci-deploy:1.1.0 + - image: grafana/grafana-ci-deploy:1.2.0 steps: - attach_workspace: at: . @@ -346,7 +346,7 @@ jobs: deploy-enterprise-release: docker: - - image: grafana/grafana-ci-deploy:1.1.0 + - image: grafana/grafana-ci-deploy:1.2.0 steps: - attach_workspace: at: . @@ -378,7 +378,7 @@ jobs: deploy-master: docker: - - image: grafana/grafana-ci-deploy:1.1.0 + - image: grafana/grafana-ci-deploy:1.2.0 steps: - attach_workspace: at: . @@ -408,7 +408,7 @@ jobs: deploy-release: docker: - - image: grafana/grafana-ci-deploy:1.1.0 + - image: grafana/grafana-ci-deploy:1.2.0 steps: - checkout - attach_workspace: From a95fe15437fcfe595f854c2e254143eeb47459a6 Mon Sep 17 00:00:00 2001 From: Leonard Gram Date: Thu, 17 Jan 2019 16:42:27 +0100 Subject: [PATCH 8/9] build: comments --- scripts/build/build-all.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/build/build-all.sh b/scripts/build/build-all.sh index 654abaf1174..dd69f8139c8 100755 --- a/scripts/build/build-all.sh +++ b/scripts/build/build-all.sh @@ -30,8 +30,7 @@ fi echo "Build arguments: $OPT" -# might want to check for enterprise here and only build what we need - +# build only amd64 for enterprise if echo "$EXTRA_OPTS" | grep -vq enterprise ; then go run build.go -goarch armv7 -cc ${CCARMV7} ${OPT} build go run build.go -goarch arm64 -cc ${CCARM64} ${OPT} build @@ -66,6 +65,7 @@ go run build.go -goos linux -pkg-arch amd64 ${OPT} package-only #removing amd64 phantomjs bin for armv7/arm64 packages rm tools/phantomjs/phantomjs +# build only amd64 for enterprise if echo "$EXTRA_OPTS" | grep -vq enterprise ; then go run build.go -goos linux -pkg-arch armv7 ${OPT} package-only go run build.go -goos linux -pkg-arch arm64 ${OPT} package-only From aafa66f64401be56b53a50023a856d8ff066b2e9 Mon Sep 17 00:00:00 2001 From: Leonard Gram Date: Thu, 17 Jan 2019 16:55:12 +0100 Subject: [PATCH 9/9] build: usage instruction for repo test. --- scripts/build/update_repo/README.md | 28 +++++++++++++++++++ .../build/update_repo/test-update-deb-repo.sh | 17 ----------- .../build/update_repo/test-update-rpm-repo.sh | 17 ----------- 3 files changed, 28 insertions(+), 34 deletions(-) create mode 100644 scripts/build/update_repo/README.md diff --git a/scripts/build/update_repo/README.md b/scripts/build/update_repo/README.md new file mode 100644 index 00000000000..22f2ea1241d --- /dev/null +++ b/scripts/build/update_repo/README.md @@ -0,0 +1,28 @@ +# Repository updates deb/rpm + + + +## Testing + +It's possible to test the repo updates for rpm and deb by running the test scripts within a docker container like this. Tests are being executed by using two buckets on gcp setup for testing. + +```bash +docker run -ti --rm -u 0:0 grafana/grafana-ci-deploy:1.2.0 bash # 1.2.0 is the newest image at the time of writing +# in the container: +mkdir -p /go/src/github.com/grafana/dist +cd /go/src/github.com/grafana + +#outside of container: +cd /.. +docker cp grafana :/go/src/github.com/grafana/. +docker cp :/private.key + +#in container: +gpg --batch --allow-secret-key-import --import /private.key +cd dist && wget https://dl.grafana.com/oss/release/grafana_5.4.3_amd64.deb && wget https://dl.grafana.com/oss/release/grafana-5.4.3-1.x86_64.rpm && cd .. + +#run these scripts: +./script/build/update_repo/test-update-deb-repo.sh +./script/build/update_repo/test-update-rpm-repo.sh + +``` diff --git a/scripts/build/update_repo/test-update-deb-repo.sh b/scripts/build/update_repo/test-update-deb-repo.sh index 192de6591df..f27e9bec265 100755 --- a/scripts/build/update_repo/test-update-deb-repo.sh +++ b/scripts/build/update_repo/test-update-deb-repo.sh @@ -1,22 +1,5 @@ #!/usr/bin/env bash -# Usage -# docker run -ti --rm -u 0:0 grafana/grafana-ci-deploy:1.1.0 bash -# in the container: -# mkdir -p /go/src/github.com/grafana/dist -# cd /go/src/github.com/grafana -# -# outside of container: -# cd /.. -# docker cp grafana :/go/src/github.com/grafana/. -# docker cp :/private.key -# -# in container: -# gpg --batch --allow-secret-key-import --import /private.key -# cd dist && wget https://dl.grafana.com/oss/release/grafana_5.4.3_amd64.deb && cd .. -# run this script: -# ./script/build/update_repo/test-update-deb-repo.sh - GPG_PASS=${1:-} ./scripts/build/update_repo/update-deb.sh "oss" "$GPG_PASS" "v5.4.3" "dist" "grafana-testing-aptly-db" "grafana-testing-repo" diff --git a/scripts/build/update_repo/test-update-rpm-repo.sh b/scripts/build/update_repo/test-update-rpm-repo.sh index f7c36c6b177..de85f000de8 100755 --- a/scripts/build/update_repo/test-update-rpm-repo.sh +++ b/scripts/build/update_repo/test-update-rpm-repo.sh @@ -1,22 +1,5 @@ #!/usr/bin/env bash -# Usage -# docker run -ti --rm -u 0:0 grafana/grafana-ci-deploy:1.1.0 bash -# in the container: -# mkdir -p /go/src/github.com/grafana/dist -# cd /go/src/github.com/grafana -# -# outside of container: -# cd /.. -# docker cp grafana :/go/src/github.com/grafana/. -# docker cp :/private.key -# -# in container: -# gpg --batch --allow-secret-key-import --import /private.key -# cd dist && wget https://dl.grafana.com/oss/release/grafana-5.4.3-1.x86_64.rpm && cd .. -# run this script: -# ./script/build/update_repo/test-update-rpm-repo.sh - GPG_PASS=${1:-} ./scripts/build/update_repo/update-rpm.sh "oss" "$GPG_PASS" "v5.4.3" "dist" "grafana-testing-repo"