Merge "Fix rpms being installed via DeployArtifactURLs" into stable/ocata

This commit is contained in:
Jenkins 2017-08-17 20:40:21 +00:00 committed by Gerrit Code Review
commit 5734c1e6fc
2 changed files with 10 additions and 2 deletions

View File

@ -10,7 +10,9 @@ if [ -n "$artifact_urls" ]; then
for URL in $(echo $artifact_urls | sed -e "s| |\n|g" | sort -u); do
curl --globoff -o $TMP_DATA/file_data "$URL"
if file -b $TMP_DATA/file_data | grep RPM &>/dev/null; then
yum install -y $TMP_DATA/file_data
mv $TMP_DATA/file_data $TMP_DATA/file_data.rpm
yum install -y $TMP_DATA/file_data.rpm
rm $TMP_DATA/file_data.rpm
elif file -b $TMP_DATA/file_data | grep 'gzip compressed data' &>/dev/null; then
pushd /
tar xvzf $TMP_DATA/file_data
@ -19,7 +21,9 @@ if [ -n "$artifact_urls" ]; then
echo "ERROR: Unsupported file format."
exit 1
fi
rm $TMP_DATA/file_data
if [ -f $TMP_DATA/file_data ]; then
rm $TMP_DATA/file_data
fi
done
else
echo "No artifact_urls was set. Skipping..."

View File

@ -0,0 +1,4 @@
---
fixes:
- |
Fix support for RPMs to be installed via DeployArtifactURLs. LP#1697102