2

我们一直在使用 ' XL Release ' 服务器 (XLR) 进行项目的发布管理,并使用 Jenkins 来持续集成来自 GitHub 的项目。我正在尝试通过提供基本配置(如 Jenkins URL/用户名/密码和 Jenkins 作业名称)来为 XLR 上的一个版本创建一个 Jenkins 任务,这些都是必需的。

现在,当我在 XLR 中启动任务时,它会给出以下错误消息,如下所示:

“在http://[Jenkins server]/job//build连接失败。状态:405”

除了响应看起来像下面的脚本:

<!DOCTYPE html><html><head resURL="/static/84561821">


<title>Form post required [Jenkins]</title><link rel="stylesheet" type="text/css" href="/static/84561821/css/style.css" /><link rel="stylesheet" type="text/css" href="/static/84561821/css/color.css" /><link rel="stylesheet" type="text/css" href="/static/84561821/css/responsive-grid.css" /><link rel="shortcut icon" type="image/vnd.microsoft.icon" href="/static/84561821/favicon.ico" /><script>var isRunAsTest=false; var rootURL=""; var resURL="/static/84561821";</script><script src="/static/84561821/scripts/prototype.js" type="text/javascript"></script><script src="/static/84561821/scripts/behavior.js" type="text/javascript"></script><script src='/adjuncts/84561821/org/kohsuke/stapler/bind.js' type='text/javascript'></script><script src="/static/84561821/scripts/yui/yahoo/yahoo-min.js"></script><script src="/static/84561821/scripts/yui/dom/dom-min.js"></script><script src="/static/84561821/scripts/yui/event/event-min.js"></script><script src="/static/84561821/scripts/yui/animation/animation-min.js"></script><script src="/static/84561821/scripts/yui/dragdrop/dragdrop-min.js"></script><script src="/static/84561821/scripts/yui/container/container-min.js"></script><script src="/static/84561821/scripts/yui/connection/connection-min.js"></script><script src="/static/84561821/scripts/yui/datasource/datasource-min.js"></script><script src="/static/84561821/scripts/yui/autocomplete/autocomplete-min.js"></script><script src="/static/84561821/scripts/yui/menu/menu-min.js"></script><script src="/static/84561821/scripts/yui/element/element-min.js"></script><script src="/static/84561821/scripts/yui/button/button-min.js"></script><script src="/static/84561821/scripts/yui/storage/storage-min.js"></script><script src="/static/84561821/scripts/hudson-behavior.js" type="text/javascript"></script><script src="/static/84561821/scripts/sortable.js" type="text/javascript"></script><script>crumb.init("", "");</script><link rel="stylesheet" type="text/css" href="/static/84561821/scripts/yui/container/assets/container.css" /><link rel="stylesheet" type="text/css" href="/static/84561821/scripts/yui/assets/skins/sam/skin.css" /><link rel="stylesheet" type="text/css" href="/static/84561821/scripts/yui/container/assets/skins/sam/container.css" /><link rel="stylesheet" type="text/css" href="/static/84561821/scripts/yui/button/assets/skins/sam/button.css" /><link rel="stylesheet" type="text/css" href="/static/84561821/scripts/yui/menu/assets/skins/sam/menu.css" /><link title="Jenkins" rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" /><meta name="ROBOTS" content="INDEX,NOFOLLOW" /><script src="/static/84561821/scripts/yui/cookie/cookie-min.js"></script></head><body id="jenkins" data-version="jenkins-1.612" class="yui-skin-sam jenkins-1.612"><a href="#skip2content" class="skiplink">Skip to content</a><div id="page-head"><div id="header"><div class="logo"><a id="jenkins-home-link" href="/"><img id="jenkins-head-icon" alt="title" src="/static/84561821/images/headshot.png" /><img id="jenkins-name-icon" height="34" alt="title" width="139" src="/static/84561821/images/title.png" /></a></div><div class="login"> <span style="white-space:nowrap"><a class="model-link inside inverse" href="/user/admin"><b>Admin</b></a>
                |
                <a href="/logout"><b>log out</b></a></span></div><div class="searchbox hidden-xs"><form style="position:relative;" name="search" action="/job/XLRConnect/search/" class="no-json" method="get"><div id="search-box-minWidth"></div><div id="search-box-sizer"></div><div id="searchform"><input id="search-box" placeholder="search" name="q" class="has-default-text" /> <a href="http://wiki.jenkins-ci.org/display/JENKINS/Search+Box"><img style="width: 16px; height: 16px; " class="icon-help icon-sm" src="/static/84561821/images/16x16/help.png" /></a><div id="search-box-completion"></div><script>createSearchBox("/job/XLRConnect/search/");</script></div></form></div></div><div id="breadcrumbBar"><tr id="top-nav"><td id="left-top-nav" colspan="2"><link rel='stylesheet' href='/adjuncts/84561821/lib/layout/breadcrumbs.css' type='text/css' /><script src='/adjuncts/84561821/lib/layout/breadcrumbs.js' type='text/javascript'></script><div class="top-sticker noedge"><div class="top-sticker-inner"><div id="right-top-nav"><div id="right-top-nav"><div class="smallfont"><a href="?auto_refresh=true">ENABLE AUTO REFRESH</a></div></div></div><ul id="breadcrumbs"><li class="item"><a class="model-link inside" href="/">Jenkins</a></li><li class="children" href="/"></li><li class="item"><a class="model-link inside" href="/job/XLRConnect/">XLRConnect</a></li><li class="children" href="/job/XLRConnect/"></li></ul><div id="breadcrumb-menu-target"></div></div></div></td></tr></div></div><div id="page-body"><div class="row"><div id="side-panel"><div id="side-panel-content"></div></div><div id="main-panel"><div id="main-panel-content"><a name="skip2content"></a><p>You must use POST method to trigger builds. (From scripts you may instead pass a per-project authentication token, or authenticate with your API token.) If you see this page, it may be because a plugin offered a GET link; file a bug report for that plugin.</p><form method="POST"><input value="Proceed" type="submit" /></form></div></div></div></div><div id="footer-container" class="hidden-xs"><div id="footer"><span class="page_generated">
      Page generated:
      May 15, 2015 7:19:33 AM</span><span class="rest_api"><a href="api/">REST API</a></span><span class="jenkins_ver"><a href="http://jenkins-ci.org/">Jenkins ver. 1.612</a></span><div id="l10n-dialog" class="dialog"></div><div id="l10n-footer" style="display:none; float:left"><a href="#" onclick="return showTranslationDialog();"><img src="/static/84561821/plugin/translation/flags.png" />
  Help us localize this page
