From aafa66f64401be56b53a50023a856d8ff066b2e9 Mon Sep 17 00:00:00 2001 From: Leonard Gram Date: Thu, 17 Jan 2019 16:55:12 +0100 Subject: [PATCH] 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"