From b5307b95c757854b18e2fd275b341ada7bd6b6bd Mon Sep 17 00:00:00 2001 From: Ken Dreyer Date: Mon, 13 Jan 2014 20:29:06 -0700 Subject: [PATCH] jenkins: support autobuild key or release key We need Jenkins to build ceph more often so we can have more testing, but we don't want to sign these "unofficial" builds with the official release key. Conditionally select the release key or the autobuild key based upon the $RELEASE environment variable. Jenkins will set this variable using a parameter when it runs each ceph build. For formal releases, we will set the parameter to "true". Signed-off-by: Ken Dreyer --- jenkins/build | 14 +++++++++++--- jenkins/setup | 14 +++++++++++--- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/jenkins/build b/jenkins/build index a9694297..44b181cf 100644 --- a/jenkins/build +++ b/jenkins/build @@ -3,9 +3,17 @@ # This is a script that runs inside Jenkins. # http://jenkins.ceph.com/job/ceph-build/ -#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 $(hostname) Date: $(date)" echo " DIST=${DIST}" diff --git a/jenkins/setup b/jenkins/setup index 4f433185..e28b886b 100644 --- a/jenkins/setup +++ b/jenkins/setup @@ -3,9 +3,17 @@ # This is a script that runs inside Jenkins. # http://jenkins.ceph.com/job/ceph-setup/ -#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}" -- 2.39.5