diff options
Diffstat (limited to 'jjb/scripts/packagecloud_push.sh')
-rw-r--r-- | jjb/scripts/packagecloud_push.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/jjb/scripts/packagecloud_push.sh b/jjb/scripts/packagecloud_push.sh new file mode 100644 index 000000000..af004a35d --- /dev/null +++ b/jjb/scripts/packagecloud_push.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# PCIO_CO is a Jenkins Global Environment variable + +FACTER_OS=$(/usr/bin/facter operatingsystem) +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 |