grafana/scripts/build/verify_signed_packages.sh
Marcus Efraimsson 4386604751
Build: Split up task in the CI pipeline to ease running outside circleci (#18861)
* build: make sign rpm packages not depend on checking out private key

* build: move commands from circleci config into verify signed packages script

* build: split update and publish of deb and rpm into two scripts

* use files argument for sign and verify packages

* validate files argument for sign and verify packages

* update test publish of deb/rpm readme
2019-09-23 12:00:18 +02:00

25 lines
393 B
Bash
Executable File

#!/bin/bash
_files=$*
if [ -z "$_files" ]; then
echo "_files (arg 1) has to be set"
exit 1
fi
mkdir -p ~/.rpmdb/pubkeys
curl -s https://packages.grafana.com/gpg.key > ~/.rpmdb/pubkeys/grafana.key
ALL_SIGNED=0
for file in $_files; do
if rpm -K "$file" | grep "pgp.*OK" -q ; then
echo "$file" OK
else
ALL_SIGNED=1
echo "$file" NOT SIGNED
fi
done
exit $ALL_SIGNED