Set curl to fail if HTTP servers return a error.
* modules/openstack_project/files/jenkins_job_builder/config/pypi-jobs.yaml: Use the curl's --fail option to detect some HTTP 400 and 500 errors. Then check that the file is actually a gzipped file. The two checks are necessary because some HTTP error codes do not result in a non zero return from curl even with the --fail option. Change-Id: I796d2c5767e787e7106040e7ef0098886135e68c Reviewed-on: https://review.openstack.org/35562 Reviewed-by: Jeremy Stanley <fungi@yuggoth.org> Approved: Monty Taylor <mordred@inaugust.com> Reviewed-by: Monty Taylor <mordred@inaugust.com> Tested-by: Jenkins
This commit is contained in:
parent
744133079e
commit
8bc65b3926
@ -9,7 +9,9 @@
|
|||||||
FILENAME="{name}-$TAG.tar.gz"
|
FILENAME="{name}-$TAG.tar.gz"
|
||||||
|
|
||||||
rm -rf *tar.gz
|
rm -rf *tar.gz
|
||||||
curl -o $FILENAME http://{tarball-site}/{name}/$FILENAME
|
curl --fail -o $FILENAME http://{tarball-site}/{name}/$FILENAME
|
||||||
|
# Make sure we actually got a gzipped file
|
||||||
|
file -b $FILENAME | grep gzip
|
||||||
|
|
||||||
- shell: |
|
- shell: |
|
||||||
/usr/local/jenkins/slave_scripts/pypi-upload.sh {name}
|
/usr/local/jenkins/slave_scripts/pypi-upload.sh {name}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user