从Eclipse触发jenkins作业

时间:2018-06-20 16:33:36

标签: jenkins eclipse-plugin

我在互联网上有一个Jenkins实例。我有一些作业需要手动触发(服务器启动/服务器关闭)。我发现了这个cloudbees插件,该插件应该与本地Jenkins实例一起使用。但是,在配置插件时,它不起作用。

在浏览器上使用URL //setting the expiration date to 6 months from now// expDate = new Date; // in the following line, 180 means 180 days.// expDate.setDate(expDate.getDate() + 180) //making the cookie// function setCookie(name, value, expires, path, domain, secure){ document.cookie= name + "=" + escape(value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=/wmb" + path : "") + ((domain) ? "; domain=ptoweb.uspto.gov" + domain : "") + ((secure) ? "; secure" : ""); } function getCookie(name) { var dc = document.cookie; var prefix = name + "="; var begin = dc.indexOf("; " + prefix); if (begin == -1) { begin = dc.indexOf(prefix); if (begin != 0) return null; } else { begin += 1; } var end = document.cookie.indexOf(";", begin); if (end == -1) { end = dc.length; } return unescape(dc.substring(begin + prefix.length, end)); } //cookie name is called CustomSurvey// visits = getCookie('CustomSurvey'); if (!visits) { visits = 1 }; if (visits > 3) //Math.random is set so that 20% of those visits actually get the popup// if ((Math.random() * (100 - 1) + 1) < 20) { //get location of where this popup came from; also contains variable from SM that will trickle down into reporting to tell where it came from// var currentLocation = window.location; window.open("https://www.surveymonkey" + "?" + currentLocation, "_blank", "toolbar=yes,scrollbars=yes,resizable=yes,top=500,left=500,width=400,height=400"); } if (visits < 3) { ++visits; cookieData = visits; setCookie('CustomSurvey', cookieData, expDate) } 可行,但是cloudbess插件抱怨在尝试从Eclipse配置时找不到面包屑。

0 个答案:

没有答案