mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Add some retry and debug to python packages install Sometimes after a full successful run, travis will fail due to not being able to parse tests output
Signed-off-by: Daan Hoogland <daan@onecht.net>
This commit is contained in:
parent
9a50e0f03e
commit
118f607942
@ -66,9 +66,12 @@ sudo mkdir -p /opt/tomcat
|
|||||||
sudo tar xfv tomcat.tar.gz -C /opt/tomcat --strip 1 > /dev/null
|
sudo tar xfv tomcat.tar.gz -C /opt/tomcat --strip 1 > /dev/null
|
||||||
|
|
||||||
echo -e "\nInstalling Development tools: "
|
echo -e "\nInstalling Development tools: "
|
||||||
|
RETRY_COUNT=3
|
||||||
|
|
||||||
sudo apt-get -q -y install uuid-runtime genisoimage python-setuptools python-pip netcat > /dev/null
|
sudo apt-get -q -y install uuid-runtime genisoimage python-setuptools python-pip netcat > /dev/null
|
||||||
|
if [[ $? -ne 0 ]]; then
|
||||||
|
echo "\napt-get packages failed to install"
|
||||||
|
fi
|
||||||
echo "<settings>
|
echo "<settings>
|
||||||
<mirrors>
|
<mirrors>
|
||||||
<mirror>
|
<mirror>
|
||||||
@ -82,11 +85,18 @@ echo "<settings>
|
|||||||
|
|
||||||
echo -e "\nInstalling some python packages: "
|
echo -e "\nInstalling some python packages: "
|
||||||
|
|
||||||
sudo pip install lxml > /dev/null
|
for ((i=0;i<$RETRY_COUNT;i++))
|
||||||
sudo pip install texttable > /dev/null
|
do
|
||||||
|
sudo pip install lxml texttable > /tmp/piplog
|
||||||
|
if [[ $? -eq 0 ]]; then
|
||||||
|
echo "\npython packages installed successfully"
|
||||||
|
break;
|
||||||
|
fi
|
||||||
|
echo -e "\npython packages failed to install"
|
||||||
|
cat /tmp/piplog
|
||||||
|
done
|
||||||
|
|
||||||
#Download project dependencies in a way we can retry if there's a failure, without failing the whole build
|
#Download project dependencies in a way we can retry if there's a failure, without failing the whole build
|
||||||
RETRY_COUNT=3
|
|
||||||
|
|
||||||
#Resolve plugins first
|
#Resolve plugins first
|
||||||
echo -e "\nDownloading Plugin dependencies"
|
echo -e "\nDownloading Plugin dependencies"
|
||||||
|
|||||||
@ -15,7 +15,7 @@ for line in $(find ../../ -name pom.xml -exec sed -n '/<dependencies>/{:a;n;/<\/
|
|||||||
elif [ $1 == "/dependency" ]; then
|
elif [ $1 == "/dependency" ]; then
|
||||||
#Check if version is empty to fix maven 3.2.5 run
|
#Check if version is empty to fix maven 3.2.5 run
|
||||||
if [[ $ARTIFACT != *version* ]]; then
|
if [[ $ARTIFACT != *version* ]]; then
|
||||||
ARTIFACT="$ARTIFACT<version>LATEST</version>"
|
continue;
|
||||||
fi
|
fi
|
||||||
#Filter out project modules interdependencies and noredist artifacts
|
#Filter out project modules interdependencies and noredist artifacts
|
||||||
if [[ $ARTIFACT != *org.apache.cloudstack* ]] && [[ $ARTIFACT != *com.cloud* ]] && [[ $ARTIFACT != *org.midonet* ]] && [[ $ARTIFACT != *net.juniper* ]] ; then
|
if [[ $ARTIFACT != *org.apache.cloudstack* ]] && [[ $ARTIFACT != *com.cloud* ]] && [[ $ARTIFACT != *org.midonet* ]] && [[ $ARTIFACT != *net.juniper* ]] ; then
|
||||||
@ -42,6 +42,8 @@ for line in $(find ../../ -name pom.xml -exec sed -n '/<dependencies>/{:a;n;/<\/
|
|||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
#For some reason, travis seems to be using surefire plugin 2.14.2
|
||||||
|
echo "<dependency><groupId>org.apache.maven.plugins</groupId><artifactId>maven-surefire-plugin</artifactId><version>2.12.4</version></dependency>" >> pom.xml
|
||||||
|
|
||||||
#Finish dummy pom
|
#Finish dummy pom
|
||||||
echo "</dependencies></project>" >> pom.xml
|
echo "</dependencies></project>" >> pom.xml
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user