Skip to content
This repository has been archived by the owner on Feb 28, 2023. It is now read-only.

Commit

Permalink
Added ability to trigger a build, when holding the 'ctrl' key. closes #5
Browse files Browse the repository at this point in the history
  • Loading branch information
Amit Shah committed Feb 15, 2015
1 parent 3679b12 commit e5b4db8
Show file tree
Hide file tree
Showing 2 changed files with 96 additions and 1 deletion.
87 changes: 87 additions & 0 deletions info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@
<key>modifiersubtext</key>
<string></string>
</dict>
<dict>
<key>destinationuid</key>
<string>C3869749-E660-4D39-880E-DDCC244AD1F5</string>
<key>modifiers</key>
<integer>262144</integer>
<key>modifiersubtext</key>
<string></string>
</dict>
</array>
<key>3A5F90F6-D823-4689-923A-B4DAA96772A1</key>
<array>
Expand All @@ -29,6 +37,14 @@
<key>modifiersubtext</key>
<string></string>
</dict>
<dict>
<key>destinationuid</key>
<string>C3869749-E660-4D39-880E-DDCC244AD1F5</string>
<key>modifiers</key>
<integer>262144</integer>
<key>modifiersubtext</key>
<string></string>
</dict>
</array>
<key>4A5377DD-2096-4300-8B37-613C9D0463A6</key>
<array>
Expand All @@ -40,6 +56,14 @@
<key>modifiersubtext</key>
<string></string>
</dict>
<dict>
<key>destinationuid</key>
<string>C3869749-E660-4D39-880E-DDCC244AD1F5</string>
<key>modifiers</key>
<integer>262144</integer>
<key>modifiersubtext</key>
<string></string>
</dict>
</array>
<key>54087FA9-94F9-4259-A28F-3A45C4C77397</key>
<array>
Expand All @@ -51,6 +75,14 @@
<key>modifiersubtext</key>
<string></string>
</dict>
<dict>
<key>destinationuid</key>
<string>C3869749-E660-4D39-880E-DDCC244AD1F5</string>
<key>modifiers</key>
<integer>262144</integer>
<key>modifiersubtext</key>
<string></string>
</dict>
</array>
<key>B496AF63-F9F0-445B-A2C4-FE46C01623C4</key>
<array>
Expand Down Expand Up @@ -138,6 +170,14 @@
<integer>102</integer>
<key>keyword</key>
<string>jenkins</string>
<key>queuedelaycustom</key>
<integer>1</integer>
<key>queuedelayimmediatelyinitially</key>
<false/>
<key>queuedelaymode</key>
<integer>0</integer>
<key>queuemode</key>
<integer>1</integer>
<key>runningsubtext</key>
<string>Loading...</string>
<key>script</key>
Expand Down Expand Up @@ -167,6 +207,14 @@
<integer>102</integer>
<key>keyword</key>
<string>jenkinsfail</string>
<key>queuedelaycustom</key>
<integer>1</integer>
<key>queuedelayimmediatelyinitially</key>
<false/>
<key>queuedelaymode</key>
<integer>0</integer>
<key>queuemode</key>
<integer>1</integer>
<key>runningsubtext</key>
<string>Loading...</string>
<key>script</key>
Expand All @@ -187,6 +235,24 @@
<key>version</key>
<integer>0</integer>
</dict>
<dict>
<key>config</key>
<dict>
<key>escaping</key>
<integer>0</integer>
<key>script</key>
<string>curl -X POST {query}/build
open {query}</string>
<key>type</key>
<integer>0</integer>
</dict>
<key>type</key>
<string>alfred.workflow.action.script</string>
<key>uid</key>
<string>C3869749-E660-4D39-880E-DDCC244AD1F5</string>
<key>version</key>
<integer>0</integer>
</dict>
<dict>
<key>config</key>
<dict>
Expand All @@ -196,6 +262,14 @@
<integer>102</integer>
<key>keyword</key>
<string>fail</string>
<key>queuedelaycustom</key>
<integer>1</integer>
<key>queuedelayimmediatelyinitially</key>
<false/>
<key>queuedelaymode</key>
<integer>0</integer>
<key>queuemode</key>
<integer>1</integer>
<key>runningsubtext</key>
<string>Loading...</string>
<key>script</key>
Expand Down Expand Up @@ -225,6 +299,14 @@
<integer>127</integer>
<key>keyword</key>
<string>building</string>
<key>queuedelaycustom</key>
<integer>1</integer>
<key>queuedelayimmediatelyinitially</key>
<false/>
<key>queuedelaymode</key>
<integer>0</integer>
<key>queuemode</key>
<integer>1</integer>
<key>runningsubtext</key>
<string>Loading...</string>
<key>script</key>
Expand Down Expand Up @@ -321,6 +403,11 @@
<key>ypos</key>
<real>10</real>
</dict>
<key>C3869749-E660-4D39-880E-DDCC244AD1F5</key>
<dict>
<key>ypos</key>
<real>180</real>
</dict>
<key>EDEEC501-4268-4179-8D41-A67C5D10356A</key>
<dict>
<key>ypos</key>
Expand Down
10 changes: 9 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,15 @@ def main(wf):
wf.add_item("Open Jenkins", arg=interface.get_jenkins_url(), valid=True)

for job in jobs:
wf.add_item(job.name, subtitle=job.description, arg=job.url, valid=True, icon=job.image)
assert isinstance(wf, Workflow)
wf.add_item(title=job.name,
subtitle=job.description,
modifier_subtitles={
'ctrl': 'Trigger a build, and open'
},
arg=job.url,
valid=True,
icon=job.image)
except NoJobsFound:
wf.logger.debug("Could not find any jobs for instance: %s", wf.settings['jenkins_url'])
wf.add_item("Error: No jobs found")
Expand Down

0 comments on commit e5b4db8

Please sign in to comment.