2 # PCIO_CO is a Jenkins Global Environment variable
6 echo "STARTING PACKAGECLOUD PUSH"
10 if [ -f /usr/bin/zypper ]; then
13 FACTER_OS=$(/usr/bin/facter operatingsystem)
16 if [ -f ~/.packagecloud ]; then
19 FACTER_LSBNAME=$(/usr/bin/facter lsbdistcodename)
20 DEBS=$(find . -type f -iname '*.deb')
21 package_cloud push "${PCIO_CO}/${STREAM}/ubuntu/${FACTER_LSBNAME}/main/" ${DEBS}
24 FACTER_OSMAJREL=$(/usr/bin/facter operatingsystemmajrelease)
25 FACTER_ARCH=$(/usr/bin/facter architecture)
26 RPMS=$(find . -type f -iregex '.*/.*\.\(s\)?rpm')
27 package_cloud push "${PCIO_CO}/${STREAM}/el/${FACTER_OSMAJREL}/os/${FACTER_ARCH}/" ${RPMS}
30 # Use /etc/os-release on openSUSE to get $VERSION
32 RPMS=$(find . -type f -iregex '.*/.*\.\(s\)?rpm')
33 package_cloud push "${PCIO_CO}/${STREAM}/opensuse/${VERSION}/" ${RPMS}