diff options
| author | Bob Ippolito <bob@redivi.com> | 2016-02-14 12:30:55 -0800 |
|---|---|---|
| committer | Bob Ippolito <bob@redivi.com> | 2016-02-15 08:05:22 -0800 |
| commit | 0941def893caef5de159652b9bd4582b99303448 (patch) | |
| tree | dc469b8f0108f241c6066d19d7b19a754c948db1 /scripts/artifacts.py | |
| parent | 60227944e9879362f9a4e09dfaae605273cdfc8c (diff) | |
| download | simplejson-test-wheels-1.tar.gz | |
WIP branch to investigate getting automated CI builds of wheels goingtest-wheels-1
Diffstat (limited to 'scripts/artifacts.py')
| -rw-r--r-- | scripts/artifacts.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/scripts/artifacts.py b/scripts/artifacts.py new file mode 100644 index 0000000..19adce4 --- /dev/null +++ b/scripts/artifacts.py @@ -0,0 +1,22 @@ +try: + from urllib.request import urlopen +except ImportError: + from urllib import urlopen +import json +import subprocess + +api_url = 'https://ci.appveyor.com/api' +builds = json.load(urlopen( + '{}/projects/etrepum/simplejson'.format(api_url))) + +def artifact_url(job): + return '{api_url}/buildjobs/{jobId}/artifacts'.format( + api_url=api_url, **job) + +for job in builds['build']['jobs']: + url = artifact_url(job) + for artifact in json.load(urlopen(url)): + download_url = '{url}/{fileName}'.format(url=url, **artifact) + print(artifact['fileName']) + subprocess.call( + ['curl', '-L', '-#', '-o', artifact['fileName'], download_url]) |
