8bc65b3926
* 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
27 lines
607 B
YAML
27 lines
607 B
YAML
- job-template:
|
|
name: '{name}-pypi-upload'
|
|
node: pypi
|
|
|
|
builders:
|
|
- shell: |
|
|
#!/bin/bash -xe
|
|
TAG=`echo $ZUUL_REF | sed 's/^refs.tags.//'`
|
|
FILENAME="{name}-$TAG.tar.gz"
|
|
|
|
rm -rf *tar.gz
|
|
curl --fail -o $FILENAME http://{tarball-site}/{name}/$FILENAME
|
|
# Make sure we actually got a gzipped file
|
|
file -b $FILENAME | grep gzip
|
|
|
|
- shell: |
|
|
/usr/local/jenkins/slave_scripts/pypi-upload.sh {name}
|
|
|
|
publishers:
|
|
- console-log-post
|
|
|
|
|
|
- job-group:
|
|
name: pypi-jobs
|
|
jobs:
|
|
- '{name}-pypi-upload'
|