diff --git a/jenkins/scripts/pypi-tarball-upload.sh b/jenkins/scripts/pypi-tarball-upload.sh index 411aab501d..ac482ee876 100755 --- a/jenkins/scripts/pypi-tarball-upload.sh +++ b/jenkins/scripts/pypi-tarball-upload.sh @@ -33,4 +33,7 @@ curl --fail -o $FILENAME http://$TARBALL_SITE/$PROJECT/$FILENAME # Make sure we actually got a gzipped file file -b $FILENAME | grep gzip -twine upload -r pypi $FILENAME +# Uploads may claim to fail but actually succeed so we check if we +# can download after upload to determine success. +twine upload -r pypi $FILENAME || true +curl --head --silent --fail "https://pypi.python.org/simple/$PROJECT/$FILENAME" >/dev/null 2>&1 diff --git a/jenkins/scripts/pypi-wheel-upload.sh b/jenkins/scripts/pypi-wheel-upload.sh index 9d37d72e25..bf1bbeb11a 100755 --- a/jenkins/scripts/pypi-wheel-upload.sh +++ b/jenkins/scripts/pypi-wheel-upload.sh @@ -35,4 +35,7 @@ curl --fail -o $FILENAME http://$TARBALL_SITE/$PROJECT/$FILENAME # Make sure we actually got a wheel file -b $FILENAME | grep -i zip -twine upload -r pypi $FILENAME +# Uploads may claim to fail but actually succeed so we check if we +# can download after upload to determine success. +twine upload -r pypi $FILENAME || true +curl --head --silent --fail "https://pypi.python.org/simple/$PROJECT/$FILENAME" >/dev/null 2>&1