Created
September 15, 2011 03:14
-
-
Save critical-bug/1218430 to your computer and use it in GitHub Desktop.
userscript working with Jenkins, navigates to the console after triggered a build of the job.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name go console after trigger | |
// @description [Jenkins] Go to the console after triggered a build of the job. | |
// @include http://*:8080/*/job/*/ | |
// @include http://*:8080/job/*/ | |
// ==/UserScript== | |
var jobUrl = unsafeWindow.location.href; | |
var referrer = unsafeWindow.document.referrer; | |
if (referrer.indexOf(jobUrl + "build") == 0) { | |
unsafeWindow.setTimeout( | |
function(){ | |
unsafeWindow.location.href = jobUrl + "lastBuild/console"; | |
}, | |
5000 // usual build waits 5 sec | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment