sign-rpms: Don't attempt off-box signing if variables not set.

Problem:
User 'jenkins' hit a build-iso failure in sign-rpms.
Problem was a test that assumes user jenkins will always
provide environment variable setting for SIGNING_USER,
SIGNING_SERVER and SIGNING_SERVER_SCRIPT.  This is not
a valid assumption.

Solution:
Explicitly test that all three environment variables are set
before invoking sign_packages_on_server.

Story: 2003906
Task: 27974
Change-Id: If9eb61b8001ca58f9262c2eccab96b4820c68102
Signed-off-by: Scott Little <scott.little@windriver.com>
This commit is contained in:
Scott Little 2018-11-19 10:37:52 -05:00
parent 8dd7a8fe2a
commit 0b8e1605db
1 changed files with 1 additions and 1 deletions

View File

@ -279,7 +279,7 @@ check_vars
echo signing $_PKG_DIR
# sign all rpms
if [ "$USER" == "jenkins" ]; then
if [ "$USER" == "jenkins" ] && [ ! -z "${SIGNING_USER}" ] && [ ! -z "${SIGNING_SERVER}" ] && [ ! -z "${SIGNING_SERVER_SCRIPT}" ]; then
sign_packages_on_server
retval=$?
else