From ee91c12fc0d1d0ba9c7ad29c205dc41ec9f94264 Mon Sep 17 00:00:00 2001 From: Maximilian Michels Date: Thu, 21 Jul 2016 17:06:06 +0200 Subject: [PATCH] [FLINK-4261][tools] retry in case of failed snapshot deployment Unfortunately, we can't deploy snapshots atomically using the Nexus repository. The staged process which leads to an atomic deployment is only designed to work for releases. Best we can do is to retry deploying artifacts in case of failures. - introduce retry in case of failure of snapshot deployment - simplify deployment script --- tools/deploy_to_maven.sh | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/tools/deploy_to_maven.sh b/tools/deploy_to_maven.sh index 0a3ee673f97d3..3c19e8237a574 100755 --- a/tools/deploy_to_maven.sh +++ b/tools/deploy_to_maven.sh @@ -89,26 +89,25 @@ echo "detected current version as: '$CURRENT_FLINK_VERSION' ; hadoop1: $CURRENT_ # if [[ $CURRENT_FLINK_VERSION == *SNAPSHOT* ]] ; then + MVN_SNAPSHOT_OPTS="-B -Pdocs-and-source -DskipTests -Drat.skip=true -Drat.ignoreErrors=true \ + -DretryFailedDeploymentCount=10 --settings deploysettings.xml clean deploy" + # Deploy hadoop v1 to maven echo "Generating poms for hadoop1" ./tools/generate_specific_pom.sh $CURRENT_FLINK_VERSION $CURRENT_FLINK_VERSION_HADOOP1 pom.hadoop1.xml - mvn -B -f pom.hadoop1.xml -DskipTests -Drat.ignoreErrors=true -Pdocs-and-source deploy --settings deploysettings.xml - + mvn -f pom.hadoop1.xml ${MVN_SNAPSHOT_OPTS} # deploy to s3 deploy_to_s3 $CURRENT_FLINK_VERSION "hadoop1" - # deploy hadoop v2 (yarn) - echo "deploy standard version (hadoop2) for scala 2.10" - # hadoop2 scala 2.10 - mvn -B -DskipTests -Drat.skip=true -Drat.ignoreErrors=true -Pdocs-and-source clean deploy --settings deploysettings.xml - + echo "deploy standard version (hadoop2) for scala 2.10" + mvn ${MVN_SNAPSHOT_OPTS} deploy_to_s3 $CURRENT_FLINK_VERSION "hadoop2" + # hadoop2 scala 2.11 echo "deploy hadoop2 version (standard) for scala 2.11" ./tools/change-scala-version.sh 2.11 - mvn -B -DskipTests -Drat.skip=true -Drat.ignoreErrors=true -Pdocs-and-source clean deploy --settings deploysettings.xml - + mvn ${MVN_SNAPSHOT_OPTS} deploy_to_s3 $CURRENT_FLINK_VERSION "hadoop2_2.11" echo "Changing back to scala 2.10"