summaryrefslogtreecommitdiffstats
path: root/jjb/scripts/packagecloud_push.sh
diff options
context:
space:
mode:
authorEric Ball <eball@linuxfoundation.org>2018-09-27 12:39:58 -0700
committerEric Ball <eball@linuxfoundation.org>2018-09-28 18:52:16 -0700
commit594ea6171dca58acb35fd052b6def35c50479161 (patch)
tree4c12488a2a6b13908a12e6e93458c0f10414f420 /jjb/scripts/packagecloud_push.sh
parent272a5c455974c7fd51b610a994810b268e5aa5d0 (diff)
Use os-release for opensuse info
Puppet, and therefore facter, are not officially supported on OpenSUSE, and currently not available for OpenSUSE 15. Using the os-release file to get the version info should be a viable alternative. Change-Id: Id4787d9b836a783792e5e5ae3b895e87b95f08cf Signed-off-by: Eric Ball <eball@linuxfoundation.org>
Diffstat (limited to 'jjb/scripts/packagecloud_push.sh')
-rw-r--r--jjb/scripts/packagecloud_push.sh13
1 files changed, 7 insertions, 6 deletions
diff --git a/jjb/scripts/packagecloud_push.sh b/jjb/scripts/packagecloud_push.sh
index c38d03b02..c37ac55fb 100644
--- a/jjb/scripts/packagecloud_push.sh
+++ b/jjb/scripts/packagecloud_push.sh
@@ -8,11 +8,11 @@ echo "STARTING PACKAGECLOUD PUSH"
sleep 10
if [ -f /usr/bin/zypper ]; then
- echo "Since zypper exists, us it to install facter"
- zypper -n install facter
+ FACTER_OS="openSUSE"
+else
+ FACTER_OS=$(/usr/bin/facter operatingsystem)
fi
-FACTER_OS=$(/usr/bin/facter operatingsystem)
if [ -f ~/.packagecloud ]; then
case "$FACTER_OS" in
Ubuntu)
@@ -26,10 +26,11 @@ if [ -f ~/.packagecloud ]; then
RPMS=$(find . -type f -iregex '.*/.*\.\(s\)?rpm')
package_cloud push "${PCIO_CO}/${STREAM}/el/${FACTER_OSMAJREL}/os/${FACTER_ARCH}/" ${RPMS}
;;
- OpenSuSE)
- FACTER_OSREL=$(/usr/bin/facter operatingsystemrelease)
+ openSUSE)
+ # Use /etc/os-release on openSUSE to get $VERSION
+ . /etc/os-release
RPMS=$(find . -type f -iregex '.*/.*\.\(s\)?rpm')
- package_cloud push "${PCIO_CO}/${STREAM}/opensuse/${FACTER_OSREL}/" ${RPMS}
+ package_cloud push "${PCIO_CO}/${STREAM}/opensuse/${VERSION}/" ${RPMS}
;;
esac
fi