summaryrefslogtreecommitdiffstats
path: root/jjb/scripts/packagecloud_push.sh
diff options
context:
space:
mode:
authorEd Warnicke <eaw@cisco.com>2017-04-17 13:48:06 -0700
committerEd Warnicke <eaw@cisco.com>2017-04-17 13:48:06 -0700
commita84fc17443864f4c02bde817e184ab1a7d7e50a2 (patch)
treea3191ca748cb1454e93c85f24ae59f2280980bd4 /jjb/scripts/packagecloud_push.sh
parent5fbe770c61ba1e2a645f706a44bbe334f473c59f (diff)
Make packagecloud push conditional on existence of ~/.packagecloud
Change-Id: I34d88bfd6f4c55c00d354aae13536a8e3eb8e613 Signed-off-by: Ed Warnicke <eaw@cisco.com>
Diffstat (limited to 'jjb/scripts/packagecloud_push.sh')
-rw-r--r--jjb/scripts/packagecloud_push.sh29
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