Increase default curl timeout to 20 as tests are failing
diff --git a/install-plugins.sh b/install-plugins.sh
index 858b857..17145c0 100755
--- a/install-plugins.sh
+++ b/install-plugins.sh
@@ -67,7 +67,7 @@
url="$JENKINS_UC_DOWNLOAD/plugins/$plugin/$version/${plugin}.hpi"
echo "Downloading plugin: $plugin from $url"
- curl --connect-timeout ${CURL_CONNECTION_TIMEOUT:-5} --retry ${CURL_RETRY:-5} --retry-delay ${CURL_RETRY_DELAY:-0} --retry-max-time ${CURL_RETRY_MAX_TIME:-60} -s -f -L "$url" -o "$jpi"
+ curl --connect-timeout ${CURL_CONNECTION_TIMEOUT:-20} --retry ${CURL_RETRY:-5} --retry-delay ${CURL_RETRY_DELAY:-0} --retry-max-time ${CURL_RETRY_MAX_TIME:-60} -s -f -L "$url" -o "$jpi"
return $?
}
diff --git a/tests/install-plugins.bats b/tests/install-plugins.bats
index ffde661..b035dac 100644
--- a/tests/install-plugins.bats
+++ b/tests/install-plugins.bats
@@ -98,7 +98,7 @@
local work; work="$BATS_TEST_DIRNAME/upgrade-plugins/work"
mkdir -p $work
# Image contains maven-plugin 2.7.1 and ant-plugin 1.3
- run bash -c "docker run -u $UID -v $work:/var/jenkins_home --rm $SUT_IMAGE-install-plugins curl --connect-timeout 5 --retry 5 --retry-delay 0 --retry-max-time 60 -s -f -L https://updates.jenkins.io/download/plugins/maven-plugin/2.12.1/maven-plugin.hpi -o /var/jenkins_home/plugins/maven-plugin.jpi"
+ run bash -c "docker run -u $UID -v $work:/var/jenkins_home --rm $SUT_IMAGE-install-plugins curl --connect-timeout 20 --retry 5 --retry-delay 0 --retry-max-time 60 -s -f -L https://updates.jenkins.io/download/plugins/maven-plugin/2.12.1/maven-plugin.hpi -o /var/jenkins_home/plugins/maven-plugin.jpi"
assert_success
run bash -c "unzip -p $work/plugins/maven-plugin.jpi META-INF/MANIFEST.MF | tr -d '\r'"
assert_line 'Plugin-Version: 2.12.1'