Signed-off-by: Alfredo Deza <adeza@redhat.com>
set -ex
date
-#export GNUPGHOME=/home/jenkins-build/build/gnupg.autobuild/
-export GNUPGHOME=/home/jenkins-build/build/gnupg.ceph-release/
-export KEYID=17ED316D
+
+# Jenkins will set $RELEASE as a parameter in the job configuration.
+if $RELEASE ; then
+ # This is a formal release. Sign it with the release key.
+ export GNUPGHOME=/home/jenkins-build/build/gnupg.ceph-release/
+ export KEYID=17ED316D
+else
+ # This is an automatic build. Sign it with the autobuild key.
+ export GNUPGHOME=/home/jenkins-build/build/gnupg.autobuild/
+ export KEYID=03C3951A
+fi
+
HOST=$(hostname --short)
echo "Building on ${HOST}"
echo " DIST=${DIST}"