diff options
-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 |