diff options
author | Chris Lamb <lamby@debian.org> | 2016-11-03 19:16:31 +0000 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2016-11-04 12:24:04 +0100 |
commit | ca7e3433e701115852b7f45b6e8916e1e8d700d2 (patch) | |
tree | 62ed89159281d60fe6f265365a8ce4b9459520fd | |
parent | 6a2de59f510ba37ae4f246d7943f12f6049d5f9d (diff) | |
download | jenkins.debian.net-ca7e3433e701115852b7f45b6e8916e1e8d700d2.tar.xz |
Submit signing keys to keyservers after generation.
Signed-off-by: Chris Lamb <lamby@debian.org>
Signed-off-by: Holger Levsen <holger@layer-acht.org>
-rwxr-xr-x | update_jdn.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/update_jdn.sh b/update_jdn.sh index 8b23af6e..dfd999d7 100755 --- a/update_jdn.sh +++ b/update_jdn.sh @@ -678,6 +678,16 @@ Expire-Date: 0 %no-protection %commit EOF + + GPG_KEY_ID="$(sudo -u jenkins gpg --with-colons --fixed-list-mode --list-secret-keys | grep '^sec' | cut -d: -f5 | tail -n1)" + + if [ "$GPG_KEY_ID" = "" ] + then + explain "$(date) - Generated GPG key but could not parse key ID" + else + explain "$(date) - Generated GPG key $GPG_KEY_ID - submitting to keyserver" + sudo -u jenkins gpg --send-keys $GPG_KEY_ID + fi fi # |