Commit c3e23d75 by Leonard Gram

build: rpm repo deploy.

parent a26a10cf
...@@ -426,7 +426,7 @@ jobs: ...@@ -426,7 +426,7 @@ jobs:
command: './scripts/build/update_repo/update-deb.sh "oss" "$GPG_KEY_PASSWORD"' command: './scripts/build/update_repo/update-deb.sh "oss" "$GPG_KEY_PASSWORD"'
- run: - run:
name: Update RPM repository name: Update RPM repository
command: 'ls' command: './scripts/build/update_repo/update-rpm.sh "oss" "$GPG_KEY_PASSWORD"'
workflows: workflows:
version: 2 version: 2
......
#!/usr/bin/env expect
set password [lindex $argv 0]
spawn gpg --detach-sign --armor /rpm-repo/repodata/repomd.xml
expect "Enter passphrase: "
send -- "$password\r"
expect eof
...@@ -29,7 +29,7 @@ aptly repo add grafana ./dist ...@@ -29,7 +29,7 @@ aptly repo add grafana ./dist
echo "allow-loopback-pinentry" > ~/.gnupg/gpg-agent.conf echo "allow-loopback-pinentry" > ~/.gnupg/gpg-agent.conf
echo "pinentry-mode loopback" > ~/.gnupg/gpg.conf echo "pinentry-mode loopback" > ~/.gnupg/gpg.conf
./scripts/build/update_repo/sign-repo.sh "$GPG_PASS" ./scripts/build/update_repo/sign-deb-repo.sh "$GPG_PASS"
# Update the repo and db on gcp # Update the repo and db on gcp
gsutil -m rsync -r -d /deb-repo/db gs://grafana-aptly-db/repo-db gsutil -m rsync -r -d /deb-repo/db gs://grafana-aptly-db/repo-db
......
#!/usr/bin/env bash #!/usr/bin/env bash
RELEASE_TYPE="${1:-}"
GPG_PASS="${2:-}"
if [ -z "$RELEASE_TYPE" -o -z "$GPG_PASS" ]; then
echo "Both RELEASE_TYPE (arg 1) and GPG_PASS (arg 2) has to be set"
exit 1
fi
set -e
# Setup environment
mkdir -p /rpm-repo
# Download the database
gsutil -m rsync -r "gs://grafana-repo/$RELEASE_TYPE/rpm" /rpm-repo
# Add the new release to the repo
cp ./dist/*.rpm /rpm-repo
cd /rpm-repo
createrepo .
# Setup signing and sign the repo
echo "allow-loopback-pinentry" > ~/.gnupg/gpg-agent.conf
echo "pinentry-mode loopback" > ~/.gnupg/gpg.conf
./scripts/build/update_repo/sign-rpm-repo.sh "$GPG_PASS"
# Update the repo and db on gcp
gsutil -m rsync -r -d /rpm-repo "gs://grafana-repo/$RELEASE_TYPE/rpm"
# usage:
# [grafana]
# name=grafana
# baseurl=https://grafana-repo.storage.googleapis.com/oss/rpm
# repo_gpgcheck=1
# enabled=1
# gpgcheck=1
# gpgkey=https://grafana-repo.storage.googleapis.com/gpg.key https://grafanarel.s3.amazonaws.com/RPM-GPG-KEY-grafana
# sslverify=1
# sslcacert=/etc/pki/tls/certs/ca-bundle.crt# later:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment