diff options
author | Ed Warnicke <eaw@cisco.com> | 2017-04-17 13:48:06 -0700 |
---|---|---|
committer | Ed Warnicke <eaw@cisco.com> | 2017-04-17 13:48:06 -0700 |
commit | a84fc17443864f4c02bde817e184ab1a7d7e50a2 (patch) | |
tree | a3191ca748cb1454e93c85f24ae59f2280980bd4 | |
parent | 5fbe770c61ba1e2a645f706a44bbe334f473c59f (diff) |
Make packagecloud push conditional on existence of ~/.packagecloud
Change-Id: I34d88bfd6f4c55c00d354aae13536a8e3eb8e613
Signed-off-by: Ed Warnicke <eaw@cisco.com>
-rw-r--r-- | jjb/scripts/packagecloud_push.sh | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/jjb/scripts/packagecloud_push.sh b/jjb/scripts/packagecloud_push.sh index 805cf1296..af004a35d 100644 --- a/jjb/scripts/packagecloud_push.sh +++ b/jjb/scripts/packagecloud_push.sh @@ -3,17 +3,18 @@ # PCIO_CO is a Jenkins Global Environment variable FACTER_OS=$(/usr/bin/facter operatingsystem) - -case "$FACTER_OS" in - Ubuntu) - FACTER_LSBNAME=$(/usr/bin/facter lsbdistcodename) - DEBS=$(find . -type f -iname '*.deb') - package_cloud push "${PCIO_CO}/${STREAM}/ubuntu/${FACTER_LSBNAME}/main/" ${DEBS} - ;; - CentOS) - FACTER_OSMAJREL=$(/usr/bin/facter operatingsystemmajrelease) - FACTER_ARCH=$(/usr/bin/facter architecture) - RPMS=$(find . -type f -iregex '.*/.*\.\(s\)?rpm') - package_cloud push "${PCIO_CO}/${STREAM}/el/${FACTER_OSMAJREL}/os/${FACTER_ARCH}/" ${RPMS} - ;; -esac +if [ -f ~/.packagecloud ]; then + case "$FACTER_OS" in + Ubuntu) + FACTER_LSBNAME=$(/usr/bin/facter lsbdistcodename) + DEBS=$(find . -type f -iname '*.deb') + package_cloud push "${PCIO_CO}/${STREAM}/ubuntu/${FACTER_LSBNAME}/main/" ${DEBS} + ;; + CentOS) + FACTER_OSMAJREL=$(/usr/bin/facter operatingsystemmajrelease) + FACTER_ARCH=$(/usr/bin/facter architecture) + RPMS=$(find . -type f -iregex '.*/.*\.\(s\)?rpm') + package_cloud push "${PCIO_CO}/${STREAM}/el/${FACTER_OSMAJREL}/os/${FACTER_ARCH}/" ${RPMS} + ;; + esac +fi |