diff options
Diffstat (limited to 'jjb/scripts')
-rw-r--r-- | jjb/scripts/packagecloud_push.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/jjb/scripts/packagecloud_push.sh b/jjb/scripts/packagecloud_push.sh new file mode 100644 index 000000000..805cf1296 --- /dev/null +++ b/jjb/scripts/packagecloud_push.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# 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 |