</a></div><script>var footer = document.getElementById('l10n-footer');
var f = document.getElementById('footer');
f.insertBefore(footer,f.firstChild);
footer.style.display="block";

var translation={}; 
translation.bundles = "2/IQrALgQj5lxSaSGgxqQQkSUo1ENoPujAvbNoPJBK21a2oKoF/JGOpvDglu0VebF5yobsoJyFLor25mINHZlxHylXblrqHOuffnUiU91xUSw1gbTHkbtyOsTKsLGVLKw+X2jk0M8bGwrntRODX2cfYB5AJ8mQaEVEmEwEZD1sCFMVG2gQHzDmgiIVBSBPtqCOjg5K4JvO0BpT9HTnxudGzYRNvIi+Dln94MShP6x3g3gP83NCpANQ7L+7XkvT3Q5cifZcX37D4vYCyYpERPJc9hO5WlbsUd7DJEAvVwemi7azuvAfJEQ34mjOBf2+72xE/EYKxZv85GUpwC79oVObY0jBPF+WHG94syh70ZYIw=";
translation.detectedLocale = "";

function showTranslationDialog() {
  if(!translation.launchDialog)
    loadScript("/static/84561821/plugin/translation/dialog.js");
  else
    translation.launchDialog();
  return false; 
}</script></div></div></body></html> 

响应头看起来像

Response headers: {'X-Frame-Options': 'sameorigin', 'X-Instance-Identity': 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyIYGgQSshNjxYz1dxA4h4OQtyFz00oXjDDjMSeJmR0o9Qrr9CkDYnrjuher6aMj/ls8qI2um+CHk9zVwUeSTzHhBIg29V+l7Hu4k9RF18ZY2omMDgonvuH9sqBpKAu4/S1U+RXQuQIKQk/66+UhhXPL3EYqYiNPuvRHXfhqIjXqH8Ts58q1ueuJ06b63RcnAx1z3XEq/pBMImz1HaXFhqS//FVhnx6Rl+AC7pXksR+vchyk8M9oHixtHk4lqaJxCgdAjydojVagPwEeh98TfBcmhjdLQhdLNaTe0SB7agNgiN0rgwzC9CCbQYlFMcYZ2UrcsPL5XsFRs8sqiMlPpswIDAQAB', 'X-Content-Type-Options': 'nosniff', 'X-Jenkins-CLI-Port': '41603', 'X-Jenkins-CLI2-Port': '41603', 'X-Jenkins-Session': '84561821', 'X-Hudson-CLI-Port': '41603', 'Cache-Control': 'no-cache,no-store,must-revalidate', 'Allow': 'POST', 'X-Hudson': '1.395', 'Server': 'Jetty(winstone-2.8)', 'X-Jenkins': '1.612', 'Set-Cookie': 'JSESSIONID.fa5428c3=158cuy2kt13l64ci0bpcstd9b;Path=/;HttpOnly', 'X-Hudson-Theme': 'default', 'Content-Type': 'text/html;charset=UTF-8', 'Expires': 'Thu, 01 Jan 1970 00:00:00 GMT', 'X-SSH-Endpoint': '10.80.250.149:48964'}

Exception during execution: SystemExit: 1 in <script> at line number 113

问题

这种设置有什么先决条件吗?或者我是否遗漏了 Jenkins 配置中的任何内容?

如果有人可以指出任何方向,那将非常有帮助。到目前为止,尽管这两种工具默认情况下相互支持,但我无法找到任何适合这种组合(Jenkins+XLR)的文档。

注意:Jenkins 有一个 XL Release 插件,它有助于通过构建作业创建新版本。但我的要求完全相反,XLR 的任务将触发 Jenkins 构建工作。

4

1 回答 1

1

您是否在启用安全性的情况下运行 Jenkins?如果是这样,以下文章“配置 XL Release Jenkins 插件以调用安全的 Jenkins 安装”可能会有所帮助:

https://support.xebialabs.com/hc/communities/public/questions/202581015-How-To-Configure-the-XL-Release-Jenkins-plugin-to-invoke-secured-Jenkins-installations-by-sending-帖子

问候

ap

于 2015-06-08T13:48:15.097 回答