Merge lp:~afrantzis/jenkins-launchpad-plugin/deb-artifacts-in-any-dir into lp:jenkins-launchpad-plugin

Proposed by Alexandros Frantzis
Status: Merged
Approved by: Michał Sawicz
Approved revision: 133
Merged at revision: 130
Proposed branch: lp:~afrantzis/jenkins-launchpad-plugin/deb-artifacts-in-any-dir
Merge into: lp:jenkins-launchpad-plugin
Prerequisite: lp:~afrantzis/jenkins-launchpad-plugin/triggered-builds
Diff against target: 22 lines (+6/-3)
1 file modified
jlp/jenkinsutils.py (+6/-3)
To merge this branch: bzr merge lp:~afrantzis/jenkins-launchpad-plugin/deb-artifacts-in-any-dir
Reviewer Review Type Date Requested Status
Michał Sawicz Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+284734@code.launchpad.net

Commit message

Be more versatile when looking for deb artifacts

Don't depend on the deb artifacts being in the 'work/output' directory

Description of the change

Be more versatile when looking for deb artifacts

Don't depend on the deb artifacts being in the 'work/output' directory

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
133. By Alexandros Frantzis

Sync with parent branch

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michał Sawicz (saviq) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'jlp/jenkinsutils.py'
2--- jlp/jenkinsutils.py 2016-02-02 14:07:32 +0000
3+++ jlp/jenkinsutils.py 2016-02-02 14:07:32 +0000
4@@ -1,4 +1,5 @@
5 import re
6+import os
7 from xml.dom.minidom import parseString
8 import jenkins
9 import urlparse
10@@ -592,9 +593,11 @@
11 for artifact in artifacts:
12 path = artifact['relativePath']
13 url = url.rstrip('/')
14- if path.startswith('work/output'):
15- link = "{run_url}/artifact/work/output/*zip*/output.zip"
16- return normalize_url(link.format(run_url=url))
17+ if path.endswith('.deb'):
18+ dirname = os.path.dirname(path)
19+ zipname = os.path.basename(dirname)
20+ link = "%s/artifact/%s/*zip*/%s.zip" % (url, dirname, zipname)
21+ return normalize_url(link)
22 return None
23
24

Subscribers

People subscribed via source and target branches